
(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 (* b (cos (* (* -0.005555555555555556 (* t_0 angle)) t_0))) 2.0)
(pow (* a (sin (* (* angle 0.005555555555555556) (PI)))) 2.0))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\mathsf{PI}\left(\right)}\\
{\left(b \cdot \cos \left(\left(-0.005555555555555556 \cdot \left(t\_0 \cdot angle\right)\right) \cdot t\_0\right)\right)}^{2} + {\left(a \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}
\end{array}
\end{array}
Initial program 81.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval81.8
Applied rewrites81.9%
lift-/.f64N/A
div-invN/A
lift-*.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-eval82.0
Applied rewrites82.0%
Final simplification82.0%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (* angle (PI)) 0.005555555555555556)) (t_1 (cos t_0))) (fma (* t_1 (* b b)) t_1 (pow (* (sin t_0) a) 2.0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\\
t_1 := \cos t\_0\\
\mathsf{fma}\left(t\_1 \cdot \left(b \cdot b\right), t\_1, {\left(\sin t\_0 \cdot a\right)}^{2}\right)
\end{array}
\end{array}
Initial program 81.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval81.8
Applied rewrites81.9%
lift-/.f64N/A
div-invN/A
lift-*.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-eval82.0
Applied rewrites82.0%
Applied rewrites81.9%
Final simplification81.9%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (* angle (PI)) 0.005555555555555556))) (fma (* (pow (cos t_0) 2.0) b) b (pow (* (sin t_0) a) 2.0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\\
\mathsf{fma}\left({\cos t\_0}^{2} \cdot b, b, {\left(\sin t\_0 \cdot a\right)}^{2}\right)
\end{array}
\end{array}
Initial program 81.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval81.8
Applied rewrites81.9%
lift-/.f64N/A
div-invN/A
lift-*.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-eval82.0
Applied rewrites82.0%
Applied rewrites81.9%
Final simplification81.9%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (* angle (PI)) 0.005555555555555556))) (+ (pow (* (cos t_0) b) 2.0) (pow (* (sin t_0) a) 2.0))))
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot 0.005555555555555556\\
{\left(\cos t\_0 \cdot b\right)}^{2} + {\left(\sin t\_0 \cdot a\right)}^{2}
\end{array}
\end{array}
Initial program 81.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.8
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval81.8
Applied rewrites81.9%
lift-/.f64N/A
div-invN/A
lift-*.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-eval82.0
Applied rewrites82.0%
Applied rewrites81.9%
Final simplification81.9%
(FPCore (a b angle) :precision binary64 (+ (pow (* 1.0 b) 2.0) (pow (* (sin (* (/ (PI) (pow angle -1.0)) 0.005555555555555556)) a) 2.0)))
\begin{array}{l}
\\
{\left(1 \cdot b\right)}^{2} + {\left(\sin \left(\frac{\mathsf{PI}\left(\right)}{{angle}^{-1}} \cdot 0.005555555555555556\right) \cdot a\right)}^{2}
\end{array}
Initial program 81.8%
lift-*.f64N/A
lift-/.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
inv-powN/A
lower-pow.f6481.9
Applied rewrites81.9%
Taylor expanded in angle around 0
Applied rewrites81.6%
Final simplification81.6%
(FPCore (a b angle)
:precision binary64
(if (<= a 9.8e-102)
(* (pow (cos (* (* angle (PI)) -0.005555555555555556)) 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(angle \cdot \mathsf{PI}\left(\right)\right) \cdot -0.005555555555555556\right)}^{2} \cdot \left(b \cdot b\right)\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{+149}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\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 (* (* 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(\left(0.005555555555555556 \cdot \mathsf{PI}\left(\right)\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(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\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 (* (* angle 0.005555555555555556) (PI)))) 2.0)))
\begin{array}{l}
\\
\mathsf{fma}\left(1, b \cdot b, {\left(a \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \mathsf{PI}\left(\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(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\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
(let* ((t_0 (* (PI) (PI))))
(if (<= b 2.8e-155)
(* (* (* (* (* t_0 a) a) 3.08641975308642e-5) angle) angle)
(if (<= b 2.3e+150)
(fma (* (* (* 3.08641975308642e-5 t_0) a) a) (* angle angle) (* b b))
(* b b)))))\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\\
\mathbf{if}\;b \leq 2.8 \cdot 10^{-155}:\\
\;\;\;\;\left(\left(\left(\left(t\_0 \cdot a\right) \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot angle\right) \cdot angle\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{+150}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(3.08641975308642 \cdot 10^{-5} \cdot t\_0\right) \cdot a\right) \cdot a, angle \cdot angle, b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot b\\
\end{array}
\end{array}
if b < 2.8e-155Initial program 82.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6482.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6482.4
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval82.4
Applied rewrites82.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites45.3%
Taylor expanded in b around 0
Applied rewrites37.5%
Taylor expanded in b around 0
Applied rewrites46.1%
if 2.8e-155 < b < 2.30000000000000001e150Initial program 72.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6472.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6472.6
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-*.f64N/A
metadata-eval72.7
Applied rewrites72.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites55.5%
Taylor expanded in b around 0
Applied rewrites56.9%
if 2.30000000000000001e150 < b Initial program 100.0%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f64100.0
Applied rewrites100.0%
Final simplification55.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(angle \cdot angle\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\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%
(FPCore (a b angle) :precision binary64 (if (<= a 2.3e+156) (* b b) (* (* (* angle angle) 3.08641975308642e-5) (* (* (* (PI) (PI)) a) a))))
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.3 \cdot 10^{+156}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(angle \cdot angle\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot a\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%
(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)))