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() |
static java.lang.String |
toString(double value) |
java.lang.String |
toString(int radix) |
void |
writeExternal(java.io.ObjectOutput out) |
abs, add, angle, asBigDecimal, asRealNumOrNull, classifyFinite, compareTo, conjugate, cos, divide, exp, im, isReal, log, max, min, re, rneg, sin, sqrt, tan, times, toExact, toExactInt, toExactInt, toExactInt, toInexact, toInt, toInt, toScaledInt, toScaledInt, toScaledInt, toStringDecimal, toStringScientific, toStringScientific, toStringScientific, toStringScientific, unitQuaternion, unitVector, vectorPartadd, colatitude, compare, complexPart, divide, equals, imMinusOne, imOne, jm, km, longitude, make, make, neg, polar, polar, power, timesadd, compare, divide, doubleImagValue, doubleJmagValue, doubleKmagValue, doubleRealValue, equals, jmMinusOne, jmOne, kmMinusOne, kmOne, make, make, neg, number, polar, polar, power, timesadd, compare, dimensions, divide, imValue, jmValue, kmValue, 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 Quaternionpublic long longValue()
longValue in class Quaternionpublic 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()
RealNum>0; 0 if ==0; -1 if <0; -2 if NaN.public 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 static java.lang.String toString(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