
(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 20 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 (cbrt (pow (PI) 1.5))) (t_1 (* (/ angle_m 180.0) (PI))))
(*
angle_s
(if (<=
(* (cos t_1) (* (sin t_1) (* (- (pow b 2.0) (pow a 2.0)) 2.0)))
-5e+99)
(*
(* (sin (* 0.011111111111111112 (* (* t_0 t_0) angle_m))) (- b a))
(+ a b))
(*
(*
(sin
(* (* (cbrt (* (* (PI) (PI)) (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)
\\
\begin{array}{l}
t_0 := \sqrt[3]{{\mathsf{PI}\left(\right)}^{1.5}}\\
t_1 := \frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)\right) \leq -5 \cdot 10^{+99}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\left(t\_0 \cdot t\_0\right) \cdot angle\_m\right)\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin \left(\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)} \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -5.00000000000000008e99Initial program 41.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.6%
lift-PI.f64N/A
add-cbrt-cubeN/A
lift-PI.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
unswap-sqrN/A
cbrt-prodN/A
lower-*.f64N/A
lower-cbrt.f64N/A
unpow1N/A
lift-PI.f64N/A
pow1/2N/A
pow-prod-upN/A
metadata-evalN/A
metadata-evalN/A
lower-pow.f64N/A
metadata-evalN/A
lower-cbrt.f64N/A
unpow1N/A
lift-PI.f64N/A
Applied rewrites72.8%
if -5.00000000000000008e99 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 57.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 rewrites73.6%
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.f6474.8
Applied rewrites74.8%
lift-pow.f64N/A
unpow3N/A
lower-*.f64N/A
lower-*.f6474.8
Applied rewrites74.8%
Final simplification74.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 (* (/ angle_m 180.0) (PI))))
(*
angle_s
(if (<=
(* (cos t_0) (* (sin t_0) (* (- (pow b 2.0) (pow a 2.0)) 2.0)))
-5e+99)
(*
(*
(sin
(* (* (cbrt (exp (* 3.0 (log (PI))))) angle_m) 0.011111111111111112))
(- b a))
(+ a b))
(*
(*
(sin
(* (* (cbrt (* (* (PI) (PI)) (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)
\\
\begin{array}{l}
t_0 := \frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\cos t\_0 \cdot \left(\sin t\_0 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)\right) \leq -5 \cdot 10^{+99}:\\
\;\;\;\;\left(\sin \left(\left(\sqrt[3]{e^{3 \cdot \log \mathsf{PI}\left(\right)}} \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin \left(\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)} \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -5.00000000000000008e99Initial program 41.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.6%
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.f6470.4
Applied rewrites70.4%
lift-pow.f64N/A
pow-to-expN/A
*-commutativeN/A
log-powN/A
lift-pow.f64N/A
lower-exp.f64N/A
lift-pow.f64N/A
log-powN/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f6469.3
Applied rewrites69.3%
if -5.00000000000000008e99 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 57.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 rewrites73.6%
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.f6474.8
Applied rewrites74.8%
lift-pow.f64N/A
unpow3N/A
lower-*.f64N/A
lower-*.f6474.8
Applied rewrites74.8%
Final simplification73.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) (PI))) (t_1 (* (/ angle_m 180.0) (PI))))
(*
angle_s
(if (<=
(* (cos t_1) (* (sin t_1) (* (- (pow b 2.0) (pow a 2.0)) 2.0)))
(- INFINITY))
(*
(*
(*
(fma
(* (* -2.2862368541380886e-7 (* angle_m angle_m)) (PI))
t_0
(* 0.011111111111111112 (PI)))
angle_m)
(- b a))
(+ a b))
(*
(*
(sin (* (* (cbrt (* t_0 (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)
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\\
t_1 := \frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)\right) \leq -\infty:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \mathsf{PI}\left(\right), t\_0, 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}:\\
\;\;\;\;\left(\sin \left(\left(\sqrt[3]{t\_0 \cdot \mathsf{PI}\left(\right)} \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -inf.0Initial program 44.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 rewrites78.4%
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.f6485.5
Applied rewrites85.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
lower-*.f64N/A
lower-PI.f6485.6
Applied rewrites85.6%
Applied rewrites85.6%
if -inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial 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.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.f6471.4
Applied rewrites71.4%
lift-pow.f64N/A
unpow3N/A
lower-*.f64N/A
lower-*.f6471.4
Applied rewrites71.4%
Final simplification73.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 (* (/ angle_m 180.0) (PI))))
(*
angle_s
(if (<=
(* (cos t_0) (* (sin t_0) (* (- (pow b 2.0) (pow a 2.0)) 2.0)))
(- INFINITY))
(*
(*
(*
(fma
(* (* -2.2862368541380886e-7 (* angle_m angle_m)) (PI))
(* (PI) (PI))
(* 0.011111111111111112 (PI)))
angle_m)
(- b a))
(+ a b))
(*
(* (sin (* (* angle_m (PI)) 0.011111111111111112)) (- 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 := \frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\cos t\_0 \cdot \left(\sin t\_0 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)\right) \leq -\infty:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot \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{else}:\\
\;\;\;\;\left(\sin \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -inf.0Initial program 44.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 rewrites78.4%
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.f6485.5
Applied rewrites85.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
lower-*.f64N/A
lower-PI.f6485.6
Applied rewrites85.6%
Applied rewrites85.6%
if -inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial 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.1%
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 (- (pow b 2.0) (pow a 2.0))))
(*
angle_s
(if (<= t_0 (- INFINITY))
(*
(*
(*
(fma
(* (* -2.2862368541380886e-7 (* angle_m angle_m)) (PI))
(* (PI) (PI))
(* 0.011111111111111112 (PI)))
angle_m)
(- b a))
(+ a b))
(if (<= t_0 5e-260)
(* (* (- a) a) (sin (* (* angle_m (PI)) 0.011111111111111112)))
(* (* (* (* (- b a) (PI)) 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 -\infty:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot \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 5 \cdot 10^{-260}:\\
\;\;\;\;\left(\left(-a\right) \cdot a\right) \cdot \sin \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(b - a\right) \cdot \mathsf{PI}\left(\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))) < -inf.0Initial program 42.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 rewrites73.3%
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.f6475.3
Applied rewrites75.3%
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
lower-*.f64N/A
lower-PI.f6482.1
Applied rewrites82.1%
Applied rewrites82.1%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 5.0000000000000003e-260Initial program 68.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 rewrites68.4%
Taylor expanded in a around inf
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.f6467.4
Applied rewrites67.4%
if 5.0000000000000003e-260 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 45.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 rewrites73.5%
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.f6471.3
Applied rewrites71.3%
Final simplification71.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 (- (pow b 2.0) (pow a 2.0))) (t_1 (* 0.011111111111111112 (PI))))
(*
angle_s
(if (<= t_0 -1e-133)
(*
(*
(*
(fma
(* (* -2.2862368541380886e-7 (* angle_m angle_m)) (PI))
(* (PI) (PI))
t_1)
angle_m)
(- b a))
(+ a b))
(if (<= t_0 2e+164)
(* (* b b) (sin (* (* angle_m (PI)) 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 -1 \cdot 10^{-133}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot \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 2 \cdot 10^{+164}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\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))) < -1.0000000000000001e-133Initial program 52.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 rewrites66.5%
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.f6468.4
Applied rewrites68.4%
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
lower-*.f64N/A
lower-PI.f6468.7
Applied rewrites68.7%
Applied rewrites68.7%
if -1.0000000000000001e-133 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e164Initial program 71.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 rewrites71.9%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6470.7
Applied rewrites70.7%
if 2e164 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 35.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--.f6453.8
Applied rewrites53.8%
Applied rewrites76.9%
Final simplification71.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 (* (/ angle_m 180.0) (PI))) (t_1 (* angle_m (PI))))
(*
angle_s
(if (<=
(* (cos t_0) (* (sin t_0) (* (- (pow b 2.0) (pow a 2.0)) 2.0)))
-2e-14)
(* (* t_1 a) (* -0.011111111111111112 a))
(* (* (* a a) -0.011111111111111112) t_1)))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \frac{angle\_m}{180} \cdot \mathsf{PI}\left(\right)\\
t_1 := angle\_m \cdot \mathsf{PI}\left(\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\cos t\_0 \cdot \left(\sin t\_0 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)\right) \leq -2 \cdot 10^{-14}:\\
\;\;\;\;\left(t\_1 \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a \cdot a\right) \cdot -0.011111111111111112\right) \cdot t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -2e-14Initial program 45.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--.f6443.3
Applied rewrites43.3%
Taylor expanded in a around inf
Applied rewrites27.7%
Applied rewrites38.5%
if -2e-14 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial 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--.f6462.7
Applied rewrites62.7%
Taylor expanded in a around inf
Applied rewrites45.5%
Final simplification43.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 (* angle_m (PI)))
(t_1 (* t_0 a))
(t_2 (- (pow b 2.0) (pow a 2.0))))
(*
angle_s
(if (<= t_2 -1e-133)
(* -0.011111111111111112 (* t_1 a))
(if (<= t_2 INFINITY)
(* (fma t_0 0.011111111111111112 0.0) (* b b))
(* t_1 (* -0.011111111111111112 a)))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := angle\_m \cdot \mathsf{PI}\left(\right)\\
t_1 := t\_0 \cdot a\\
t_2 := {b}^{2} - {a}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-133}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(t\_1 \cdot a\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t\_0, 0.011111111111111112, 0\right) \cdot \left(b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \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))) < -1.0000000000000001e-133Initial 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--.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
Applied rewrites51.5%
Applied rewrites64.4%
Applied rewrites64.4%
if -1.0000000000000001e-133 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 62.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--.f6460.0
Applied rewrites60.0%
Taylor expanded in b around inf
Applied rewrites60.5%
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--.f6466.3
Applied rewrites66.3%
Taylor expanded in a around inf
Applied rewrites55.0%
Applied rewrites55.1%
Final simplification61.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 (* (* angle_m (PI)) a)) (t_1 (- (pow b 2.0) (pow a 2.0))))
(*
angle_s
(if (<= t_1 -1e-133)
(* -0.011111111111111112 (* t_0 a))
(if (<= t_1 INFINITY)
(* (* (* (* b b) (PI)) angle_m) 0.011111111111111112)
(* t_0 (* -0.011111111111111112 a)))))))\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\\
t_1 := {b}^{2} - {a}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-133}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(t\_0 \cdot a\right)\\
\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}:\\
\;\;\;\;t\_0 \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))) < -1.0000000000000001e-133Initial 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--.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
Applied rewrites51.5%
Applied rewrites64.4%
Applied rewrites64.4%
if -1.0000000000000001e-133 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 62.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--.f6460.0
Applied rewrites60.0%
Taylor expanded in a around 0
Applied rewrites60.5%
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--.f6466.3
Applied rewrites66.3%
Taylor expanded in a around inf
Applied rewrites55.0%
Applied rewrites55.1%
Final simplification61.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 (- (pow b 2.0) (pow a 2.0)))
(t_1 (* (* (* angle_m (PI)) a) (* -0.011111111111111112 a))))
(*
angle_s
(if (<= t_0 -1e-133)
t_1
(if (<= t_0 INFINITY)
(* (* (* (* b b) (PI)) angle_m) 0.011111111111111112)
t_1)))))\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 := \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\left(\left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1.0000000000000001e-133 or +inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 43.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--.f6454.4
Applied rewrites54.4%
Taylor expanded in a around inf
Applied rewrites52.1%
Applied rewrites62.9%
if -1.0000000000000001e-133 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < +inf.0Initial program 62.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--.f6460.0
Applied rewrites60.0%
Taylor expanded in a around 0
Applied rewrites60.5%
Final simplification61.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
(if (<= (- (pow b 2.0) (pow a 2.0)) -5e+307)
(* -0.011111111111111112 (* (* (* angle_m (PI)) a) a))
(* (* (* (- b a) (+ a b)) (* 0.011111111111111112 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}\;{b}^{2} - {a}^{2} \leq -5 \cdot 10^{+307}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right) \cdot \mathsf{PI}\left(\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -5e307Initial program 41.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--.f6443.8
Applied rewrites43.8%
Taylor expanded in a around inf
Applied rewrites43.8%
Applied rewrites72.0%
Applied rewrites72.1%
if -5e307 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 56.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--.f6460.3
Applied rewrites60.3%
Applied rewrites60.4%
Final simplification62.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)) -5e+307)
(* -0.011111111111111112 (* (* (* angle_m (PI)) a) a))
(* (* (- b a) (+ a b)) (* (* 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^{+307}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(a + b\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))) < -5e307Initial program 41.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--.f6443.8
Applied rewrites43.8%
Taylor expanded in a around inf
Applied rewrites43.8%
Applied rewrites72.0%
Applied rewrites72.1%
if -5e307 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 56.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--.f6460.3
Applied rewrites60.3%
Final simplification62.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)) -4e+63)
(* (* (* angle_m (PI)) a) (* -0.011111111111111112 a))
(* (* (* (- b a) (+ a b)) (PI)) (* 0.011111111111111112 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 -4 \cdot 10^{+63}:\\
\;\;\;\;\left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.00000000000000023e63Initial program 52.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--.f6452.9
Applied rewrites52.9%
Taylor expanded in a around inf
Applied rewrites52.8%
Applied rewrites68.3%
if -4.00000000000000023e63 < (-.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--.f6459.6
Applied rewrites59.6%
Applied rewrites59.5%
Final simplification62.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 a 2.0) 5e-137)
(* (* (sin (* (* angle_m (PI)) 0.011111111111111112)) b) (+ a b))
(*
(*
(*
(fma
(* (* -2.2862368541380886e-7 (* angle_m angle_m)) (PI))
(* (PI) (PI))
(* 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}\;{a}^{2} \leq 5 \cdot 10^{-137}:\\
\;\;\;\;\left(\sin \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right) \cdot b\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot \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)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 5.00000000000000001e-137Initial program 64.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 rewrites74.7%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6473.8
Applied rewrites73.8%
if 5.00000000000000001e-137 < (pow.f64 a #s(literal 2 binary64)) Initial program 46.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 rewrites69.4%
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.f6472.6
Applied rewrites72.6%
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
lower-*.f64N/A
lower-PI.f6469.3
Applied rewrites69.3%
Applied rewrites69.3%
Final simplification71.1%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (/ angle_m 180.0) 5e-52)
(* (* (* (+ a b) (PI)) (* 0.011111111111111112 angle_m)) (- b a))
(* (* (- b a) (+ a b)) (sin (* (* 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 5 \cdot 10^{-52}:\\
\;\;\;\;\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right) \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \left(\left(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5e-52Initial program 60.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--.f6463.4
Applied rewrites63.4%
Applied rewrites77.4%
if 5e-52 < (/.f64 angle #s(literal 180 binary64)) Initial program 35.5%
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 rewrites44.5%
Final simplification68.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 (<= a 2e+190)
(* (* (sin (* (* 0.011111111111111112 angle_m) (PI))) (- b a)) (+ a b))
(*
(*
(*
(fma
(* (* -2.2862368541380886e-7 (* angle_m angle_m)) (PI))
(* (PI) (PI))
(* 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}\;a \leq 2 \cdot 10^{+190}:\\
\;\;\;\;\left(\sin \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot \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)\\
\end{array}
\end{array}
if a < 2.0000000000000001e190Initial program 56.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.9%
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.f6473.8
Applied rewrites73.8%
lift-pow.f64N/A
unpow3N/A
lower-*.f64N/A
lower-*.f6473.8
Applied rewrites73.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-cbrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow3N/A
rem-cbrt-cubeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6469.9
Applied rewrites69.9%
if 2.0000000000000001e190 < a Initial program 23.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%
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.f6473.4
Applied rewrites73.4%
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
lower-*.f64N/A
lower-PI.f6491.0
Applied rewrites91.0%
Applied rewrites91.0%
Final simplification71.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) 1e+68)
(*
(*
(*
(fma
(* (* -2.2862368541380886e-7 (* angle_m angle_m)) (PI))
(* (PI) (PI))
t_0)
angle_m)
(- b a))
(+ a b))
(* (* (- b a) (+ a b)) (* 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 10^{+68}:\\
\;\;\;\;\left(\left(\mathsf{fma}\left(\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \mathsf{PI}\left(\right), \mathsf{PI}\left(\right) \cdot \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(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \left(t\_0 \cdot angle\_m\right)\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999953e67Initial program 59.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 rewrites79.4%
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.f6481.1
Applied rewrites81.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
lower-*.f64N/A
lower-PI.f6475.7
Applied rewrites75.7%
Applied rewrites75.7%
if 9.99999999999999953e67 < (/.f64 angle #s(literal 180 binary64)) Initial program 25.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--.f6437.8
Applied rewrites37.8%
Final simplification69.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+219)
(* (* (* (+ a b) (PI)) (* 0.011111111111111112 angle_m)) (- b a))
(* (* (- a) (+ a b)) (* (* 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 3 \cdot 10^{+219}:\\
\;\;\;\;\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\right) \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-a\right) \cdot \left(a + b\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)) < 2.9999999999999997e219Initial 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--.f6459.1
Applied rewrites59.1%
Applied rewrites69.6%
if 2.9999999999999997e219 < (/.f64 angle #s(literal 180 binary64)) Initial program 25.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--.f6429.1
Applied rewrites29.1%
Taylor expanded in a around inf
Applied rewrites42.8%
Final simplification68.0%
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) 3e+219)
(* (* t_0 (- b a)) (+ a b))
(* (* (- a) (+ 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 := \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 3 \cdot 10^{+219}:\\
\;\;\;\;\left(t\_0 \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-a\right) \cdot \left(a + b\right)\right) \cdot t\_0\\
\end{array}
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 2.9999999999999997e219Initial 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--.f6459.1
Applied rewrites59.1%
Applied rewrites69.6%
if 2.9999999999999997e219 < (/.f64 angle #s(literal 180 binary64)) Initial program 25.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--.f6429.1
Applied rewrites29.1%
Taylor expanded in a around inf
Applied rewrites42.8%
Final simplification68.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 (* (* (* angle_m (PI)) 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(angle\_m \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right)\right)
\end{array}
Initial program 53.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--.f6457.4
Applied rewrites57.4%
Taylor expanded in a around inf
Applied rewrites40.6%
Applied rewrites44.0%
Final simplification44.0%
herbie shell --seed 2024304
(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)))))