
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (PI) (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (PI) (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (/ (PI) 2.0))
(t_1
(+
(- (* (/ angle_m 180.0) (PI)) (fma (/ angle_m 180.0) (PI) t_0))
t_0))
(t_2 (+ (fma (/ angle_m 180.0) (PI) (* 0.5 (PI))) t_0))
(t_3 (* (* 0.005555555555555556 angle_m) (PI))))
(*
angle_s
(if (<= angle_m 4.5e+121)
(* (* 2.0 (cos t_3)) (* (* (sin t_3) (+ a b)) (- b a)))
(*
(* (* (+ b a) (- b a)) 2.0)
(/
(* 2.0 (* (sin (/ (- t_1 t_2) 2.0)) (cos (/ (+ t_1 t_2) 2.0))))
2.0))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \frac{\mathsf{PI}\left(\right)}{2}\\
t_1 := \left(\frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right) - \mathsf{fma}\left(\frac{angle\_m}{180}, \mathsf{PI}\left(\right), t\_0\right)\right) + t\_0\\
t_2 := \mathsf{fma}\left(\frac{angle\_m}{180}, \mathsf{PI}\left(\right), 0.5 \cdot \mathsf{PI}\left(\right)\right) + t\_0\\
t_3 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 4.5 \cdot 10^{+121}:\\
\;\;\;\;\left(2 \cdot \cos t\_3\right) \cdot \left(\left(\sin t\_3 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \frac{2 \cdot \left(\sin \left(\frac{t\_1 - t\_2}{2}\right) \cdot \cos \left(\frac{t\_1 + t\_2}{2}\right)\right)}{2}\\
\end{array}
\end{array}
\end{array}
if angle < 4.5000000000000003e121Initial program 62.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites66.0%
Taylor expanded in angle around inf
Applied rewrites76.4%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6475.8
Applied rewrites75.8%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6475.9
Applied rewrites75.9%
if 4.5000000000000003e121 < angle Initial program 25.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites25.1%
lift-*.f64N/A
lift-sin.f64N/A
lift-cos.f64N/A
sin-+PI/2-revN/A
sin-multN/A
lower-/.f64N/A
Applied rewrites29.6%
Taylor expanded in angle around 0
lower-*.f64N/A
lift-PI.f6429.4
Applied rewrites29.4%
Applied rewrites36.6%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* 2.0 (- (pow b 2.0) (pow a 2.0)))))
(*
angle_s
(if (or (<= t_0 -2e-220) (not (<= t_0 INFINITY)))
(* (* -0.011111111111111112 a) (* (* angle_m (PI)) a))
(* (* (* (PI) (* b b)) angle_m) 0.011111111111111112)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-220} \lor \neg \left(t\_0 \leq \infty\right):\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -1.99999999999999998e-220 or +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 45.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6446.2
Applied rewrites46.2%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6444.0
Applied rewrites44.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6445.5
Applied rewrites45.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6453.7
Applied rewrites53.7%
if -1.99999999999999998e-220 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0Initial program 65.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.2
Applied rewrites59.2%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
pow2N/A
lift-*.f6459.4
Applied rewrites59.4%
Final simplification56.7%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (PI) angle_m)))
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 1e-224)
(* 2.0 (* (* (sin (* t_0 0.005555555555555556)) a) (- b a)))
(* (* (* t_0 (+ a b)) (- b a)) 0.011111111111111112)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-224}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(t\_0 \cdot 0.005555555555555556\right) \cdot a\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1e-224Initial program 55.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites55.3%
Taylor expanded in angle around inf
Applied rewrites61.7%
Taylor expanded in angle around 0
Applied rewrites58.9%
Taylor expanded in a around inf
+-commutative57.7
Applied rewrites57.7%
if 1e-224 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 55.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6458.4
Applied rewrites58.4%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6468.8
Applied rewrites68.8%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle_m) (PI)))
(t_1 (* (* (sin t_0) (+ a b)) (- b a))))
(*
angle_s
(if (<= angle_m 2.9e+105)
(* (* 2.0 (cos t_0)) t_1)
(*
(*
2.0
(sin (+ (* (* angle_m (PI)) (- 0.005555555555555556)) (/ (PI) 2.0))))
t_1)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\
t_1 := \left(\sin t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 2.9 \cdot 10^{+105}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \sin \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-0.005555555555555556\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot t\_1\\
\end{array}
\end{array}
\end{array}
if angle < 2.9000000000000001e105Initial program 61.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites65.8%
Taylor expanded in angle around inf
Applied rewrites76.4%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6475.9
Applied rewrites75.9%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6475.9
Applied rewrites75.9%
if 2.9000000000000001e105 < angle Initial program 28.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites28.1%
Taylor expanded in angle around inf
Applied rewrites24.6%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6430.5
Applied rewrites30.5%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-/.f64N/A
lift-PI.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6433.0
Applied rewrites33.0%
Final simplification67.9%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle_m) (PI))))
(*
angle_s
(if (<= angle_m 6e+61)
(* (* 2.0 (cos t_0)) (* (* (sin t_0) (+ a b)) (- b a)))
(*
(* (* (+ b a) (- b a)) 2.0)
(*
(sin (* (PI) (/ angle_m 180.0)))
(cos (/ (* (PI) angle_m) 180.0))))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 6 \cdot 10^{+61}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle\_m}{180}\right)\right)\\
\end{array}
\end{array}
\end{array}
if angle < 6e61Initial program 63.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites66.9%
Taylor expanded in angle around inf
Applied rewrites78.0%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6477.5
Applied rewrites77.5%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6477.5
Applied rewrites77.5%
if 6e61 < angle Initial program 28.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites30.4%
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6433.8
Applied rewrites33.8%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* 2.0 (cos (* (* (PI) angle_m) 0.005555555555555556)))))
(*
angle_s
(if (<= b 9.5e+154)
(*
t_0
(* (* (sin (* (* 0.005555555555555556 angle_m) (PI))) (+ a b)) (- b a)))
(*
t_0
(* (* (* (* (+ a b) (PI)) angle_m) 0.005555555555555556) (- b a)))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := 2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 9.5 \cdot 10^{+154}:\\
\;\;\;\;t\_0 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
\end{array}
if b < 9.5000000000000001e154Initial program 57.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites58.9%
Taylor expanded in angle around inf
Applied rewrites65.1%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6466.3
Applied rewrites66.3%
if 9.5000000000000001e154 < b Initial program 43.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites58.0%
Taylor expanded in angle around inf
Applied rewrites77.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f6477.1
Applied rewrites77.1%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle_m) (PI)))
(t_1 (* (* (sin t_0) (+ a b)) (- b a))))
(*
angle_s
(if (<= angle_m 1.1e+126) (* (* 2.0 (cos t_0)) t_1) (* 2.0 t_1)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\
t_1 := \left(\sin t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 1.1 \cdot 10^{+126}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot t\_1\\
\end{array}
\end{array}
\end{array}
if angle < 1.09999999999999999e126Initial program 62.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites66.1%
Taylor expanded in angle around inf
Applied rewrites76.5%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6476.0
Applied rewrites76.0%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6476.0
Applied rewrites76.0%
if 1.09999999999999999e126 < angle Initial program 23.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites23.4%
Taylor expanded in angle around inf
Applied rewrites19.6%
Taylor expanded in angle around 0
Applied rewrites28.0%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6427.8
Applied rewrites27.8%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -1e-185)
(* (* -0.011111111111111112 a) (* (* angle_m (PI)) a))
(* (* (* (PI) angle_m) (* b (- b a))) 0.011111111111111112))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -1 \cdot 10^{-185}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -9.9999999999999999e-186Initial program 52.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6444.3
Applied rewrites44.3%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6443.6
Applied rewrites43.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6445.4
Applied rewrites45.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6452.6
Applied rewrites52.6%
if -9.9999999999999999e-186 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 57.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.0
Applied rewrites59.0%
Taylor expanded in a around 0
Applied rewrites57.5%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= angle_m 1.8e-10)
(*
(* 2.0 (cos (* (* (PI) angle_m) 0.005555555555555556)))
(* (* (* (* (+ a b) (PI)) angle_m) 0.005555555555555556) (- b a)))
(* (* (- b a) (+ a b)) (sin (* 2.0 (* (PI) (/ angle_m 180.0))))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 1.8 \cdot 10^{-10}:\\
\;\;\;\;\left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right)\\
\end{array}
\end{array}
if angle < 1.8e-10Initial program 64.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites67.4%
Taylor expanded in angle around inf
Applied rewrites79.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f6477.6
Applied rewrites77.6%
if 1.8e-10 < angle Initial program 33.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites36.6%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites36.7%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= angle_m 1.5e-10)
(* (* (* (* (PI) angle_m) (+ a b)) (- b a)) 0.011111111111111112)
(* (* (- b a) (+ a b)) (sin (* 2.0 (* (PI) (/ angle_m 180.0))))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 1.5 \cdot 10^{-10}:\\
\;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \left(2 \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\right)\\
\end{array}
\end{array}
if angle < 1.5e-10Initial program 64.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6464.7
Applied rewrites64.7%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6475.9
Applied rewrites75.9%
if 1.5e-10 < angle Initial program 33.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites36.6%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites36.7%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (PI) angle_m)))
(*
angle_s
(if (<= b 8.8e+89)
(* 2.0 (* (* (sin (* t_0 0.005555555555555556)) (+ a b)) (- b a)))
(* (* (* t_0 (+ a b)) (- b a)) 0.011111111111111112)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 8.8 \cdot 10^{+89}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(t\_0 \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
\end{array}
if b < 8.8000000000000001e89Initial program 57.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites58.7%
Taylor expanded in angle around inf
Applied rewrites65.0%
Taylor expanded in angle around 0
Applied rewrites63.7%
if 8.8000000000000001e89 < b Initial program 49.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.7
Applied rewrites51.7%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6466.5
Applied rewrites66.5%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= b 6.1e+119)
(*
2.0
(* (* (sin (* (* 0.005555555555555556 angle_m) (PI))) (+ a b)) (- b a)))
(* (* (* (* (PI) angle_m) (+ a b)) (- b a)) 0.011111111111111112))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 6.1 \cdot 10^{+119}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if b < 6.1e119Initial program 57.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites58.6%
Taylor expanded in angle around inf
Applied rewrites64.9%
Taylor expanded in angle around 0
Applied rewrites62.8%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6462.7
Applied rewrites62.7%
if 6.1e119 < b Initial program 47.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.7
Applied rewrites55.7%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6469.8
Applied rewrites69.8%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (pow a 2.0) 2e+307)
(* (* (PI) (* angle_m (* (- b a) (+ a b)))) 0.011111111111111112)
(* (* -0.011111111111111112 a) (* (* angle_m (PI)) a)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+307}:\\
\;\;\;\;\left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999997e307Initial program 59.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.8
Applied rewrites52.8%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6452.9
Applied rewrites52.9%
if 1.99999999999999997e307 < (pow.f64 a #s(literal 2 binary64)) Initial program 43.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.7
Applied rewrites53.7%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6453.5
Applied rewrites53.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6470.5
Applied rewrites70.5%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (pow a 2.0) 8e+286)
(* (* (PI) angle_m) (* (* (- b a) (+ a b)) 0.011111111111111112))
(* (* -0.011111111111111112 a) (* (* angle_m (PI)) a)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 8 \cdot 10^{+286}:\\
\;\;\;\;\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 8.00000000000000026e286Initial program 59.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.4
Applied rewrites53.4%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6453.5
Applied rewrites53.5%
if 8.00000000000000026e286 < (pow.f64 a #s(literal 2 binary64)) Initial program 44.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.8
Applied rewrites51.8%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6448.7
Applied rewrites48.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.7
Applied rewrites51.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6467.1
Applied rewrites67.1%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (pow a 2.0) 8e+286)
(* (* 0.011111111111111112 angle_m) (* (* (PI) (+ a b)) (- b a)))
(* (* -0.011111111111111112 a) (* (* angle_m (PI)) a)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 8 \cdot 10^{+286}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 8.00000000000000026e286Initial program 59.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.4
Applied rewrites53.4%
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites53.4%
if 8.00000000000000026e286 < (pow.f64 a #s(literal 2 binary64)) Initial program 44.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.8
Applied rewrites51.8%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6448.7
Applied rewrites48.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.7
Applied rewrites51.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6467.1
Applied rewrites67.1%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (PI) angle_m)))
(*
angle_s
(if (<= angle_m 5.5e+187)
(* (* (* t_0 (+ a b)) (- b a)) 0.011111111111111112)
(* (* t_0 (* (+ b a) b)) 0.011111111111111112)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot angle\_m\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 5.5 \cdot 10^{+187}:\\
\;\;\;\;\left(\left(t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot \left(\left(b + a\right) \cdot b\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
\end{array}
if angle < 5.49999999999999997e187Initial program 58.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.0
Applied rewrites56.0%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6464.8
Applied rewrites64.8%
if 5.49999999999999997e187 < angle Initial program 25.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6420.2
Applied rewrites20.2%
Taylor expanded in a around 0
Applied rewrites20.4%
angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b angle_m) :precision binary64 (* angle_s (* (* -0.011111111111111112 a) (* (* angle_m (PI)) a))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)\right)
\end{array}
Initial program 55.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.0
Applied rewrites53.0%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6430.3
Applied rewrites30.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6431.0
Applied rewrites31.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6433.4
Applied rewrites33.4%
herbie shell --seed 2025056
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* (PI) (/ angle 180.0)))) (cos (* (PI) (/ angle 180.0)))))