
(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 18 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
(+
(* (cos (+ (* PI (* angle 0.005555555555555556)) 1.0)) (cos 1.0))
(* (fabs (sin (fma PI (* angle 0.005555555555555556) 1.0))) (sin 1.0))))
2.0)
(pow (* b (sin (/ 1.0 (/ 180.0 (* PI angle))))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * ((cos(((((double) M_PI) * (angle * 0.005555555555555556)) + 1.0)) * cos(1.0)) + (fabs(sin(fma(((double) M_PI), (angle * 0.005555555555555556), 1.0))) * sin(1.0)))), 2.0) + pow((b * sin((1.0 / (180.0 / (((double) M_PI) * angle))))), 2.0);
}
function code(a, b, angle) return Float64((Float64(a * Float64(Float64(cos(Float64(Float64(pi * Float64(angle * 0.005555555555555556)) + 1.0)) * cos(1.0)) + Float64(abs(sin(fma(pi, Float64(angle * 0.005555555555555556), 1.0))) * sin(1.0)))) ^ 2.0) + (Float64(b * sin(Float64(1.0 / Float64(180.0 / Float64(pi * angle))))) ^ 2.0)) end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[(N[(N[Cos[N[(N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] * N[Cos[1.0], $MachinePrecision]), $MachinePrecision] + N[(N[Abs[N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sin[1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(1.0 / N[(180.0 / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right) + 1\right) \cdot \cos 1 + \left|\sin \left(\mathsf{fma}\left(\pi, angle \cdot 0.005555555555555556, 1\right)\right)\right| \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right)\right)}^{2}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
metadata-eval82.2%
div-inv82.1%
associate-*r/82.1%
Applied egg-rr82.1%
div-inv82.1%
metadata-eval82.1%
*-commutative82.1%
expm1-log1p-u65.9%
expm1-undefine65.9%
cos-diff66.0%
log1p-undefine66.0%
rem-exp-log66.1%
*-commutative66.1%
associate-*r*66.1%
+-commutative66.1%
Applied egg-rr82.2%
add-sqr-sqrt67.6%
sqrt-unprod82.4%
pow282.4%
fma-define82.4%
Applied egg-rr82.4%
unpow282.4%
rem-sqrt-square82.4%
*-commutative82.4%
Simplified82.4%
metadata-eval82.4%
div-inv82.4%
associate-*r/82.4%
clear-num82.4%
Applied egg-rr82.4%
Final simplification82.4%
(FPCore (a b angle)
:precision binary64
(+
(pow
(*
a
(+
(* (cos (+ (* PI (* angle 0.005555555555555556)) 1.0)) (cos 1.0))
(* (fabs (sin (fma PI (* angle 0.005555555555555556) 1.0))) (sin 1.0))))
2.0)
(pow (* b (sin (/ (* PI angle) 180.0))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * ((cos(((((double) M_PI) * (angle * 0.005555555555555556)) + 1.0)) * cos(1.0)) + (fabs(sin(fma(((double) M_PI), (angle * 0.005555555555555556), 1.0))) * sin(1.0)))), 2.0) + pow((b * sin(((((double) M_PI) * angle) / 180.0))), 2.0);
}
function code(a, b, angle) return Float64((Float64(a * Float64(Float64(cos(Float64(Float64(pi * Float64(angle * 0.005555555555555556)) + 1.0)) * cos(1.0)) + Float64(abs(sin(fma(pi, Float64(angle * 0.005555555555555556), 1.0))) * sin(1.0)))) ^ 2.0) + (Float64(b * sin(Float64(Float64(pi * angle) / 180.0))) ^ 2.0)) end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[(N[(N[Cos[N[(N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] * N[Cos[1.0], $MachinePrecision]), $MachinePrecision] + N[(N[Abs[N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sin[1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right) + 1\right) \cdot \cos 1 + \left|\sin \left(\mathsf{fma}\left(\pi, angle \cdot 0.005555555555555556, 1\right)\right)\right| \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\right)}^{2}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
metadata-eval82.2%
div-inv82.1%
associate-*r/82.1%
Applied egg-rr82.1%
div-inv82.1%
metadata-eval82.1%
*-commutative82.1%
expm1-log1p-u65.9%
expm1-undefine65.9%
cos-diff66.0%
log1p-undefine66.0%
rem-exp-log66.1%
*-commutative66.1%
associate-*r*66.1%
+-commutative66.1%
Applied egg-rr82.2%
add-sqr-sqrt67.6%
sqrt-unprod82.4%
pow282.4%
fma-define82.4%
Applied egg-rr82.4%
unpow282.4%
rem-sqrt-square82.4%
*-commutative82.4%
Simplified82.4%
metadata-eval82.2%
div-inv82.1%
associate-*r/82.1%
Applied egg-rr82.4%
Final simplification82.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (* angle 0.005555555555555556))))
(+
(pow
(*
a
(+
(* (cos (+ t_0 1.0)) (cos 1.0))
(* (fabs (sin (fma PI (* angle 0.005555555555555556) 1.0))) (sin 1.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 * 0.005555555555555556);
return pow((a * ((cos((t_0 + 1.0)) * cos(1.0)) + (fabs(sin(fma(((double) M_PI), (angle * 0.005555555555555556), 1.0))) * sin(1.0)))), 2.0) + pow((b * sin(t_0)), 2.0);
}
function code(a, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) return Float64((Float64(a * Float64(Float64(cos(Float64(t_0 + 1.0)) * cos(1.0)) + Float64(abs(sin(fma(pi, Float64(angle * 0.005555555555555556), 1.0))) * sin(1.0)))) ^ 2.0) + (Float64(b * sin(t_0)) ^ 2.0)) end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[(N[(N[Cos[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision] * N[Cos[1.0], $MachinePrecision]), $MachinePrecision] + N[(N[Abs[N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Sin[1.0], $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}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
{\left(a \cdot \left(\cos \left(t\_0 + 1\right) \cdot \cos 1 + \left|\sin \left(\mathsf{fma}\left(\pi, angle \cdot 0.005555555555555556, 1\right)\right)\right| \cdot \sin 1\right)\right)}^{2} + {\left(b \cdot \sin t\_0\right)}^{2}
\end{array}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
metadata-eval82.2%
div-inv82.1%
associate-*r/82.1%
Applied egg-rr82.1%
div-inv82.1%
metadata-eval82.1%
*-commutative82.1%
expm1-log1p-u65.9%
expm1-undefine65.9%
cos-diff66.0%
log1p-undefine66.0%
rem-exp-log66.1%
*-commutative66.1%
associate-*r*66.1%
+-commutative66.1%
Applied egg-rr82.2%
add-sqr-sqrt67.6%
sqrt-unprod82.4%
pow282.4%
fma-define82.4%
Applied egg-rr82.4%
unpow282.4%
rem-sqrt-square82.4%
*-commutative82.4%
Simplified82.4%
Final simplification82.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (* angle 0.005555555555555556))))
(+
(pow (* b (sin t_0)) 2.0)
(pow
(*
a
(+
(* (cos (+ t_0 1.0)) (cos 1.0))
(*
(sin 1.0)
(fabs (sin (+ 1.0 (* 0.005555555555555556 (* PI angle))))))))
2.0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
return pow((b * sin(t_0)), 2.0) + pow((a * ((cos((t_0 + 1.0)) * cos(1.0)) + (sin(1.0) * fabs(sin((1.0 + (0.005555555555555556 * (((double) M_PI) * angle)))))))), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle * 0.005555555555555556);
return Math.pow((b * Math.sin(t_0)), 2.0) + Math.pow((a * ((Math.cos((t_0 + 1.0)) * Math.cos(1.0)) + (Math.sin(1.0) * Math.abs(Math.sin((1.0 + (0.005555555555555556 * (Math.PI * angle)))))))), 2.0);
}
def code(a, b, angle): t_0 = math.pi * (angle * 0.005555555555555556) return math.pow((b * math.sin(t_0)), 2.0) + math.pow((a * ((math.cos((t_0 + 1.0)) * math.cos(1.0)) + (math.sin(1.0) * math.fabs(math.sin((1.0 + (0.005555555555555556 * (math.pi * angle)))))))), 2.0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) return Float64((Float64(b * sin(t_0)) ^ 2.0) + (Float64(a * Float64(Float64(cos(Float64(t_0 + 1.0)) * cos(1.0)) + Float64(sin(1.0) * abs(sin(Float64(1.0 + Float64(0.005555555555555556 * Float64(pi * angle)))))))) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle * 0.005555555555555556); tmp = ((b * sin(t_0)) ^ 2.0) + ((a * ((cos((t_0 + 1.0)) * cos(1.0)) + (sin(1.0) * abs(sin((1.0 + (0.005555555555555556 * (pi * angle)))))))) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[(N[(N[Cos[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision] * N[Cos[1.0], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[1.0], $MachinePrecision] * N[Abs[N[Sin[N[(1.0 + N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
{\left(b \cdot \sin t\_0\right)}^{2} + {\left(a \cdot \left(\cos \left(t\_0 + 1\right) \cdot \cos 1 + \sin 1 \cdot \left|\sin \left(1 + 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right|\right)\right)}^{2}
\end{array}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
metadata-eval82.2%
div-inv82.1%
associate-*r/82.1%
Applied egg-rr82.1%
div-inv82.1%
metadata-eval82.1%
*-commutative82.1%
expm1-log1p-u65.9%
expm1-undefine65.9%
cos-diff66.0%
log1p-undefine66.0%
rem-exp-log66.1%
*-commutative66.1%
associate-*r*66.1%
+-commutative66.1%
Applied egg-rr82.2%
add-sqr-sqrt67.6%
sqrt-unprod82.4%
pow282.4%
fma-define82.4%
Applied egg-rr82.4%
unpow282.4%
rem-sqrt-square82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in angle around inf 82.4%
Final simplification82.4%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (cos (* PI (/ angle 180.0)))) 2.0) (pow (* b (sin (* (* angle 0.005555555555555556) (cbrt (pow PI 3.0))))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * cos((((double) M_PI) * (angle / 180.0)))), 2.0) + pow((b * sin(((angle * 0.005555555555555556) * cbrt(pow(((double) M_PI), 3.0))))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.cos((Math.PI * (angle / 180.0)))), 2.0) + Math.pow((b * Math.sin(((angle * 0.005555555555555556) * Math.cbrt(Math.pow(Math.PI, 3.0))))), 2.0);
}
function code(a, b, angle) return Float64((Float64(a * cos(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (Float64(b * sin(Float64(Float64(angle * 0.005555555555555556) * cbrt((pi ^ 3.0))))) ^ 2.0)) end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)}^{2}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
metadata-eval82.2%
div-inv82.1%
clear-num82.1%
un-div-inv82.1%
Applied egg-rr82.1%
associate-/r/82.1%
associate-*l/82.1%
associate-/l*82.1%
Simplified82.1%
add-cbrt-cube82.3%
pow382.3%
Applied egg-rr82.3%
Final simplification82.3%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (cos (* PI (* angle 0.005555555555555556)))) 2.0) (pow (* b (sin (expm1 (log1p (* 0.005555555555555556 (* PI angle)))))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * cos((((double) M_PI) * (angle * 0.005555555555555556)))), 2.0) + pow((b * sin(expm1(log1p((0.005555555555555556 * (((double) M_PI) * angle)))))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.cos((Math.PI * (angle * 0.005555555555555556)))), 2.0) + Math.pow((b * Math.sin(Math.expm1(Math.log1p((0.005555555555555556 * (Math.PI * angle)))))), 2.0);
}
def code(a, b, angle): return math.pow((a * math.cos((math.pi * (angle * 0.005555555555555556)))), 2.0) + math.pow((b * math.sin(math.expm1(math.log1p((0.005555555555555556 * (math.pi * angle)))))), 2.0)
function code(a, b, angle) return Float64((Float64(a * cos(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 2.0) + (Float64(b * sin(expm1(log1p(Float64(0.005555555555555556 * Float64(pi * angle)))))) ^ 2.0)) end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(Exp[N[Log[1 + N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\right)}^{2}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
expm1-log1p-u66.0%
associate-*r*66.0%
*-commutative66.0%
Applied egg-rr66.0%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (cos (* PI (* angle 0.005555555555555556)))) 2.0) (pow (* b (sin (/ PI (/ 180.0 angle)))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * cos((((double) M_PI) * (angle * 0.005555555555555556)))), 2.0) + pow((b * sin((((double) M_PI) / (180.0 / angle)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.cos((Math.PI * (angle * 0.005555555555555556)))), 2.0) + Math.pow((b * Math.sin((Math.PI / (180.0 / angle)))), 2.0);
}
def code(a, b, angle): return math.pow((a * math.cos((math.pi * (angle * 0.005555555555555556)))), 2.0) + math.pow((b * math.sin((math.pi / (180.0 / angle)))), 2.0)
function code(a, b, angle) return Float64((Float64(a * cos(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 2.0) + (Float64(b * sin(Float64(pi / Float64(180.0 / angle)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * cos((pi * (angle * 0.005555555555555556)))) ^ 2.0) + ((b * sin((pi / (180.0 / angle)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
metadata-eval82.2%
div-inv82.1%
clear-num82.1%
un-div-inv82.1%
Applied egg-rr82.2%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (cos (* PI (* angle 0.005555555555555556)))) 2.0) (pow (* b (sin (* angle (/ PI 180.0)))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * cos((((double) M_PI) * (angle * 0.005555555555555556)))), 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 * Math.cos((Math.PI * (angle * 0.005555555555555556)))), 2.0) + Math.pow((b * Math.sin((angle * (Math.PI / 180.0)))), 2.0);
}
def code(a, b, angle): return math.pow((a * math.cos((math.pi * (angle * 0.005555555555555556)))), 2.0) + math.pow((b * math.sin((angle * (math.pi / 180.0)))), 2.0)
function code(a, b, angle) return Float64((Float64(a * cos(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 2.0) + (Float64(b * sin(Float64(angle * Float64(pi / 180.0)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * cos((pi * (angle * 0.005555555555555556)))) ^ 2.0) + ((b * sin((angle * (pi / 180.0)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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}
\\
{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
metadata-eval82.2%
div-inv82.1%
clear-num82.1%
un-div-inv82.1%
Applied egg-rr82.2%
associate-/r/82.2%
Simplified82.2%
Final simplification82.2%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (* angle 0.005555555555555556)))) (+ (pow (* b (sin t_0)) 2.0) (pow (* a (cos t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
return pow((b * sin(t_0)), 2.0) + pow((a * cos(t_0)), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle * 0.005555555555555556);
return Math.pow((b * Math.sin(t_0)), 2.0) + Math.pow((a * Math.cos(t_0)), 2.0);
}
def code(a, b, angle): t_0 = math.pi * (angle * 0.005555555555555556) return math.pow((b * math.sin(t_0)), 2.0) + math.pow((a * math.cos(t_0)), 2.0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) return Float64((Float64(b * sin(t_0)) ^ 2.0) + (Float64(a * cos(t_0)) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle * 0.005555555555555556); tmp = ((b * sin(t_0)) ^ 2.0) + ((a * cos(t_0)) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $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}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
{\left(b \cdot \sin t\_0\right)}^{2} + {\left(a \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
Final simplification82.2%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (* angle 0.005555555555555556)))) (pow (hypot (* a (cos t_0)) (* b (sin t_0))) 2.0)))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
return pow(hypot((a * cos(t_0)), (b * sin(t_0))), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle * 0.005555555555555556);
return Math.pow(Math.hypot((a * Math.cos(t_0)), (b * Math.sin(t_0))), 2.0);
}
def code(a, b, angle): t_0 = math.pi * (angle * 0.005555555555555556) return math.pow(math.hypot((a * math.cos(t_0)), (b * math.sin(t_0))), 2.0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) return hypot(Float64(a * cos(t_0)), Float64(b * sin(t_0))) ^ 2.0 end
function tmp = code(a, b, angle) t_0 = pi * (angle * 0.005555555555555556); tmp = hypot((a * cos(t_0)), (b * sin(t_0))) ^ 2.0; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[Power[N[Sqrt[N[(a * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(b * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
{\left(\mathsf{hypot}\left(a \cdot \cos t\_0, b \cdot \sin t\_0\right)\right)}^{2}
\end{array}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
expm1-log1p-u66.0%
associate-*r*66.0%
*-commutative66.0%
Applied egg-rr66.0%
add-sqr-sqrt66.0%
Applied egg-rr82.2%
(FPCore (a b angle) :precision binary64 (+ (pow (* b (sin (* PI (* angle 0.005555555555555556)))) 2.0) (pow a 2.0)))
double code(double a, double b, double angle) {
return pow((b * sin((((double) M_PI) * (angle * 0.005555555555555556)))), 2.0) + pow(a, 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((b * Math.sin((Math.PI * (angle * 0.005555555555555556)))), 2.0) + Math.pow(a, 2.0);
}
def code(a, b, angle): return math.pow((b * math.sin((math.pi * (angle * 0.005555555555555556)))), 2.0) + math.pow(a, 2.0)
function code(a, b, angle) return Float64((Float64(b * sin(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 2.0) + (a ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((b * sin((pi * (angle * 0.005555555555555556)))) ^ 2.0) + (a ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {a}^{2}
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
Taylor expanded in angle around 0 82.0%
Final simplification82.0%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (* angle 0.005555555555555556)))) (if (<= b 6.2e+154) (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 * 0.005555555555555556);
double tmp;
if (b <= 6.2e+154) {
tmp = pow((a * cos(t_0)), 2.0);
} else {
tmp = pow((b * sin(t_0)), 2.0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle * 0.005555555555555556);
double tmp;
if (b <= 6.2e+154) {
tmp = Math.pow((a * Math.cos(t_0)), 2.0);
} else {
tmp = Math.pow((b * Math.sin(t_0)), 2.0);
}
return tmp;
}
def code(a, b, angle): t_0 = math.pi * (angle * 0.005555555555555556) tmp = 0 if b <= 6.2e+154: tmp = math.pow((a * math.cos(t_0)), 2.0) else: tmp = math.pow((b * math.sin(t_0)), 2.0) return tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) tmp = 0.0 if (b <= 6.2e+154) tmp = Float64(a * cos(t_0)) ^ 2.0; else tmp = Float64(b * sin(t_0)) ^ 2.0; end return tmp end
function tmp_2 = code(a, b, angle) t_0 = pi * (angle * 0.005555555555555556); tmp = 0.0; if (b <= 6.2e+154) tmp = (a * cos(t_0)) ^ 2.0; else tmp = (b * sin(t_0)) ^ 2.0; end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 6.2e+154], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;b \leq 6.2 \cdot 10^{+154}:\\
\;\;\;\;{\left(a \cdot \cos t\_0\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(b \cdot \sin t\_0\right)}^{2}\\
\end{array}
\end{array}
if b < 6.2000000000000003e154Initial program 79.4%
associate-*r/79.4%
metadata-eval79.4%
metadata-eval79.4%
distribute-neg-frac279.4%
distribute-frac-neg79.4%
distribute-rgt-neg-out79.4%
associate-/l*79.4%
neg-mul-179.4%
*-commutative79.4%
associate-/l*79.5%
metadata-eval79.5%
metadata-eval79.5%
Simplified79.5%
metadata-eval79.5%
div-inv79.4%
clear-num79.5%
un-div-inv79.4%
Applied egg-rr79.4%
associate-/r/79.4%
associate-*l/79.4%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in a around inf 64.4%
unpow264.4%
associate-*r*64.4%
*-commutative64.4%
*-commutative64.4%
unpow264.4%
swap-sqr64.4%
unpow264.4%
*-commutative64.4%
Simplified64.4%
if 6.2000000000000003e154 < b Initial program 99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-rgt-neg-out99.7%
associate-/l*99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
metadata-eval99.7%
div-inv99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
associate-/r/99.7%
associate-*l/99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 65.7%
unpow265.7%
associate-*r*65.7%
*-commutative65.7%
*-commutative65.7%
unpow265.7%
swap-sqr81.6%
unpow281.6%
*-commutative81.6%
Simplified81.6%
Final simplification66.7%
(FPCore (a b angle) :precision binary64 (if (<= b 1.9e+154) (pow (* a (cos (* PI (* angle 0.005555555555555556)))) 2.0) (pow (* b (sin (* angle (* PI 0.005555555555555556)))) 2.0)))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.9e+154) {
tmp = pow((a * cos((((double) M_PI) * (angle * 0.005555555555555556)))), 2.0);
} else {
tmp = pow((b * sin((angle * (((double) M_PI) * 0.005555555555555556)))), 2.0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 1.9e+154) {
tmp = Math.pow((a * Math.cos((Math.PI * (angle * 0.005555555555555556)))), 2.0);
} else {
tmp = Math.pow((b * Math.sin((angle * (Math.PI * 0.005555555555555556)))), 2.0);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 1.9e+154: tmp = math.pow((a * math.cos((math.pi * (angle * 0.005555555555555556)))), 2.0) else: tmp = math.pow((b * math.sin((angle * (math.pi * 0.005555555555555556)))), 2.0) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 1.9e+154) tmp = Float64(a * cos(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 2.0; else tmp = Float64(b * sin(Float64(angle * Float64(pi * 0.005555555555555556)))) ^ 2.0; end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 1.9e+154) tmp = (a * cos((pi * (angle * 0.005555555555555556)))) ^ 2.0; else tmp = (b * sin((angle * (pi * 0.005555555555555556)))) ^ 2.0; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 1.9e+154], N[Power[N[(a * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(b * N[Sin[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.9 \cdot 10^{+154}:\\
\;\;\;\;{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}\\
\end{array}
\end{array}
if b < 1.8999999999999999e154Initial program 79.4%
associate-*r/79.4%
metadata-eval79.4%
metadata-eval79.4%
distribute-neg-frac279.4%
distribute-frac-neg79.4%
distribute-rgt-neg-out79.4%
associate-/l*79.4%
neg-mul-179.4%
*-commutative79.4%
associate-/l*79.5%
metadata-eval79.5%
metadata-eval79.5%
Simplified79.5%
metadata-eval79.5%
div-inv79.4%
clear-num79.5%
un-div-inv79.4%
Applied egg-rr79.4%
associate-/r/79.4%
associate-*l/79.4%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in a around inf 64.4%
unpow264.4%
associate-*r*64.4%
*-commutative64.4%
*-commutative64.4%
unpow264.4%
swap-sqr64.4%
unpow264.4%
*-commutative64.4%
Simplified64.4%
if 1.8999999999999999e154 < b Initial program 99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-rgt-neg-out99.7%
associate-/l*99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
expm1-log1p-u73.3%
associate-*r*73.2%
*-commutative73.2%
Applied egg-rr73.2%
Taylor expanded in a around 0 65.7%
unpow265.7%
*-commutative65.7%
*-commutative65.7%
associate-*r*65.7%
unpow265.7%
swap-sqr81.6%
unpow281.6%
*-commutative81.6%
associate-*l*81.5%
Simplified81.5%
Final simplification66.7%
(FPCore (a b angle) :precision binary64 (if (<= b 2e+154) (pow (* a (cos (* PI (* angle 0.005555555555555556)))) 2.0) (pow (* b (sin (* 0.005555555555555556 (* PI angle)))) 2.0)))
double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+154) {
tmp = pow((a * cos((((double) M_PI) * (angle * 0.005555555555555556)))), 2.0);
} else {
tmp = pow((b * sin((0.005555555555555556 * (((double) M_PI) * angle)))), 2.0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+154) {
tmp = Math.pow((a * Math.cos((Math.PI * (angle * 0.005555555555555556)))), 2.0);
} else {
tmp = Math.pow((b * Math.sin((0.005555555555555556 * (Math.PI * angle)))), 2.0);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 2e+154: tmp = math.pow((a * math.cos((math.pi * (angle * 0.005555555555555556)))), 2.0) else: tmp = math.pow((b * math.sin((0.005555555555555556 * (math.pi * angle)))), 2.0) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 2e+154) tmp = Float64(a * cos(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 2.0; else tmp = Float64(b * sin(Float64(0.005555555555555556 * Float64(pi * angle)))) ^ 2.0; end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2e+154) tmp = (a * cos((pi * (angle * 0.005555555555555556)))) ^ 2.0; else tmp = (b * sin((0.005555555555555556 * (pi * angle)))) ^ 2.0; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 2e+154], N[Power[N[(a * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(b * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2 \cdot 10^{+154}:\\
\;\;\;\;{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}\\
\end{array}
\end{array}
if b < 2.00000000000000007e154Initial program 79.4%
associate-*r/79.4%
metadata-eval79.4%
metadata-eval79.4%
distribute-neg-frac279.4%
distribute-frac-neg79.4%
distribute-rgt-neg-out79.4%
associate-/l*79.4%
neg-mul-179.4%
*-commutative79.4%
associate-/l*79.5%
metadata-eval79.5%
metadata-eval79.5%
Simplified79.5%
metadata-eval79.5%
div-inv79.4%
clear-num79.5%
un-div-inv79.4%
Applied egg-rr79.4%
associate-/r/79.4%
associate-*l/79.4%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in a around inf 64.4%
unpow264.4%
associate-*r*64.4%
*-commutative64.4%
*-commutative64.4%
unpow264.4%
swap-sqr64.4%
unpow264.4%
*-commutative64.4%
Simplified64.4%
if 2.00000000000000007e154 < b Initial program 99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-rgt-neg-out99.7%
associate-/l*99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around 0 65.7%
*-commutative65.7%
unpow265.7%
unpow265.7%
swap-sqr81.5%
unpow281.5%
*-commutative81.5%
Simplified81.5%
Final simplification66.7%
(FPCore (a b angle) :precision binary64 (if (<= b 5e+167) (pow (* a (cos (* PI (* angle 0.005555555555555556)))) 2.0) (cbrt (pow a 6.0))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 5e+167) {
tmp = pow((a * cos((((double) M_PI) * (angle * 0.005555555555555556)))), 2.0);
} else {
tmp = cbrt(pow(a, 6.0));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 5e+167) {
tmp = Math.pow((a * Math.cos((Math.PI * (angle * 0.005555555555555556)))), 2.0);
} else {
tmp = Math.cbrt(Math.pow(a, 6.0));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (b <= 5e+167) tmp = Float64(a * cos(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 2.0; else tmp = cbrt((a ^ 6.0)); end return tmp end
code[a_, b_, angle_] := If[LessEqual[b, 5e+167], N[Power[N[(a * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 1/3], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5 \cdot 10^{+167}:\\
\;\;\;\;{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{a}^{6}}\\
\end{array}
\end{array}
if b < 4.9999999999999997e167Initial program 79.7%
associate-*r/79.7%
metadata-eval79.7%
metadata-eval79.7%
distribute-neg-frac279.7%
distribute-frac-neg79.7%
distribute-rgt-neg-out79.7%
associate-/l*79.7%
neg-mul-179.7%
*-commutative79.7%
associate-/l*79.8%
metadata-eval79.8%
metadata-eval79.8%
Simplified79.8%
metadata-eval79.8%
div-inv79.7%
clear-num79.7%
un-div-inv79.7%
Applied egg-rr79.7%
associate-/r/79.7%
associate-*l/79.6%
associate-/l*79.7%
Simplified79.7%
Taylor expanded in a around inf 63.5%
unpow263.5%
associate-*r*63.6%
*-commutative63.6%
*-commutative63.6%
unpow263.6%
swap-sqr63.6%
unpow263.6%
*-commutative63.6%
Simplified63.6%
if 4.9999999999999997e167 < b Initial program 99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-rgt-neg-out99.7%
associate-/l*99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in angle around 0 37.8%
add-sqr-sqrt37.8%
sqrt-unprod43.8%
pow-prod-up43.8%
metadata-eval43.8%
Applied egg-rr43.8%
add-cbrt-cube46.7%
pow1/346.3%
add-sqr-sqrt46.3%
sqrt-pow146.3%
metadata-eval46.3%
pow-prod-up46.3%
metadata-eval46.3%
Applied egg-rr46.3%
unpow1/346.7%
Simplified46.7%
Final simplification61.6%
(FPCore (a b angle) :precision binary64 (if (<= b 9.5e+166) (pow (* a (cos (* 0.005555555555555556 (* PI angle)))) 2.0) (cbrt (pow a 6.0))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 9.5e+166) {
tmp = pow((a * cos((0.005555555555555556 * (((double) M_PI) * angle)))), 2.0);
} else {
tmp = cbrt(pow(a, 6.0));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 9.5e+166) {
tmp = Math.pow((a * Math.cos((0.005555555555555556 * (Math.PI * angle)))), 2.0);
} else {
tmp = Math.cbrt(Math.pow(a, 6.0));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (b <= 9.5e+166) tmp = Float64(a * cos(Float64(0.005555555555555556 * Float64(pi * angle)))) ^ 2.0; else tmp = cbrt((a ^ 6.0)); end return tmp end
code[a_, b_, angle_] := If[LessEqual[b, 9.5e+166], N[Power[N[(a * N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 1/3], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 9.5 \cdot 10^{+166}:\\
\;\;\;\;{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{a}^{6}}\\
\end{array}
\end{array}
if b < 9.49999999999999984e166Initial program 79.7%
associate-*r/79.7%
metadata-eval79.7%
metadata-eval79.7%
distribute-neg-frac279.7%
distribute-frac-neg79.7%
distribute-rgt-neg-out79.7%
associate-/l*79.7%
neg-mul-179.7%
*-commutative79.7%
associate-/l*79.8%
metadata-eval79.8%
metadata-eval79.8%
Simplified79.8%
Taylor expanded in a around inf 63.5%
unpow263.5%
*-commutative63.5%
unpow263.5%
swap-sqr63.5%
unpow263.5%
*-commutative63.5%
Simplified63.5%
if 9.49999999999999984e166 < b Initial program 99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-rgt-neg-out99.7%
associate-/l*99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in angle around 0 37.8%
add-sqr-sqrt37.8%
sqrt-unprod43.8%
pow-prod-up43.8%
metadata-eval43.8%
Applied egg-rr43.8%
add-cbrt-cube46.7%
pow1/346.3%
add-sqr-sqrt46.3%
sqrt-pow146.3%
metadata-eval46.3%
pow-prod-up46.3%
metadata-eval46.3%
Applied egg-rr46.3%
unpow1/346.7%
Simplified46.7%
Final simplification61.5%
(FPCore (a b angle) :precision binary64 (if (<= b 1.75e+168) (* a a) (cbrt (pow a 6.0))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.75e+168) {
tmp = a * a;
} else {
tmp = cbrt(pow(a, 6.0));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 1.75e+168) {
tmp = a * a;
} else {
tmp = Math.cbrt(Math.pow(a, 6.0));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (b <= 1.75e+168) tmp = Float64(a * a); else tmp = cbrt((a ^ 6.0)); end return tmp end
code[a_, b_, angle_] := If[LessEqual[b, 1.75e+168], N[(a * a), $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 1/3], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.75 \cdot 10^{+168}:\\
\;\;\;\;a \cdot a\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{a}^{6}}\\
\end{array}
\end{array}
if b < 1.7500000000000001e168Initial program 79.7%
associate-*r/79.7%
metadata-eval79.7%
metadata-eval79.7%
distribute-neg-frac279.7%
distribute-frac-neg79.7%
distribute-rgt-neg-out79.7%
associate-/l*79.7%
neg-mul-179.7%
*-commutative79.7%
associate-/l*79.8%
metadata-eval79.8%
metadata-eval79.8%
Simplified79.8%
Taylor expanded in angle around 0 63.4%
unpow263.4%
Applied egg-rr63.4%
if 1.7500000000000001e168 < b Initial program 99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
distribute-neg-frac299.7%
distribute-frac-neg99.7%
distribute-rgt-neg-out99.7%
associate-/l*99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in angle around 0 37.8%
add-sqr-sqrt37.8%
sqrt-unprod43.8%
pow-prod-up43.8%
metadata-eval43.8%
Applied egg-rr43.8%
add-cbrt-cube46.7%
pow1/346.3%
add-sqr-sqrt46.3%
sqrt-pow146.3%
metadata-eval46.3%
pow-prod-up46.3%
metadata-eval46.3%
Applied egg-rr46.3%
unpow1/346.7%
Simplified46.7%
(FPCore (a b angle) :precision binary64 (* a a))
double code(double a, double b, double angle) {
return a * a;
}
real(8) function code(a, b, angle)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: angle
code = a * a
end function
public static double code(double a, double b, double angle) {
return a * a;
}
def code(a, b, angle): return a * a
function code(a, b, angle) return Float64(a * a) end
function tmp = code(a, b, angle) tmp = a * a; end
code[a_, b_, angle_] := N[(a * a), $MachinePrecision]
\begin{array}{l}
\\
a \cdot a
\end{array}
Initial program 82.1%
associate-*r/82.1%
metadata-eval82.1%
metadata-eval82.1%
distribute-neg-frac282.1%
distribute-frac-neg82.1%
distribute-rgt-neg-out82.1%
associate-/l*82.1%
neg-mul-182.1%
*-commutative82.1%
associate-/l*82.2%
metadata-eval82.2%
metadata-eval82.2%
Simplified82.2%
Taylor expanded in angle around 0 60.3%
unpow260.3%
Applied egg-rr60.3%
herbie shell --seed 2024186
(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)))