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 adoublevalue 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 FP64add(FP64 a)bytebyteValue()intcompareTo(FP64 other)FP64divide(FP64 a)doubledoubleValue()booleanequals(Object other)floatfloatValue()inthashCode()intintValue()booleanisOne()booleanisZero()longlongValue()FP64multiply(int n)FP64multiply(FP64 a)FP64negate()static FP64of(double value)Factory.FP64one()FP64pow(int n)FP64reciprocal()FP64subtract(FP64 a)StringtoString()FP64zero()-
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:
reciprocalin interfaceMultiplication<FP64>
-
multiply
public FP64 multiply(int n)
- Specified by:
multiplyin interfaceNativeOperators<FP64>
-
pow
public FP64 pow(int n)
- Specified by:
powin interfaceNativeOperators<FP64>
-
doubleValue
public double doubleValue()
- Specified by:
doubleValuein classNumber
-
floatValue
public float floatValue()
- Specified by:
floatValuein classNumber
-
compareTo
public int compareTo(FP64 other)
- Specified by:
compareToin interfaceComparable<FP64>
-
one
public FP64 one()
- Specified by:
onein interfaceMultiplication<FP64>
-
isOne
public boolean isOne()
- Specified by:
isOnein interfaceMultiplication<FP64>
-
-