
(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
(*
angle_s
(if (<= (/ angle_m 180.0) 1e+124)
(*
(cos (/ 1.0 (/ 180.0 (* (PI) angle_m))))
(*
(- b a)
(* (+ b a) (* (sin (* (* 0.005555555555555556 angle_m) (PI))) 2.0))))
(if (<= (/ angle_m 180.0) 1e+254)
(*
(cos (* (PI) (/ angle_m 180.0)))
(* (* (+ b a) (- b a)) (* (* 0.011111111111111112 (PI)) angle_m)))
(*
1.0
(*
(/
(*
(*
(sin (* (cbrt (pow (PI) 3.0)) (* 0.005555555555555556 angle_m)))
(+ b a))
2.0)
(pow (- b a) -1.0))
(* (/ (- b a) (+ b a)) (/ (+ b a) (- b 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 10^{+124}:\\
\;\;\;\;\cos \left(\frac{1}{\frac{180}{\mathsf{PI}\left(\right) \cdot angle\_m}}\right) \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 2\right)\right)\right)\\
\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+254}:\\
\;\;\;\;\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 \cdot \left(\frac{\left(\sin \left(\sqrt[3]{{\mathsf{PI}\left(\right)}^{3}} \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right) \cdot \left(b + a\right)\right) \cdot 2}{{\left(b - a\right)}^{-1}} \cdot \left(\frac{b - a}{b + a} \cdot \frac{b + a}{b - a}\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999948e123Initial program 56.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites74.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6476.8
Applied rewrites76.8%
if 9.99999999999999948e123 < (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999994e253Initial program 30.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.8
Applied rewrites54.8%
if 9.9999999999999994e253 < (/.f64 angle #s(literal 180 binary64)) Initial program 41.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites41.1%
Applied rewrites41.1%
lift-PI.f64N/A
add-cbrt-cubeN/A
lower-cbrt.f64N/A
rem-cube-cbrtN/A
add-cbrt-cubeN/A
lift-PI.f64N/A
lower-pow.f6432.7
Applied rewrites32.7%
Taylor expanded in angle around 0
Applied rewrites53.1%
Final simplification73.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
(*
(- b a)
(*
(+ b a)
(* (sin (* (* 0.005555555555555556 angle_m) (PI))) 2.0)))))
(*
angle_s
(if (<= (/ angle_m 180.0) 1e+124)
(* (cos (/ 1.0 (/ 180.0 (* (PI) angle_m)))) t_0)
(if (<= (/ angle_m 180.0) 1e+254)
(*
(cos (* (PI) (/ angle_m 180.0)))
(* (* (+ b a) (- b a)) (* (* 0.011111111111111112 (PI)) angle_m)))
(*
(cos
(*
(pow (* (PI) (PI)) 0.25)
(* (sqrt (PI)) (* 0.005555555555555556 angle_m))))
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(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 2\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+124}:\\
\;\;\;\;\cos \left(\frac{1}{\frac{180}{\mathsf{PI}\left(\right) \cdot angle\_m}}\right) \cdot t\_0\\
\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+254}:\\
\;\;\;\;\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left({\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}^{0.25} \cdot \left(\sqrt{\mathsf{PI}\left(\right)} \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right) \cdot t\_0\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999948e123Initial program 56.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites74.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6476.8
Applied rewrites76.8%
if 9.99999999999999948e123 < (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999994e253Initial program 30.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.8
Applied rewrites54.8%
if 9.9999999999999994e253 < (/.f64 angle #s(literal 180 binary64)) Initial program 41.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites41.1%
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
div-invN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6446.0
Applied rewrites46.0%
lift-sqrt.f64N/A
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
metadata-eval49.8
Applied rewrites49.8%
Final simplification73.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
(*
(cos (* (* (PI) 0.005555555555555556) angle_m))
(*
(- b a)
(*
(+ b a)
(* (sin (* (* 0.005555555555555556 angle_m) (PI))) 2.0))))))
(*
angle_s
(if (<= (/ angle_m 180.0) 1e+60)
t_0
(if (<= (/ angle_m 180.0) 5e+277)
(*
(cos (* (PI) (/ angle_m 180.0)))
(* (* (+ b a) (- b a)) (* (* 0.011111111111111112 (PI)) angle_m)))
t_0)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \cos \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\_m\right) \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 2\right)\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+60}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+277}:\\
\;\;\;\;\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999995e59 or 4.99999999999999982e277 < (/.f64 angle #s(literal 180 binary64)) Initial program 57.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites75.6%
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
div-invN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6476.5
Applied rewrites76.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
rem-square-sqrtN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6476.4
Applied rewrites76.4%
if 9.9999999999999995e59 < (/.f64 angle #s(literal 180 binary64)) < 4.99999999999999982e277Initial program 31.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6448.8
Applied rewrites48.8%
Final simplification72.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))))
(*
angle_s
(if (<= (/ angle_m 180.0) 500000000000.0)
(* (* (sin (* 0.011111111111111112 (* (PI) angle_m))) (- b a)) (+ b a))
(if (<= (/ angle_m 180.0) 1e+254)
(*
(cos (* (PI) (/ angle_m 180.0)))
(* (* (+ b a) (- b a)) (* (* 0.011111111111111112 (PI)) angle_m)))
(* (* (* (cos t_0) (- b a)) (+ b a)) (* (sin t_0) 2.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}\;\frac{angle\_m}{180} \leq 500000000000:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+254}:\\
\;\;\;\;\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\cos t\_0 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\sin t\_0 \cdot 2\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5e11Initial program 58.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 rewrites75.5%
if 5e11 < (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999994e253Initial program 27.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6442.5
Applied rewrites42.5%
if 9.9999999999999994e253 < (/.f64 angle #s(literal 180 binary64)) Initial program 41.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites41.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
Applied rewrites48.4%
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
(let* ((t_0 (sqrt (PI))))
(*
angle_s
(if (<= a 1e+181)
(*
(cos (* (* t_0 (* 0.005555555555555556 angle_m)) t_0))
(*
(- b a)
(* (+ b a) (* (sin (* (* 0.005555555555555556 angle_m) (PI))) 2.0))))
(*
(* (* (* (* (+ b a) (PI)) angle_m) 0.011111111111111112) (- b a))
(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 := \sqrt{\mathsf{PI}\left(\right)}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 10^{+181}:\\
\;\;\;\;\cos \left(\left(t\_0 \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right) \cdot t\_0\right) \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\left(b + a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\\
\end{array}
\end{array}
\end{array}
if a < 9.9999999999999992e180Initial program 55.6%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites69.4%
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
div-invN/A
metadata-evalN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6471.8
Applied rewrites71.8%
if 9.9999999999999992e180 < a Initial program 30.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites62.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-PI.f6483.2
Applied rewrites83.2%
Final simplification72.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 (* (PI) angle_m)))
(*
angle_s
(if (<= a 5e+207)
(*
(cos (/ 1.0 (/ 180.0 t_0)))
(*
(- b a)
(* (+ b a) (* (sin (* (* 0.005555555555555556 angle_m) (PI))) 2.0))))
(*
(* (* (* 0.011111111111111112 t_0) (+ b a)) (- b a))
(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 := \mathsf{PI}\left(\right) \cdot angle\_m\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{+207}:\\
\;\;\;\;\cos \left(\frac{1}{\frac{180}{t\_0}}\right) \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(0.011111111111111112 \cdot t\_0\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right)\\
\end{array}
\end{array}
\end{array}
if a < 4.9999999999999999e207Initial program 55.0%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites69.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6471.6
Applied rewrites71.6%
if 4.9999999999999999e207 < a Initial program 33.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites57.0%
Taylor expanded in angle around 0
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6480.9
Applied rewrites80.9%
Final simplification72.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
(if (<= (- (pow b 2.0) (pow a 2.0)) (- INFINITY))
(* (* (* (PI) angle_m) a) (* -0.011111111111111112 a))
(* (* (* (+ b a) (- b a)) (* 0.011111111111111112 (PI))) angle_m))))\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 -\infty:\\
\;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right)\right) \cdot angle\_m\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 49.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.7
Applied rewrites49.7%
Taylor expanded in a around inf
Applied rewrites49.7%
Applied rewrites77.0%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 54.0%
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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.5
Applied rewrites54.5%
Applied rewrites54.5%
Final simplification58.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 (<= (- (pow b 2.0) (pow a 2.0)) -5e+286)
(* (* (* (PI) angle_m) a) (* -0.011111111111111112 a))
(* (* (+ b a) (- b a)) (* (* 0.011111111111111112 (PI)) angle_m)))))\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 -5 \cdot 10^{+286}:\\
\;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -5.0000000000000004e286Initial program 49.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6448.4
Applied rewrites48.4%
Taylor expanded in a around inf
Applied rewrites48.4%
Applied rewrites72.6%
if -5.0000000000000004e286 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial 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
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%
Final simplification58.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 (<= (- (pow b 2.0) (pow a 2.0)) -2e-202)
(* (* (* (* (PI) angle_m) a) a) -0.011111111111111112)
(* (* (* (* b b) (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}\;{b}^{2} - {a}^{2} \leq -2 \cdot 10^{-202}:\\
\;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot a\right) \cdot a\right) \cdot -0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -2.0000000000000001e-202Initial program 52.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.6
Applied rewrites49.6%
Taylor expanded in a around inf
Applied rewrites49.5%
Applied rewrites62.4%
Applied rewrites62.5%
if -2.0000000000000001e-202 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 53.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.2
Applied rewrites56.2%
Taylor expanded in a around 0
Applied rewrites55.4%
Final simplification58.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 (<= (- (pow b 2.0) (pow a 2.0)) -2e-202)
(* (* (* (PI) angle_m) a) (* -0.011111111111111112 a))
(* (* (* (* b b) (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}\;{b}^{2} - {a}^{2} \leq -2 \cdot 10^{-202}:\\
\;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -2.0000000000000001e-202Initial program 52.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.6
Applied rewrites49.6%
Taylor expanded in a around inf
Applied rewrites49.5%
Applied rewrites62.4%
if -2.0000000000000001e-202 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 53.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.2
Applied rewrites56.2%
Taylor expanded in a around 0
Applied rewrites55.4%
Final simplification58.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 (* (+ b a) (- b a))))
(*
angle_s
(if (<= (/ angle_m 180.0) 500000000000.0)
(* (* (sin (* 0.011111111111111112 (* (PI) angle_m))) (- b a)) (+ b a))
(if (<= (/ angle_m 180.0) 1e+254)
(*
(cos (* (PI) (/ angle_m 180.0)))
(* t_0 (* (* 0.011111111111111112 (PI)) angle_m)))
(* (sin (* (* (* 0.005555555555555556 angle_m) (PI)) 2.0)) 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(b - a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 500000000000:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+254}:\\
\;\;\;\;\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle\_m}{180}\right) \cdot \left(t\_0 \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 2\right) \cdot t\_0\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5e11Initial program 58.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 rewrites75.5%
if 5e11 < (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999994e253Initial program 27.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6442.5
Applied rewrites42.5%
if 9.9999999999999994e253 < (/.f64 angle #s(literal 180 binary64)) Initial program 41.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites41.1%
Applied rewrites48.4%
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
(let* ((t_0 (* (+ b a) (- b a)))
(t_1 (* (* 0.011111111111111112 (PI)) angle_m)))
(*
angle_s
(if (<= (/ angle_m 180.0) 2e-29)
(* (* t_1 (- b a)) (+ b a))
(if (<= (/ angle_m 180.0) 5e+198)
(* t_0 (sin (* 0.011111111111111112 (* (PI) angle_m))))
(* t_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(b + a\right) \cdot \left(b - a\right)\\
t_1 := \left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{-29}:\\
\;\;\;\;\left(t\_1 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+198}:\\
\;\;\;\;t\_0 \cdot \sin \left(0.011111111111111112 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 1.99999999999999989e-29Initial program 57.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.7
Applied rewrites59.7%
Applied rewrites74.4%
if 1.99999999999999989e-29 < (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000049e198Initial program 43.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
Applied rewrites45.7%
if 5.00000000000000049e198 < (/.f64 angle #s(literal 180 binary64)) Initial program 31.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6440.9
Applied rewrites40.9%
Final simplification67.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 (* (PI) angle_m)))
(*
angle_s
(if (<= (/ angle_m 180.0) 500000000000.0)
(* (* (sin (* 0.011111111111111112 t_0)) (- b a)) (+ b a))
(*
(cos (* t_0 0.005555555555555556))
(* (* (* (+ b a) (PI)) (- b a)) (* 0.011111111111111112 angle_m)))))))\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}\;\frac{angle\_m}{180} \leq 500000000000:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot t\_0\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left(t\_0 \cdot 0.005555555555555556\right) \cdot \left(\left(\left(\left(b + a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5e11Initial program 58.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 rewrites75.5%
if 5e11 < (/.f64 angle #s(literal 180 binary64)) Initial program 31.2%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6427.8
Applied rewrites27.8%
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6422.6
Applied rewrites22.6%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
+-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-+.f64N/A
lower-PI.f64N/A
lower--.f6439.1
Applied rewrites39.1%
Final simplification68.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+198)
(* (* (sin (* 0.011111111111111112 (* (PI) angle_m))) (- b a)) (+ b a))
(* (* (+ b a) (- b a)) (* (* 0.011111111111111112 (PI)) angle_m)))))\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^{+198}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000049e198Initial program 55.6%
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.4%
if 5.00000000000000049e198 < (/.f64 angle #s(literal 180 binary64)) Initial program 31.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6440.9
Applied rewrites40.9%
Final simplification67.5%
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 (<= (pow a 2.0) 4e+268)
(* (* (* a a) -0.011111111111111112) t_0)
(* (* t_0 a) (* -0.011111111111111112 a))))))\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}\;{a}^{2} \leq 4 \cdot 10^{+268}:\\
\;\;\;\;\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
\end{array}
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 3.9999999999999999e268Initial program 57.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.3
Applied rewrites55.3%
Taylor expanded in a around inf
Applied rewrites34.6%
if 3.9999999999999999e268 < (pow.f64 a #s(literal 2 binary64)) Initial program 42.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.1
Applied rewrites49.1%
Taylor expanded in a around inf
Applied rewrites46.0%
Applied rewrites64.7%
Final simplification42.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.011111111111111112 (PI))))
(*
angle_s
(if (<= (/ angle_m 180.0) 5e-43)
(* (* (* t_0 angle_m) (- b a)) (+ b a))
(* (* (* (+ b a) (- b a)) t_0) angle_m)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{-43}:\\
\;\;\;\;\left(\left(t\_0 \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot t\_0\right) \cdot angle\_m\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000019e-43Initial program 57.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.1
Applied rewrites59.1%
Applied rewrites74.1%
if 5.00000000000000019e-43 < (/.f64 angle #s(literal 180 binary64)) Initial program 41.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6436.8
Applied rewrites36.8%
Applied rewrites36.8%
Final simplification64.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 (* (* (* (PI) angle_m) a) (* -0.011111111111111112 a))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right)
\end{array}
Initial program 53.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
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 a around inf
Applied rewrites37.7%
Applied rewrites40.6%
Final simplification40.6%
herbie shell --seed 2024283
(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)))))