Package org.apache.commons.math3.util
Class FastMath.Split
java.lang.Object
org.apache.commons.math3.util.FastMath.Split
- Enclosing class:
FastMath
Class operator on double numbers split into one 26 bits number and one 27 bits number.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final double
Full number.private final double
High order bits.private final double
Low order bits.static final FastMath.Split
Split version of NaN.static final FastMath.Split
Split version of negative infinity.static final FastMath.Split
Split version of positive infinity. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMultiply the instance by another one.private FastMath.Split
pow
(long e) Computes this^e.Compute the reciprocal of the instance.
-
Field Details
-
NAN
Split version of NaN. -
POSITIVE_INFINITY
Split version of positive infinity. -
NEGATIVE_INFINITY
Split version of negative infinity. -
full
private final double fullFull number. -
high
private final double highHigh order bits. -
low
private final double lowLow order bits.
-
-
Constructor Details
-
Split
Split(double x) Simple constructor.- Parameters:
x
- number to split
-
Split
Split(double high, double low) Simple constructor.- Parameters:
high
- high order bitslow
- low order bits
-
Split
Split(double full, double high, double low) Simple constructor.- Parameters:
full
- full numberhigh
- high order bitslow
- low order bits
-
-
Method Details
-
multiply
Multiply the instance by another one.- Parameters:
b
- other instance to multiply by- Returns:
- product
-
reciprocal
Compute the reciprocal of the instance.- Returns:
- reciprocal of the instance
-
pow
Computes this^e.- Parameters:
e
- exponent (beware, here it MUST be > 0; the only exclusion is Long.MIN_VALUE)- Returns:
- d^e, split in high and low bits
- Since:
- 3.6
-