T
- the type of the field elementspublic interface CalculusFieldElement<T> extends FieldElement<T>
FieldElement
Modifier and Type | Field and Description |
---|---|
static double |
DEG_TO_RAD
Degrees to radians conversion factor.
|
static double |
RAD_TO_DEG
Radians to degrees conversion factor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
double |
getReal()
Get the real value of the number.
|
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 |
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.
|
default T |
newInstance(double value)
Create an instance corresponding to a constant real value.
|
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.
|
T |
scalb(int n)
Multiply the instance by a power of 2.
|
T |
signum()
Compute the signum of the instance.
|
T |
sin()
Sine operation.
|
default FieldSinCos<T> |
sinCos()
Combined Sine and Cosine operation.
|
T |
sinh()
Hyperbolic sine operation.
|
T |
sqrt()
Square root.
|
T |
subtract(double a)
'-' operator.
|
T |
tan()
Tangent operation.
|
T |
tanh()
Hyperbolic tangent operation.
|
default T |
toDegrees()
Convert radians to degrees, with error of less than 0.5 ULP
|
default T |
toRadians()
Convert degrees to radians, with error of less than 0.5 ULP
|
static final double DEG_TO_RAD
static final double RAD_TO_DEG
default T newInstance(double value)
The default implementation creates the instance by adding
the value to getField().getZero()
. This is not optimal
and does not work when called with a negative zero as the
sign of zero is lost with the addition. The default implementation
should therefore be overridden in concrete classes. The default
implementation will be removed at the next major version.
value
- constant real valuedouble getReal()
T 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 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>
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()
default FieldSinCos<T> sinCos()
T tan()
T acos()
T asin()
T atan()
T atan2(T x) throws MathIllegalArgumentException
x
- second argument of the arc tangentMathIllegalArgumentException
- if number of free parameters or orders are inconsistentT cosh()
T sinh()
T tanh()
T acosh()
T asinh()
T atanh()
default T toDegrees()
default 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(Object, Object, Object, Object, Object, Object)
,
linearCombination(Object, Object, Object, Object, Object, Object, Object, Object)
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, Object, double, Object, double, Object)
,
linearCombination(double, Object, double, Object, double, Object, double, Object)
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(Object, Object, Object, Object)
,
linearCombination(Object, Object, Object, Object, Object, Object, Object, Object)
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, Object, double, Object)
,
linearCombination(double, Object, double, Object, double, Object, double, Object)
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(Object, Object, Object, Object)
,
linearCombination(Object, Object, Object, Object, Object, Object)
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, Object, double, Object)
,
linearCombination(double, Object, double, Object, double, Object)
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 signum()
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 isNaN()
Copyright © 2016–2020 Hipparchus.org. All rights reserved.