Package org.apache.commons.math3.util
Class FastMath.Split
- java.lang.Object
-
- org.apache.commons.math3.util.FastMath.Split
-
- Enclosing class:
- FastMath
private static class FastMath.Split extends java.lang.ObjectClass operator on double numbers split into one 26 bits number and one 27 bits number.
-
-
Field Summary
Fields Modifier and Type Field Description private doublefullFull number.private doublehighHigh order bits.private doublelowLow order bits.static FastMath.SplitNANSplit version of NaN.static FastMath.SplitNEGATIVE_INFINITYSplit version of negative infinity.static FastMath.SplitPOSITIVE_INFINITYSplit version of positive infinity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FastMath.Splitmultiply(FastMath.Split b)Multiply the instance by another one.private FastMath.Splitpow(long e)Computes this^e.FastMath.Splitreciprocal()Compute the reciprocal of the instance.
-
-
-
Field Detail
-
NAN
public static final FastMath.Split NAN
Split version of NaN.
-
POSITIVE_INFINITY
public static final FastMath.Split POSITIVE_INFINITY
Split version of positive infinity.
-
NEGATIVE_INFINITY
public static final FastMath.Split NEGATIVE_INFINITY
Split version of negative infinity.
-
full
private final double full
Full number.
-
high
private final double high
High order bits.
-
low
private final double low
Low order bits.
-
-
Constructor Detail
-
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 Detail
-
multiply
public FastMath.Split multiply(FastMath.Split b)
Multiply the instance by another one.- Parameters:
b- other instance to multiply by- Returns:
- product
-
reciprocal
public FastMath.Split reciprocal()
Compute the reciprocal of the instance.- Returns:
- reciprocal of the instance
-
pow
private FastMath.Split pow(long e)
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
-
-