public interface CFun
Complex
). java.lang.Math
. Most of them are used by
Complex
.de.frame4j.math
,
Complex
Modifier and Type | Interface and Description |
---|---|
static class |
CFun.Impl |
Modifier and Type | Field and Description |
---|---|
static double |
D_NaN
The invalid value (NaN) for double.
|
static long |
D_SIGN_MASK
Mask for the sign bit in IEEE 754 double coding.
|
static long |
D_VALUE_MASK
Mask for exponent and mantissa in IEEE 754 double coding.
|
static double |
EPSILON_SMALL
The smallest relative spacing for doubles.
|
static MathContext |
FOUR_MC
A mathematical context with precision 4.
|
static int |
NOSH
Number of special hash values.
|
static double |
PI
pi .
|
static double |
PI_2
pi/2 .
|
static double |
PI_3_4
3pi/4 .
|
static double |
PI_4
pi/4 .
|
Modifier and Type | Method and Description |
---|---|
static StringBuilder |
append(StringBuilder bastel,
double dD,
int prec,
String[] forms)
Append the text representation of a double.
|
static double |
asinh(double x)
Arcussinus hyperbolicus / inverse (arc) hyperbolic sine.
|
static double |
cosh(double x)
Hyperbolic cosine.
|
static double |
csevl(double x,
double[] coef)
Evaluate a Chebyshev series.
|
static MathContext |
getMathContext(int prec)
Return a mathematical context.
|
static int |
hashCode(double x,
double y)
A hash value for a double pair.
|
static boolean |
sign(double val)
The sign of a double.
|
static double |
sign(double val,
double sign)
Value of x with the sign of y.
|
static double |
sinh(double x)
Hyperbolic sine.
|
static double |
tanh(double x)
Tangens hyperbolicus / hyperbolic tangent .
|
static final double EPSILON_SMALL
static final double D_NaN
static final double PI
static final double PI_2
static final double PI_4
static final double PI_3_4
static final long D_SIGN_MASK
static final long D_VALUE_MASK
static final int NOSH
hashCode()
,
Constant Field Valuesstatic final MathContext FOUR_MC
static boolean sign(double val)
sign(double, double)
static double sign(double val, double sign)
val
with the
parameter's sign
sign. This will also be done if parameter
sign
is NaN.sign
is NaN in Java's canonical encoding (0x7ff8000000000000L)
that will be positive.val
- take the valuesign
- take the sign (only if val is not NaN)sign(double)
static int hashCode(double x, double y)
Complex
(complex numbers). But it is
nevertheless suitable for other number pairs like common
co-ordinates or factors in a transformation.x | y | Hash-Wert | arcus | Grad |
---|---|---|---|---|
NaN | beliebig | 0 | D_NaN | - |
any | NaN | 0 | D_NaN | - |
+infinit | finite | 1 | 0.0 | 0 |
+infinit | +infinit | 2 | PI_4 | 45 |
finite | +infinit | 3 | PI_2 | 90 |
-infinit | +infinit | 4 | PI_3_4 | 135 |
-infinit | finite | 5 | PI | 180 |
-infinit | -infinit | 6 | -PI_3_4 | 225 |
finite | -infinit | 7 | -PI_2 | 270 |
+infinit | -infinit | 8 | -PI_4 | 315 |
0.0 | 0.0 | 9 | 0.0 | 0 |
1.0 | 0.0 | 10 | 0.0 | 0 |
0.0 | 1.0 | 11 | PI_2 | 90 |
-1.0 | 0.0 | 12 | PI | 180 |
0.0 | -1.0 | 13 | -PI_2 | 270 |
static double csevl(double x, double[] coef)
coef
is not null and does contain no NaN as
well as that the argument x
is in the allowed
range (mostly 0..1).x
- the argumentcoef
- the field (vector) of coefficientsstatic double sinh(double x)
static double cosh(double x)
static double tanh(double x)
static double asinh(double x)
static StringBuilder append(StringBuilder bastel, double dD, int prec, String[] forms)
forms
, if null, will default to
{"", "-", "0.00", "NaN", "inf."}. As might be obvious
forms
has to contain the prefixes for positive and negative, and
the presentments of zero, infinity and invalid.bastel
- the StringBuilder to append to (if null one is made)dD
- the value to be formattedprec
- the decimal precision (2..18; default 4)forms
- an array of length 5 containing no null String, or nullstatic MathContext getMathContext(int prec)
prec
- a precision 0..18 (default 4, 0 meaning unlimited precision)FOUR_MC
,
MathContext.UNLIMITED