| java.lang.Object java.lang.Number gnu.math.Numeric gnu.math.Quantity gnu.math.Complex gnu.math.RealNum
All known Subclasses: gnu.math.DFloNum, gnu.math.RatNum,
Method Summary | |
public Numeric | abs() | public static RealNum | add(RealNum x, RealNum y, int k) | abstract public Numeric | add(Object obj, int k) | public java.math.BigDecimal | asBigDecimal() | public int | compareTo(Object o) Implements the Comparable interface. | abstract public Numeric | div(Object obj) | public static RealNum | divide(RealNum x, RealNum y) | public Complex | exp() | final public RealNum | im() | abstract public boolean | isNegative() | public boolean | isZero() | public Complex | log() | public RealNum | max(RealNum x) | public RealNum | min(RealNum x) | abstract public Numeric | mul(Object obj) | final public RealNum | re() | final public RealNum | rneg() | abstract public int | sign() Return 1 if >0; 0 if ==0; -1 if <0; -2 if NaN. | final public Complex | sin() | final public Complex | sqrt() | public static RealNum | times(RealNum x, RealNum y) | public RatNum | toExact() Convert to an exact number. | public IntNum | toExactInt(int rounding_mode) Converts to an exact integer, with specified rounding mode. | public static IntNum | toExactInt(double value, int rounding_mode) Converts real to an exact integer, with specified rounding mode. | public static IntNum | toExactInt(double value) Converts an integral double (such as a toInt result) to an IntNum. | public static double | toInt(double d, int rounding_mode) Converts a real to an integer, according to a specified rounding mode.
Note an inexact argument gives an inexact result, following Scheme.
See also RatNum.toExactInt. | public RealNum | toInt(int rounding_mode) Converts a real to an integer, according to a specified rounding mode.
Note an inexact argument gives an inexact result, following Scheme.
See also toExactInt. | public static IntNum | toScaledInt(double f, int k) Convert double to (rounded) integer, after multiplying by 10**k. | public static IntNum | toScaledInt(RatNum r, int k) Convert rational to (rounded) integer, after multiplying by 10**k. | public IntNum | toScaledInt(int k) Convert this to (rounded) integer, after multiplying by 10**k. | public static String | toStringDecimal(String dstr) | public static String | toStringScientific(float d) | public static String | toStringScientific(double d) | public static String | toStringScientific(String dstr) Convert result of Double.toString or Float.toString to
scientific notation. | public static int | toStringScientific(String dstr, StringBuffer sbuf) |
compareTo | public int compareTo(Object o)(Code) | | Implements the Comparable interface.
This ordering isn't fully consistent with equals, since say
it returns 0 when comparing 1.5 and 3/2, though they are not equals.
|
isNegative | abstract public boolean isNegative()(Code) | | |
isZero | public boolean isZero()(Code) | | |
sign | abstract public int sign()(Code) | | Return 1 if >0; 0 if ==0; -1 if <0; -2 if NaN.
|
toExact | public RatNum toExact()(Code) | | Convert to an exact number.
Implements the Scheme inexact->exact (for real numbers).
|
toExactInt | public IntNum toExactInt(int rounding_mode)(Code) | | Converts to an exact integer, with specified rounding mode.
|
toExactInt | public static IntNum toExactInt(double value, int rounding_mode)(Code) | | Converts real to an exact integer, with specified rounding mode.
|
toExactInt | public static IntNum toExactInt(double value)(Code) | | Converts an integral double (such as a toInt result) to an IntNum.
|
toInt | public static double toInt(double d, int rounding_mode)(Code) | | Converts a real to an integer, according to a specified rounding mode.
Note an inexact argument gives an inexact result, following Scheme.
See also RatNum.toExactInt.
|
toInt | public RealNum toInt(int rounding_mode)(Code) | | Converts a real to an integer, according to a specified rounding mode.
Note an inexact argument gives an inexact result, following Scheme.
See also toExactInt.
|
toScaledInt | public static IntNum toScaledInt(double f, int k)(Code) | | Convert double to (rounded) integer, after multiplying by 10**k.
|
toScaledInt | public static IntNum toScaledInt(RatNum r, int k)(Code) | | Convert rational to (rounded) integer, after multiplying by 10**k.
|
toScaledInt | public IntNum toScaledInt(int k)(Code) | | Convert this to (rounded) integer, after multiplying by 10**k.
|
toStringScientific | public static String toStringScientific(float d)(Code) | | |
toStringScientific | public static String toStringScientific(double d)(Code) | | |
toStringScientific | public static String toStringScientific(String dstr)(Code) | | Convert result of Double.toString or Float.toString to
scientific notation.
Does not validate the input.
|
Methods inherited from gnu.math.Complex | public Numeric abs()(Code)(Java Doc) public static Complex add(Complex x, Complex y, int k)(Code)(Java Doc) public Numeric add(Object y, int k)(Code)(Java Doc) public Numeric addReversed(Numeric x, int k)(Code)(Java Doc) public RealNum angle()(Code)(Java Doc) public static int compare(Complex x, Complex y)(Code)(Java Doc) public int compare(Object obj)(Code)(Java Doc) public Numeric div(Object y)(Code)(Java Doc) public Numeric divReversed(Numeric x)(Code)(Java Doc) public static Complex divide(Complex x, Complex y)(Code)(Java Doc) public double doubleImagValue()(Code)(Java Doc) final public double doubleRealValue()(Code)(Java Doc) public double doubleValue()(Code)(Java Doc) public static boolean equals(Complex x, Complex y)(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public Complex exp()(Code)(Java Doc) public static CComplex imMinusOne()(Code)(Java Doc) public static CComplex imOne()(Code)(Java Doc) public boolean isExact()(Code)(Java Doc) public boolean isZero()(Code)(Java Doc) public Complex log()(Code)(Java Doc) public long longValue()(Code)(Java Doc) public static Complex make(RealNum re, RealNum im)(Code)(Java Doc) public static Complex make(double re, double im)(Code)(Java Doc) public Numeric mul(Object y)(Code)(Java Doc) public Numeric mulReversed(Numeric x)(Code)(Java Doc) public static Complex neg(Complex x)(Code)(Java Doc) public Numeric neg()(Code)(Java Doc) public Complex number()(Code)(Java Doc) public static DComplex polar(double r, double t)(Code)(Java Doc) public static DComplex polar(RealNum r, RealNum t)(Code)(Java Doc) public static Complex power(Complex x, Complex y)(Code)(Java Doc) public Complex sqrt()(Code)(Java Doc) public static Complex times(Complex x, Complex y)(Code)(Java Doc) public String toString(int radix)(Code)(Java Doc)
|
Methods inherited from gnu.math.Quantity | public Numeric abs()(Code)(Java Doc) public static Quantity add(Quantity x, Quantity y, int k)(Code)(Java Doc) public Numeric add(Object y, int k)(Code)(Java Doc) public Numeric addReversed(Numeric x, int k)(Code)(Java Doc) public static int compare(Quantity x, Quantity y)(Code)(Java Doc) public int compare(Object obj)(Code)(Java Doc) public int compareReversed(Numeric x)(Code)(Java Doc) public Dimensions dimensions()(Code)(Java Doc) public Numeric div(Object y)(Code)(Java Doc) public Numeric divReversed(Numeric x)(Code)(Java Doc) public static Quantity divide(Quantity x, Quantity y)(Code)(Java Doc) public double doubleImagValue()(Code)(Java Doc) public double doubleValue()(Code)(Java Doc) public RealNum im()(Code)(Java Doc) final public double imValue()(Code)(Java Doc) public static Quantity make(Complex x, Unit u)(Code)(Java Doc) public static Quantity make(RealNum re, RealNum im, Unit unit)(Code)(Java Doc) public static Quantity make(double re, double im, Unit unit)(Code)(Java Doc) public Numeric mul(Object y)(Code)(Java Doc) public Numeric mulReversed(Numeric x)(Code)(Java Doc) public Numeric neg()(Code)(Java Doc) abstract public Complex number()(Code)(Java Doc) public RealNum re()(Code)(Java Doc) final public double reValue()(Code)(Java Doc) public static Quantity times(Quantity x, Quantity y)(Code)(Java Doc) public String toString(int radix)(Code)(Java Doc) public Unit unit()(Code)(Java Doc)
|
|
|