Examples of imaginary()


Examples of jscicalc.complex.Complex.imaginary()

     * @return The result of the operation
     */
    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && Math.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      return c.scale( scale ).sin();
  } else {
      return x.sin( angleType );
  }
View Full Code Here

Examples of jscicalc.complex.Complex.imaginary()

     * @return The result of the operation
     */
    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      return c.scale( scale ).cos();
  } else {
      return x.cos( angleType );
  }
View Full Code Here

Examples of jscicalc.complex.Complex.imaginary()

     * @return The result of the operation
     */
    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      return c.scale( scale ).tan();
  } else {
      return x.tan( angleType );
  }
View Full Code Here

Examples of jscicalc.complex.Complex.imaginary()

    for( String s : p.name_array() )
        c.add( s );
      } else if( o instanceof Complex ){
    Complex z = (Complex)o;
    String s = Double.toString( z.real() )
        + "+i" + Double.toString( z.imaginary() );
    c.add( s );
      } else ifo instanceof Double ){
    Double d = (Double)o;
    c.add( d.toString() );
      }
View Full Code Here

Examples of jscicalc.complex.Complex.imaginary()

     * @return The result of the operation
     */
    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      if( scale != 1 && StrictMath.abs( c.real() ) > 1 )
    throw new RuntimeException( "Error" );
      return c.acos().scale( iscale );
  } else {
View Full Code Here

Examples of jscicalc.complex.Complex.imaginary()

  System.out.print( t.toModelX( x ) );
  System.out.print( " ) = " );
  OObject p = substitute( t.toModelX( x ) );
  if( p instanceof Complex ){
      Complex z = (Complex)p;
      if( Math.abs( z.imaginary() ) < epsilon ){
    double y = z.real();
    System.out.print( y );
    System.out.print( "]" );
    return t.toViewY( z.real() );
      }
View Full Code Here

Examples of jscicalc.complex.Complex.imaginary()

     * @return The result of the operation
     */
    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      return c.atan().scale( iscale );
  } else {
      return x.atan( angleType );
  }
View Full Code Here

Examples of jscicalc.complex.Complex.imaginary()

     * @return The result of the operation
     */
    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      if( scale != 1 && StrictMath.abs( c.real() ) > 1 )
    throw new RuntimeException( "Error" );
      return c.asin().scale( iscale );
  } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.