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)
Deprecated.
|
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) |
static DFloNum |
valueOf(double value) |
void |
writeExternal(java.io.ObjectOutput out) |
static DFloNum |
zero() |
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, vectorPart
add, colatitude, compare, complexPart, divide, equals, imMinusOne, imOne, jm, km, longitude, make, make, neg, polar, polar, power, times
add, compare, divide, doubleImagValue, doubleJmagValue, doubleKmagValue, doubleRealValue, equals, jmMinusOne, jmOne, kmMinusOne, kmOne, make, make, neg, number, polar, polar, power, times
add, compare, dimensions, divide, imValue, jmValue, kmValue, make, make, make, reValue, times, unit
add, asNumericOrNull, div_inv, floatValue, geq, grt, intValue, mul_ident, sub
public DFloNum()
public DFloNum(double value)
public DFloNum(java.lang.String s) throws java.lang.NumberFormatException
java.lang.NumberFormatException
@Deprecated public static DFloNum make(double value)
public static DFloNum valueOf(double value)
public static DFloNum zero()
public static DFloNum asDFloNumOrNull(java.lang.Object value)
public final double doubleValue()
Quantity
doubleValue
in class Quaternion
public long longValue()
longValue
in class Quaternion
public int hashCode()
hashCode
in class java.lang.Object
public Numeric add(java.lang.Object y, int k)
Numeric
public Numeric addReversed(Numeric x, int k)
Numeric
x+k&this
.addReversed
in class Complex
public Numeric mulReversed(Numeric x)
mulReversed
in class Complex
public static final DFloNum one()
public Numeric divReversed(Numeric x)
divReversed
in class Complex
public Numeric power(IntNum y)
Numeric
y < 0
, returns div_inv of the result.public boolean isNegative()
isNegative
in class RealNum
public 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)
Numeric
this
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 Quantity
public 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.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException