public class DFloNum extends RealNum implements java.io.Externalizable
| Constructor and Description |
|---|
DFloNum() |
DFloNum(double value) |
DFloNum(java.lang.String s) |
| Modifier and Type | Method and Description |
|---|---|
Numeric |
add(java.lang.Object y,
int k)
Return this + k * obj.
|
Numeric |
addReversed(Numeric x,
int k)
Calculate x+k&this.
|
static DFloNum |
asDFloNumOrNull(java.lang.Object value) |
static int |
compare(double x,
double y) |
static int |
compare(IntNum x_num,
IntNum x_den,
double y)
Compare (x_num/x_den) with toExact(y).
|
int |
compare(java.lang.Object obj)
Return an integer for which of
this or obj is larger. |
int |
compareReversed(Numeric x) |
Numeric |
div(java.lang.Object y) |
Numeric |
divReversed(Numeric x) |
double |
doubleValue()
The value of the real component, as a double.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isExact() |
boolean |
isNegative() |
boolean |
isZero() |
long |
longValue() |
static DFloNum |
make(double value) |
Numeric |
mul(java.lang.Object y) |
Numeric |
mulReversed(Numeric x) |
Numeric |
neg() |
static DFloNum |
one() |
Numeric |
power(IntNum y)
Return this raised to an integer power.
|
void |
readExternal(java.io.ObjectInput in) |
int |
sign()
Return 1 if >0; 0 if ==0; -1 if <0; -2 if NaN.
|
static RatNum |
toExact(double value)
Converts to the closest exact rational value.
|
java.lang.String |
toString() |
java.lang.String |
toString(int radix) |
void |
writeExternal(java.io.ObjectOutput out) |
abs, add, asBigDecimal, asRealNumOrNull, compareTo, divide, exp, im, log, max, min, re, rneg, sin, sqrt, times, toExact, toExactInt, toExactInt, toExactInt, toInexact, toInt, toInt, toScaledInt, toScaledInt, toScaledInt, toStringDecimal, toStringScientific, toStringScientific, toStringScientific, toStringScientificadd, angle, compare, divide, doubleImagValue, doubleRealValue, equals, imMinusOne, imOne, make, make, neg, number, polar, polar, power, timesadd, compare, dimensions, divide, imValue, make, make, make, reValue, times, unitadd, asNumericOrNull, div_inv, floatValue, geq, grt, intValue, mul_ident, subpublic DFloNum()
public DFloNum(double value)
public DFloNum(java.lang.String s)
throws java.lang.NumberFormatException
java.lang.NumberFormatExceptionpublic static DFloNum make(double value)
public static DFloNum asDFloNumOrNull(java.lang.Object value)
public final double doubleValue()
QuantitydoubleValue in class Complexpublic int hashCode()
hashCode in class java.lang.Objectpublic Numeric add(java.lang.Object y, int k)
Numericpublic Numeric addReversed(Numeric x, int k)
NumericaddReversed in class Complexpublic Numeric mulReversed(Numeric x)
mulReversed in class Complexpublic static final DFloNum one()
public Numeric divReversed(Numeric x)
divReversed in class Complexpublic Numeric power(IntNum y)
Numericy < 0, returns div_inv of the result.public boolean isNegative()
isNegative in class RealNumpublic int sign()
RealNumpublic static int compare(double x,
double y)
public static int compare(IntNum x_num, IntNum x_den, double y)
public int compare(java.lang.Object obj)
Numericthis or obj is larger.
Return 1 if this>obj; 0 if this==obj;
-1 if this<obj;
-2 if this!=obj otherwise (for example if either is NaN);
-3 if not comparable (incompatible types).public int compareReversed(Numeric x)
compareReversed in class Quantitypublic static RatNum toExact(double value)
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundException