private elemental function sin_reduced(r) result(y)
Horner sin Taylor on |r| ≤ π/4. sin(r) = r * P(r²) where
P is the odd-power polynomial in r² — avoids computing r¹,
r³, r⁵… separately. 9 terms (highest power r¹⁷) gives
< 1e-18 truncation error.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Variables
Type
Visibility
Attributes
Name
Initial
real(kind=wp),
private
::
p
real(kind=wp),
private
::
u
Source Code
elemental function sin_reduced(r)result(y)!! Horner sin Taylor on |r| ≤ π/4. `sin(r) = r * P(r²)` where!! P is the odd-power polynomial in r² — avoids computing r¹,!! r³, r⁵... separately. 9 terms (highest power r¹⁷) gives!! < 1e-18 truncation error.real(wp),intent(in)::rreal(wp)::yreal(wp)::u,pu=r*rp=SIN_C8p=p*u+SIN_C7p=p*u+SIN_C6p=p*u+SIN_C5p=p*u+SIN_C4p=p*u+SIN_C3p=p*u+SIN_C2p=p*u+SIN_C1p=p*u+SIN_C0y=r*pend function sin_reduced