
(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 23 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) 2e+264)
(/
(* (sin (* (* 0.011111111111111112 (PI)) angle_m)) (- a b))
(/ -1.0 (+ a b)))
(*
(* (cos (/ (* (pow (pow (cbrt (PI)) 2.0) 1.5) angle_m) -180.0)) 2.0)
(*
(* (+ a b) (- b a))
(sin (* (* 0.005555555555555556 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}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+264}:\\
\;\;\;\;\frac{\sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a - b\right)}{\frac{-1}{a + b}}\\
\mathbf{else}:\\
\;\;\;\;\left(\cos \left(\frac{{\left({\left(\sqrt[3]{\mathsf{PI}\left(\right)}\right)}^{2}\right)}^{1.5} \cdot angle\_m}{-180}\right) \cdot 2\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000009e264Initial program 57.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 rewrites74.0%
Applied rewrites75.4%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
lft-mult-inverseN/A
frac-2negN/A
clear-numN/A
Applied rewrites75.4%
if 2.00000000000000009e264 < (/.f64 angle #s(literal 180 binary64)) Initial program 27.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites3.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.f6424.6
Applied rewrites24.6%
lift-cbrt.f64N/A
lift-pow.f64N/A
rem-cbrt-cube3.1
rem-cube-cbrtN/A
lift-PI.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
lower-pow.f64N/A
pow2N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-cbrt.f64N/A
metadata-eval41.4
Applied rewrites41.4%
Final simplification74.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 (- (pow b 2.0) (pow a 2.0))))
(*
angle_s
(if (<= t_0 -4e+275)
(*
(*
(*
(fma
(* (* (PI) (PI)) (* -2.2862368541380886e-7 (* angle_m angle_m)))
(PI)
(* 0.011111111111111112 (PI)))
angle_m)
(- b a))
(+ a b))
(if (<= t_0 4e+289)
(* (sin (* (* (PI) angle_m) 0.011111111111111112)) (* (+ a b) (- b a)))
(* (* (* (* (PI) (- b a)) angle_m) 0.011111111111111112) (+ a b)))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := {b}^{2} - {a}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -4 \cdot 10^{+275}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(a + b\right)\\
\end{array}
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -3.99999999999999984e275Initial program 54.3%
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 rewrites77.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6481.1
Applied rewrites81.1%
Applied rewrites81.1%
if -3.99999999999999984e275 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.0000000000000002e289Initial program 68.0%
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 rewrites68.6%
if 4.0000000000000002e289 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 37.9%
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 rewrites77.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f6480.8
Applied rewrites80.8%
Final simplification74.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 (- (pow b 2.0) (pow a 2.0))) (t_1 (* 0.011111111111111112 (PI))))
(*
angle_s
(if (<= t_0 -4e+275)
(*
(*
(*
(fma
(* (* (PI) (PI)) (* -2.2862368541380886e-7 (* angle_m angle_m)))
(PI)
t_1)
angle_m)
(- b a))
(+ a b))
(if (<= t_0 4e-311)
(* (* (- a) a) (sin (* (* (PI) angle_m) 0.011111111111111112)))
(* (* (* t_1 angle_m) (- b a)) (+ a b)))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := {b}^{2} - {a}^{2}\\
t_1 := 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -4 \cdot 10^{+275}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), t\_1\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-311}:\\
\;\;\;\;\left(\left(-a\right) \cdot a\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t\_1 \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\end{array}
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -3.99999999999999984e275Initial program 54.3%
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 rewrites77.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6481.1
Applied rewrites81.1%
Applied rewrites81.1%
if -3.99999999999999984e275 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 3.99999999999979e-311Initial program 67.6%
Applied rewrites12.0%
Taylor expanded in b around 0
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
unpow2N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6468.0
Applied rewrites68.0%
if 3.99999999999979e-311 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 52.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--.f6461.7
Applied rewrites61.7%
Applied rewrites72.4%
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 (- (pow b 2.0) (pow a 2.0))))
(*
angle_s
(if (<= t_0 -5e-189)
(*
(*
(*
(fma
(* (* (PI) (PI)) (* -2.2862368541380886e-7 (* angle_m angle_m)))
(PI)
(* 0.011111111111111112 (PI)))
angle_m)
(- b a))
(+ a b))
(if (<= t_0 4e+289)
(* (* b b) (sin (* (* (PI) angle_m) 0.011111111111111112)))
(* (* (* (* (PI) (- b a)) angle_m) 0.011111111111111112) (+ a b)))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := {b}^{2} - {a}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-189}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), 0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+289}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(a + b\right)\\
\end{array}
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.9999999999999997e-189Initial program 56.9%
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 rewrites68.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6467.0
Applied rewrites67.0%
Applied rewrites67.0%
if -4.9999999999999997e-189 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.0000000000000002e289Initial program 73.4%
Applied rewrites14.6%
Taylor expanded in b around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6473.2
Applied rewrites73.2%
if 4.0000000000000002e289 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 37.9%
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 rewrites77.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f6480.8
Applied rewrites80.8%
Final simplification72.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)) (t_1 (- (pow b 2.0) (pow a 2.0))))
(*
angle_s
(if (<= t_1 -5e-189)
(* (* (* -0.011111111111111112 a) t_0) a)
(if (<= t_1 INFINITY)
(fma (* b b) (* t_0 0.011111111111111112) 0.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\\
t_1 := {b}^{2} - {a}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-189}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot t\_0\right) \cdot a\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(b \cdot b, t\_0 \cdot 0.011111111111111112, 0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
\end{array}
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.9999999999999997e-189Initial program 56.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6450.5
Applied rewrites50.5%
Taylor expanded in b around 0
Applied rewrites50.5%
Applied rewrites61.4%
if -4.9999999999999997e-189 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 66.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--.f6465.3
Applied rewrites65.3%
Taylor expanded in b around 0
Applied rewrites24.6%
Taylor expanded in b around inf
Applied rewrites65.2%
if +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 0.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--.f6463.2
Applied rewrites63.2%
Taylor expanded in b around 0
Applied rewrites43.9%
Applied rewrites54.9%
Final simplification62.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 (* (PI) angle_m)) (t_1 (- (pow b 2.0) (pow a 2.0))))
(*
angle_s
(if (<= t_1 -5e-189)
(* (* (* -0.011111111111111112 a) t_0) a)
(if (<= t_1 INFINITY)
(* (* (* (* b b) (PI)) angle_m) 0.011111111111111112)
(* (* 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\\
t_1 := {b}^{2} - {a}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-189}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot t\_0\right) \cdot a\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
\end{array}
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.9999999999999997e-189Initial program 56.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6450.5
Applied rewrites50.5%
Taylor expanded in b around 0
Applied rewrites50.5%
Applied rewrites61.4%
if -4.9999999999999997e-189 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 66.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--.f6465.3
Applied rewrites65.3%
Taylor expanded in b around inf
Applied rewrites65.2%
if +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 0.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--.f6463.2
Applied rewrites63.2%
Taylor expanded in b around 0
Applied rewrites43.9%
Applied rewrites54.9%
Final simplification62.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 b 2.0) (pow a 2.0)) 4e-311)
(* (* (- a) (sin (* (* (PI) angle_m) 0.011111111111111112))) (+ a b))
(* (* (* (* 0.011111111111111112 (PI)) angle_m) (- b a)) (+ a 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 4 \cdot 10^{-311}:\\
\;\;\;\;\left(\left(-a\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 3.99999999999979e-311Initial program 62.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 rewrites71.7%
Taylor expanded in b around 0
mul-1-negN/A
lower-neg.f6471.7
Applied rewrites71.7%
if 3.99999999999979e-311 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 52.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--.f6461.7
Applied rewrites61.7%
Applied rewrites72.4%
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 (sin (* (* 0.011111111111111112 (PI)) angle_m))))
(*
angle_s
(if (<= (/ angle_m 180.0) 2e+253)
(/ (* t_0 (- a b)) (/ -1.0 (+ a b)))
(*
(/ (* t_0 (- b a)) (pow (+ a b) -1.0))
(* (/ (- b a) (+ a b)) 1.0))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+253}:\\
\;\;\;\;\frac{t\_0 \cdot \left(a - b\right)}{\frac{-1}{a + b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0 \cdot \left(b - a\right)}{{\left(a + b\right)}^{-1}} \cdot \left(\frac{b - a}{a + b} \cdot 1\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 1.9999999999999999e253Initial program 58.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 rewrites74.3%
Applied rewrites75.7%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
lft-mult-inverseN/A
frac-2negN/A
clear-numN/A
Applied rewrites75.7%
if 1.9999999999999999e253 < (/.f64 angle #s(literal 180 binary64)) Initial program 23.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 rewrites5.9%
Applied rewrites4.2%
Taylor expanded in b around inf
Applied rewrites39.7%
Final simplification74.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+239)
(* (* (* -0.011111111111111112 a) (* (PI) angle_m)) a)
(* (* (* 0.011111111111111112 (PI)) (* (+ a b) (- b a))) 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 -2 \cdot 10^{+239}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\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))) < -1.99999999999999998e239Initial program 55.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--.f6449.8
Applied rewrites49.8%
Taylor expanded in b around 0
Applied rewrites49.8%
Applied rewrites68.6%
if -1.99999999999999998e239 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 57.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--.f6462.0
Applied rewrites62.0%
Applied rewrites62.0%
Final simplification63.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 b 2.0) (pow a 2.0)) -1e+234)
(* (* (* -0.011111111111111112 a) (* (PI) angle_m)) a)
(* (* (* 0.011111111111111112 (PI)) angle_m) (* (+ a b) (- 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}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{+234}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1.00000000000000002e234Initial program 55.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--.f6449.0
Applied rewrites49.0%
Taylor expanded in b around 0
Applied rewrites49.0%
Applied rewrites67.5%
if -1.00000000000000002e234 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 57.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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.3
Applied rewrites62.3%
Final simplification63.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 (* (* 0.011111111111111112 (PI)) angle_m)))
(*
angle_s
(if (<= (/ angle_m 180.0) 5e-41)
(* (* t_0 (- b a)) (+ a b))
(* (sin t_0) (* (+ a b) (- b a)))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \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 5 \cdot 10^{-41}:\\
\;\;\;\;\left(t\_0 \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 4.9999999999999996e-41Initial program 58.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--.f6462.7
Applied rewrites62.7%
Applied rewrites72.9%
if 4.9999999999999996e-41 < (/.f64 angle #s(literal 180 binary64)) Initial program 51.5%
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 rewrites55.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
difference-of-squaresN/A
pow2N/A
pow2N/A
lower-*.f64N/A
pow2N/A
pow2N/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6455.0
lift-+.f64N/A
+-commutativeN/A
lift-+.f6455.0
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
Applied rewrites57.4%
Final simplification70.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 (/ (* (sin (* (* 0.011111111111111112 (PI)) angle_m)) (- a b)) (/ -1.0 (+ a b)))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \frac{\sin \left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(a - b\right)}{\frac{-1}{a + b}}
\end{array}
Initial program 57.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 rewrites72.7%
Applied rewrites74.0%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
lft-mult-inverseN/A
frac-2negN/A
clear-numN/A
Applied rewrites74.0%
Final simplification74.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) 1e+210)
(* (* (* (* a a) -0.011111111111111112) (PI)) angle_m)
(* (* (* -0.011111111111111112 a) (* (PI) angle_m)) 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 10^{+210}:\\
\;\;\;\;\left(\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 9.99999999999999927e209Initial program 64.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--.f6462.1
Applied rewrites62.1%
Taylor expanded in b around 0
Applied rewrites31.7%
Applied rewrites31.8%
if 9.99999999999999927e209 < (pow.f64 a #s(literal 2 binary64)) Initial program 43.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--.f6453.5
Applied rewrites53.5%
Taylor expanded in b around 0
Applied rewrites45.8%
Applied rewrites60.9%
Final simplification42.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) 2e-74)
(* (* (* (* a a) -0.011111111111111112) angle_m) (PI))
(* (* (* -0.011111111111111112 a) (* (PI) angle_m)) 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^{-74}:\\
\;\;\;\;\left(\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999992e-74Initial program 69.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--.f6468.3
Applied rewrites68.3%
Taylor expanded in b around 0
Applied rewrites30.7%
Applied rewrites30.7%
if 1.99999999999999992e-74 < (pow.f64 a #s(literal 2 binary64)) Initial program 46.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--.f6451.5
Applied rewrites51.5%
Taylor expanded in b around 0
Applied rewrites41.6%
Applied rewrites51.4%
Final simplification42.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) 2e-88)
(* (* (* -0.011111111111111112 a) a) (* (PI) angle_m))
(* (* (* -0.011111111111111112 a) (PI)) (* a 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}\;{a}^{2} \leq 2 \cdot 10^{-88}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot angle\_m\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999987e-88Initial program 71.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--.f6469.6
Applied rewrites69.6%
Taylor expanded in b around 0
Applied rewrites31.1%
Applied rewrites31.1%
if 1.99999999999999987e-88 < (pow.f64 a #s(literal 2 binary64)) Initial program 46.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--.f6451.1
Applied rewrites51.1%
Taylor expanded in b around 0
Applied rewrites41.0%
Applied rewrites50.3%
Applied rewrites50.3%
Final simplification42.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) 6e+300)
(* (* (* a a) -0.011111111111111112) (* (PI) angle_m))
(* (* (* -0.011111111111111112 a) (PI)) (* a 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}\;{a}^{2} \leq 6 \cdot 10^{+300}:\\
\;\;\;\;\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot angle\_m\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 6.00000000000000032e300Initial program 64.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--.f6461.6
Applied rewrites61.6%
Taylor expanded in b around 0
Applied rewrites33.1%
if 6.00000000000000032e300 < (pow.f64 a #s(literal 2 binary64)) Initial program 37.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--.f6452.4
Applied rewrites52.4%
Taylor expanded in b around 0
Applied rewrites46.5%
Applied rewrites66.1%
Applied rewrites66.1%
Final simplification42.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 (* (* (sin (* (* (PI) angle_m) 0.011111111111111112)) (- b a)) (+ a b))))
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)
\end{array}
Initial program 57.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 rewrites72.7%
Final simplification72.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 (* 0.011111111111111112 (PI))))
(*
angle_s
(if (<= (/ angle_m 180.0) 2e+33)
(*
(*
(*
(fma
(* (* (PI) (PI)) (* -2.2862368541380886e-7 (* angle_m angle_m)))
(PI)
t_0)
angle_m)
(- b a))
(+ a b))
(* (* t_0 angle_m) (* (+ a b) (- b a)))))))\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 2 \cdot 10^{+33}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right), \mathsf{PI}\left(\right), t\_0\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot angle\_m\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 1.9999999999999999e33Initial program 59.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 rewrites77.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6474.2
Applied rewrites74.2%
Applied rewrites74.2%
if 1.9999999999999999e33 < (/.f64 angle #s(literal 180 binary64)) Initial program 39.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--.f6436.0
Applied rewrites36.0%
Final simplification69.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 (<= (/ angle_m 180.0) 1e+125)
(* (* (* (* 0.011111111111111112 (PI)) angle_m) (- b a)) (+ a b))
(fma (* b b) (* (* (PI) angle_m) 0.011111111111111112) 0.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}\;\frac{angle\_m}{180} \leq 10^{+125}:\\
\;\;\;\;\left(\left(\left(0.011111111111111112 \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot b, \left(\mathsf{PI}\left(\right) \cdot angle\_m\right) \cdot 0.011111111111111112, 0\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999992e124Initial 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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.3
Applied rewrites61.3%
Applied rewrites70.3%
if 9.9999999999999992e124 < (/.f64 angle #s(literal 180 binary64)) Initial program 38.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--.f6434.7
Applied rewrites34.7%
Taylor expanded in b around 0
Applied rewrites26.7%
Taylor expanded in b around inf
Applied rewrites36.1%
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
(*
angle_s
(if (<= (/ angle_m 180.0) 2e-64)
(* (* (* -0.011111111111111112 a) (* (PI) angle_m)) a)
(* (* (* (* a 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}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{-64}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\_m\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(a \cdot a\right) \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot -0.011111111111111112\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 1.99999999999999993e-64Initial 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--.f6462.0
Applied rewrites62.0%
Taylor expanded in b around 0
Applied rewrites39.0%
Applied rewrites43.9%
if 1.99999999999999993e-64 < (/.f64 angle #s(literal 180 binary64)) Initial program 55.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.3
Applied rewrites48.3%
Taylor expanded in b around 0
Applied rewrites28.1%
Applied rewrites28.1%
Final simplification40.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 (* (PI) angle_m)))
(*
angle_s
(if (<= (/ angle_m 180.0) 1e-73)
(* (* (* -0.011111111111111112 a) t_0) a)
(* (* (* a a) -0.011111111111111112) t_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}\;\frac{angle\_m}{180} \leq 10^{-73}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot t\_0\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot t\_0\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999997e-74Initial 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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.6
Applied rewrites61.6%
Taylor expanded in b around 0
Applied rewrites38.9%
Applied rewrites43.9%
if 9.99999999999999997e-74 < (/.f64 angle #s(literal 180 binary64)) Initial program 56.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--.f6450.2
Applied rewrites50.2%
Taylor expanded in b around 0
Applied rewrites28.9%
Final simplification40.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 (* (PI) angle_m)))
(*
angle_s
(if (<= (/ angle_m 180.0) 1e-73)
(* (* t_0 a) (* -0.011111111111111112 a))
(* (* (* a a) -0.011111111111111112) t_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}\;\frac{angle\_m}{180} \leq 10^{-73}:\\
\;\;\;\;\left(t\_0 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot t\_0\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999997e-74Initial 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
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.6
Applied rewrites61.6%
Taylor expanded in b around 0
Applied rewrites38.9%
Applied rewrites43.8%
if 9.99999999999999997e-74 < (/.f64 angle #s(literal 180 binary64)) Initial program 56.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--.f6450.2
Applied rewrites50.2%
Taylor expanded in b around 0
Applied rewrites28.9%
Final simplification40.6%
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 57.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--.f6459.1
Applied rewrites59.1%
Taylor expanded in b around 0
Applied rewrites36.7%
Applied rewrites39.8%
Final simplification39.8%
herbie shell --seed 2024255
(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)))))