
Classes | |
| class | HTMLStringResult |
| internal class used for result of tryHTMLString More... | |
Public Member Functions | |
| Complex () | |
| Default constructor. | |
| Complex (double real) | |
| Constructor. | |
| Complex (double real, double imaginary) | |
| Constructor. | |
| boolean | isZero () |
| Test for equality to zero. | |
| Long | isInteger () |
| Test if an integer. | |
| boolean | isNegative () |
| Indicate whether or not Complex has leading negative sign. | |
| double | real () |
| Get the real part of the complex number. | |
| double | imaginary () |
| Get the real part of the complex number. | |
| Complex | conjugate () |
| Get the conjugate of this. | |
| Complex | negate () |
| Get the negative of this. | |
| double | abs () |
| Get the absolute value of this. | |
| double | arg () |
| Get the argument of this. | |
| Complex | inverse () |
| Get the inverse of this. | |
| Complex | imultiply () |
| Multiply this by i. | |
| Complex | scale (double real) |
| Scale this. | |
| Complex | add (Complex complex) |
| Add a complex number to this. | |
| Complex | subtract (Complex complex) |
| Subtract a complex number from this. | |
| Complex | multiply (Complex complex) |
| Multiply this by a complex number. | |
| Complex | divide (Complex complex) |
| Divide this by a complex number. | |
| Complex | square () |
| Get the square of this. | |
| Complex | cube () |
| Get the cube of this. | |
| Complex | sqrt () |
| Get the square root of this. | |
| Complex | exp () |
| Find exp( this ). | |
| Complex | tenx () |
| Find 10 to the power of this. | |
| Complex | pow (Complex r) |
| Find this to the power of r. | |
| Complex | root (Complex r) |
| Find rth root of this. | |
| Complex | log () |
| Find log( this ). | |
| Complex | log10 () |
| Find log10( this ). | |
| Complex | cuberoot () |
| Get the cube root of this. | |
| Complex | sin () |
| Get the sine of this. | |
| Complex | cos () |
| Get the cosine of this. | |
| Complex | tan () |
| Get the tangent of this. | |
| Complex | asin () |
| Get the arcsine of this. | |
| Complex | acos () |
| Get the arccosine of this. | |
| Complex | atan () |
| Get the arctangent of this. | |
| Complex | and (Complex z) |
| And with another complex. | |
| Complex | or (Complex z) |
| Or with another complex. | |
| Complex | xor (Complex z) |
| Xor with another complex. | |
| double | xor (double x, double y) |
| Calculates x XOR y. | |
| Complex | factorial () |
| Calculate factorial of this. | |
| Complex | combination (Complex z) |
| Calculates the number of unordered ways to choose y objects from this. | |
| Complex | permutation (Complex z) |
| Calculates the number of ordered ways to choose y objects from this. | |
| jscicalc.StringArray | toHTMLSubString (int maxChars, int precision, final Base base, final Notation notation, double polarFactor) |
| Function to create an HTML string representation of the complex number. | |
| jscicalc.StringArray | toHTMLParenString (int maxChars, int precision, final Base base, final Notation notation, double polarFactor) |
| int | compareTo (Complex complex) |
| The comparison operator. | |
Static Public Member Functions | |
| static Complex | polar (double r, double theta) |
| Constructor. | |
| static double | or (double x, double y) |
| Calculates x OR y. | |
| static void | main (String args[]) |
| Test code. | |
Static Public Attributes | |
| static final Complex | I = new Complex( 0, 1 ) |
| i | |
| static final double | smallImaginary = 1e-10 |
| A calculation (e.g. | |
Private Member Functions | |
| double | logabs () |
| Find log |this|. | |
| Complex | pow (int r) |
| Find power of this for nonnegative integral powers. | |
| Complex | root (int r) |
| Find root of this for integer. | |
| double | acosh_real (double y) |
| Used to compute arccosh where y greater than or equal to 1. | |
| Complex | asin_real (double a) |
| Used to compute arcsin where imaginary part is zero. | |
| Complex | acos_real (double a) |
| Used to compute arccos where imaginary part is zero. | |
| HTMLStringResult | tryHTMLString (final int maxChars, final int precision, final Base base, final Notation notation) |
| Internal function to create an HTML string representation of the complex number. | |
Static Private Member Functions | |
| static double | and (double x, double y) |
| Calculates x AND y. | |
| static double | factorial (long x) |
| Calculate factorial of x. | |
| static double | combination (long x, long y) |
| Calculates the number of unordered ways to choose y objects from x. | |
| static double | permutation (long x, long y) |
| Calculates the number of ordered ways to choose y objects from x. | |
| static int | min (int x, int y) |
| Used by tryHTMLString. | |
Private Attributes | |
| final double | real_part |
| The real part of the complex number. | |
| final double | imaginary_part |
| The imaginary part of the complex number. | |
Static Private Attributes | |
| static final Complex | THIRD = new Complex( 1 / (double)3 ) |
| Used for cube roots. | |
| static final Complex | LOG10 = new Complex( StrictMath.log( 10 ) ) |
| Used for tenx. | |
Complex numbers.
This is based on the GNU Scientific Library, http://gsl.gnu.org/, Copyright (C) 1996, 1997, 1998, 1999, 2000 Jorma Olavi Tätinen, Brian Gough and was suggested as an addition to the calculator by Sebastian Schneider ihi0 at sourceforge dot net.
| jscicalc.complex.Complex.Complex | ( | ) |
Default constructor.
Gives the complex number zero.
Referenced by jscicalc.complex.Complex.acos(), jscicalc.complex.Complex.acos_real(), jscicalc.complex.Complex.add(), jscicalc.complex.Complex.and(), jscicalc.complex.Complex.asin(), jscicalc.complex.Complex.asin_real(), jscicalc.complex.Complex.atan(), jscicalc.complex.Complex.combination(), jscicalc.complex.Complex.conjugate(), jscicalc.complex.Complex.cos(), jscicalc.complex.Complex.divide(), jscicalc.complex.Complex.exp(), jscicalc.complex.Complex.factorial(), jscicalc.complex.Complex.imultiply(), jscicalc.complex.Complex.inverse(), jscicalc.complex.Complex.log(), jscicalc.complex.Complex.main(), jscicalc.complex.Complex.multiply(), jscicalc.complex.Complex.negate(), jscicalc.complex.Complex.or(), jscicalc.complex.Complex.permutation(), jscicalc.complex.Complex.polar(), jscicalc.complex.Complex.pow(), jscicalc.complex.Complex.root(), jscicalc.complex.Complex.scale(), jscicalc.complex.Complex.sin(), jscicalc.complex.Complex.sqrt(), jscicalc.complex.Complex.subtract(), jscicalc.complex.Complex.tan(), and jscicalc.complex.Complex.xor().
| jscicalc.complex.Complex.Complex | ( | double | real | ) |
Constructor.
Converts real number to complex representation.
| real | The number to be converted |
| jscicalc.complex.Complex.Complex | ( | double | real, | |
| double | imaginary | |||
| ) |
Constructor.
Converts real and imaginary parts to complex number.
| real | The real part | |
| imaginary | The imaginary part |
References jscicalc.complex.Complex.imaginary_part, and jscicalc.complex.Complex.real_part.
| double jscicalc.complex.Complex.abs | ( | ) |
Get the absolute value of this.
References jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Test.checkNumber(), jscicalc.complex.Complex.compareTo(), jscicalc.complex.Format.Format(), jscicalc.complex.Format.formatStandard(), jscicalc.complex.Test.main(), jscicalc.complex.Complex.root(), and jscicalc.complex.Complex.tryHTMLString().
| Complex jscicalc.complex.Complex.acos | ( | ) |
Get the arccosine of this.
References jscicalc.complex.Complex.acos_real(), jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.I, jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.pobject.ACos.function().
| Complex jscicalc.complex.Complex.acos_real | ( | double | a | ) | [private] |
Used to compute arccos where imaginary part is zero.
| a | The real part |
References jscicalc.complex.Complex.acosh_real(), and jscicalc.complex.Complex.Complex().
Referenced by jscicalc.complex.Complex.acos().
| double jscicalc.complex.Complex.acosh_real | ( | double | y | ) | [private] |
Used to compute arccosh where y greater than or equal to 1.
| y | The number |
Referenced by jscicalc.complex.Complex.acos_real(), and jscicalc.complex.Complex.asin_real().
Add a complex number to this.
| complex | The addend |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.expression.Sum.add(), jscicalc.expression.Sum.auto_simplify(), jscicalc.complex.Complex.inverse(), jscicalc.expression.Sum.multiply(), jscicalc.expression.Sum.rMultiply(), jscicalc.complex.Complex.root(), jscicalc.CalculatorApplet.statMean(), jscicalc.CalculatorApplet.statSumSquares(), and jscicalc.expression.Sum.substitute().
And with another complex.
| z | The number to AND with this. |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
| static double jscicalc.complex.Complex.and | ( | double | x, | |
| double | y | |||
| ) | [static, private] |
Calculates x AND y.
Used internally for and( z ).
| x | The first value (left of symbol) | |
| y | The second value (right of symbol) |
| double jscicalc.complex.Complex.arg | ( | ) |
Get the argument of this.
Returns a value in the range (-Pi, Pi ).
References jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Test.checkNumber(), jscicalc.complex.Complex.compareTo(), jscicalc.complex.Format.Format(), jscicalc.complex.Format.formatStandard(), jscicalc.complex.Complex.log(), jscicalc.complex.Complex.pow(), jscicalc.complex.Complex.root(), and jscicalc.complex.Complex.tryHTMLString().
| Complex jscicalc.complex.Complex.asin | ( | ) |
Get the arcsine of this.
References jscicalc.complex.Complex.asin_real(), jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.I, jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.pobject.ASin.function().
| Complex jscicalc.complex.Complex.asin_real | ( | double | a | ) | [private] |
Used to compute arcsin where imaginary part is zero.
| a | The real part |
References jscicalc.complex.Complex.acosh_real(), and jscicalc.complex.Complex.Complex().
Referenced by jscicalc.complex.Complex.asin().
| Complex jscicalc.complex.Complex.atan | ( | ) |
Get the arctangent of this.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.I, jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.pobject.ATan.function().
Calculates the number of unordered ways to choose y objects from this.
Produces an error if this doesn’t make sense.
| z | The second value (right of symbol) |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Complex.combination().
| static double jscicalc.complex.Complex.combination | ( | long | x, | |
| long | y | |||
| ) | [static, private] |
Calculates the number of unordered ways to choose y objects from x.
Produces an error if this doesn’t make sense. Used internally.
| x | The first value (left of symbol) | |
| y | The second value (right of symbol) |
References jscicalc.complex.Complex.combination().
| int jscicalc.complex.Complex.compareTo | ( | Complex | complex | ) |
The comparison operator.
| complex | The Complex to be compared. |
References jscicalc.complex.Complex.abs(), and jscicalc.complex.Complex.arg().
Referenced by jscicalc.expression.Sum.compareTo().
| Complex jscicalc.complex.Complex.conjugate | ( | ) |
Get the conjugate of this.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
| Complex jscicalc.complex.Complex.cos | ( | ) |
Get the cosine of this.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.pobject.Cos.function().
| Complex jscicalc.complex.Complex.cube | ( | ) |
Get the cube of this.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.multiply(), and jscicalc.complex.Complex.square().
| Complex jscicalc.complex.Complex.cuberoot | ( | ) |
Get the cube root of this.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.root().
Divide this by a complex number.
| complex | The divisor. |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.expression.Product.auto_simplify(), jscicalc.expression.Product.divide(), jscicalc.complex.Complex.inverse(), jscicalc.expression.Product.Product(), jscicalc.complex.Complex.root(), jscicalc.CalculatorApplet.statMean(), jscicalc.CalculatorApplet.statPopulationStDev(), jscicalc.CalculatorApplet.statSampleStDev(), and jscicalc.expression.Product.substitute().
| Complex jscicalc.complex.Complex.exp | ( | ) |
Find exp( this ).
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.exp(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Complex.exp(), and jscicalc.complex.Complex.tenx().
| Complex jscicalc.complex.Complex.factorial | ( | ) |
Calculate factorial of this.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Complex.factorial().
| static double jscicalc.complex.Complex.factorial | ( | long | x | ) | [static, private] |
Calculate factorial of x.
Used internally.
| x | The value (left of symbol) |
References jscicalc.complex.Complex.factorial().
| double jscicalc.complex.Complex.imaginary | ( | ) |
Get the real part of the complex number.
References jscicalc.complex.Complex.imaginary_part.
Referenced by jscicalc.complex.Complex.abs(), jscicalc.complex.Complex.acos(), jscicalc.complex.Complex.add(), jscicalc.complex.Complex.and(), jscicalc.complex.Complex.arg(), jscicalc.complex.Complex.asin(), jscicalc.complex.Complex.atan(), jscicalc.complex.Test.checkNumber(), jscicalc.expression.Sum.clone(), jscicalc.expression.Product.clone(), jscicalc.complex.Complex.combination(), jscicalc.complex.Complex.conjugate(), jscicalc.complex.Complex.cos(), jscicalc.complex.Complex.divide(), jscicalc.complex.Complex.exp(), jscicalc.complex.Complex.factorial(), jscicalc.complex.Format.Format(), jscicalc.complex.Format.formatStandard(), jscicalc.pobject.Tan.function(), jscicalc.pobject.Sin.function(), jscicalc.graph.Locus.function(), jscicalc.pobject.Cos.function(), jscicalc.pobject.ATan.function(), jscicalc.pobject.ASin.function(), jscicalc.pobject.ACos.function(), jscicalc.Parser.getListAsStringVector(), jscicalc.complex.Complex.imultiply(), jscicalc.complex.Complex.inverse(), jscicalc.complex.Complex.isInteger(), jscicalc.complex.Complex.isNegative(), jscicalc.complex.Complex.isZero(), jscicalc.complex.Complex.logabs(), jscicalc.complex.Test.main(), jscicalc.complex.Complex.main(), jscicalc.complex.Complex.multiply(), jscicalc.complex.Complex.negate(), jscicalc.complex.Complex.or(), jscicalc.complex.Complex.permutation(), jscicalc.complex.Complex.pow(), jscicalc.complex.Complex.root(), jscicalc.complex.Complex.scale(), jscicalc.complex.Complex.sin(), jscicalc.complex.Complex.sqrt(), jscicalc.complex.Complex.subtract(), jscicalc.complex.Complex.tan(), jscicalc.complex.Complex.toHTMLParenString(), jscicalc.complex.Complex.toHTMLSubString(), jscicalc.complex.Complex.tryHTMLString(), and jscicalc.complex.Complex.xor().
| Complex jscicalc.complex.Complex.imultiply | ( | ) |
Multiply this by i.
This function is used so that the calculator can enter complex numbers in convenient form without having to know when parsing a double that it will later be converted to a complex imaginary part.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
| Complex jscicalc.complex.Complex.inverse | ( | ) |
Get the inverse of this.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.add(), jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.divide(), jscicalc.complex.Complex.imaginary(), jscicalc.complex.Complex.multiply(), jscicalc.complex.Complex.negate(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Complex.pow(), and jscicalc.complex.Complex.root().
| Long jscicalc.complex.Complex.isInteger | ( | ) |
Test if an integer.
References jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.expression.Power.auto_simplify().
| boolean jscicalc.complex.Complex.isNegative | ( | ) |
Indicate whether or not Complex has leading negative sign.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.expression.Sum.isNegative(), jscicalc.expression.Product.isNegative(), and jscicalc.expression.Sum.toHTMLSubString().
| boolean jscicalc.complex.Complex.isZero | ( | ) |
Test for equality to zero.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.expression.Sum.isNegative(), jscicalc.expression.Product.isNegative(), jscicalc.expression.SumOrProduct.isZero(), jscicalc.expression.Sum.toHTMLParenString(), jscicalc.expression.Sum.unBox(), and jscicalc.expression.Product.unBox().
| Complex jscicalc.complex.Complex.log | ( | ) |
Find log( this ).
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.arg(), jscicalc.complex.Complex.Complex(), and jscicalc.complex.Complex.logabs().
Referenced by jscicalc.complex.Complex.log10().
| Complex jscicalc.complex.Complex.log10 | ( | ) |
Find log10( this ).
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.log(), and jscicalc.complex.Complex.scale().
| double jscicalc.complex.Complex.logabs | ( | ) | [private] |
Find log |this|.
References jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Complex.log(), jscicalc.complex.Complex.pow(), and jscicalc.complex.Complex.root().
| static void jscicalc.complex.Complex.main | ( | String | args[] | ) | [static] |
| static int jscicalc.complex.Complex.min | ( | int | x, | |
| int | y | |||
| ) | [static, private] |
Used by tryHTMLString.
Finds the smaller of x and y
| x | The first operand | |
| y | The second operand |
Multiply this by a complex number.
| complex | The multiplier. |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.expression.Sum.auto_simplify(), jscicalc.expression.Product.auto_simplify(), jscicalc.complex.Complex.cube(), jscicalc.complex.Complex.inverse(), jscicalc.expression.Product.multiply(), jscicalc.complex.Complex.pow(), jscicalc.complex.Complex.square(), jscicalc.expression.Product.substitute(), and jscicalc.complex.Complex.tenx().
| Complex jscicalc.complex.Complex.negate | ( | ) |
Get the negative of this.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Complex.inverse(), jscicalc.expression.Sum.negate(), and jscicalc.expression.Product.negate().
Or with another complex.
| z | The number to OR with this. |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
| static double jscicalc.complex.Complex.or | ( | double | x, | |
| double | y | |||
| ) | [static] |
Calculates x OR y.
Used internally for and( z ).
| x | The first value (left of symbol) | |
| y | The second value (right of symbol) |
| static double jscicalc.complex.Complex.permutation | ( | long | x, | |
| long | y | |||
| ) | [static, private] |
Calculates the number of ordered ways to choose y objects from x.
Produces an error if this doesn’t make sense. Used internally.
| x | The first value (left of symbol) | |
| y | The second value (right of symbol) |
References jscicalc.complex.Complex.permutation().
Calculates the number of ordered ways to choose y objects from this.
Produces an error if this doesn’t make sense.
| z | The second value (right of symbol) |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Complex.permutation().
| static Complex jscicalc.complex.Complex.polar | ( | double | r, | |
| double | theta | |||
| ) | [static] |
Constructor.
Converts real and imaginary parts to complex number. Probably not needed.
| r | The distance from zero | |
| theta | The angle |
References jscicalc.complex.Complex.Complex().
| Complex jscicalc.complex.Complex.pow | ( | int | r | ) | [private] |
Find power of this for nonnegative integral powers.
| r | the power |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), jscicalc.complex.Complex.multiply(), jscicalc.complex.Complex.real(), and jscicalc.complex.Complex.square().
Referenced by jscicalc.expression.Power.auto_simplify(), jscicalc.expression.Product.integer_power(), jscicalc.complex.Complex.pow(), and jscicalc.complex.Complex.root().
Find this to the power of r.
| r | the power |
References jscicalc.complex.Complex.arg(), jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), jscicalc.complex.Complex.inverse(), jscicalc.complex.Complex.logabs(), jscicalc.complex.Complex.pow(), and jscicalc.complex.Complex.real().
| double jscicalc.complex.Complex.real | ( | ) |
Get the real part of the complex number.
References jscicalc.complex.Complex.real_part.
Referenced by jscicalc.complex.Complex.abs(), jscicalc.complex.Complex.acos(), jscicalc.complex.Complex.add(), jscicalc.complex.Complex.and(), jscicalc.complex.Complex.arg(), jscicalc.complex.Complex.asin(), jscicalc.complex.Complex.atan(), jscicalc.complex.Test.checkNumber(), jscicalc.expression.Sum.clone(), jscicalc.expression.Product.clone(), jscicalc.complex.Complex.combination(), jscicalc.complex.Complex.conjugate(), jscicalc.complex.Complex.cos(), jscicalc.complex.Complex.divide(), jscicalc.complex.Complex.exp(), jscicalc.complex.Complex.factorial(), jscicalc.complex.Format.Format(), jscicalc.complex.Format.formatStandard(), jscicalc.graph.Locus.function(), jscicalc.pobject.ASin.function(), jscicalc.pobject.ACos.function(), jscicalc.Parser.getListAsStringVector(), jscicalc.complex.Complex.imultiply(), jscicalc.complex.Complex.inverse(), jscicalc.complex.Complex.isInteger(), jscicalc.complex.Complex.isNegative(), jscicalc.complex.Complex.isZero(), jscicalc.complex.Complex.logabs(), jscicalc.complex.Test.main(), jscicalc.ParseBase.main(), jscicalc.complex.Complex.main(), jscicalc.complex.Complex.multiply(), jscicalc.complex.Complex.negate(), jscicalc.complex.Complex.or(), jscicalc.complex.Complex.permutation(), jscicalc.complex.Complex.pow(), jscicalc.complex.Complex.root(), jscicalc.complex.Complex.scale(), jscicalc.complex.Complex.sin(), jscicalc.complex.Complex.sqrt(), jscicalc.complex.Complex.subtract(), jscicalc.complex.Complex.tan(), jscicalc.complex.Complex.toHTMLParenString(), jscicalc.complex.Complex.toHTMLSubString(), jscicalc.complex.Complex.tryHTMLString(), and jscicalc.complex.Complex.xor().
| Complex jscicalc.complex.Complex.root | ( | int | r | ) | [private] |
Find root of this for integer.
| r | the root |
References jscicalc.complex.Complex.abs(), jscicalc.complex.Complex.add(), jscicalc.complex.Complex.arg(), jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.divide(), jscicalc.complex.Complex.imaginary(), jscicalc.complex.Complex.logabs(), jscicalc.complex.Complex.pow(), jscicalc.complex.Complex.real(), jscicalc.complex.Complex.scale(), jscicalc.complex.Complex.sqrt(), and jscicalc.complex.Complex.subtract().
Referenced by jscicalc.complex.Complex.cuberoot(), jscicalc.complex.Complex.main(), and jscicalc.complex.Complex.root().
Find rth root of this.
| r | The value such that pow( result, r ) = this |
References jscicalc.complex.Complex.abs(), jscicalc.complex.Complex.arg(), jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), jscicalc.complex.Complex.inverse(), jscicalc.complex.Complex.pow(), jscicalc.complex.Complex.real(), and jscicalc.complex.Complex.root().
| Complex jscicalc.complex.Complex.scale | ( | double | real | ) |
Scale this.
| real | The scale factor |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.pobject.Tan.function(), jscicalc.pobject.Sin.function(), jscicalc.pobject.Cos.function(), jscicalc.pobject.ATan.function(), jscicalc.pobject.ASin.function(), jscicalc.pobject.ACos.function(), jscicalc.complex.Complex.log10(), and jscicalc.complex.Complex.root().
| Complex jscicalc.complex.Complex.sin | ( | ) |
Get the sine of this.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.pobject.Sin.function().
| Complex jscicalc.complex.Complex.sqrt | ( | ) |
Get the square root of this.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Complex.root(), jscicalc.CalculatorApplet.statPopulationStDev(), and jscicalc.CalculatorApplet.statSampleStDev().
| Complex jscicalc.complex.Complex.square | ( | ) |
Get the square of this.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.multiply().
Referenced by jscicalc.complex.Complex.cube(), jscicalc.complex.Complex.pow(), and jscicalc.CalculatorApplet.statSumSquares().
Subtract a complex number from this.
| complex | The subtrahend |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.complex.Complex.root(), jscicalc.CalculatorApplet.statMean(), jscicalc.CalculatorApplet.statSumSquares(), and jscicalc.expression.Product.unBox().
| Complex jscicalc.complex.Complex.tan | ( | ) |
Get the tangent of this.
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
Referenced by jscicalc.pobject.Tan.function().
| Complex jscicalc.complex.Complex.tenx | ( | ) |
Find 10 to the power of this.
Reimplemented from jscicalc.OObject.
References jscicalc.complex.Complex.exp(), jscicalc.complex.Complex.LOG10, and jscicalc.complex.Complex.multiply().
| jscicalc.StringArray jscicalc.complex.Complex.toHTMLParenString | ( | int | maxChars, | |
| int | precision, | |||
| final Base | base, | |||
| final Notation | notation, | |||
| double | polarFactor | |||
| ) |
References jscicalc.StringArray.add(), jscicalc.Notation.complex(), jscicalc.complex.Complex.imaginary(), jscicalc.complex.Complex.HTMLStringResult.parentheses, jscicalc.complex.Complex.real(), jscicalc.Notation.rectangular(), jscicalc.Notation.setComplex(), jscicalc.Notation.setNonComplex(), jscicalc.Notation.setPolar(), jscicalc.Notation.setRectangular(), jscicalc.Notation.setScientific(), jscicalc.Notation.setStandard(), jscicalc.Notation.standard(), jscicalc.StringArray.StringArray(), jscicalc.complex.Complex.HTMLStringResult.stringVector, and jscicalc.complex.Complex.tryHTMLString().
Referenced by jscicalc.expression.Sum.toHTMLParenString(), jscicalc.expression.Product.toHTMLParenString(), jscicalc.expression.Product.toHTMLParenStringL(), and jscicalc.expression.Product.toHTMLSubString().
| jscicalc.StringArray jscicalc.complex.Complex.toHTMLSubString | ( | int | maxChars, | |
| int | precision, | |||
| final Base | base, | |||
| final Notation | notation, | |||
| double | polarFactor | |||
| ) |
Function to create an HTML string representation of the complex number.
This has six arguments. First, we need to know the maximum number of characters available and the desired precision of the complex numbers. These are given as two arguments. Then we need to know the base Then we need to know whether the Complex number is to be represented in standard or scientific notation. These give the last two arguments. Finally we need to know if we must use complex notation. If not we can ignore small imaginary parts (and zero real part).
| maxChars | The maximum number of (visible) characters we can use | |
| precision | The desired number of significant figures | |
| base | The required base | |
| notation | The notation to use to display this value | |
| polarFactor | Not used |
References jscicalc.Notation.complex(), jscicalc.complex.Complex.imaginary(), jscicalc.complex.Complex.real(), jscicalc.Notation.rectangular(), jscicalc.Notation.setComplex(), jscicalc.Notation.setNonComplex(), jscicalc.Notation.setPolar(), jscicalc.Notation.setRectangular(), jscicalc.Notation.setScientific(), jscicalc.Notation.setStandard(), jscicalc.Notation.standard(), jscicalc.StringArray.StringArray(), jscicalc.complex.Complex.HTMLStringResult.stringVector, and jscicalc.complex.Complex.tryHTMLString().
Referenced by jscicalc.expression.Sum.toHTMLSubString().
| HTMLStringResult jscicalc.complex.Complex.tryHTMLString | ( | final int | maxChars, | |
| final int | precision, | |||
| final Base | base, | |||
| final Notation | notation | |||
| ) | [private] |
Internal function to create an HTML string representation of the complex number.
This has five arguments. First, we need to know the maximum number of characters available and the desired precision of the complex numbers. These are given as two arguments. Then we need to know the base Then we need to know whether the Complex number is to be represented in standard or scientific notation. These give the last two arguments. Finally we need to know if we must use complex notation. If not we can ignore small imaginary parts (and zero real part). The fifth parameter is returned as TRUE or FALSE according as the representation would or would not need parentheses if expressed as part of a product.
| maxChars | The maximum number of (visible) characters we can use | |
| precision | The desired number of significant figures | |
| base | The required base | |
| notation | The notation to use to display this value |
References jscicalc.complex.Complex.abs(), jscicalc.complex.Complex.arg(), jscicalc.Notation.complex(), jscicalc.complex.DoubleFormat.getAbsNumber(), jscicalc.complex.Complex.imaginary(), jscicalc.complex.DoubleFormat.NullRepresentation, jscicalc.complex.Complex.HTMLStringResult.parentheses, jscicalc.Notation.polar(), jscicalc.complex.Complex.real(), jscicalc.Notation.rectangular(), jscicalc.complex.DoubleFormat.representation(), jscicalc.Notation.scientific(), jscicalc.complex.DoubleFormat.setNotation(), jscicalc.complex.DoubleFormat.setPrecision(), jscicalc.Notation.setScientific(), jscicalc.complex.Complex.smallImaginary, jscicalc.StringArray.StringArray(), and jscicalc.complex.Complex.HTMLStringResult.stringVector.
Referenced by jscicalc.complex.Complex.toHTMLParenString(), and jscicalc.complex.Complex.toHTMLSubString().
| double jscicalc.complex.Complex.xor | ( | double | x, | |
| double | y | |||
| ) |
Calculates x XOR y.
Used internally by xor().
| x | The first value (left of symbol) | |
| y | The second value (right of symbol) |
Xor with another complex.
| z | The number to XOR with this. |
References jscicalc.complex.Complex.Complex(), jscicalc.complex.Complex.imaginary(), and jscicalc.complex.Complex.real().
final Complex jscicalc.complex.Complex.I = new Complex( 0, 1 ) [static] |
i
Referenced by jscicalc.complex.Complex.acos(), jscicalc.complex.Complex.asin(), and jscicalc.complex.Complex.atan().
final double jscicalc.complex.Complex.imaginary_part [private] |
The imaginary part of the complex number.
Referenced by jscicalc.complex.Complex.Complex(), and jscicalc.complex.Complex.imaginary().
final Complex jscicalc.complex.Complex.LOG10 = new Complex( StrictMath.log( 10 ) ) [static, private] |
Used for tenx.
Referenced by jscicalc.complex.Complex.tenx().
final double jscicalc.complex.Complex.real_part [private] |
The real part of the complex number.
Referenced by jscicalc.complex.Complex.Complex(), and jscicalc.complex.Complex.real().
final double jscicalc.complex.Complex.smallImaginary = 1e-10 [static] |
A calculation (e.g.
sin) might create a small imaginary part. If it is smaller than this number in size AND we want to ignore small complex parts, ignore it.
Referenced by jscicalc.complex.Complex.tryHTMLString().
final Complex jscicalc.complex.Complex.THIRD = new Complex( 1 / (double)3 ) [static, private] |
Used for cube roots.
1.7.1