
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (/ angle 180.0) (PI)))) (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (/ angle 180.0) (PI)))) (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \mathsf{PI}\left(\right)\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (sqrt (PI))))
(+
(pow (* (cos (* (* (* t_0 angle) 0.005555555555555556) t_0)) b) 2.0)
(pow (* a (sin (* (PI) (* angle 0.005555555555555556)))) 2.0))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
{\left(\cos \left(\left(\left(t\_0 \cdot angle\right) \cdot 0.005555555555555556\right) \cdot t\_0\right) \cdot b\right)}^{2} + {\left(a \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}
\end{array}
\end{array}
Initial program 81.8%
lift-*.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f6481.9
Applied rewrites81.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6482.0
Applied rewrites82.0%
Final simplification82.0%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (PI) angle)))
(+
(pow (* (cos (* -0.005555555555555556 t_0)) b) 2.0)
(pow (* (sin (* t_0 0.005555555555555556)) a) 2.0))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot angle\\
{\left(\cos \left(-0.005555555555555556 \cdot t\_0\right) \cdot b\right)}^{2} + {\left(\sin \left(t\_0 \cdot 0.005555555555555556\right) \cdot a\right)}^{2}
\end{array}
\end{array}
Initial program 81.8%
lift-*.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f6481.9
Applied rewrites81.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6482.0
Applied rewrites82.0%
Applied rewrites81.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.9
lift-*.f64N/A
*-commutativeN/A
lift-*.f6481.9
Applied rewrites81.9%
Final simplification81.9%
(FPCore (a b angle) :precision binary64 (+ (pow (* (cos (* -0.005555555555555556 (* (PI) angle))) b) 2.0) (pow (* a (sin (* (PI) (* angle 0.005555555555555556)))) 2.0)))
\begin{array}{l}
\\
{\left(\cos \left(-0.005555555555555556 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot b\right)}^{2} + {\left(a \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}
\end{array}
Initial program 81.8%
lift-*.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f6481.9
Applied rewrites81.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6482.0
Applied rewrites82.0%
Applied rewrites81.9%
Final simplification81.9%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (PI) (* angle 0.005555555555555556)))) (fma (+ (* (cos (* 2.0 t_0)) 0.5) 0.5) (* b b) (pow (* a (sin t_0)) 2.0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathsf{fma}\left(\cos \left(2 \cdot t\_0\right) \cdot 0.5 + 0.5, b \cdot b, {\left(a \cdot \sin t\_0\right)}^{2}\right)
\end{array}
\end{array}
Initial program 81.8%
lift-+.f64N/A
+-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow-prod-downN/A
lower-fma.f64N/A
Applied rewrites81.9%
lift-pow.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-/.f64N/A
frac-2negN/A
metadata-evalN/A
distribute-frac-negN/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
cos-negN/A
lift-cos.f64N/A
lift-/.f64N/A
frac-2negN/A
metadata-evalN/A
distribute-frac-negN/A
div-invN/A
metadata-evalN/A
Applied rewrites81.8%
Final simplification81.8%
(FPCore (a b angle)
:precision binary64
(if (<= a 9.8e-102)
(* (pow (cos (* -0.005555555555555556 (* (PI) angle))) 2.0) (* b b))
(if (<= a 1.95e+149)
(fma
(* (* (* (* a a) 3.08641975308642e-5) (PI)) (PI))
(* angle angle)
(* b b))
(* (pow (* (* a (PI)) angle) 2.0) 3.08641975308642e-5))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.8 \cdot 10^{-102}:\\
\;\;\;\;{\cos \left(-0.005555555555555556 \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)}^{2} \cdot \left(b \cdot b\right)\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{+149}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), angle \cdot angle, b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\
\end{array}
\end{array}
if a < 9.7999999999999995e-102Initial program 80.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6480.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6480.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval80.4
Applied rewrites80.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-cos.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6457.2
Applied rewrites57.2%
if 9.7999999999999995e-102 < a < 1.95e149Initial program 75.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval75.5
Applied rewrites75.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites44.5%
Taylor expanded in b around 0
Applied rewrites70.8%
if 1.95e149 < a Initial program 97.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6497.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6497.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval97.4
Applied rewrites97.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.3%
Taylor expanded in b around 0
Applied rewrites67.9%
Applied rewrites90.6%
Final simplification64.0%
(FPCore (a b angle)
:precision binary64
(if (<= a 9.8e-102)
(* (pow (cos (* (* (PI) 0.005555555555555556) angle)) 2.0) (* b b))
(if (<= a 1.95e+149)
(fma
(* (* (* (* a a) 3.08641975308642e-5) (PI)) (PI))
(* angle angle)
(* b b))
(* (pow (* (* a (PI)) angle) 2.0) 3.08641975308642e-5))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.8 \cdot 10^{-102}:\\
\;\;\;\;{\cos \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)}^{2} \cdot \left(b \cdot b\right)\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{+149}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), angle \cdot angle, b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\
\end{array}
\end{array}
if a < 9.7999999999999995e-102Initial program 80.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-cos.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6457.1
Applied rewrites57.1%
if 9.7999999999999995e-102 < a < 1.95e149Initial program 75.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval75.5
Applied rewrites75.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites44.5%
Taylor expanded in b around 0
Applied rewrites70.8%
if 1.95e149 < a Initial program 97.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6497.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6497.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval97.4
Applied rewrites97.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.3%
Taylor expanded in b around 0
Applied rewrites67.9%
Applied rewrites90.6%
Final simplification63.9%
(FPCore (a b angle) :precision binary64 (fma 1.0 (* b b) (pow (* a (sin (* (PI) (* angle 0.005555555555555556)))) 2.0)))
\begin{array}{l}
\\
\mathsf{fma}\left(1, b \cdot b, {\left(a \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}\right)
\end{array}
Initial program 81.8%
lift-+.f64N/A
+-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow-prod-downN/A
lower-fma.f64N/A
Applied rewrites81.9%
Taylor expanded in angle around 0
Applied rewrites81.4%
Final simplification81.4%
(FPCore (a b angle)
:precision binary64
(if (<= a 9.8e-102)
(* b b)
(if (<= a 1.95e+149)
(fma
(* (* (* (* a a) 3.08641975308642e-5) (PI)) (PI))
(* angle angle)
(* b b))
(* (pow (* (* a (PI)) angle) 2.0) 3.08641975308642e-5))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.8 \cdot 10^{-102}:\\
\;\;\;\;b \cdot b\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{+149}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), angle \cdot angle, b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\
\end{array}
\end{array}
if a < 9.7999999999999995e-102Initial program 80.4%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6457.0
Applied rewrites57.0%
if 9.7999999999999995e-102 < a < 1.95e149Initial program 75.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval75.5
Applied rewrites75.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites44.5%
Taylor expanded in b around 0
Applied rewrites70.8%
if 1.95e149 < a Initial program 97.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6497.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6497.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval97.4
Applied rewrites97.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.3%
Taylor expanded in b around 0
Applied rewrites67.9%
Applied rewrites90.6%
Final simplification63.8%
(FPCore (a b angle)
:precision binary64
(if (<= b 1.5e+150)
(fma
(*
(* (* (PI) (PI)) angle)
(fma (* 3.08641975308642e-5 a) a (* -3.08641975308642e-5 (* b b))))
angle
(* b b))
(* b b)))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.5 \cdot 10^{+150}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \mathsf{fma}\left(3.08641975308642 \cdot 10^{-5} \cdot a, a, -3.08641975308642 \cdot 10^{-5} \cdot \left(b \cdot b\right)\right), angle, b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot b\\
\end{array}
\end{array}
if b < 1.50000000000000006e150Initial program 79.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6479.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6479.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval79.4
Applied rewrites79.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites48.4%
Applied rewrites53.3%
if 1.50000000000000006e150 < b Initial program 100.0%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
Final simplification58.8%
(FPCore (a b angle)
:precision binary64
(if (<= a 9.8e-102)
(* b b)
(if (<= a 1.95e+149)
(fma
(* (* (* (* a a) 3.08641975308642e-5) (PI)) (PI))
(* angle angle)
(* b b))
(* (* (* (* (* angle angle) 3.08641975308642e-5) a) (* (PI) (PI))) a))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.8 \cdot 10^{-102}:\\
\;\;\;\;b \cdot b\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{+149}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right), angle \cdot angle, b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(angle \cdot angle\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot a\\
\end{array}
\end{array}
if a < 9.7999999999999995e-102Initial program 80.4%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6457.0
Applied rewrites57.0%
if 9.7999999999999995e-102 < a < 1.95e149Initial program 75.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval75.5
Applied rewrites75.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites44.5%
Taylor expanded in b around 0
Applied rewrites70.8%
if 1.95e149 < a Initial program 97.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6497.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6497.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval97.4
Applied rewrites97.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.3%
Taylor expanded in b around 0
Applied rewrites67.9%
Applied rewrites79.4%
Final simplification62.3%
(FPCore (a b angle) :precision binary64 (if (<= a 2.3e+156) (* b b) (* (* (* (* (* angle angle) 3.08641975308642e-5) a) (* (PI) (PI))) a)))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.3 \cdot 10^{+156}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(angle \cdot angle\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot a\\
\end{array}
\end{array}
if a < 2.2999999999999999e156Initial program 79.4%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6455.8
Applied rewrites55.8%
if 2.2999999999999999e156 < a Initial program 99.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.6
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval99.6
Applied rewrites99.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites54.2%
Taylor expanded in b around 0
Applied rewrites74.2%
Applied rewrites87.1%
(FPCore (a b angle) :precision binary64 (if (<= a 2.3e+156) (* b b) (* (* (* (PI) (PI)) a) (* (* (* angle angle) 3.08641975308642e-5) a))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.3 \cdot 10^{+156}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot \left(\left(\left(angle \cdot angle\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot a\right)\\
\end{array}
\end{array}
if a < 2.2999999999999999e156Initial program 79.4%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6455.8
Applied rewrites55.8%
if 2.2999999999999999e156 < a Initial program 99.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.6
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval99.6
Applied rewrites99.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites54.2%
Taylor expanded in b around 0
Applied rewrites74.2%
Applied rewrites87.0%
Final simplification59.4%
(FPCore (a b angle) :precision binary64 (if (<= a 2.3e+156) (* b b) (* (* (* (* angle angle) 3.08641975308642e-5) (* a a)) (* (PI) (PI)))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.3 \cdot 10^{+156}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(angle \cdot angle\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\\
\end{array}
\end{array}
if a < 2.2999999999999999e156Initial program 79.4%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6455.8
Applied rewrites55.8%
if 2.2999999999999999e156 < a Initial program 99.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.6
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval99.6
Applied rewrites99.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites54.2%
Taylor expanded in b around 0
Applied rewrites74.2%
Applied rewrites74.2%
Final simplification57.9%
(FPCore (a b angle) :precision binary64 (* b b))
double code(double a, double b, double angle) {
return b * b;
}
real(8) function code(a, b, angle)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: angle
code = b * b
end function
public static double code(double a, double b, double angle) {
return b * b;
}
def code(a, b, angle): return b * b
function code(a, b, angle) return Float64(b * b) end
function tmp = code(a, b, angle) tmp = b * b; end
code[a_, b_, angle_] := N[(b * b), $MachinePrecision]
\begin{array}{l}
\\
b \cdot b
\end{array}
Initial program 81.8%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6452.3
Applied rewrites52.3%
herbie shell --seed 2024249
(FPCore (a b angle)
:name "ab-angle->ABCF A"
:precision binary64
(+ (pow (* a (sin (* (/ angle 180.0) (PI)))) 2.0) (pow (* b (cos (* (/ angle 180.0) (PI)))) 2.0)))