Hyperbolic functions.
Inheritance Hierarchy Namespace: Altaxo.CalcAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3618.0 (4.8.3618.0)
Syntaxpublic static class Hyperbolic
The Hyperbolic type exposes the following members.
Methods| | Name | Description |
|---|
  | Acosh |
Returns the inverse hyperbolic cosine of a value.
|
  | Asinh |
Returns the inverse hyperbolic sine of a value.
|
  | Atanh |
Returns the inverse hyperbolic tangent of a value.
|
  | Cosh |
Hyperbolic cosine, i.e. (Exp(x)+Exp(-x))/2.
|
  | Coth |
Hyperbolic cotangent, i.e. Cosh(x)/Sinh(x).
|
  | Csch |
Hyperbolic cosecant, i.e. 1/Sinh(x) = 2/(Exp(x)-Exp(-x)).
|
  | CschTimesX |
Hyperbolic cosecant, multiplied with the argument x, i.e. x*Csch(x) = x/Sinh(x).
|
  | ExpMinusOne |
Calculates Exp(x)-1 with better accuracy around x=0.
|
  | InverseLangevin |
High-accuracy inverse Langevin function: starts from Kröger's rational
approximation (max. relative error ~0.28%) and refines it with a fixed
number of Newton-Raphson steps on the exact equation L(x) = y, where
L is the true Langevin function (not an approximation).
Each Newton step roughly doubles the number of correct digits, so
starting from ~0.28% (about 2-3 correct digits), 3 steps reach full
double precision (~15-16 digits) everywhere except in the immediate
vicinity of y = +-1, where L'(x) -> 0 and the problem becomes
ill-conditioned regardless of solver.
|
  | InverseLangevinApproximationByCohen |
Padé approximation of the inverse Langevin function (Cohen, 1991).
Accurate to within ~5% over the full domain (0,1).
|
  | InverseLangevinApproximationByJedynak |
Inverse Langevin function approximation by Jedynak (2015).
|
  | InverseLangevinApproximationByKroger |
Kröger's rational approximation of the inverse Langevin function
(Kröger, M., J. Non-Newtonian Fluid Mech. 223 (2015) 77-87).
Substantially more accurate than Cohen's Padé approximant (max.
relative error ~0.28% vs. ~4.9%), at a similar computational cost,
since it is still a single rational expression with only integer powers.
|
  | InverseLangevinDerivative |
High-accuracy derivative of the inverse Langevin function, d(L^-1)/dy.
Uses the inverse function theorem: if x = L^-1(y), then
d(L^-1)/dy (y) = 1 / L'(x)
evaluated with the EXACT Langevin derivative (not an approximant's
derivative), at the highly accurate x produced by
InverseLangevinAccurate. This is far more accurate than
differentiating a closed-form approximation analytically (e.g.
InverseLangevinDerivative, which inherits Cohen's ~5% approximation
error) -- the error here is limited only by the Newton refinement
in InverseLangevinAccurate, i.e. essentially full double precision
away from y = +-1.
|
  | InverseLangevinDerivativeApproxiationByCohen |
Closed-form derivative of Cohen's Padé approximant of the inverse Langevin
function, dL^-1/dx = (3 + x^4) / (1 - x^2)^2.
|
  | Langevin |
Langevin function, which is defined as Coth(x)-1/x.
|
  | LangevinFirstDerivative |
Exact derivative of the Langevin function, L'(x) = 1/x^2 - csch^2(x),
evaluated via its Taylor series near x = 0 to avoid cancellation error.
|
  | Log1p |
Calculates the natural logarithm of 1+x with better accuracy for very small x.
|
  | OneMinusExp |
Calculates 1-Exp(x) with better accuracy around x=0.
|
  | Sech |
Hyperbolic secant, i.e. 1/Cosh(x) = 2/(Exp(x)+Exp(-x)).
|
  | Sinh |
Hyperbolic sine, i.e. (Exp(x)-Exp(-x))/2.
|
  | SinhAxBxTimesCschX |
Calculates [Exp(a x)-Exp(b x)]/[Exp(x)-Exp(-x)].
|
  | Tanh |
Hyperbolic tangent, i.e. Sinh(x)/Cosh(x).
|
Top
See Also