Class Binary64
- java.lang.Object
-
- java.lang.Number
-
- org.hipparchus.util.Binary64
-
- All Implemented Interfaces:
Serializable
,Comparable<Binary64>
,CalculusFieldElement<Binary64>
,FieldElement<Binary64>
public class Binary64 extends Number implements CalculusFieldElement<Binary64>, Comparable<Binary64>
This class wraps adouble
value in an object. It is similar to the standard classDouble
, while also implementing theCalculusFieldElement
interface.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Binary64
NAN
The constant value ofDouble.NaN
as aBinary64
.static Binary64
NEGATIVE_INFINITY
The constant value ofDouble.NEGATIVE_INFINITY
as aBinary64
.static Binary64
ONE
The constant value of1d
as aBinary64
.static Binary64
PI
The constant value of π as aBinary64
.static Binary64
POSITIVE_INFINITY
The constant value ofDouble.POSITIVE_INFINITY
as aBinary64
.static Binary64
ZERO
The constant value of0d
as aBinary64
.
-
Constructor Summary
Constructors Constructor Description Binary64(double x)
Creates a new instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Binary64
abs()
absolute value.Binary64
acos()
Arc cosine operation.Binary64
acosh()
Inverse hyperbolic cosine operation.Binary64
add(double a)
'+' operator.Binary64
add(Binary64 a)
Compute this + a.Binary64
asin()
Arc sine operation.Binary64
asinh()
Inverse hyperbolic sine operation.Binary64
atan()
Arc tangent operation.Binary64
atan2(Binary64 x)
Two arguments arc tangent operation.Binary64
atanh()
Inverse hyperbolic tangent operation.byte
byteValue()
The current implementation performs casting to abyte
.Binary64
cbrt()
Cubic root.Binary64
ceil()
Get the smallest whole number larger than instance.int
compareTo(Binary64 o)
The current implementation returns the same value asnew Double(this.doubleValue()).compareTo(new Double(o.doubleValue()))
Binary64
copySign(double sign)
Returns the instance with the sign of the argument.Binary64
copySign(Binary64 sign)
Returns the instance with the sign of the argument.Binary64
cos()
Cosine operation.Binary64
cosh()
Hyperbolic cosine operation.Binary64
divide(double a)
'÷' operator.Binary64
divide(Binary64 a)
Compute this ÷ a.double
doubleValue()
boolean
equals(Object obj)
Binary64
exp()
Exponential.Binary64
expm1()
Exponential minus 1.float
floatValue()
The current implementation performs casting to afloat
.Binary64
floor()
Get the largest whole number smaller than instance.Field<Binary64>
getField()
Get theField
to which the instance belongs.Binary64
getPi()
Get the Archimedes constant π.double
getReal()
Get the real value of the number.int
hashCode()
The current implementation returns the same value asnew Double(this.doubleValue()).hashCode()
Binary64
hypot(Binary64 y)
Returns the hypotenuse of a triangle with sidesthis
andy
- sqrt(this2 +y2) avoiding intermediate overflow or underflow.int
intValue()
The current implementation performs casting to aint
.boolean
isInfinite()
Returnstrue
ifthis
double precision number is infinite (Double.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
).boolean
isNaN()
Returnstrue
ifthis
double precision number is Not-a-Number (NaN
), false otherwise.boolean
isZero()
Check if an element is semantically equal to zero.Binary64
linearCombination(double[] a, Binary64[] b)
Compute a linear combination.Binary64
linearCombination(double a1, Binary64 b1, double a2, Binary64 b2)
Compute a linear combination.Binary64
linearCombination(double a1, Binary64 b1, double a2, Binary64 b2, double a3, Binary64 b3)
Compute a linear combination.Binary64
linearCombination(double a1, Binary64 b1, double a2, Binary64 b2, double a3, Binary64 b3, double a4, Binary64 b4)
Compute a linear combination.Binary64
linearCombination(Binary64[] a, Binary64[] b)
Compute a linear combination.Binary64
linearCombination(Binary64 a1, Binary64 b1, Binary64 a2, Binary64 b2)
Compute a linear combination.Binary64
linearCombination(Binary64 a1, Binary64 b1, Binary64 a2, Binary64 b2, Binary64 a3, Binary64 b3)
Compute a linear combination.Binary64
linearCombination(Binary64 a1, Binary64 b1, Binary64 a2, Binary64 b2, Binary64 a3, Binary64 b3, Binary64 a4, Binary64 b4)
Compute a linear combination.Binary64
log()
Natural logarithm.Binary64
log10()
Base 10 logarithm.Binary64
log1p()
Shifted natural logarithm.long
longValue()
The current implementation performs casting to along
.Binary64
multiply(double a)
'×' operator.Binary64
multiply(int n)
Compute n × this.Binary64
multiply(Binary64 a)
Compute this × a.Binary64
negate()
Returns the additive inverse ofthis
element.Binary64
newInstance(double v)
Create an instance corresponding to a constant real value.Binary64
pow(double p)
Power operation.Binary64
pow(int n)
Integer power operation.Binary64
pow(Binary64 e)
Power operation.Binary64
reciprocal()
Returns the multiplicative inverse ofthis
element.Binary64
remainder(double a)
IEEE remainder operator.Binary64
remainder(Binary64 a)
IEEE remainder operator.Binary64
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.Binary64
rootN(int n)
Nth root.Binary64
scalb(int n)
Multiply the instance by a power of 2.short
shortValue()
The current implementation performs casting to ashort
.Binary64
sign()
Compute the sign of the instance.Binary64
sin()
Sine operation.FieldSinCos<Binary64>
sinCos()
Combined Sine and Cosine operation.Binary64
sinh()
Hyperbolic sine operation.FieldSinhCosh<Binary64>
sinhCosh()
Combined hyperbolic sine and sosine operation.Binary64
sqrt()
Square root.Binary64
subtract(double a)
'-' operator.Binary64
subtract(Binary64 a)
Compute this - a.Binary64
tan()
Tangent operation.Binary64
tanh()
Hyperbolic tangent operation.Binary64
toDegrees()
Convert radians to degrees, with error of less than 0.5 ULPBinary64
toRadians()
Convert degrees to radians, with error of less than 0.5 ULPString
toString()
The returnedString
is equal toDouble.toString(this.doubleValue())
Binary64
ulp()
Compute least significant bit (Unit in Last Position) for a number.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hipparchus.CalculusFieldElement
getExponent, isFinite, norm, round
-
-
-
-
Field Detail
-
ZERO
public static final Binary64 ZERO
The constant value of0d
as aBinary64
.
-
ONE
public static final Binary64 ONE
The constant value of1d
as aBinary64
.
-
PI
public static final Binary64 PI
The constant value of π as aBinary64
.
-
NEGATIVE_INFINITY
public static final Binary64 NEGATIVE_INFINITY
The constant value ofDouble.NEGATIVE_INFINITY
as aBinary64
.
-
POSITIVE_INFINITY
public static final Binary64 POSITIVE_INFINITY
The constant value ofDouble.POSITIVE_INFINITY
as aBinary64
.
-
NAN
public static final Binary64 NAN
The constant value ofDouble.NaN
as aBinary64
.
-
-
Method Detail
-
newInstance
public Binary64 newInstance(double v)
Create an instance corresponding to a constant real value.- Specified by:
newInstance
in interfaceCalculusFieldElement<Binary64>
- Parameters:
v
- constant real value- Returns:
- instance corresponding to a constant real value
-
getField
public Field<Binary64> getField()
Get theField
to which the instance belongs.- Specified by:
getField
in interfaceFieldElement<Binary64>
- Returns:
Field
to which the instance belongs
-
add
public Binary64 add(Binary64 a)
Compute this + a. The current implementation strictly enforcesthis.add(a).equals(new Binary64(this.doubleValue() + a.doubleValue()))
.- Specified by:
add
in interfaceFieldElement<Binary64>
- Parameters:
a
- element to add- Returns:
- a new element representing this + a
-
subtract
public Binary64 subtract(Binary64 a)
Compute this - a. The current implementation strictly enforcesthis.subtract(a).equals(new Binary64(this.doubleValue() - a.doubleValue()))
.- Specified by:
subtract
in interfaceFieldElement<Binary64>
- Parameters:
a
- element to subtract- Returns:
- a new element representing this - a
-
negate
public Binary64 negate()
Returns the additive inverse ofthis
element. The current implementation strictly enforcesthis.negate().equals(new Binary64(-this.doubleValue()))
.- Specified by:
negate
in interfaceFieldElement<Binary64>
- Returns:
- the opposite of
this
.
-
multiply
public Binary64 multiply(Binary64 a)
Compute this × a. The current implementation strictly enforcesthis.multiply(a).equals(new Binary64(this.doubleValue() * a.doubleValue()))
.- Specified by:
multiply
in interfaceFieldElement<Binary64>
- Parameters:
a
- element to multiply- Returns:
- a new element representing this × a
-
multiply
public Binary64 multiply(int n)
Compute n × this. Multiplication by an integer number is defined as the following sum \[ n \times \mathrm{this} = \sum_{i=1}^n \mathrm{this} \] The current implementation strictly enforcesthis.multiply(n).equals(new Binary64(n * this.doubleValue()))
.- Specified by:
multiply
in interfaceFieldElement<Binary64>
- Parameters:
n
- Number of timesthis
must be added to itself.- Returns:
- A new element representing n × this.
-
divide
public Binary64 divide(Binary64 a)
Compute this ÷ a. The current implementation strictly enforcesthis.divide(a).equals(new Binary64(this.doubleValue() / a.doubleValue()))
.- Specified by:
divide
in interfaceFieldElement<Binary64>
- Parameters:
a
- element to divide by- Returns:
- a new element representing this ÷ a
-
reciprocal
public Binary64 reciprocal()
Returns the multiplicative inverse ofthis
element. The current implementation strictly enforcesthis.reciprocal().equals(new Binary64(1.0 / this.doubleValue()))
.- Specified by:
reciprocal
in interfaceCalculusFieldElement<Binary64>
- Specified by:
reciprocal
in interfaceFieldElement<Binary64>
- Returns:
- the inverse of
this
.
-
byteValue
public byte byteValue()
The current implementation performs casting to abyte
.
-
shortValue
public short shortValue()
The current implementation performs casting to ashort
.- Overrides:
shortValue
in classNumber
-
intValue
public int intValue()
The current implementation performs casting to aint
.
-
longValue
public long longValue()
The current implementation performs casting to along
.
-
floatValue
public float floatValue()
The current implementation performs casting to afloat
.- Specified by:
floatValue
in classNumber
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in classNumber
-
compareTo
public int compareTo(Binary64 o)
The current implementation returns the same value asnew Double(this.doubleValue()).compareTo(new Double(o.doubleValue()))
- Specified by:
compareTo
in interfaceComparable<Binary64>
- See Also:
Double.compareTo(Double)
-
isZero
public boolean isZero()
Check if an element is semantically equal to zero.The default implementation simply calls
equals(getField().getZero())
. However, this may need to be overridden in some cases as due to compatibility withhashCode()
some classes implementsequals(Object)
in such a way that -0.0 and +0.0 are different, which may be a problem. It prevents for example identifying a diagonal element is zero and should be avoided when doing partial pivoting in LU decomposition.This implementation considers +0.0 and -0.0 to be equal.
- Specified by:
isZero
in interfaceFieldElement<Binary64>
- Returns:
- true if the element is semantically equal to zero
- Since:
- 1.8
-
hashCode
public int hashCode()
The current implementation returns the same value asnew Double(this.doubleValue()).hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Double.hashCode()
-
toString
public String toString()
The returnedString
is equal toDouble.toString(this.doubleValue())
- Overrides:
toString
in classObject
- See Also:
Double.toString(double)
-
isInfinite
public boolean isInfinite()
Returnstrue
ifthis
double precision number is infinite (Double.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
).- Specified by:
isInfinite
in interfaceCalculusFieldElement<Binary64>
- Returns:
true
ifthis
number is infinite
-
isNaN
public boolean isNaN()
Returnstrue
ifthis
double precision number is Not-a-Number (NaN
), false otherwise.- Specified by:
isNaN
in interfaceCalculusFieldElement<Binary64>
- Returns:
true
ifthis
isNaN
-
getReal
public double getReal()
Get the real value of the number.- Specified by:
getReal
in interfaceFieldElement<Binary64>
- Returns:
- real value
-
add
public Binary64 add(double a)
'+' operator.- Specified by:
add
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a
- right hand side parameter of the operator- Returns:
- this+a
-
subtract
public Binary64 subtract(double a)
'-' operator.- Specified by:
subtract
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a
- right hand side parameter of the operator- Returns:
- this-a
-
multiply
public Binary64 multiply(double a)
'×' operator.- Specified by:
multiply
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a
- right hand side parameter of the operator- Returns:
- this×a
-
divide
public Binary64 divide(double a)
'÷' operator.- Specified by:
divide
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a
- right hand side parameter of the operator- Returns:
- this÷a
-
remainder
public Binary64 remainder(double a)
IEEE remainder operator.- Specified by:
remainder
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a
- right hand side parameter of the operator- Returns:
- this - n × a where n is the closest integer to this/a
-
remainder
public Binary64 remainder(Binary64 a)
IEEE remainder operator.- Specified by:
remainder
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a
- right hand side parameter of the operator- Returns:
- this - n × a where n is the closest integer to this/a
-
abs
public Binary64 abs()
absolute value.Just another name for
CalculusFieldElement.norm()
- Specified by:
abs
in interfaceCalculusFieldElement<Binary64>
- Returns:
- abs(this)
-
ceil
public Binary64 ceil()
Get the smallest whole number larger than instance.- Specified by:
ceil
in interfaceCalculusFieldElement<Binary64>
- Returns:
- ceil(this)
-
floor
public Binary64 floor()
Get the largest whole number smaller than instance.- Specified by:
floor
in interfaceCalculusFieldElement<Binary64>
- Returns:
- floor(this)
-
rint
public Binary64 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.- Specified by:
rint
in interfaceCalculusFieldElement<Binary64>
- Returns:
- a double number r such that r is an integer r - 0.5 ≤ this ≤ r + 0.5
-
sign
public Binary64 sign()
Compute the sign of the instance. The sign is -1 for negative numbers, +1 for positive numbers and 0 otherwise, for Complex number, it is extended on the unit circle (equivalent to z/|z|, with special handling for 0 and NaN)- Specified by:
sign
in interfaceCalculusFieldElement<Binary64>
- Returns:
- -1.0, -0.0, +0.0, +1.0 or NaN depending on sign of a
-
copySign
public Binary64 copySign(Binary64 sign)
Returns the instance with the sign of the argument. A NaNsign
argument is treated as positive.- Specified by:
copySign
in interfaceCalculusFieldElement<Binary64>
- Parameters:
sign
- the sign for the returned value- Returns:
- the instance with the same sign as the
sign
argument
-
copySign
public Binary64 copySign(double sign)
Returns the instance with the sign of the argument. A NaNsign
argument is treated as positive.- Specified by:
copySign
in interfaceCalculusFieldElement<Binary64>
- Parameters:
sign
- the sign for the returned value- Returns:
- the instance with the same sign as the
sign
argument
-
scalb
public Binary64 scalb(int n)
Multiply the instance by a power of 2.- Specified by:
scalb
in interfaceCalculusFieldElement<Binary64>
- Parameters:
n
- power of 2- Returns:
- this × 2n
-
ulp
public Binary64 ulp()
Compute least significant bit (Unit in Last Position) for a number.- Specified by:
ulp
in interfaceCalculusFieldElement<Binary64>
- Returns:
- ulp(this)
-
hypot
public Binary64 hypot(Binary64 y)
Returns the hypotenuse of a triangle with sidesthis
andy
- sqrt(this2 +y2) avoiding intermediate overflow or underflow.- If either argument is infinite, then the result is positive infinity.
- else, if either argument is NaN then the result is NaN.
- Specified by:
hypot
in interfaceCalculusFieldElement<Binary64>
- Parameters:
y
- a value- Returns:
- sqrt(this2 +y2)
-
sqrt
public Binary64 sqrt()
Square root.- Specified by:
sqrt
in interfaceCalculusFieldElement<Binary64>
- Returns:
- square root of the instance
-
cbrt
public Binary64 cbrt()
Cubic root.- Specified by:
cbrt
in interfaceCalculusFieldElement<Binary64>
- Returns:
- cubic root of the instance
-
rootN
public Binary64 rootN(int n)
Nth root.- Specified by:
rootN
in interfaceCalculusFieldElement<Binary64>
- Parameters:
n
- order of the root- Returns:
- nth root of the instance
-
pow
public Binary64 pow(double p)
Power operation.- Specified by:
pow
in interfaceCalculusFieldElement<Binary64>
- Parameters:
p
- power to apply- Returns:
- thisp
-
pow
public Binary64 pow(int n)
Integer power operation.- Specified by:
pow
in interfaceCalculusFieldElement<Binary64>
- Parameters:
n
- power to apply- Returns:
- thisn
-
pow
public Binary64 pow(Binary64 e)
Power operation.- Specified by:
pow
in interfaceCalculusFieldElement<Binary64>
- Parameters:
e
- exponent- Returns:
- thise
-
exp
public Binary64 exp()
Exponential.- Specified by:
exp
in interfaceCalculusFieldElement<Binary64>
- Returns:
- exponential of the instance
-
expm1
public Binary64 expm1()
Exponential minus 1.- Specified by:
expm1
in interfaceCalculusFieldElement<Binary64>
- Returns:
- exponential minus one of the instance
-
log
public Binary64 log()
Natural logarithm.- Specified by:
log
in interfaceCalculusFieldElement<Binary64>
- Returns:
- logarithm of the instance
-
log1p
public Binary64 log1p()
Shifted natural logarithm.- Specified by:
log1p
in interfaceCalculusFieldElement<Binary64>
- Returns:
- logarithm of one plus the instance
-
log10
public Binary64 log10()
Base 10 logarithm.- Specified by:
log10
in interfaceCalculusFieldElement<Binary64>
- Returns:
- base 10 logarithm of the instance
-
cos
public Binary64 cos()
Cosine operation.- Specified by:
cos
in interfaceCalculusFieldElement<Binary64>
- Returns:
- cos(this)
-
sin
public Binary64 sin()
Sine operation.- Specified by:
sin
in interfaceCalculusFieldElement<Binary64>
- Returns:
- sin(this)
-
sinCos
public FieldSinCos<Binary64> sinCos()
Combined Sine and Cosine operation.- Specified by:
sinCos
in interfaceCalculusFieldElement<Binary64>
- Returns:
- [sin(this), cos(this)]
-
tan
public Binary64 tan()
Tangent operation.- Specified by:
tan
in interfaceCalculusFieldElement<Binary64>
- Returns:
- tan(this)
-
acos
public Binary64 acos()
Arc cosine operation.- Specified by:
acos
in interfaceCalculusFieldElement<Binary64>
- Returns:
- acos(this)
-
asin
public Binary64 asin()
Arc sine operation.- Specified by:
asin
in interfaceCalculusFieldElement<Binary64>
- Returns:
- asin(this)
-
atan
public Binary64 atan()
Arc tangent operation.- Specified by:
atan
in interfaceCalculusFieldElement<Binary64>
- Returns:
- atan(this)
-
atan2
public Binary64 atan2(Binary64 x)
Two arguments arc tangent operation.Beware of the order or arguments! As this is based on a two-arguments functions, in order to be consistent with arguments order, the instance is the first argument and the single provided argument is the second argument. In order to be consistent with programming languages
atan2
, this method computesatan2(this, x)
, i.e. the instance represents they
argument and thex
argument is the one passed as a single argument. This may seem confusing especially for users of Wolfram alpha, as this site is not consistent with programming languagesatan2
two-arguments arc tangent and putsx
as its first argument.- Specified by:
atan2
in interfaceCalculusFieldElement<Binary64>
- Parameters:
x
- second argument of the arc tangent- Returns:
- atan2(this, x)
-
cosh
public Binary64 cosh()
Hyperbolic cosine operation.- Specified by:
cosh
in interfaceCalculusFieldElement<Binary64>
- Returns:
- cosh(this)
-
sinh
public Binary64 sinh()
Hyperbolic sine operation.- Specified by:
sinh
in interfaceCalculusFieldElement<Binary64>
- Returns:
- sinh(this)
-
sinhCosh
public FieldSinhCosh<Binary64> sinhCosh()
Combined hyperbolic sine and sosine operation.- Specified by:
sinhCosh
in interfaceCalculusFieldElement<Binary64>
- Returns:
- [sinh(this), cosh(this)]
-
tanh
public Binary64 tanh()
Hyperbolic tangent operation.- Specified by:
tanh
in interfaceCalculusFieldElement<Binary64>
- Returns:
- tanh(this)
-
acosh
public Binary64 acosh()
Inverse hyperbolic cosine operation.- Specified by:
acosh
in interfaceCalculusFieldElement<Binary64>
- Returns:
- acosh(this)
-
asinh
public Binary64 asinh()
Inverse hyperbolic sine operation.- Specified by:
asinh
in interfaceCalculusFieldElement<Binary64>
- Returns:
- asin(this)
-
atanh
public Binary64 atanh()
Inverse hyperbolic tangent operation.- Specified by:
atanh
in interfaceCalculusFieldElement<Binary64>
- Returns:
- atanh(this)
-
toDegrees
public Binary64 toDegrees()
Convert radians to degrees, with error of less than 0.5 ULP- Specified by:
toDegrees
in interfaceCalculusFieldElement<Binary64>
- Returns:
- instance converted into degrees
-
toRadians
public Binary64 toRadians()
Convert degrees to radians, with error of less than 0.5 ULP- Specified by:
toRadians
in interfaceCalculusFieldElement<Binary64>
- Returns:
- instance converted into radians
-
linearCombination
public Binary64 linearCombination(Binary64[] a, Binary64[] b) throws MathIllegalArgumentException
Compute a linear combination.- Specified by:
linearCombination
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a
- Factors.b
- Factors.- Returns:
Σi ai bi
.- Throws:
MathIllegalArgumentException
- if arrays dimensions don't match
-
linearCombination
public Binary64 linearCombination(double[] a, Binary64[] b) throws MathIllegalArgumentException
Compute a linear combination.- Specified by:
linearCombination
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a
- Factors.b
- Factors.- Returns:
Σi ai bi
.- Throws:
MathIllegalArgumentException
- if arrays dimensions don't match
-
linearCombination
public Binary64 linearCombination(Binary64 a1, Binary64 b1, Binary64 a2, Binary64 b2)
Compute a linear combination.- Specified by:
linearCombination
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second term- Returns:
- a1×b1 + a2×b2
- See Also:
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
,CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
-
linearCombination
public Binary64 linearCombination(double a1, Binary64 b1, double a2, Binary64 b2)
Compute a linear combination.- Specified by:
linearCombination
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second term- Returns:
- a1×b1 + a2×b2
- See Also:
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement)
,CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement, double, FieldElement)
-
linearCombination
public Binary64 linearCombination(Binary64 a1, Binary64 b1, Binary64 a2, Binary64 b2, Binary64 a3, Binary64 b3)
Compute a linear combination.- Specified by:
linearCombination
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second terma3
- first factor of the third termb3
- second factor of the third term- Returns:
- a1×b1 + a2×b2 + a3×b3
- See Also:
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement)
,CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
-
linearCombination
public Binary64 linearCombination(double a1, Binary64 b1, double a2, Binary64 b2, double a3, Binary64 b3)
Compute a linear combination.- Specified by:
linearCombination
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second terma3
- first factor of the third termb3
- second factor of the third term- Returns:
- a1×b1 + a2×b2 + a3×b3
- See Also:
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement)
,CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement, double, FieldElement)
-
linearCombination
public Binary64 linearCombination(Binary64 a1, Binary64 b1, Binary64 a2, Binary64 b2, Binary64 a3, Binary64 b3, Binary64 a4, Binary64 b4)
Compute a linear combination.- Specified by:
linearCombination
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second terma3
- first factor of the third termb3
- second factor of the third terma4
- first factor of the fourth termb4
- second factor of the fourth term- Returns:
- a1×b1 + a2×b2 + a3×b3 + a4×b4
- See Also:
CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement)
,CalculusFieldElement.linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
-
linearCombination
public Binary64 linearCombination(double a1, Binary64 b1, double a2, Binary64 b2, double a3, Binary64 b3, double a4, Binary64 b4)
Compute a linear combination.- Specified by:
linearCombination
in interfaceCalculusFieldElement<Binary64>
- Parameters:
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second terma3
- first factor of the third termb3
- second factor of the third terma4
- first factor of the fourth termb4
- second factor of the fourth term- Returns:
- a1×b1 + a2×b2 + a3×b3 + a4×b4
- See Also:
CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement)
,CalculusFieldElement.linearCombination(double, FieldElement, double, FieldElement, double, FieldElement)
-
getPi
public Binary64 getPi()
Get the Archimedes constant π.Archimedes constant is the ratio of a circle's circumference to its diameter.
- Specified by:
getPi
in interfaceCalculusFieldElement<Binary64>
- Returns:
- Archimedes constant π
-
-