Top Description Fields Constructors Methods
org.apache.commons.math3.util

public Class Decimal64

extends Number
implements RealFieldElement<Decimal64>, Comparable<Decimal64>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable, org.apache.commons.math3.RealFieldElement, org.apache.commons.math3.FieldElement
Imports
org.apache.commons.math3.RealFieldElement, .Field, org.apache.commons.math3.exception.DimensionMismatchException

This class wraps a double value in an object. It is similar to the standard class Double, while also implementing the RealFieldElement interface.
Since
3.1

Field Summary

Modifier and TypeField and Description
public static final Decimal64
NAN

The constant value of Double#NaN as a Decimal64.

public static final Decimal64
NEGATIVE_INFINITY

The constant value of Double#NEGATIVE_INFINITY as a Decimal64.

public static final Decimal64
ONE

The constant value of 1d as a Decimal64.

public static final Decimal64
POSITIVE_INFINITY

The constant value of Double#POSITIVE_INFINITY as a Decimal64.

private static final long
private final double
value

The primitive double value of this object.

public static final Decimal64
ZERO

The constant value of 0d as a Decimal64.

Constructor Summary

AccessConstructor and Description
public
Decimal64(final double
the primitive double value of the object to be created
x
)

Creates a new instance of this class.

Method Summary

Modifier and TypeMethod and Description
public Decimal64
public Decimal64
acos()

Implements org.apache.commons.math3.RealFieldElement.acos.

Arc cosine operation.

public Decimal64
acosh()

Implements org.apache.commons.math3.RealFieldElement.acosh.

Inverse hyperbolic cosine operation.

public Decimal64
add(final Decimal64
element to add
a
)

Implements org.apache.commons.math3.FieldElement.add.

Compute this + a.

public Decimal64
add(final double
right hand side parameter of the operator
a
)

Implements org.apache.commons.math3.RealFieldElement.add.

'+' operator.

public Decimal64
asin()

Implements org.apache.commons.math3.RealFieldElement.asin.

Arc sine operation.

public Decimal64
asinh()

Implements org.apache.commons.math3.RealFieldElement.asinh.

Inverse hyperbolic sine operation.

public Decimal64
atan()

Implements org.apache.commons.math3.RealFieldElement.atan.

Arc tangent operation.

public Decimal64
atan2(final Decimal64
second argument of the arc tangent
x
)

Implements org.apache.commons.math3.RealFieldElement.atan2.

Two arguments arc tangent operation.

public Decimal64
atanh()

Implements org.apache.commons.math3.RealFieldElement.atanh.

Inverse hyperbolic tangent operation.

public byte
byteValue()

Overrides java.lang.Number.byteValue.

Returns the value of the specified number as a byte.

public Decimal64
public Decimal64
ceil()

Implements org.apache.commons.math3.RealFieldElement.ceil.

Get the smallest whole number larger than instance.

public int
compareTo(final Decimal64
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.</center>

public Decimal64
copySign(final Decimal64
the sign for the returned value
sign
)

Implements org.apache.commons.math3.RealFieldElement.copySign.

Returns the instance with the sign of the argument.

public Decimal64
copySign(final double
the sign for the returned value
sign
)

Implements org.apache.commons.math3.RealFieldElement.copySign, org.apache.commons.math3.RealFieldElement.copySign.

Returns the instance with the sign of the argument.

public Decimal64
cos()

Implements org.apache.commons.math3.RealFieldElement.cos.

Cosine operation.

public Decimal64
cosh()

Implements org.apache.commons.math3.RealFieldElement.cosh.

Hyperbolic cosine operation.

public Decimal64
divide(final Decimal64
element to divide by
a
)

Implements org.apache.commons.math3.FieldElement.divide.

Compute this ÷ a.

public Decimal64
divide(final double
right hand side parameter of the operator
a
)

Implements org.apache.commons.math3.RealFieldElement.divide.

'÷' operator.

public double
doubleValue()

Implements abstract java.lang.Number.doubleValue.

Returns the value of the specified number as a double.

public boolean
equals(final Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public Decimal64
public Decimal64
expm1()

Implements org.apache.commons.math3.RealFieldElement.expm1.

Exponential minus 1.

public float
floatValue()

Implements abstract java.lang.Number.floatValue.

Returns the value of the specified number as a float.

public Decimal64
floor()

Implements org.apache.commons.math3.RealFieldElement.floor.

Get the largest whole number smaller than instance.

public Field<Decimal64>
getField()

Implements org.apache.commons.math3.FieldElement.getField.

Get the Field to which the instance belongs.

public double
getReal()

Implements org.apache.commons.math3.RealFieldElement.getReal.

Get the real value of the number.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public Decimal64
hypot(final Decimal64
a value
y
)

Implements org.apache.commons.math3.RealFieldElement.hypot.

Returns the hypotenuse of a triangle with sides this and y - sqrt(this2 +y2) avoiding intermediate overflow or underflow.

public int
intValue()

Implements abstract java.lang.Number.intValue.

Returns the value of the specified number as an int.

public boolean

Returns:

true if this number is infinite
isInfinite
()

Returns true if this double precision number is infinite (Double#POSITIVE_INFINITY or Double#NEGATIVE_INFINITY).

public boolean

Returns:

true if this is NaN
isNaN
()

Returns true if this double precision number is Not-a-Number (NaN), false otherwise.

public Decimal64
linearCombination(final Decimal64[]
Factors.
a
,
final Decimal64[]
Factors.
b
)

Implements org.apache.commons.math3.RealFieldElement.linearCombination.

Compute a linear combination.

public Decimal64
public Decimal64
linearCombination(final Decimal64
first factor of the first term
a1
,
final Decimal64
second factor of the first term
b1
,
final Decimal64
first factor of the second term
a2
,
final Decimal64
second factor of the second term
b2
)

Implements org.apache.commons.math3.RealFieldElement.linearCombination.

Compute a linear combination.

public Decimal64
linearCombination(final double
first factor of the first term
a1
,
final Decimal64
second factor of the first term
b1
,
final double
first factor of the second term
a2
,
final Decimal64
second factor of the second term
b2
)

Implements org.apache.commons.math3.RealFieldElement.linearCombination, org.apache.commons.math3.RealFieldElement.linearCombination.

Compute a linear combination.

public Decimal64
linearCombination(final Decimal64
first factor of the first term
a1
,
final Decimal64
second factor of the first term
b1
,
final Decimal64
first factor of the second term
a2
,
final Decimal64
second factor of the second term
b2
,
final Decimal64
first factor of the third term
a3
,
final Decimal64
second factor of the third term
b3
)

Implements org.apache.commons.math3.RealFieldElement.linearCombination.

Compute a linear combination.

public Decimal64
linearCombination(final double
first factor of the first term
a1
,
final Decimal64
second factor of the first term
b1
,
final double
first factor of the second term
a2
,
final Decimal64
second factor of the second term
b2
,
final double
first factor of the third term
a3
,
final Decimal64
second factor of the third term
b3
)

Implements org.apache.commons.math3.RealFieldElement.linearCombination, org.apache.commons.math3.RealFieldElement.linearCombination.

Compute a linear combination.

public Decimal64
linearCombination(final Decimal64
first factor of the first term
a1
,
final Decimal64
second factor of the first term
b1
,
final Decimal64
first factor of the second term
a2
,
final Decimal64
second factor of the second term
b2
,
final Decimal64
first factor of the third term
a3
,
final Decimal64
second factor of the third term
b3
,
final Decimal64
first factor of the third term
a4
,
final Decimal64
second factor of the third term
b4
)

Implements org.apache.commons.math3.RealFieldElement.linearCombination.

Compute a linear combination.

public Decimal64
linearCombination(final double
first factor of the first term
a1
,
final Decimal64
second factor of the first term
b1
,
final double
first factor of the second term
a2
,
final Decimal64
second factor of the second term
b2
,
final double
first factor of the third term
a3
,
final Decimal64
second factor of the third term
b3
,
final double
first factor of the third term
a4
,
final Decimal64
second factor of the third term
b4
)

Implements org.apache.commons.math3.RealFieldElement.linearCombination, org.apache.commons.math3.RealFieldElement.linearCombination.

Compute a linear combination.

public Decimal64
log()

Implements org.apache.commons.math3.RealFieldElement.log.

Natural logarithm.

public Decimal64

Returns:

base 10 logarithm of the instance
log10
()

Base 10 logarithm.

public Decimal64
log1p()

Implements org.apache.commons.math3.RealFieldElement.log1p.

Shifted natural logarithm.

public long
longValue()

Implements abstract java.lang.Number.longValue.

Returns the value of the specified number as a long.

public Decimal64
multiply(final Decimal64
element to multiply
a
)

Implements org.apache.commons.math3.FieldElement.multiply.

Compute this × a.

public Decimal64
multiply(final int
Number of times this must be added to itself.
n
)

Implements org.apache.commons.math3.FieldElement.multiply, org.apache.commons.math3.FieldElement.multiply.

Compute n × this.</center>

public Decimal64
multiply(final double
right hand side parameter of the operator
a
)

Implements org.apache.commons.math3.RealFieldElement.multiply.

'×' operator.

public Decimal64
negate()

Implements org.apache.commons.math3.FieldElement.negate.

Returns the additive inverse of this element.

public Decimal64
pow(final double
power to apply
p
)

Implements org.apache.commons.math3.RealFieldElement.pow, org.apache.commons.math3.RealFieldElement.pow.

Power operation.

public Decimal64
pow(final int
power to apply
n
)

Implements org.apache.commons.math3.RealFieldElement.pow, org.apache.commons.math3.RealFieldElement.pow.

Integer power operation.

public Decimal64
pow(final Decimal64
exponent
e
)

Implements org.apache.commons.math3.RealFieldElement.pow.

Power operation.

public Decimal64
reciprocal()

Implements org.apache.commons.math3.RealFieldElement.reciprocal.

Returns the multiplicative inverse of this element.

public Decimal64
remainder(final double
right hand side parameter of the operator
a
)

Implements org.apache.commons.math3.RealFieldElement.remainder, org.apache.commons.math3.RealFieldElement.remainder.

IEEE remainder operator.

public Decimal64
remainder(final Decimal64
right hand side parameter of the operator
a
)

Implements org.apache.commons.math3.RealFieldElement.remainder.

IEEE remainder operator.

public Decimal64
rint()

Implements org.apache.commons.math3.RealFieldElement.rint.

Get the whole number that is the nearest to the instance, or the even one if x is exactly half way between two integers.

public Decimal64
rootN(final int
order of the root
n
)

Implements org.apache.commons.math3.RealFieldElement.rootN.

Nth root.

public long
round()

Implements org.apache.commons.math3.RealFieldElement.round.

Get the closest long to instance value.

public Decimal64
scalb(final int
power of 2
n
)

Implements org.apache.commons.math3.RealFieldElement.scalb.

Multiply the instance by a power of 2.

public short
shortValue()

Overrides java.lang.Number.shortValue.

Returns the value of the specified number as a short.

public Decimal64
signum()

Implements org.apache.commons.math3.RealFieldElement.signum.

Compute the signum of the instance.

public Decimal64
public Decimal64
sinh()

Implements org.apache.commons.math3.RealFieldElement.sinh.

Hyperbolic sine operation.

public Decimal64
public Decimal64
subtract(final Decimal64
element to subtract
a
)

Implements org.apache.commons.math3.FieldElement.subtract.

Compute this - a.

public Decimal64
subtract(final double
right hand side parameter of the operator
a
)

Implements org.apache.commons.math3.RealFieldElement.subtract.

'-' operator.

public Decimal64
tan()

Implements org.apache.commons.math3.RealFieldElement.tan.

Tangent operation.

public Decimal64
tanh()

Implements org.apache.commons.math3.RealFieldElement.tanh.

Hyperbolic tangent operation.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.