Package org.apache.commons.numbers.field
Class FP64
- java.lang.Object
-
- java.lang.Number
-
- org.apache.commons.numbers.field.FP64
-
- All Implemented Interfaces:
Serializable
,Comparable<FP64>
,Addition<FP64>
,Multiplication<FP64>
,NativeOperators<FP64>
public final class FP64 extends Number implements NativeOperators<FP64>, Comparable<FP64>
Wraps adouble
value in order to be used as a field element.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FP64
add(FP64 a)
byte
byteValue()
int
compareTo(FP64 other)
FP64
divide(FP64 a)
double
doubleValue()
boolean
equals(Object other)
float
floatValue()
int
hashCode()
int
intValue()
boolean
isOne()
boolean
isZero()
long
longValue()
FP64
multiply(int n)
FP64
multiply(FP64 a)
FP64
negate()
static FP64
of(double value)
Factory.FP64
one()
FP64
pow(int n)
FP64
reciprocal()
FP64
subtract(FP64 a)
String
toString()
FP64
zero()
-
Methods inherited from class java.lang.Number
shortValue
-
-
-
-
Method Detail
-
of
public static FP64 of(double value)
Factory.- Parameters:
value
- Value.- Returns:
- a new instance.
-
reciprocal
public FP64 reciprocal()
- Specified by:
reciprocal
in interfaceMultiplication<FP64>
-
multiply
public FP64 multiply(int n)
- Specified by:
multiply
in interfaceNativeOperators<FP64>
-
pow
public FP64 pow(int n)
- Specified by:
pow
in interfaceNativeOperators<FP64>
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in classNumber
-
floatValue
public float floatValue()
- Specified by:
floatValue
in classNumber
-
compareTo
public int compareTo(FP64 other)
- Specified by:
compareTo
in interfaceComparable<FP64>
-
one
public FP64 one()
- Specified by:
one
in interfaceMultiplication<FP64>
-
isOne
public boolean isOne()
- Specified by:
isOne
in interfaceMultiplication<FP64>
-
-