
(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 17 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}
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle_m)))
(t_1 (pow t_0 0.16666666666666666)))
(+
(pow
(*
a
(cos
(*
t_1
(* t_1 (pow (cbrt (* 0.005555555555555556 (* PI angle_m))) 2.0)))))
2.0)
(pow (* b (sin t_0)) 2.0))))angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle_m);
double t_1 = pow(t_0, 0.16666666666666666);
return pow((a * cos((t_1 * (t_1 * pow(cbrt((0.005555555555555556 * (((double) M_PI) * angle_m))), 2.0))))), 2.0) + pow((b * sin(t_0)), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double t_0 = Math.PI * (0.005555555555555556 * angle_m);
double t_1 = Math.pow(t_0, 0.16666666666666666);
return Math.pow((a * Math.cos((t_1 * (t_1 * Math.pow(Math.cbrt((0.005555555555555556 * (Math.PI * angle_m))), 2.0))))), 2.0) + Math.pow((b * Math.sin(t_0)), 2.0);
}
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(pi * Float64(0.005555555555555556 * angle_m)) t_1 = t_0 ^ 0.16666666666666666 return Float64((Float64(a * cos(Float64(t_1 * Float64(t_1 * (cbrt(Float64(0.005555555555555556 * Float64(pi * angle_m))) ^ 2.0))))) ^ 2.0) + (Float64(b * sin(t_0)) ^ 2.0)) end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 0.16666666666666666], $MachinePrecision]}, N[(N[Power[N[(a * N[Cos[N[(t$95$1 * N[(t$95$1 * N[Power[N[Power[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
t_1 := {t\_0}^{0.16666666666666666}\\
{\left(a \cdot \cos \left(t\_1 \cdot \left(t\_1 \cdot {\left(\sqrt[3]{0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)}\right)}^{2}\right)\right)\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}
Initial program 76.9%
Simplified76.9%
metadata-eval76.9%
div-inv77.0%
add-cube-cbrt77.0%
pow377.0%
div-inv77.0%
metadata-eval77.0%
Applied egg-rr77.0%
cube-mult77.1%
add-sqr-sqrt40.2%
associate-*l*40.3%
pow1/340.1%
sqrt-pow140.1%
*-commutative40.1%
metadata-eval40.1%
pow1/340.2%
sqrt-pow140.2%
*-commutative40.2%
metadata-eval40.2%
pow240.2%
Applied egg-rr31.1%
*-un-lft-identity31.1%
*-commutative31.1%
*-commutative31.1%
associate-*r*31.1%
pow231.1%
cbrt-prod40.3%
pow240.3%
*-commutative40.3%
*-commutative40.3%
associate-*r*40.2%
Applied egg-rr40.2%
*-rgt-identity40.2%
*-commutative40.2%
*-commutative40.2%
associate-*r*40.3%
Simplified40.3%
Final simplification40.3%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle_m))) (t_1 (+ t_0 1.0)))
(+
(pow (* b (sin t_0)) 2.0)
(pow (* a (fma (sin t_1) (sin 1.0) (* (cos 1.0) (cos t_1)))) 2.0))))angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle_m);
double t_1 = t_0 + 1.0;
return pow((b * sin(t_0)), 2.0) + pow((a * fma(sin(t_1), sin(1.0), (cos(1.0) * cos(t_1)))), 2.0);
}
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(pi * Float64(0.005555555555555556 * angle_m)) t_1 = Float64(t_0 + 1.0) return Float64((Float64(b * sin(t_0)) ^ 2.0) + (Float64(a * fma(sin(t_1), sin(1.0), Float64(cos(1.0) * cos(t_1)))) ^ 2.0)) end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + 1.0), $MachinePrecision]}, N[(N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[(N[Sin[t$95$1], $MachinePrecision] * N[Sin[1.0], $MachinePrecision] + N[(N[Cos[1.0], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
t_1 := t\_0 + 1\\
{\left(b \cdot \sin t\_0\right)}^{2} + {\left(a \cdot \mathsf{fma}\left(\sin t\_1, \sin 1, \cos 1 \cdot \cos t\_1\right)\right)}^{2}
\end{array}
\end{array}
Initial program 76.9%
Simplified76.9%
metadata-eval76.9%
div-inv77.0%
expm1-log1p-u63.6%
expm1-undefine63.6%
cos-diff63.5%
div-inv63.5%
metadata-eval63.5%
div-inv63.5%
metadata-eval63.5%
Applied egg-rr63.5%
+-commutative63.5%
fma-define63.5%
log1p-undefine63.5%
rem-exp-log63.5%
*-commutative63.5%
*-commutative63.5%
log1p-undefine63.5%
rem-exp-log77.0%
*-commutative77.0%
Simplified77.0%
Final simplification77.0%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle_m))))
(+
(pow (* b (sin t_0)) 2.0)
(pow (* a (cos (exp (* (* 3.0 (log t_0)) 0.3333333333333333)))) 2.0))))angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle_m);
return pow((b * sin(t_0)), 2.0) + pow((a * cos(exp(((3.0 * log(t_0)) * 0.3333333333333333)))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double t_0 = Math.PI * (0.005555555555555556 * angle_m);
return Math.pow((b * Math.sin(t_0)), 2.0) + Math.pow((a * Math.cos(Math.exp(((3.0 * Math.log(t_0)) * 0.3333333333333333)))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): t_0 = math.pi * (0.005555555555555556 * angle_m) return math.pow((b * math.sin(t_0)), 2.0) + math.pow((a * math.cos(math.exp(((3.0 * math.log(t_0)) * 0.3333333333333333)))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(pi * Float64(0.005555555555555556 * angle_m)) return Float64((Float64(b * sin(t_0)) ^ 2.0) + (Float64(a * cos(exp(Float64(Float64(3.0 * log(t_0)) * 0.3333333333333333)))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) t_0 = pi * (0.005555555555555556 * angle_m); tmp = ((b * sin(t_0)) ^ 2.0) + ((a * cos(exp(((3.0 * log(t_0)) * 0.3333333333333333)))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[Exp[N[(N[(3.0 * N[Log[t$95$0], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
{\left(b \cdot \sin t\_0\right)}^{2} + {\left(a \cdot \cos \left(e^{\left(3 \cdot \log t\_0\right) \cdot 0.3333333333333333}\right)\right)}^{2}
\end{array}
\end{array}
Initial program 76.9%
Simplified76.9%
metadata-eval76.9%
div-inv77.0%
add-cbrt-cube58.1%
pow1/346.1%
pow-to-exp46.1%
pow346.1%
log-pow40.3%
div-inv40.3%
metadata-eval40.3%
Applied egg-rr40.3%
Final simplification40.3%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (let* ((t_0 (* PI (* 0.005555555555555556 angle_m)))) (+ (pow (* b (sin t_0)) 2.0) (pow (* a (cos (exp (log t_0)))) 2.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle_m);
return pow((b * sin(t_0)), 2.0) + pow((a * cos(exp(log(t_0)))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double t_0 = Math.PI * (0.005555555555555556 * angle_m);
return Math.pow((b * Math.sin(t_0)), 2.0) + Math.pow((a * Math.cos(Math.exp(Math.log(t_0)))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): t_0 = math.pi * (0.005555555555555556 * angle_m) return math.pow((b * math.sin(t_0)), 2.0) + math.pow((a * math.cos(math.exp(math.log(t_0)))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(pi * Float64(0.005555555555555556 * angle_m)) return Float64((Float64(b * sin(t_0)) ^ 2.0) + (Float64(a * cos(exp(log(t_0)))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) t_0 = pi * (0.005555555555555556 * angle_m); tmp = ((b * sin(t_0)) ^ 2.0) + ((a * cos(exp(log(t_0)))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[Exp[N[Log[t$95$0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
{\left(b \cdot \sin t\_0\right)}^{2} + {\left(a \cdot \cos \left(e^{\log t\_0}\right)\right)}^{2}
\end{array}
\end{array}
Initial program 76.9%
Simplified76.9%
add-exp-log40.2%
Applied egg-rr40.2%
Final simplification40.2%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (* PI (* 0.005555555555555556 angle_m)))) 2.0) (pow (* a (cos (/ 1.0 (/ 180.0 (* PI angle_m))))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0) + pow((a * cos((1.0 / (180.0 / (((double) M_PI) * angle_m))))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((b * Math.sin((Math.PI * (0.005555555555555556 * angle_m)))), 2.0) + Math.pow((a * Math.cos((1.0 / (180.0 / (Math.PI * angle_m))))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((b * math.sin((math.pi * (0.005555555555555556 * angle_m)))), 2.0) + math.pow((a * math.cos((1.0 / (180.0 / (math.pi * angle_m))))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0) + (Float64(a * cos(Float64(1.0 / Float64(180.0 / Float64(pi * angle_m))))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((b * sin((pi * (0.005555555555555556 * angle_m)))) ^ 2.0) + ((a * cos((1.0 / (180.0 / (pi * angle_m))))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[(1.0 / N[(180.0 / N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2} + {\left(a \cdot \cos \left(\frac{1}{\frac{180}{\pi \cdot angle\_m}}\right)\right)}^{2}
\end{array}
Initial program 76.9%
Simplified76.9%
metadata-eval76.9%
div-inv77.0%
associate-*r/77.0%
clear-num77.0%
Applied egg-rr77.0%
Final simplification77.0%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (* PI (* 0.005555555555555556 angle_m)))) 2.0) (pow (* a (cos (* 0.005555555555555556 (/ PI (/ 1.0 angle_m))))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0) + pow((a * cos((0.005555555555555556 * (((double) M_PI) / (1.0 / angle_m))))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((b * Math.sin((Math.PI * (0.005555555555555556 * angle_m)))), 2.0) + Math.pow((a * Math.cos((0.005555555555555556 * (Math.PI / (1.0 / angle_m))))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((b * math.sin((math.pi * (0.005555555555555556 * angle_m)))), 2.0) + math.pow((a * math.cos((0.005555555555555556 * (math.pi / (1.0 / angle_m))))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0) + (Float64(a * cos(Float64(0.005555555555555556 * Float64(pi / Float64(1.0 / angle_m))))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((b * sin((pi * (0.005555555555555556 * angle_m)))) ^ 2.0) + ((a * cos((0.005555555555555556 * (pi / (1.0 / angle_m))))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[(0.005555555555555556 * N[(Pi / N[(1.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2} + {\left(a \cdot \cos \left(0.005555555555555556 \cdot \frac{\pi}{\frac{1}{angle\_m}}\right)\right)}^{2}
\end{array}
Initial program 76.9%
Simplified76.9%
metadata-eval76.9%
div-inv77.0%
add-cbrt-cube58.1%
pow1/346.1%
pow-to-exp46.1%
pow346.1%
log-pow40.3%
div-inv40.3%
metadata-eval40.3%
Applied egg-rr40.3%
*-commutative40.3%
associate-*r*40.2%
metadata-eval40.2%
*-un-lft-identity40.2%
add-exp-log76.9%
metadata-eval76.9%
div-inv77.0%
clear-num76.9%
associate-*r/76.9%
*-commutative76.9%
div-inv76.9%
times-frac77.0%
metadata-eval77.0%
Applied egg-rr77.0%
Final simplification77.0%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (* PI (* 0.005555555555555556 angle_m)))) 2.0) (pow (* a (cos (/ PI (/ 180.0 angle_m)))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0) + pow((a * cos((((double) M_PI) / (180.0 / angle_m)))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((b * Math.sin((Math.PI * (0.005555555555555556 * angle_m)))), 2.0) + Math.pow((a * Math.cos((Math.PI / (180.0 / angle_m)))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((b * math.sin((math.pi * (0.005555555555555556 * angle_m)))), 2.0) + math.pow((a * math.cos((math.pi / (180.0 / angle_m)))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0) + (Float64(a * cos(Float64(pi / Float64(180.0 / angle_m)))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((b * sin((pi * (0.005555555555555556 * angle_m)))) ^ 2.0) + ((a * cos((pi / (180.0 / angle_m)))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2} + {\left(a \cdot \cos \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2}
\end{array}
Initial program 76.9%
Simplified76.9%
metadata-eval76.9%
div-inv77.0%
clear-num76.9%
un-div-inv76.9%
Applied egg-rr76.9%
Final simplification76.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* a (cos (/ PI (/ 180.0 angle_m)))) 2.0) (pow (* b (sin (* 0.005555555555555556 (* PI angle_m)))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((a * cos((((double) M_PI) / (180.0 / angle_m)))), 2.0) + pow((b * sin((0.005555555555555556 * (((double) M_PI) * angle_m)))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((a * Math.cos((Math.PI / (180.0 / angle_m)))), 2.0) + Math.pow((b * Math.sin((0.005555555555555556 * (Math.PI * angle_m)))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((a * math.cos((math.pi / (180.0 / angle_m)))), 2.0) + math.pow((b * math.sin((0.005555555555555556 * (math.pi * angle_m)))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(a * cos(Float64(pi / Float64(180.0 / angle_m)))) ^ 2.0) + (Float64(b * sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((a * cos((pi / (180.0 / angle_m)))) ^ 2.0) + ((b * sin((0.005555555555555556 * (pi * angle_m)))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Cos[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(a \cdot \cos \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)}^{2}
\end{array}
Initial program 76.9%
Simplified76.9%
metadata-eval76.9%
div-inv77.0%
clear-num76.9%
un-div-inv76.9%
Applied egg-rr76.9%
Taylor expanded in angle around inf 76.9%
Final simplification76.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (let* ((t_0 (* PI (* 0.005555555555555556 angle_m)))) (+ (pow (* b (sin t_0)) 2.0) (pow (* a (cos t_0)) 2.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle_m);
return pow((b * sin(t_0)), 2.0) + pow((a * cos(t_0)), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double t_0 = Math.PI * (0.005555555555555556 * angle_m);
return Math.pow((b * Math.sin(t_0)), 2.0) + Math.pow((a * Math.cos(t_0)), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): t_0 = math.pi * (0.005555555555555556 * angle_m) return math.pow((b * math.sin(t_0)), 2.0) + math.pow((a * math.cos(t_0)), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(pi * Float64(0.005555555555555556 * angle_m)) return Float64((Float64(b * sin(t_0)) ^ 2.0) + (Float64(a * cos(t_0)) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) t_0 = pi * (0.005555555555555556 * angle_m); tmp = ((b * sin(t_0)) ^ 2.0) + ((a * cos(t_0)) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
{\left(b \cdot \sin t\_0\right)}^{2} + {\left(a \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Initial program 76.9%
Simplified76.9%
Final simplification76.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (* 0.005555555555555556 (* PI angle_m)))) 2.0) (pow (* a (cos (* PI (* 0.005555555555555556 angle_m)))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((b * sin((0.005555555555555556 * (((double) M_PI) * angle_m)))), 2.0) + pow((a * cos((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((b * Math.sin((0.005555555555555556 * (Math.PI * angle_m)))), 2.0) + Math.pow((a * Math.cos((Math.PI * (0.005555555555555556 * angle_m)))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((b * math.sin((0.005555555555555556 * (math.pi * angle_m)))), 2.0) + math.pow((a * math.cos((math.pi * (0.005555555555555556 * angle_m)))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(b * sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))) ^ 2.0) + (Float64(a * cos(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((b * sin((0.005555555555555556 * (pi * angle_m)))) ^ 2.0) + ((a * cos((pi * (0.005555555555555556 * angle_m)))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)}^{2} + {\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2}
\end{array}
Initial program 76.9%
Simplified76.9%
Taylor expanded in angle around inf 76.9%
Final simplification76.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (* PI (* 0.005555555555555556 angle_m)))) 2.0) (pow a 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0) + pow(a, 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((b * Math.sin((Math.PI * (0.005555555555555556 * angle_m)))), 2.0) + Math.pow(a, 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((b * math.sin((math.pi * (0.005555555555555556 * angle_m)))), 2.0) + math.pow(a, 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0) + (a ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((b * sin((pi * (0.005555555555555556 * angle_m)))) ^ 2.0) + (a ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2} + {a}^{2}
\end{array}
Initial program 76.9%
Simplified76.9%
Taylor expanded in angle around 0 76.6%
Final simplification76.6%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (* 0.005555555555555556 (* PI angle_m)))) 2.0) (pow a 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((b * sin((0.005555555555555556 * (((double) M_PI) * angle_m)))), 2.0) + pow(a, 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((b * Math.sin((0.005555555555555556 * (Math.PI * angle_m)))), 2.0) + Math.pow(a, 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((b * math.sin((0.005555555555555556 * (math.pi * angle_m)))), 2.0) + math.pow(a, 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(b * sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))) ^ 2.0) + (a ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((b * sin((0.005555555555555556 * (pi * angle_m)))) ^ 2.0) + (a ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)}^{2} + {a}^{2}
\end{array}
Initial program 76.9%
Simplified76.9%
Taylor expanded in angle around 0 76.6%
Taylor expanded in angle around inf 76.6%
Final simplification76.6%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(+
(pow a 2.0)
(*
b
(*
angle_m
(*
(* 0.005555555555555556 (* PI angle_m))
(+ -1.0 (fma 0.005555555555555556 (* PI b) 1.0)))))))angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow(a, 2.0) + (b * (angle_m * ((0.005555555555555556 * (((double) M_PI) * angle_m)) * (-1.0 + fma(0.005555555555555556, (((double) M_PI) * b), 1.0)))));
}
angle_m = abs(angle) function code(a, b, angle_m) return Float64((a ^ 2.0) + Float64(b * Float64(angle_m * Float64(Float64(0.005555555555555556 * Float64(pi * angle_m)) * Float64(-1.0 + fma(0.005555555555555556, Float64(pi * b), 1.0)))))) end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[(b * N[(angle$95$m * N[(N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(0.005555555555555556 * N[(Pi * b), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{a}^{2} + b \cdot \left(angle\_m \cdot \left(\left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(-1 + \mathsf{fma}\left(0.005555555555555556, \pi \cdot b, 1\right)\right)\right)\right)
\end{array}
Initial program 76.9%
Simplified76.9%
Taylor expanded in angle around 0 76.6%
Taylor expanded in angle around 0 71.5%
unpow271.5%
associate-*r*71.5%
*-commutative71.5%
*-commutative71.5%
associate-*l*71.0%
*-commutative71.0%
associate-*r*71.0%
*-commutative71.0%
associate-*r*71.0%
*-commutative71.0%
Applied egg-rr71.0%
associate-*r*71.0%
*-commutative71.0%
associate-*r*71.0%
associate-*l*71.0%
Simplified71.0%
expm1-log1p-u54.5%
expm1-undefine56.6%
associate-*r*56.6%
*-commutative56.6%
Applied egg-rr56.6%
sub-neg56.6%
metadata-eval56.6%
+-commutative56.6%
log1p-undefine56.6%
rem-exp-log73.1%
+-commutative73.1%
associate-*r*73.1%
*-commutative73.1%
associate-*l*73.1%
fma-define73.1%
Simplified73.1%
Final simplification73.1%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow a 2.0) (pow (* b (* angle_m (* PI 0.005555555555555556))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow(a, 2.0) + pow((b * (angle_m * (((double) M_PI) * 0.005555555555555556))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow(a, 2.0) + Math.pow((b * (angle_m * (Math.PI * 0.005555555555555556))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow(a, 2.0) + math.pow((b * (angle_m * (math.pi * 0.005555555555555556))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((a ^ 2.0) + (Float64(b * Float64(angle_m * Float64(pi * 0.005555555555555556))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = (a ^ 2.0) + ((b * (angle_m * (pi * 0.005555555555555556))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(b * N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{a}^{2} + {\left(b \cdot \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}
\end{array}
Initial program 76.9%
Simplified76.9%
Taylor expanded in angle around 0 76.6%
Taylor expanded in angle around 0 71.5%
associate-*r*71.5%
*-commutative71.5%
associate-*r*71.5%
Simplified71.5%
Final simplification71.5%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow a 2.0) (pow (* angle_m (* 0.005555555555555556 (* PI b))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow(a, 2.0) + pow((angle_m * (0.005555555555555556 * (((double) M_PI) * b))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow(a, 2.0) + Math.pow((angle_m * (0.005555555555555556 * (Math.PI * b))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow(a, 2.0) + math.pow((angle_m * (0.005555555555555556 * (math.pi * b))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((a ^ 2.0) + (Float64(angle_m * Float64(0.005555555555555556 * Float64(pi * b))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = (a ^ 2.0) + ((angle_m * (0.005555555555555556 * (pi * b))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(angle$95$m * N[(0.005555555555555556 * N[(Pi * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{a}^{2} + {\left(angle\_m \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot b\right)\right)\right)}^{2}
\end{array}
Initial program 76.9%
Simplified76.9%
Taylor expanded in angle around 0 76.6%
Taylor expanded in angle around 0 71.5%
*-un-lft-identity71.5%
associate-*r*71.5%
*-commutative71.5%
associate-*r*71.5%
*-commutative71.5%
Applied egg-rr71.5%
*-lft-identity71.5%
*-commutative71.5%
associate-*l*71.5%
*-commutative71.5%
Simplified71.5%
Final simplification71.5%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (let* ((t_0 (* angle_m (* PI (* 0.005555555555555556 b))))) (+ (pow a 2.0) (* t_0 t_0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = angle_m * (((double) M_PI) * (0.005555555555555556 * b));
return pow(a, 2.0) + (t_0 * t_0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double t_0 = angle_m * (Math.PI * (0.005555555555555556 * b));
return Math.pow(a, 2.0) + (t_0 * t_0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): t_0 = angle_m * (math.pi * (0.005555555555555556 * b)) return math.pow(a, 2.0) + (t_0 * t_0)
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(angle_m * Float64(pi * Float64(0.005555555555555556 * b))) return Float64((a ^ 2.0) + Float64(t_0 * t_0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) t_0 = angle_m * (pi * (0.005555555555555556 * b)); tmp = (a ^ 2.0) + (t_0 * t_0); end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(angle$95$m * N[(Pi * N[(0.005555555555555556 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[a, 2.0], $MachinePrecision] + N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := angle\_m \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\\
{a}^{2} + t\_0 \cdot t\_0
\end{array}
\end{array}
Initial program 76.9%
Simplified76.9%
Taylor expanded in angle around 0 76.6%
Taylor expanded in angle around 0 71.5%
unpow271.5%
associate-*r*71.5%
associate-*r*71.5%
*-commutative71.5%
associate-*r*71.5%
*-commutative71.5%
*-commutative71.5%
associate-*r*71.5%
*-commutative71.5%
Applied egg-rr71.5%
Final simplification71.5%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow a 2.0) (* angle_m (* b (* PI (* b (* PI (* angle_m 3.08641975308642e-5))))))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow(a, 2.0) + (angle_m * (b * (((double) M_PI) * (b * (((double) M_PI) * (angle_m * 3.08641975308642e-5))))));
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow(a, 2.0) + (angle_m * (b * (Math.PI * (b * (Math.PI * (angle_m * 3.08641975308642e-5))))));
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow(a, 2.0) + (angle_m * (b * (math.pi * (b * (math.pi * (angle_m * 3.08641975308642e-5))))))
angle_m = abs(angle) function code(a, b, angle_m) return Float64((a ^ 2.0) + Float64(angle_m * Float64(b * Float64(pi * Float64(b * Float64(pi * Float64(angle_m * 3.08641975308642e-5))))))) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = (a ^ 2.0) + (angle_m * (b * (pi * (b * (pi * (angle_m * 3.08641975308642e-5)))))); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(b * N[(Pi * N[(b * N[(Pi * N[(angle$95$m * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{a}^{2} + angle\_m \cdot \left(b \cdot \left(\pi \cdot \left(b \cdot \left(\pi \cdot \left(angle\_m \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\right)
\end{array}
Initial program 76.9%
Simplified76.9%
Taylor expanded in angle around 0 76.6%
Taylor expanded in angle around 0 71.5%
unpow271.5%
associate-*r*71.5%
*-commutative71.5%
*-commutative71.5%
associate-*l*71.0%
*-commutative71.0%
associate-*r*71.0%
*-commutative71.0%
associate-*r*71.0%
*-commutative71.0%
Applied egg-rr71.0%
associate-*r*71.0%
*-commutative71.0%
associate-*r*71.0%
associate-*l*71.0%
Simplified71.0%
pow171.0%
*-commutative71.0%
associate-*l*71.5%
associate-*r*71.5%
*-commutative71.5%
*-commutative71.5%
*-commutative71.5%
associate-*l*71.5%
*-commutative71.5%
metadata-eval71.5%
Applied egg-rr71.5%
unpow171.5%
associate-*r*71.0%
*-commutative71.0%
associate-*l*71.1%
associate-*l*71.1%
associate-*l*71.1%
Simplified71.1%
Final simplification71.1%
herbie shell --seed 2024086
(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)))