
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (+ (pow (* a (cos t_0)) 2.0) (pow (* b (sin t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return pow((a * cos(t_0)), 2.0) + pow((b * sin(t_0)), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return Math.pow((a * Math.cos(t_0)), 2.0) + Math.pow((b * Math.sin(t_0)), 2.0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return math.pow((a * math.cos(t_0)), 2.0) + math.pow((b * math.sin(t_0)), 2.0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64((Float64(a * cos(t_0)) ^ 2.0) + (Float64(b * sin(t_0)) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((a * cos(t_0)) ^ 2.0) + ((b * sin(t_0)) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t\_0\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (+ (pow (* a (cos t_0)) 2.0) (pow (* b (sin t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return pow((a * cos(t_0)), 2.0) + pow((b * sin(t_0)), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return Math.pow((a * Math.cos(t_0)), 2.0) + Math.pow((b * Math.sin(t_0)), 2.0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return math.pow((a * math.cos(t_0)), 2.0) + math.pow((b * math.sin(t_0)), 2.0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64((Float64(a * cos(t_0)) ^ 2.0) + (Float64(b * sin(t_0)) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((a * cos(t_0)) ^ 2.0) + ((b * sin(t_0)) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t\_0\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}
(FPCore (a b angle) :precision binary64 (+ (pow a 2.0) (pow (* b (sin (* PI (* -0.005555555555555556 angle)))) 2.0)))
double code(double a, double b, double angle) {
return pow(a, 2.0) + pow((b * sin((((double) M_PI) * (-0.005555555555555556 * angle)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow(a, 2.0) + Math.pow((b * Math.sin((Math.PI * (-0.005555555555555556 * angle)))), 2.0);
}
def code(a, b, angle): return math.pow(a, 2.0) + math.pow((b * math.sin((math.pi * (-0.005555555555555556 * angle)))), 2.0)
function code(a, b, angle) return Float64((a ^ 2.0) + (Float64(b * sin(Float64(pi * Float64(-0.005555555555555556 * angle)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = (a ^ 2.0) + ((b * sin((pi * (-0.005555555555555556 * angle)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(Pi * N[(-0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{a}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(-0.005555555555555556 \cdot angle\right)\right)\right)}^{2}
\end{array}
Initial program 79.1%
Simplified79.3%
Taylor expanded in angle around 0 79.7%
Taylor expanded in angle around inf 79.7%
*-commutative79.7%
associate-*r*79.7%
*-commutative79.7%
associate-*l*79.7%
Simplified79.7%
Final simplification79.7%
(FPCore (a b angle) :precision binary64 (+ (pow a 2.0) (pow (* b (sin (* -0.005555555555555556 (* PI angle)))) 2.0)))
double code(double a, double b, double angle) {
return pow(a, 2.0) + pow((b * sin((-0.005555555555555556 * (((double) M_PI) * angle)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow(a, 2.0) + Math.pow((b * Math.sin((-0.005555555555555556 * (Math.PI * angle)))), 2.0);
}
def code(a, b, angle): return math.pow(a, 2.0) + math.pow((b * math.sin((-0.005555555555555556 * (math.pi * angle)))), 2.0)
function code(a, b, angle) return Float64((a ^ 2.0) + (Float64(b * sin(Float64(-0.005555555555555556 * Float64(pi * angle)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = (a ^ 2.0) + ((b * sin((-0.005555555555555556 * (pi * angle)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{a}^{2} + {\left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}
\end{array}
Initial program 79.1%
Simplified79.3%
Taylor expanded in angle around 0 79.7%
Taylor expanded in angle around 0 79.7%
Final simplification79.7%
(FPCore (a b angle) :precision binary64 (+ (pow a 2.0) (pow (* b (sin (* angle (/ PI -180.0)))) 2.0)))
double code(double a, double b, double angle) {
return pow(a, 2.0) + pow((b * sin((angle * (((double) M_PI) / -180.0)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow(a, 2.0) + Math.pow((b * Math.sin((angle * (Math.PI / -180.0)))), 2.0);
}
def code(a, b, angle): return math.pow(a, 2.0) + math.pow((b * math.sin((angle * (math.pi / -180.0)))), 2.0)
function code(a, b, angle) return Float64((a ^ 2.0) + (Float64(b * sin(Float64(angle * Float64(pi / -180.0)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = (a ^ 2.0) + ((b * sin((angle * (pi / -180.0)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{a}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{-180}\right)\right)}^{2}
\end{array}
Initial program 79.1%
Simplified79.3%
Taylor expanded in angle around 0 79.7%
Final simplification79.7%
(FPCore (a b angle) :precision binary64 (if (<= b 2.8e-90) (pow a 2.0) (+ (pow a 2.0) (* (pow (* angle (* b PI)) 2.0) 3.08641975308642e-5))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 2.8e-90) {
tmp = pow(a, 2.0);
} else {
tmp = pow(a, 2.0) + (pow((angle * (b * ((double) M_PI))), 2.0) * 3.08641975308642e-5);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2.8e-90) {
tmp = Math.pow(a, 2.0);
} else {
tmp = Math.pow(a, 2.0) + (Math.pow((angle * (b * Math.PI)), 2.0) * 3.08641975308642e-5);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 2.8e-90: tmp = math.pow(a, 2.0) else: tmp = math.pow(a, 2.0) + (math.pow((angle * (b * math.pi)), 2.0) * 3.08641975308642e-5) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 2.8e-90) tmp = a ^ 2.0; else tmp = Float64((a ^ 2.0) + Float64((Float64(angle * Float64(b * pi)) ^ 2.0) * 3.08641975308642e-5)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2.8e-90) tmp = a ^ 2.0; else tmp = (a ^ 2.0) + (((angle * (b * pi)) ^ 2.0) * 3.08641975308642e-5); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 2.8e-90], N[Power[a, 2.0], $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[(N[Power[N[(angle * N[(b * Pi), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.8 \cdot 10^{-90}:\\
\;\;\;\;{a}^{2}\\
\mathbf{else}:\\
\;\;\;\;{a}^{2} + {\left(angle \cdot \left(b \cdot \pi\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\
\end{array}
\end{array}
if b < 2.7999999999999999e-90Initial program 76.9%
Simplified77.1%
Taylor expanded in angle around 0 77.7%
Taylor expanded in angle around 0 71.0%
unpow271.0%
associate-*r*71.0%
associate-*l*69.7%
*-commutative69.7%
*-commutative69.7%
add-sqr-sqrt40.2%
sqrt-prod59.1%
unpow259.1%
unpow-prod-down59.1%
metadata-eval59.1%
unpow-prod-down51.1%
*-commutative51.1%
pow-prod-down51.0%
associate-*l*51.0%
*-commutative51.0%
*-commutative51.0%
Applied egg-rr48.4%
Taylor expanded in a around inf 60.4%
if 2.7999999999999999e-90 < b Initial program 83.0%
Simplified83.3%
Taylor expanded in angle around 0 83.4%
Taylor expanded in angle around 0 81.1%
*-commutative81.1%
unpow-prod-down81.1%
*-commutative81.1%
metadata-eval81.1%
Applied egg-rr81.1%
Final simplification67.7%
(FPCore (a b angle) :precision binary64 (if (<= b 1.15e-89) (pow a 2.0) (+ (pow a 2.0) (pow (* -0.005555555555555556 (* b (* PI angle))) 2.0))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.15e-89) {
tmp = pow(a, 2.0);
} else {
tmp = pow(a, 2.0) + pow((-0.005555555555555556 * (b * (((double) M_PI) * angle))), 2.0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 1.15e-89) {
tmp = Math.pow(a, 2.0);
} else {
tmp = Math.pow(a, 2.0) + Math.pow((-0.005555555555555556 * (b * (Math.PI * angle))), 2.0);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 1.15e-89: tmp = math.pow(a, 2.0) else: tmp = math.pow(a, 2.0) + math.pow((-0.005555555555555556 * (b * (math.pi * angle))), 2.0) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 1.15e-89) tmp = a ^ 2.0; else tmp = Float64((a ^ 2.0) + (Float64(-0.005555555555555556 * Float64(b * Float64(pi * angle))) ^ 2.0)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 1.15e-89) tmp = a ^ 2.0; else tmp = (a ^ 2.0) + ((-0.005555555555555556 * (b * (pi * angle))) ^ 2.0); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 1.15e-89], N[Power[a, 2.0], $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(-0.005555555555555556 * N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.15 \cdot 10^{-89}:\\
\;\;\;\;{a}^{2}\\
\mathbf{else}:\\
\;\;\;\;{a}^{2} + {\left(-0.005555555555555556 \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}\\
\end{array}
\end{array}
if b < 1.15e-89Initial program 76.9%
Simplified77.1%
Taylor expanded in angle around 0 77.7%
Taylor expanded in angle around 0 71.0%
unpow271.0%
associate-*r*71.0%
associate-*l*69.7%
*-commutative69.7%
*-commutative69.7%
add-sqr-sqrt40.2%
sqrt-prod59.1%
unpow259.1%
unpow-prod-down59.1%
metadata-eval59.1%
unpow-prod-down51.1%
*-commutative51.1%
pow-prod-down51.0%
associate-*l*51.0%
*-commutative51.0%
*-commutative51.0%
Applied egg-rr48.4%
Taylor expanded in a around inf 60.4%
if 1.15e-89 < b Initial program 83.0%
Simplified83.3%
Taylor expanded in angle around 0 83.4%
Taylor expanded in angle around 0 81.1%
add-log-exp62.3%
*-commutative62.3%
exp-prod62.3%
*-commutative62.3%
exp-prod55.0%
*-commutative55.0%
exp-prod55.0%
Applied egg-rr55.0%
log-pow55.0%
log-pow55.0%
log-pow81.1%
rem-log-exp81.1%
*-commutative81.1%
associate-*r*81.1%
Simplified81.1%
Final simplification67.7%
(FPCore (a b angle) :precision binary64 (if (<= b 2e-90) (pow a 2.0) (pow (hypot a (* b (* angle (* PI 0.005555555555555556)))) 2.0)))
double code(double a, double b, double angle) {
double tmp;
if (b <= 2e-90) {
tmp = pow(a, 2.0);
} else {
tmp = pow(hypot(a, (b * (angle * (((double) M_PI) * 0.005555555555555556)))), 2.0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2e-90) {
tmp = Math.pow(a, 2.0);
} else {
tmp = Math.pow(Math.hypot(a, (b * (angle * (Math.PI * 0.005555555555555556)))), 2.0);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 2e-90: tmp = math.pow(a, 2.0) else: tmp = math.pow(math.hypot(a, (b * (angle * (math.pi * 0.005555555555555556)))), 2.0) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 2e-90) tmp = a ^ 2.0; else tmp = hypot(a, Float64(b * Float64(angle * Float64(pi * 0.005555555555555556)))) ^ 2.0; end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2e-90) tmp = a ^ 2.0; else tmp = hypot(a, (b * (angle * (pi * 0.005555555555555556)))) ^ 2.0; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 2e-90], N[Power[a, 2.0], $MachinePrecision], N[Power[N[Sqrt[a ^ 2 + N[(b * N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2 \cdot 10^{-90}:\\
\;\;\;\;{a}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(a, b \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)}^{2}\\
\end{array}
\end{array}
if b < 1.99999999999999999e-90Initial program 76.9%
Simplified77.1%
Taylor expanded in angle around 0 77.7%
Taylor expanded in angle around 0 71.0%
unpow271.0%
associate-*r*71.0%
associate-*l*69.7%
*-commutative69.7%
*-commutative69.7%
add-sqr-sqrt40.2%
sqrt-prod59.1%
unpow259.1%
unpow-prod-down59.1%
metadata-eval59.1%
unpow-prod-down51.1%
*-commutative51.1%
pow-prod-down51.0%
associate-*l*51.0%
*-commutative51.0%
*-commutative51.0%
Applied egg-rr48.4%
Taylor expanded in a around inf 60.4%
if 1.99999999999999999e-90 < b Initial program 83.0%
Simplified83.3%
Taylor expanded in angle around 0 83.4%
Taylor expanded in angle around 0 81.1%
unpow281.1%
associate-*r*81.1%
associate-*l*77.9%
*-commutative77.9%
*-commutative77.9%
add-sqr-sqrt37.4%
sqrt-prod50.1%
unpow250.1%
unpow-prod-down50.1%
metadata-eval50.1%
unpow-prod-down41.3%
*-commutative41.3%
pow-prod-down41.3%
associate-*l*41.3%
*-commutative41.3%
*-commutative41.3%
Applied egg-rr27.5%
add-sqr-sqrt27.0%
pow227.0%
Applied egg-rr81.1%
Final simplification67.7%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (* b PI) (* angle 0.005555555555555556)))) (if (<= b 3.6e-91) (pow a 2.0) (+ (pow a 2.0) (* t_0 t_0)))))
double code(double a, double b, double angle) {
double t_0 = (b * ((double) M_PI)) * (angle * 0.005555555555555556);
double tmp;
if (b <= 3.6e-91) {
tmp = pow(a, 2.0);
} else {
tmp = pow(a, 2.0) + (t_0 * t_0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b * Math.PI) * (angle * 0.005555555555555556);
double tmp;
if (b <= 3.6e-91) {
tmp = Math.pow(a, 2.0);
} else {
tmp = Math.pow(a, 2.0) + (t_0 * t_0);
}
return tmp;
}
def code(a, b, angle): t_0 = (b * math.pi) * (angle * 0.005555555555555556) tmp = 0 if b <= 3.6e-91: tmp = math.pow(a, 2.0) else: tmp = math.pow(a, 2.0) + (t_0 * t_0) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b * pi) * Float64(angle * 0.005555555555555556)) tmp = 0.0 if (b <= 3.6e-91) tmp = a ^ 2.0; else tmp = Float64((a ^ 2.0) + Float64(t_0 * t_0)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b * pi) * (angle * 0.005555555555555556); tmp = 0.0; if (b <= 3.6e-91) tmp = a ^ 2.0; else tmp = (a ^ 2.0) + (t_0 * t_0); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b * Pi), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 3.6e-91], N[Power[a, 2.0], $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;b \leq 3.6 \cdot 10^{-91}:\\
\;\;\;\;{a}^{2}\\
\mathbf{else}:\\
\;\;\;\;{a}^{2} + t\_0 \cdot t\_0\\
\end{array}
\end{array}
if b < 3.6e-91Initial program 76.9%
Simplified77.1%
Taylor expanded in angle around 0 77.7%
Taylor expanded in angle around 0 71.0%
unpow271.0%
associate-*r*71.0%
associate-*l*69.7%
*-commutative69.7%
*-commutative69.7%
add-sqr-sqrt40.2%
sqrt-prod59.1%
unpow259.1%
unpow-prod-down59.1%
metadata-eval59.1%
unpow-prod-down51.1%
*-commutative51.1%
pow-prod-down51.0%
associate-*l*51.0%
*-commutative51.0%
*-commutative51.0%
Applied egg-rr48.4%
Taylor expanded in a around inf 60.4%
if 3.6e-91 < b Initial program 83.0%
Simplified83.3%
Taylor expanded in angle around 0 83.4%
Taylor expanded in angle around 0 81.1%
unpow-prod-down81.1%
metadata-eval81.1%
*-commutative81.1%
*-commutative81.1%
pow-prod-down66.0%
*-commutative66.0%
pow-prod-down66.0%
associate-*r*66.0%
add-sqr-sqrt66.0%
Applied egg-rr81.0%
Final simplification67.6%
(FPCore (a b angle) :precision binary64 (pow a 2.0))
double code(double a, double b, double angle) {
return pow(a, 2.0);
}
real(8) function code(a, b, angle)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: angle
code = a ** 2.0d0
end function
public static double code(double a, double b, double angle) {
return Math.pow(a, 2.0);
}
def code(a, b, angle): return math.pow(a, 2.0)
function code(a, b, angle) return a ^ 2.0 end
function tmp = code(a, b, angle) tmp = a ^ 2.0; end
code[a_, b_, angle_] := N[Power[a, 2.0], $MachinePrecision]
\begin{array}{l}
\\
{a}^{2}
\end{array}
Initial program 79.1%
Simplified79.3%
Taylor expanded in angle around 0 79.7%
Taylor expanded in angle around 0 74.6%
unpow274.6%
associate-*r*74.6%
associate-*l*72.6%
*-commutative72.6%
*-commutative72.6%
add-sqr-sqrt39.2%
sqrt-prod55.9%
unpow255.9%
unpow-prod-down55.9%
metadata-eval55.9%
unpow-prod-down47.6%
*-commutative47.6%
pow-prod-down47.6%
associate-*l*47.6%
*-commutative47.6%
*-commutative47.6%
Applied egg-rr41.0%
Taylor expanded in a around inf 53.8%
Final simplification53.8%
herbie shell --seed 2024075
(FPCore (a b angle)
:name "ab-angle->ABCF C"
:precision binary64
(+ (pow (* a (cos (* PI (/ angle 180.0)))) 2.0) (pow (* b (sin (* PI (/ angle 180.0)))) 2.0)))