
(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 15 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 180.0) angle) 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(\frac{t\_0}{180} \cdot angle\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.5%
lift-*.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*r*N/A
add-sqr-sqrtN/A
cbrt-prodN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites81.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
pow-prod-upN/A
metadata-evalN/A
pow1/3N/A
lift-cbrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-pow.f64N/A
pow-plusN/A
metadata-evalN/A
Applied rewrites81.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6481.7
Applied rewrites81.7%
Final simplification81.7%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (sqrt (PI))))
(+
(pow (* (cos (* (* (* t_0 angle) 0.005555555555555556) t_0)) b) 2.0)
(pow (* (sin (* (/ angle 180.0) (PI))) a) 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(\sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot a\right)}^{2}
\end{array}
\end{array}
Initial program 81.5%
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.6
Applied rewrites81.6%
Final simplification81.6%
(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(t\_0 \cdot \left(angle \cdot 0.005555555555555556\right)\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.5%
lift-*.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*r*N/A
add-sqr-sqrtN/A
cbrt-prodN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites81.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
pow-prod-upN/A
metadata-evalN/A
pow1/3N/A
lift-cbrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-pow.f64N/A
pow-plusN/A
metadata-evalN/A
Applied rewrites81.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6481.7
Applied rewrites81.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
rem-square-sqrtN/A
*-commutativeN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6481.6
Applied rewrites81.6%
Final simplification81.6%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* a (sin (* (PI) (* angle 0.005555555555555556)))))) (fma t_0 t_0 (pow (* (cos (/ (* (PI) angle) -180.0)) b) 2.0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\
\mathsf{fma}\left(t\_0, t\_0, {\left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{-180}\right) \cdot b\right)}^{2}\right)
\end{array}
\end{array}
Initial program 81.5%
lift-+.f64N/A
lift-pow.f64N/A
unpow2N/A
lower-fma.f6481.5
Applied rewrites81.6%
Final simplification81.6%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (PI) (* angle 0.005555555555555556)))) (+ (pow (* (cos t_0) b) 2.0) (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)\\
{\left(\cos t\_0 \cdot b\right)}^{2} + {\left(a \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}
Initial program 81.5%
lift-*.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*r*N/A
add-sqr-sqrtN/A
cbrt-prodN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites81.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
pow-prod-upN/A
metadata-evalN/A
pow1/3N/A
lift-cbrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-pow.f64N/A
pow-plusN/A
metadata-evalN/A
Applied rewrites81.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6481.7
Applied rewrites81.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
rem-square-sqrtN/A
*-commutativeN/A
lift-*.f6481.6
Applied rewrites81.6%
Final simplification81.6%
(FPCore (a b angle) :precision binary64 (+ (pow (* 1.0 b) 2.0) (pow (* a (sin (* (PI) (* angle 0.005555555555555556)))) 2.0)))
\begin{array}{l}
\\
{\left(1 \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.5%
lift-*.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*r*N/A
add-sqr-sqrtN/A
cbrt-prodN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites81.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
pow-prod-upN/A
metadata-evalN/A
pow1/3N/A
lift-cbrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-pow.f64N/A
pow-plusN/A
metadata-evalN/A
Applied rewrites81.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f6481.7
Applied rewrites81.7%
Taylor expanded in angle around 0
Applied rewrites81.4%
Final simplification81.4%
(FPCore (a b angle)
:precision binary64
(if (<= a 3.5e-16)
(* (* b b) (pow (cos (* (* (PI) 0.005555555555555556) angle)) 2.0))
(+
(pow (* (cos (* (/ angle 180.0) (PI))) b) 2.0)
(* (* (PI) (PI)) (* (* (* (* angle angle) a) a) 3.08641975308642e-5)))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.5 \cdot 10^{-16}:\\
\;\;\;\;\left(b \cdot b\right) \cdot {\cos \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(\cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot b\right)}^{2} + \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(\left(\left(angle \cdot angle\right) \cdot a\right) \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\\
\end{array}
\end{array}
if a < 3.50000000000000017e-16Initial program 80.3%
Taylor expanded in a around 0
*-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-*.f6464.1
Applied rewrites64.1%
if 3.50000000000000017e-16 < a Initial program 85.3%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6474.4
Applied rewrites74.4%
Final simplification66.6%
(FPCore (a b angle)
:precision binary64
(if (<= a 3.5e-16)
(* (* b b) (pow (cos (* (* (PI) 0.005555555555555556) angle)) 2.0))
(if (<= a 7.5e+153)
(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 3.5 \cdot 10^{-16}:\\
\;\;\;\;\left(b \cdot b\right) \cdot {\cos \left(\left(\mathsf{PI}\left(\right) \cdot 0.005555555555555556\right) \cdot angle\right)}^{2}\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+153}:\\
\;\;\;\;\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 < 3.50000000000000017e-16Initial program 80.3%
Taylor expanded in a around 0
*-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-*.f6464.1
Applied rewrites64.1%
if 3.50000000000000017e-16 < a < 7.50000000000000065e153Initial program 73.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites51.4%
Taylor expanded in a around inf
Applied rewrites64.4%
if 7.50000000000000065e153 < a Initial program 97.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites33.9%
Taylor expanded in a around inf
Applied rewrites50.0%
Applied rewrites75.3%
Final simplification65.5%
(FPCore (a b angle)
:precision binary64
(if (<= a 3.5e-16)
(* (pow (cos (* -0.005555555555555556 (* (PI) angle))) 2.0) (* b b))
(if (<= a 7.5e+153)
(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 3.5 \cdot 10^{-16}:\\
\;\;\;\;{\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 7.5 \cdot 10^{+153}:\\
\;\;\;\;\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 < 3.50000000000000017e-16Initial program 80.3%
lift-+.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow-prod-downN/A
lower-fma.f64N/A
Applied rewrites73.8%
Taylor expanded in a around 0
*-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-*.f6464.0
Applied rewrites64.0%
if 3.50000000000000017e-16 < a < 7.50000000000000065e153Initial program 73.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites51.4%
Taylor expanded in a around inf
Applied rewrites64.4%
if 7.50000000000000065e153 < a Initial program 97.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites33.9%
Taylor expanded in a around inf
Applied rewrites50.0%
Applied rewrites75.3%
Final simplification65.4%
(FPCore (a b angle)
:precision binary64
(if (<= a 3.5e-16)
(* b b)
(if (<= a 7.5e+153)
(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 3.5 \cdot 10^{-16}:\\
\;\;\;\;b \cdot b\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+153}:\\
\;\;\;\;\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 < 3.50000000000000017e-16Initial program 80.3%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6463.9
Applied rewrites63.9%
if 3.50000000000000017e-16 < a < 7.50000000000000065e153Initial program 73.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites51.4%
Taylor expanded in a around inf
Applied rewrites64.4%
if 7.50000000000000065e153 < a Initial program 97.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites33.9%
Taylor expanded in a around inf
Applied rewrites50.0%
Applied rewrites75.3%
Final simplification65.3%
(FPCore (a b angle)
:precision binary64
(if (<= b 3.85e+87)
(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 3.85 \cdot 10^{+87}:\\
\;\;\;\;\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 < 3.85000000000000015e87Initial program 78.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.2%
Applied rewrites55.0%
if 3.85000000000000015e87 < b Initial program 94.4%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6492.3
Applied rewrites92.3%
Final simplification61.5%
(FPCore (a b angle)
:precision binary64
(if (<= a 3.5e-16)
(* b b)
(if (<= a 1.35e+154)
(fma
(* (* (* (* a a) 3.08641975308642e-5) (PI)) (PI))
(* angle angle)
(* b b))
(* (* (* (PI) (PI)) a) (* (* (* angle angle) 3.08641975308642e-5) a)))))\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.5 \cdot 10^{-16}:\\
\;\;\;\;b \cdot b\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\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(\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 < 3.50000000000000017e-16Initial program 80.3%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6463.9
Applied rewrites63.9%
if 3.50000000000000017e-16 < a < 1.35000000000000003e154Initial program 72.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.4%
Taylor expanded in a around inf
Applied rewrites63.0%
if 1.35000000000000003e154 < a Initial program 99.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites34.4%
Taylor expanded in a around inf
Applied rewrites51.1%
Applied rewrites64.2%
Final simplification63.8%
(FPCore (a b angle) :precision binary64 (if (<= a 4.5e+125) (* b b) (* (* (* (PI) (PI)) a) (* (* (* angle angle) 3.08641975308642e-5) a))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.5 \cdot 10^{+125}:\\
\;\;\;\;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 < 4.5e125Initial program 79.3%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6461.6
Applied rewrites61.6%
if 4.5e125 < a Initial program 95.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites37.7%
Taylor expanded in a around inf
Applied rewrites49.0%
Applied rewrites60.0%
Final simplification61.3%
(FPCore (a b angle) :precision binary64 (if (<= a 3.9e+139) (* b b) (* (* (* (* (PI) (PI)) a) a) (* (* 3.08641975308642e-5 angle) angle))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.9 \cdot 10^{+139}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \cdot a\right) \cdot \left(\left(3.08641975308642 \cdot 10^{-5} \cdot angle\right) \cdot angle\right)\\
\end{array}
\end{array}
if a < 3.90000000000000006e139Initial program 79.6%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6461.6
Applied rewrites61.6%
if 3.90000000000000006e139 < a Initial program 94.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites35.1%
Taylor expanded in a around inf
Applied rewrites47.4%
Applied rewrites47.4%
Final simplification59.8%
(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.5%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6458.6
Applied rewrites58.6%
herbie shell --seed 2024304
(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)))