Fix a typo in the comment.
The implementation of expf() explains how approximation in the range [0 - 0.34] is done. The comment describes the "Reme" algorithm for constructing the polynomial. This is a typo and should be the "Remez" algorithm. The remez algorithm (or minimax) is used to calculate the coefficients of polynomials in other implementations of exp(0 and log(). See more: https://en.wikipedia.org/wiki/Remez_algorithm
This commit is contained in:
parent
125e39bfea
commit
abf672604b
|
@ -28,7 +28,7 @@
|
||||||
* the interval [0,0.34658]:
|
* the interval [0,0.34658]:
|
||||||
* Write
|
* Write
|
||||||
* R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...
|
* R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...
|
||||||
* We use a special Reme algorithm on [0,0.34658] to generate
|
* We use a special Remez algorithm on [0,0.34658] to generate
|
||||||
* a polynomial of degree 5 to approximate R. The maximum error
|
* a polynomial of degree 5 to approximate R. The maximum error
|
||||||
* of this polynomial approximation is bounded by 2**-59. In
|
* of this polynomial approximation is bounded by 2**-59. In
|
||||||
* other words,
|
* other words,
|
||||||
|
|
Loading…
Reference in New Issue