
(FPCore (F l) :precision binary64 (let* ((t_0 (* (PI) l))) (- t_0 (* (/ 1.0 (* F F)) (tan t_0)))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \ell\\
t\_0 - \frac{1}{F \cdot F} \cdot \tan t\_0
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F l) :precision binary64 (let* ((t_0 (* (PI) l))) (- t_0 (* (/ 1.0 (* F F)) (tan t_0)))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \ell\\
t\_0 - \frac{1}{F \cdot F} \cdot \tan t\_0
\end{array}
\end{array}
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* l_m (PI))) (t_1 (* (PI) l_m)))
(*
l_s
(if (<= t_1 2.5e-64)
(fma (/ l_m (/ F (PI))) (/ -1.0 F) t_0)
(if (<= t_1 2e+15) (fma (PI) l_m (/ (tan t_0) (* (- F) F))) t_1)))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := l\_m \cdot \mathsf{PI}\left(\right)\\
t_1 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 2.5 \cdot 10^{-64}:\\
\;\;\;\;\mathsf{fma}\left(\frac{l\_m}{\frac{F}{\mathsf{PI}\left(\right)}}, \frac{-1}{F}, t\_0\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{PI}\left(\right), l\_m, \frac{\tan t\_0}{\left(-F\right) \cdot F}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2.50000000000000017e-64Initial program 88.1%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
times-fracN/A
distribute-neg-frac2N/A
inv-powN/A
Applied rewrites92.9%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-PI.f6486.1
Applied rewrites86.1%
Applied rewrites86.2%
if 2.50000000000000017e-64 < (*.f64 (PI.f64) l) < 2e15Initial program 97.7%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6497.6
Applied rewrites97.6%
if 2e15 < (*.f64 (PI.f64) l) Initial program 78.0%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6499.6
Applied rewrites99.6%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* (PI) l_m)))
(*
l_s
(if (<= t_0 2e+15)
(fma
(/ (/ (sin t_0) F) (cos (* (cbrt (pow (PI) 3.0)) l_m)))
(/ -1.0 F)
(* l_m (PI)))
(*
(pow (PI) 0.8333333333333334)
(* (pow (PI) 0.16666666666666666) l_m))))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\frac{\sin t\_0}{F}}{\cos \left(\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}} \cdot l\_m\right)}, \frac{-1}{F}, l\_m \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\mathsf{PI}\left(\right)}^{0.8333333333333334} \cdot \left({\mathsf{PI}\left(\right)}^{0.16666666666666666} \cdot l\_m\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2e15Initial program 88.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
times-fracN/A
distribute-neg-frac2N/A
inv-powN/A
Applied rewrites93.2%
lift-/.f64N/A
div-invN/A
lift-tan.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
tan-quotN/A
associate-*l/N/A
lower-/.f64N/A
un-div-invN/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6493.2
Applied rewrites93.2%
rem-cbrt-cubeN/A
lift-pow.f64N/A
lift-cbrt.f6493.0
Applied rewrites93.0%
if 2e15 < (*.f64 (PI.f64) l) Initial program 78.0%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6499.6
Applied rewrites99.6%
Applied rewrites99.0%
Applied rewrites99.4%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* (PI) l_m)))
(*
l_s
(if (<= t_0 2e+15)
(fma (/ (/ (sin t_0) F) (cos t_0)) (/ -1.0 F) (* l_m (PI)))
(*
(pow (PI) 0.8333333333333334)
(* (pow (PI) 0.16666666666666666) l_m))))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\frac{\sin t\_0}{F}}{\cos t\_0}, \frac{-1}{F}, l\_m \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\mathsf{PI}\left(\right)}^{0.8333333333333334} \cdot \left({\mathsf{PI}\left(\right)}^{0.16666666666666666} \cdot l\_m\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2e15Initial program 88.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
times-fracN/A
distribute-neg-frac2N/A
inv-powN/A
Applied rewrites93.2%
lift-/.f64N/A
div-invN/A
lift-tan.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
tan-quotN/A
associate-*l/N/A
lower-/.f64N/A
un-div-invN/A
lower-/.f64N/A
lower-sin.f64N/A
lower-cos.f6493.2
Applied rewrites93.2%
if 2e15 < (*.f64 (PI.f64) l) Initial program 78.0%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6499.6
Applied rewrites99.6%
Applied rewrites99.0%
Applied rewrites99.4%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* (PI) l_m)))
(*
l_s
(if (<= (- t_0 (* (pow (* F F) -1.0) (tan t_0))) -1e-273)
(* (- (PI)) (/ l_m (* F F)))
t_0))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 - {\left(F \cdot F\right)}^{-1} \cdot \tan t\_0 \leq -1 \cdot 10^{-273}:\\
\;\;\;\;\left(-\mathsf{PI}\left(\right)\right) \cdot \frac{l\_m}{F \cdot F}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (-.f64 (*.f64 (PI.f64) l) (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 F F)) (tan.f64 (*.f64 (PI.f64) l)))) < -1e-273Initial program 86.3%
Taylor expanded in l around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f64N/A
lower-/.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6475.8
Applied rewrites75.8%
Taylor expanded in F around 0
Applied rewrites21.3%
Applied rewrites18.2%
if -1e-273 < (-.f64 (*.f64 (PI.f64) l) (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 F F)) (tan.f64 (*.f64 (PI.f64) l)))) Initial program 87.3%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6466.1
Applied rewrites66.1%
Final simplification42.0%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* l_m (PI))))
(*
l_s
(if (<= (* (PI) l_m) 2e+15)
(fma (/ (tan t_0) F) (/ -1.0 F) t_0)
(*
(pow (PI) 0.8333333333333334)
(* (pow (PI) 0.16666666666666666) l_m))))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := l\_m \cdot \mathsf{PI}\left(\right)\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;\mathsf{PI}\left(\right) \cdot l\_m \leq 2 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\tan t\_0}{F}, \frac{-1}{F}, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;{\mathsf{PI}\left(\right)}^{0.8333333333333334} \cdot \left({\mathsf{PI}\left(\right)}^{0.16666666666666666} \cdot l\_m\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2e15Initial program 88.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
times-fracN/A
distribute-neg-frac2N/A
inv-powN/A
Applied rewrites93.2%
if 2e15 < (*.f64 (PI.f64) l) Initial program 78.0%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6499.6
Applied rewrites99.6%
Applied rewrites99.0%
Applied rewrites99.4%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* l_m (PI))))
(*
l_s
(if (<= (* (PI) l_m) 2e+15)
(fma (/ (tan t_0) F) (/ -1.0 F) t_0)
(*
(pow (PI) 0.16666666666666666)
(* (pow (PI) 0.8333333333333334) l_m))))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := l\_m \cdot \mathsf{PI}\left(\right)\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;\mathsf{PI}\left(\right) \cdot l\_m \leq 2 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\tan t\_0}{F}, \frac{-1}{F}, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;{\mathsf{PI}\left(\right)}^{0.16666666666666666} \cdot \left({\mathsf{PI}\left(\right)}^{0.8333333333333334} \cdot l\_m\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2e15Initial program 88.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
times-fracN/A
distribute-neg-frac2N/A
inv-powN/A
Applied rewrites93.2%
if 2e15 < (*.f64 (PI.f64) l) Initial program 78.0%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6499.6
Applied rewrites99.6%
Applied rewrites99.0%
Applied rewrites99.5%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (let* ((t_0 (* (PI) l_m)) (t_1 (* l_m (PI)))) (* l_s (if (<= t_0 2e+15) (fma (/ (tan t_1) F) (/ -1.0 F) t_1) t_0))))
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
t_1 := l\_m \cdot \mathsf{PI}\left(\right)\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\tan t\_1}{F}, \frac{-1}{F}, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2e15Initial program 88.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
times-fracN/A
distribute-neg-frac2N/A
inv-powN/A
Applied rewrites93.2%
if 2e15 < (*.f64 (PI.f64) l) Initial program 78.0%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6499.6
Applied rewrites99.6%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (let* ((t_0 (* (PI) l_m))) (* l_s (if (<= t_0 2e+15) (- t_0 (/ (/ (tan (* l_m (PI))) F) F)) t_0))))
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{+15}:\\
\;\;\;\;t\_0 - \frac{\frac{\tan \left(l\_m \cdot \mathsf{PI}\left(\right)\right)}{F}}{F}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2e15Initial program 88.7%
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6493.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6493.1
Applied rewrites93.1%
if 2e15 < (*.f64 (PI.f64) l) Initial program 78.0%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6499.6
Applied rewrites99.6%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* (PI) l_m)))
(*
l_s
(if (<= t_0 50000.0) (* (* (PI) (- 1.0 (pow (* F F) -1.0))) l_m) t_0))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 50000:\\
\;\;\;\;\left(\mathsf{PI}\left(\right) \cdot \left(1 - {\left(F \cdot F\right)}^{-1}\right)\right) \cdot l\_m\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 5e4Initial program 88.7%
Taylor expanded in l around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f64N/A
lower-/.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6481.7
Applied rewrites81.7%
Taylor expanded in F around 0
Applied rewrites81.7%
if 5e4 < (*.f64 (PI.f64) l) Initial program 78.4%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6497.5
Applied rewrites97.5%
Final simplification84.6%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* (PI) l_m)))
(*
l_s
(if (<= t_0 50000.0)
(fma (/ l_m (/ F (PI))) (/ -1.0 F) (* l_m (PI)))
t_0))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 50000:\\
\;\;\;\;\mathsf{fma}\left(\frac{l\_m}{\frac{F}{\mathsf{PI}\left(\right)}}, \frac{-1}{F}, l\_m \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 5e4Initial program 88.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
times-fracN/A
distribute-neg-frac2N/A
inv-powN/A
Applied rewrites93.2%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-PI.f6486.2
Applied rewrites86.2%
Applied rewrites86.2%
if 5e4 < (*.f64 (PI.f64) l) Initial program 78.4%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6497.5
Applied rewrites97.5%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (let* ((t_0 (* (PI) l_m)) (t_1 (* l_m (PI)))) (* l_s (if (<= t_0 50000.0) (fma (/ t_1 F) (/ -1.0 F) t_1) t_0))))
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
t_1 := l\_m \cdot \mathsf{PI}\left(\right)\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 50000:\\
\;\;\;\;\mathsf{fma}\left(\frac{t\_1}{F}, \frac{-1}{F}, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 5e4Initial program 88.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
times-fracN/A
distribute-neg-frac2N/A
inv-powN/A
Applied rewrites93.2%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-PI.f6486.2
Applied rewrites86.2%
Applied rewrites86.2%
if 5e4 < (*.f64 (PI.f64) l) Initial program 78.4%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6497.5
Applied rewrites97.5%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* (PI) l_m)))
(*
l_s
(if (<= t_0 50000.0)
(fma (* (PI) (/ l_m F)) (/ -1.0 F) (* l_m (PI)))
t_0))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 50000:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot \frac{l\_m}{F}, \frac{-1}{F}, l\_m \cdot \mathsf{PI}\left(\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 5e4Initial program 88.7%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
*-rgt-identityN/A
times-fracN/A
distribute-neg-frac2N/A
inv-powN/A
Applied rewrites93.2%
Taylor expanded in l around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
lower-PI.f6486.2
Applied rewrites86.2%
Applied rewrites86.2%
if 5e4 < (*.f64 (PI.f64) l) Initial program 78.4%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6497.5
Applied rewrites97.5%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* (PI) l_m)))
(*
l_s
(if (<= t_0 50000.0) (fma (PI) l_m (* (/ (PI) F) (/ l_m (- F)))) t_0))))\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 50000:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{PI}\left(\right), l\_m, \frac{\mathsf{PI}\left(\right)}{F} \cdot \frac{l\_m}{-F}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 5e4Initial program 88.7%
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
un-div-invN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6489.0
Applied rewrites89.0%
Taylor expanded in l around 0
mul-1-negN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-frac-negN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-PI.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
if 5e4 < (*.f64 (PI.f64) l) Initial program 78.4%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6497.5
Applied rewrites97.5%
Final simplification88.2%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (let* ((t_0 (* (PI) l_m))) (* l_s (if (<= t_0 50000.0) (* (- (PI) (/ (PI) (* F F))) l_m) t_0))))
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot l\_m\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 50000:\\
\;\;\;\;\left(\mathsf{PI}\left(\right) - \frac{\mathsf{PI}\left(\right)}{F \cdot F}\right) \cdot l\_m\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 5e4Initial program 88.7%
Taylor expanded in l around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f64N/A
lower-/.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6481.7
Applied rewrites81.7%
if 5e4 < (*.f64 (PI.f64) l) Initial program 78.4%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6497.5
Applied rewrites97.5%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (* l_s (* (PI) l_m)))
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \left(\mathsf{PI}\left(\right) \cdot l\_m\right)
\end{array}
Initial program 86.8%
Taylor expanded in F around inf
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6471.9
Applied rewrites71.9%
herbie shell --seed 2024319
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* (PI) l) (* (/ 1.0 (* F F)) (tan (* (PI) l)))))