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, toStringScientific
add, angle, compare, divide, doubleImagValue, doubleRealValue, equals, imMinusOne, imOne, make, make, neg, number, polar, polar, power, times
add, compare, dimensions, divide, imValue, 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
public static DFloNum make(double value)
public static DFloNum asDFloNumOrNull(java.lang.Object value)
public final double doubleValue()
Quantity
doubleValue
in class Complex
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
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
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 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