
(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 21 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) (* angle_m 0.005555555555555556)))
(t_1 (* (+ b a) (* (- b a) (* 2.0 (sin t_0))))))
(*
angle_s
(if (<= (/ angle_m 180.0) 5e+156)
(* t_1 (cos (pow (exp (- (log t_0))) -1.0)))
(* t_1 (cos (/ (* angle_m 0.005555555555555556) (/ 1.0 (PI)))))))))\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 \left(angle\_m \cdot 0.005555555555555556\right)\\
t_1 := \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin t\_0\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+156}:\\
\;\;\;\;t\_1 \cdot \cos \left({\left(e^{-\log t\_0}\right)}^{-1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \cos \left(\frac{angle\_m \cdot 0.005555555555555556}{\frac{1}{\mathsf{PI}\left(\right)}}\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 4.99999999999999992e156Initial program 58.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6472.3
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval73.2
Applied rewrites73.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6474.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.5
Applied rewrites74.5%
lift-/.f64N/A
inv-powN/A
pow-to-expN/A
exp-prodN/A
lower-pow.f64N/A
lower-exp.f64N/A
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
log-recN/A
lower-neg.f64N/A
lower-log.f6438.5
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f6438.5
Applied rewrites38.5%
if 4.99999999999999992e156 < (/.f64 angle #s(literal 180 binary64)) Initial program 37.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6442.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval43.1
Applied rewrites43.1%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6437.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6437.6
Applied rewrites37.6%
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
div-invN/A
associate-/r*N/A
lift-/.f64N/A
lower-/.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f64N/A
lower-/.f6442.7
Applied rewrites42.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
(*
(+ b a)
(*
(- b a)
(* 2.0 (sin (* (PI) (* angle_m 0.005555555555555556))))))))
(*
angle_s
(if (<= (pow a 2.0) 4e-290)
(* t_0 1.0)
(* t_0 (cos (* 0.005555555555555556 (/ (PI) (/ 1.0 angle_m)))))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 4 \cdot 10^{-290}:\\
\;\;\;\;t\_0 \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \cos \left(0.005555555555555556 \cdot \frac{\mathsf{PI}\left(\right)}{\frac{1}{angle\_m}}\right)\\
\end{array}
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 4.0000000000000003e-290Initial program 62.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6466.8
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval66.8
Applied rewrites66.8%
Taylor expanded in angle around 0
Applied rewrites71.9%
if 4.0000000000000003e-290 < (pow.f64 a #s(literal 2 binary64)) Initial program 51.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval68.8
Applied rewrites68.8%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*r/N/A
*-commutativeN/A
div-invN/A
times-fracN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6469.3
Applied rewrites69.3%
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 (sin (* (PI) (* angle_m 0.005555555555555556))))))
(*
angle_s
(if (<= (pow a 2.0) 5e-270)
(* (* (+ b a) (* (- b a) t_0)) 1.0)
(*
(* (- b a) (* (+ b a) t_0))
(cos (* 0.005555555555555556 (* angle_m (PI)))))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := 2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 5 \cdot 10^{-270}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t\_0\right)\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot t\_0\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\\
\end{array}
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 4.9999999999999998e-270Initial program 62.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.0
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval67.0
Applied rewrites67.0%
Taylor expanded in angle around 0
Applied rewrites71.7%
if 4.9999999999999998e-270 < (pow.f64 a #s(literal 2 binary64)) Initial program 51.4%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-cos.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6450.0
Applied rewrites50.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
lift-+.f64N/A
lift--.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
Applied rewrites69.2%
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 (sqrt (PI))))
(*
angle_s
(if (<= b 2.9e+165)
(*
(*
(+ b a)
(* (- b a) (* 2.0 (sin (* (PI) (* angle_m 0.005555555555555556))))))
(cos (* (/ angle_m 180.0) (* (sqrt (* (PI) t_0)) (sqrt t_0)))))
(*
(*
(+ b a)
(*
(- b a)
(* 2.0 (sin (* t_0 (* (* angle_m 0.005555555555555556) t_0))))))
(cos (/ (* (PI) 0.005555555555555556) (/ 1.0 angle_m))))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 2.9 \cdot 10^{+165}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot \left(\sqrt{\mathsf{PI}\left(\right) \cdot t\_0} \cdot \sqrt{t\_0}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(t\_0 \cdot \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot t\_0\right)\right)\right)\right)\right) \cdot \cos \left(\frac{\mathsf{PI}\left(\right) \cdot 0.005555555555555556}{\frac{1}{angle\_m}}\right)\\
\end{array}
\end{array}
\end{array}
if b < 2.90000000000000006e165Initial program 55.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6465.4
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval66.3
Applied rewrites66.3%
rem-square-sqrtN/A
sqrt-unprodN/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6468.7
Applied rewrites68.7%
if 2.90000000000000006e165 < b Initial program 54.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6484.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval84.4
Applied rewrites84.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6484.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6484.4
Applied rewrites84.4%
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
div-invN/A
associate-/r*N/A
clear-numN/A
lower-/.f64N/A
div-invN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f6488.2
Applied rewrites88.2%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6473.0
Applied rewrites73.0%
Final simplification69.2%
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
(*
(*
(+ b a)
(* (- b a) (* 2.0 (sin (* (PI) (* angle_m 0.005555555555555556))))))
(cos (/ (* (PI) 0.005555555555555556) (/ 1.0 angle_m))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{\mathsf{PI}\left(\right) \cdot 0.005555555555555556}{\frac{1}{angle\_m}}\right)\right)
\end{array}
Initial program 55.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval68.2
Applied rewrites68.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6468.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6468.3
Applied rewrites68.3%
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
div-invN/A
associate-/r*N/A
clear-numN/A
lower-/.f64N/A
div-invN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f6470.0
Applied rewrites70.0%
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) 4e-290)
(*
(*
(+ b a)
(* (- b a) (* 2.0 (sin (* (PI) (* angle_m 0.005555555555555556))))))
1.0)
(* (- b a) (* (+ b a) (sin (* (PI) (* angle_m 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}\;{a}^{2} \leq 4 \cdot 10^{-290}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 4.0000000000000003e-290Initial program 62.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6466.8
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval66.8
Applied rewrites66.8%
Taylor expanded in angle around 0
Applied rewrites71.9%
if 4.0000000000000003e-290 < (pow.f64 a #s(literal 2 binary64)) Initial program 51.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval68.8
Applied rewrites68.8%
rem-square-sqrtN/A
sqrt-unprodN/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6470.1
Applied rewrites70.1%
Applied rewrites68.3%
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 b 2.0) (pow a 2.0)) -2e-232)
(* -0.011111111111111112 (* a (* a (* angle_m (PI)))))
(* (* angle_m 0.011111111111111112) (* (PI) (* b b))))))\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}^{2} - {a}^{2} \leq -2 \cdot 10^{-232}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -2.00000000000000005e-232Initial program 55.8%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.4
Applied rewrites53.4%
Taylor expanded in b around 0
Applied rewrites51.9%
Applied rewrites58.6%
if -2.00000000000000005e-232 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 54.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.9
Applied rewrites55.9%
Taylor expanded in b around 0
Applied rewrites25.5%
Taylor expanded in b around inf
Applied rewrites55.9%
Final simplification56.9%
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 b 2.0) (pow a 2.0)) -2e-232)
(* -0.011111111111111112 (* a (* a (* angle_m (PI)))))
(* 0.011111111111111112 (* (PI) (* angle_m (* b b)))))))\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}^{2} - {a}^{2} \leq -2 \cdot 10^{-232}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -2.00000000000000005e-232Initial program 55.8%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.4
Applied rewrites53.4%
Taylor expanded in b around 0
Applied rewrites51.9%
Applied rewrites58.6%
if -2.00000000000000005e-232 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 54.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.9
Applied rewrites55.9%
Taylor expanded in b around inf
Applied rewrites55.9%
Final simplification56.9%
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 180.0) 1e+64)
(*
(+ b a)
(*
(- b a)
(*
angle_m
(fma
-2.2862368541380886e-7
(* (* angle_m angle_m) (* (PI) (* (PI) (PI))))
(* (PI) 0.011111111111111112)))))
(* (* (+ b a) (- b a)) (sin (* (PI) (* angle_m 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}\;\frac{angle\_m}{180} \leq 10^{+64}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right) \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000002e64Initial program 61.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites76.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6471.7
Applied rewrites71.7%
if 1.00000000000000002e64 < (/.f64 angle #s(literal 180 binary64)) Initial program 36.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6440.9
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval39.9
Applied rewrites39.9%
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites37.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
metadata-evalN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6437.7
Applied rewrites37.7%
Final simplification63.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 (* (+ b a) (* (- b a) (sin (/ (* (PI) 0.011111111111111112) (/ 1.0 angle_m)))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot 0.011111111111111112}{\frac{1}{angle\_m}}\right)\right)\right)
\end{array}
Initial program 55.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites64.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-PI.f64N/A
*-commutativeN/A
remove-double-divN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f64N/A
lift-PI.f64N/A
lower-*.f6468.2
Applied rewrites68.2%
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 (sin (* 0.011111111111111112 (* angle_m (PI))))))
(*
angle_s
(if (<= b 1.6e-119)
(* (+ b a) (* (- a) t_0))
(if (<= b 2.9e+149)
(* (- b a) (* (+ b a) (* angle_m (* (PI) 0.011111111111111112))))
(if (<= b 1.65e+258)
(*
(+ b a)
(*
angle_m
(fma
0.011111111111111112
(* (- b a) (PI))
(*
(* -2.2862368541380886e-7 (* angle_m angle_m))
(* (- b a) (* (PI) (* (PI) (PI))))))))
(* (+ b a) (* b t_0))))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 1.6 \cdot 10^{-119}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(-a\right) \cdot t\_0\right)\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+149}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle\_m \cdot \left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{+258}:\\
\;\;\;\;\left(b + a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(0.011111111111111112, \left(b - a\right) \cdot \mathsf{PI}\left(\right), \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(b \cdot t\_0\right)\\
\end{array}
\end{array}
\end{array}
if b < 1.59999999999999997e-119Initial program 55.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites62.8%
Taylor expanded in b around 0
mul-1-negN/A
lower-neg.f6441.2
Applied rewrites41.2%
if 1.59999999999999997e-119 < b < 2.9000000000000002e149Initial program 57.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.7
Applied rewrites61.7%
Applied rewrites69.6%
if 2.9000000000000002e149 < b < 1.64999999999999998e258Initial program 38.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites70.7%
Taylor expanded in angle around 0
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6479.5
Applied rewrites79.5%
if 1.64999999999999998e258 < b Initial program 85.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites85.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6485.7
Applied rewrites85.7%
Final simplification51.4%
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 (sin (* 0.011111111111111112 (* angle_m (PI))))))
(*
angle_s
(if (<= b 2.8e-151)
(* t_0 (- (* a a)))
(if (<= b 2.9e+149)
(* (- b a) (* (+ b a) (* angle_m (* (PI) 0.011111111111111112))))
(if (<= b 1.65e+258)
(*
(+ b a)
(*
angle_m
(fma
0.011111111111111112
(* (- b a) (PI))
(*
(* -2.2862368541380886e-7 (* angle_m angle_m))
(* (- b a) (* (PI) (* (PI) (PI))))))))
(* (+ b a) (* b t_0))))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 2.8 \cdot 10^{-151}:\\
\;\;\;\;t\_0 \cdot \left(-a \cdot a\right)\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+149}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle\_m \cdot \left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{+258}:\\
\;\;\;\;\left(b + a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(0.011111111111111112, \left(b - a\right) \cdot \mathsf{PI}\left(\right), \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(b \cdot t\_0\right)\\
\end{array}
\end{array}
\end{array}
if b < 2.8000000000000001e-151Initial program 54.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6464.4
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval65.8
Applied rewrites65.8%
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites58.7%
Taylor expanded in b around 0
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
mul-1-negN/A
unpow2N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6438.3
Applied rewrites38.3%
if 2.8000000000000001e-151 < b < 2.9000000000000002e149Initial program 60.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6463.8
Applied rewrites63.8%
Applied rewrites72.3%
if 2.9000000000000002e149 < b < 1.64999999999999998e258Initial program 38.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites70.7%
Taylor expanded in angle around 0
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6479.5
Applied rewrites79.5%
if 1.64999999999999998e258 < b Initial program 85.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites85.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6485.7
Applied rewrites85.7%
Final simplification50.9%
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) 5e+302)
(* angle_m (* (* (PI) 0.011111111111111112) (* (+ b a) (- b a))))
(* -0.011111111111111112 (* a (* a (* angle_m (PI))))))))\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 5 \cdot 10^{+302}:\\
\;\;\;\;angle\_m \cdot \left(\left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 5e302Initial program 58.9%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.7
Applied rewrites54.7%
Applied rewrites54.8%
if 5e302 < (pow.f64 a #s(literal 2 binary64)) Initial program 40.9%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.0
Applied rewrites56.0%
Taylor expanded in b around 0
Applied rewrites54.1%
Applied rewrites69.1%
Final simplification57.9%
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) 5e+302)
(* (* (+ b a) (- b a)) (* angle_m (* (PI) 0.011111111111111112)))
(* -0.011111111111111112 (* a (* a (* angle_m (PI))))))))\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 5 \cdot 10^{+302}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(angle\_m \cdot \left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 5e302Initial program 58.9%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.7
Applied rewrites54.7%
if 5e302 < (pow.f64 a #s(literal 2 binary64)) Initial program 40.9%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.0
Applied rewrites56.0%
Taylor expanded in b around 0
Applied rewrites54.1%
Applied rewrites69.1%
Final simplification57.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
(* (- b a) (* (+ b a) (* angle_m (* (PI) 0.011111111111111112))))))
(*
angle_s
(if (<= b 2.8e-151)
(* (sin (* 0.011111111111111112 (* angle_m (PI)))) (- (* a a)))
(if (<= b 2.9e+149)
t_0
(if (<= b 6.3e+257)
(*
(+ b a)
(*
angle_m
(fma
0.011111111111111112
(* (- b a) (PI))
(*
(* -2.2862368541380886e-7 (* angle_m angle_m))
(* (- b a) (* (PI) (* (PI) (PI))))))))
t_0))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle\_m \cdot \left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right)\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 2.8 \cdot 10^{-151}:\\
\;\;\;\;\sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(-a \cdot a\right)\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;b \leq 6.3 \cdot 10^{+257}:\\
\;\;\;\;\left(b + a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(0.011111111111111112, \left(b - a\right) \cdot \mathsf{PI}\left(\right), \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if b < 2.8000000000000001e-151Initial program 54.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6464.4
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval65.8
Applied rewrites65.8%
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites58.7%
Taylor expanded in b around 0
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
mul-1-negN/A
unpow2N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6438.3
Applied rewrites38.3%
if 2.8000000000000001e-151 < b < 2.9000000000000002e149 or 6.30000000000000012e257 < b Initial program 63.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6464.6
Applied rewrites64.6%
Applied rewrites72.2%
if 2.9000000000000002e149 < b < 6.30000000000000012e257Initial program 38.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites70.7%
Taylor expanded in angle around 0
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6479.5
Applied rewrites79.5%
Final simplification50.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 (* (- b a) (* (+ b a) (sin (* (PI) (* angle_m 0.011111111111111112)))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)
\end{array}
Initial program 55.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval68.2
Applied rewrites68.2%
rem-square-sqrtN/A
sqrt-unprodN/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6468.4
Applied rewrites68.4%
Applied rewrites67.9%
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 180.0) 1e+64)
(*
(+ b a)
(*
(- b a)
(*
angle_m
(fma
-2.2862368541380886e-7
(* (* angle_m angle_m) (* (PI) (* (PI) (PI))))
(* (PI) 0.011111111111111112)))))
(* (* (+ b a) (- b a)) (* (PI) (* angle_m 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}\;\frac{angle\_m}{180} \leq 10^{+64}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \mathsf{PI}\left(\right) \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000002e64Initial program 61.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites76.2%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6471.7
Applied rewrites71.7%
if 1.00000000000000002e64 < (/.f64 angle #s(literal 180 binary64)) Initial program 36.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6428.8
Applied rewrites28.8%
Applied rewrites28.8%
Final simplification61.2%
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 180.0) 5e-76)
(* -0.011111111111111112 (* a (* a (* angle_m (PI)))))
(* -0.011111111111111112 (* angle_m (* (PI) (* a 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}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{-76}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(angle\_m \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a \cdot a\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 4.9999999999999998e-76Initial program 60.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6464.9
Applied rewrites64.9%
Taylor expanded in b around 0
Applied rewrites42.5%
Applied rewrites44.9%
if 4.9999999999999998e-76 < (/.f64 angle #s(literal 180 binary64)) Initial program 44.9%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6437.3
Applied rewrites37.3%
Taylor expanded in b around 0
Applied rewrites23.0%
Applied rewrites23.1%
Final simplification37.0%
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 180.0) 3e-25)
(* -0.011111111111111112 (* a (* a (* angle_m (PI)))))
(* -0.011111111111111112 (* (PI) (* angle_m (* a 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}\;\frac{angle\_m}{180} \leq 3 \cdot 10^{-25}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\mathsf{PI}\left(\right) \cdot \left(angle\_m \cdot \left(a \cdot a\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 2.9999999999999998e-25Initial program 62.5%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6466.4
Applied rewrites66.4%
Taylor expanded in b around 0
Applied rewrites42.9%
Applied rewrites45.2%
if 2.9999999999999998e-25 < (/.f64 angle #s(literal 180 binary64)) Initial program 39.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6430.7
Applied rewrites30.7%
Taylor expanded in b around 0
Applied rewrites19.7%
Final simplification37.0%
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 2.8e-151)
(* (* a a) (* (* angle_m (PI)) -0.011111111111111112))
(* (- b a) (* (+ b a) (* angle_m (* (PI) 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 2.8 \cdot 10^{-151}:\\
\;\;\;\;\left(a \cdot a\right) \cdot \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot -0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle\_m \cdot \left(\mathsf{PI}\left(\right) \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.8000000000000001e-151Initial program 54.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.6
Applied rewrites53.6%
Taylor expanded in b around 0
Applied rewrites35.3%
Applied rewrites35.3%
if 2.8000000000000001e-151 < b Initial program 56.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6457.8
Applied rewrites57.8%
Applied rewrites70.6%
Final simplification47.3%
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 (* a (* angle_m (PI)))))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle\_m \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)
\end{array}
Initial program 55.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.0
Applied rewrites55.0%
Taylor expanded in b around 0
Applied rewrites35.5%
Applied rewrites36.3%
Final simplification36.3%
herbie shell --seed 2024221
(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)))))