T
- the type of the field elementspublic interface CalculusFieldElement<T extends FieldElement<T>> extends FieldElement<T>
FieldElement
Modifier and Type | Method and Description |
---|---|
T |
abs()
absolute value.
|
T |
acos()
Arc cosine operation.
|
T |
acosh()
Inverse hyperbolic cosine operation.
|
T |
add(double a)
'+' operator.
|
T |
asin()
Arc sine operation.
|
T |
asinh()
Inverse hyperbolic sine operation.
|
T |
atan()
Arc tangent operation.
|
T |
atan2(T x)
Two arguments arc tangent operation.
|
T |
atanh()
Inverse hyperbolic tangent operation.
|
T |
cbrt()
Cubic root.
|
T |
ceil()
Get the smallest whole number larger than instance.
|
T |
copySign(double sign)
Returns the instance with the sign of the argument.
|
T |
copySign(T sign)
Returns the instance with the sign of the argument.
|
T |
cos()
Cosine operation.
|
T |
cosh()
Hyperbolic cosine operation.
|
T |
divide(double a)
'÷' operator.
|
T |
exp()
Exponential.
|
T |
expm1()
Exponential minus 1.
|
T |
floor()
Get the largest whole number smaller than instance.
|
default int |
getExponent()
Return the exponent of the instance, removing the bias.
|
T |
getPi()
Get the Archimedes constant π.
|
T |
hypot(T y)
Returns the hypotenuse of a triangle with sides
this and y
- sqrt(this2 +y2)
avoiding intermediate overflow or underflow. |
default boolean |
isFinite()
Check if the instance is finite (neither infinite nor NaN).
|
default boolean |
isInfinite()
Check if the instance is infinite.
|
default boolean |
isNaN()
Check if the instance is Not a Number.
|
T |
linearCombination(double[] a,
T[] b)
Compute a linear combination.
|
T |
linearCombination(double a1,
T b1,
double a2,
T b2)
Compute a linear combination.
|
T |
linearCombination(double a1,
T b1,
double a2,
T b2,
double a3,
T b3)
Compute a linear combination.
|
T |
linearCombination(double a1,
T b1,
double a2,
T b2,
double a3,
T b3,
double a4,
T b4)
Compute a linear combination.
|
T |
linearCombination(T[] a,
T[] b)
Compute a linear combination.
|
T |
linearCombination(T a1,
T b1,
T a2,
T b2)
Compute a linear combination.
|
T |
linearCombination(T a1,
T b1,
T a2,
T b2,
T a3,
T b3)
Compute a linear combination.
|
T |
linearCombination(T a1,
T b1,
T a2,
T b2,
T a3,
T b3,
T a4,
T b4)
Compute a linear combination.
|
T |
log()
Natural logarithm.
|
T |
log10()
Base 10 logarithm.
|
T |
log1p()
Shifted natural logarithm.
|
T |
multiply(double a)
'×' operator.
|
T |
newInstance(double value)
Create an instance corresponding to a constant real value.
|
default double |
norm()
norm.
|
T |
pow(double p)
Power operation.
|
T |
pow(int n)
Integer power operation.
|
T |
pow(T e)
Power operation.
|
T |
reciprocal()
Returns the multiplicative inverse of
this element. |
T |
remainder(double a)
IEEE remainder operator.
|
T |
remainder(T a)
IEEE remainder operator.
|
T |
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.
|
T |
rootN(int n)
Nth root.
|
default long |
round()
Get the closest long to instance real value.
|
T |
scalb(int n)
Multiply the instance by a power of 2.
|
T |
sign()
Compute the sign of the instance.
|
T |
sin()
Sine operation.
|
FieldSinCos<T> |
sinCos()
Combined Sine and Cosine operation.
|
T |
sinh()
Hyperbolic sine operation.
|
FieldSinhCosh<T> |
sinhCosh()
Combined hyperbolic sine and sosine operation.
|
T |
sqrt()
Square root.
|
T |
subtract(double a)
'-' operator.
|
T |
tan()
Tangent operation.
|
T |
tanh()
Hyperbolic tangent operation.
|
T |
toDegrees()
Convert radians to degrees, with error of less than 0.5 ULP
|
T |
toRadians()
Convert degrees to radians, with error of less than 0.5 ULP
|
T |
ulp()
Compute least significant bit (Unit in Last Position) for a number.
|
T getPi()
Archimedes constant is the ratio of a circle's circumference to its diameter.
T newInstance(double value)
value
- constant real valueT add(double a)
a
- right hand side parameter of the operatorT subtract(double a)
a
- right hand side parameter of the operatorT multiply(double a)
a
- right hand side parameter of the operatorT divide(double a)
a
- right hand side parameter of the operatordefault int getExponent()
For double numbers of the form 2x, the unbiased exponent is exactly x.
T scalb(int n)
n
- power of 2T ulp()
T hypot(T y) throws MathIllegalArgumentException
this
and y
- sqrt(this2 +y2)
avoiding intermediate overflow or underflow.
y
- a valueMathIllegalArgumentException
- if number of free parameters or orders are inconsistentT reciprocal()
this
element.reciprocal
in interface FieldElement<T extends FieldElement<T>>
this
.T sqrt()
T cbrt()
T rootN(int n)
n
- order of the rootT pow(double p)
p
- power to applyT pow(int n)
n
- power to applyT pow(T e) throws MathIllegalArgumentException
e
- exponentMathIllegalArgumentException
- if number of free parameters or orders are inconsistentT exp()
T expm1()
T log()
T log1p()
T log10()
T cos()
T sin()
FieldSinCos<T> sinCos()
T tan()
T acos()
T asin()
T atan()
T atan2(T x) throws MathIllegalArgumentException
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 computes atan2(this, x)
, i.e. the instance
represents the y
argument and the x
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 languages atan2
two-arguments arc tangent
and puts x
as its first argument.
x
- second argument of the arc tangentMathIllegalArgumentException
- if number of free parameters or orders are inconsistentT cosh()
T sinh()
FieldSinhCosh<T> sinhCosh()
T tanh()
T acosh()
T asinh()
T atanh()
T toDegrees()
T toRadians()
T linearCombination(T[] a, T[] b) throws MathIllegalArgumentException
a
- Factors.b
- Factors.Σi ai bi
.MathIllegalArgumentException
- if arrays dimensions don't matchT linearCombination(double[] a, T[] b) throws MathIllegalArgumentException
a
- Factors.b
- Factors.Σi ai bi
.MathIllegalArgumentException
- if arrays dimensions don't matchT linearCombination(T a1, T b1, T a2, T b2)
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second termlinearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
,
linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
T linearCombination(double a1, T b1, double a2, T b2)
a1
- first factor of the first termb1
- second factor of the first terma2
- first factor of the second termb2
- second factor of the second termlinearCombination(double, FieldElement, double, FieldElement, double, FieldElement)
,
linearCombination(double, FieldElement, double, FieldElement, double, FieldElement, double, FieldElement)
T linearCombination(T a1, T b1, T a2, T b2, T a3, T b3)
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 termlinearCombination(FieldElement, FieldElement, FieldElement, FieldElement)
,
linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
T linearCombination(double a1, T b1, double a2, T b2, double a3, T b3)
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 termlinearCombination(double, FieldElement, double, FieldElement)
,
linearCombination(double, FieldElement, double, FieldElement, double, FieldElement, double, FieldElement)
T linearCombination(T a1, T b1, T a2, T b2, T a3, T b3, T a4, T b4)
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 termlinearCombination(FieldElement, FieldElement, FieldElement, FieldElement)
,
linearCombination(FieldElement, FieldElement, FieldElement, FieldElement, FieldElement, FieldElement)
T linearCombination(double a1, T b1, double a2, T b2, double a3, T b3, double a4, T b4)
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 termlinearCombination(double, FieldElement, double, FieldElement)
,
linearCombination(double, FieldElement, double, FieldElement, double, FieldElement)
T ceil()
T floor()
T rint()
T remainder(double a)
a
- right hand side parameter of the operatorT remainder(T a)
a
- right hand side parameter of the operatorT sign()
T copySign(T sign)
sign
argument is treated as positive.sign
- the sign for the returned valuesign
argumentT copySign(double sign)
sign
argument is treated as positive.sign
- the sign for the returned valuesign
argumentdefault boolean isInfinite()
default boolean isFinite()
default boolean isNaN()
default double norm()
default long round()
FieldElement.getReal()
Copyright © 2016-2022 CS GROUP. All rights reserved.