Package jscicalc.complex

Examples of jscicalc.complex.Complex.real()


    PObject p = (PObject)o;
    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


    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 {
      return x.acos( angleType );
  }
View Full Code Here

  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

      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() );
      }
  }
  return Double.NaN;
    }
   
View Full Code Here

    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 {
      return x.asin( angleType );
  }
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.