
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (/ angle 180.0) PI))) (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = (angle / 180.0) * ((double) M_PI);
return pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = (angle / 180.0) * Math.PI;
return Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0);
}
def code(a, b, angle): t_0 = (angle / 180.0) * math.pi return math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)
function code(a, b, angle) t_0 = Float64(Float64(angle / 180.0) * pi) return Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = (angle / 180.0) * pi; tmp = ((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (/ angle 180.0) PI))) (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = (angle / 180.0) * ((double) M_PI);
return pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = (angle / 180.0) * Math.PI;
return Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0);
}
def code(a, b, angle): t_0 = (angle / 180.0) * math.pi return math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)
function code(a, b, angle) t_0 = Float64(Float64(angle / 180.0) * pi) return Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = (angle / 180.0) * pi; tmp = ((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(let* ((t_0 (* angle_m (* PI 0.005555555555555556))))
(+
(pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0)
(pow
(* b (cos (* (cbrt t_0) (* (pow (cbrt (pow t_0 0.25)) 2.0) (sqrt t_0)))))
2.0))))angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = angle_m * (((double) M_PI) * 0.005555555555555556);
return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos((cbrt(t_0) * (pow(cbrt(pow(t_0, 0.25)), 2.0) * sqrt(t_0))))), 2.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);
return Math.pow((a * Math.sin(((angle_m / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos((Math.cbrt(t_0) * (Math.pow(Math.cbrt(Math.pow(t_0, 0.25)), 2.0) * Math.sqrt(t_0))))), 2.0);
}
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(angle_m * Float64(pi * 0.005555555555555556)) return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(cbrt(t_0) * Float64((cbrt((t_0 ^ 0.25)) ^ 2.0) * sqrt(t_0))))) ^ 2.0)) end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[Power[t$95$0, 1/3], $MachinePrecision] * N[(N[Power[N[Power[N[Power[t$95$0, 0.25], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\sqrt[3]{t\_0} \cdot \left({\left(\sqrt[3]{{t\_0}^{0.25}}\right)}^{2} \cdot \sqrt{t\_0}\right)\right)\right)}^{2}
\end{array}
\end{array}
Initial program 77.8%
associate-*l/77.8%
associate-*r/77.8%
add-exp-log39.1%
div-inv39.1%
metadata-eval39.1%
Applied egg-rr39.1%
rem-exp-log77.8%
add-sqr-sqrt39.1%
add-cbrt-cube35.6%
add-sqr-sqrt35.6%
cbrt-prod39.1%
rem-exp-log39.1%
associate-*l*39.1%
rem-exp-log39.1%
Applied egg-rr39.1%
add-sqr-sqrt39.2%
pow239.2%
Applied egg-rr39.2%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(let* ((t_0 (* angle_m (* PI 0.005555555555555556))))
(+
(pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0)
(pow
(*
b
(cos
(*
(* (pow (cbrt (pow t_0 0.25)) 2.0) (sqrt t_0))
(cbrt (* 0.005555555555555556 (* angle_m PI))))))
2.0))))angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = angle_m * (((double) M_PI) * 0.005555555555555556);
return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(((pow(cbrt(pow(t_0, 0.25)), 2.0) * sqrt(t_0)) * cbrt((0.005555555555555556 * (angle_m * ((double) M_PI))))))), 2.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);
return Math.pow((a * Math.sin(((angle_m / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((Math.pow(Math.cbrt(Math.pow(t_0, 0.25)), 2.0) * Math.sqrt(t_0)) * Math.cbrt((0.005555555555555556 * (angle_m * Math.PI)))))), 2.0);
}
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(angle_m * Float64(pi * 0.005555555555555556)) return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64((cbrt((t_0 ^ 0.25)) ^ 2.0) * sqrt(t_0)) * cbrt(Float64(0.005555555555555556 * Float64(angle_m * pi)))))) ^ 2.0)) end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(N[Power[N[Power[N[Power[t$95$0, 0.25], $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left({\left(\sqrt[3]{{t\_0}^{0.25}}\right)}^{2} \cdot \sqrt{t\_0}\right) \cdot \sqrt[3]{0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)}\right)\right)}^{2}
\end{array}
\end{array}
Initial program 77.8%
associate-*l/77.8%
associate-*r/77.8%
add-exp-log39.1%
div-inv39.1%
metadata-eval39.1%
Applied egg-rr39.1%
rem-exp-log77.8%
add-sqr-sqrt39.1%
add-cbrt-cube35.6%
add-sqr-sqrt35.6%
cbrt-prod39.1%
rem-exp-log39.1%
associate-*l*39.1%
rem-exp-log39.1%
Applied egg-rr39.1%
add-sqr-sqrt39.2%
pow239.2%
Applied egg-rr39.2%
*-un-lft-identity39.2%
Applied egg-rr39.2%
*-lft-identity39.2%
associate-*r*39.2%
*-commutative39.2%
Simplified39.2%
Final simplification39.2%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(let* ((t_0 (* angle_m (* PI 0.005555555555555556))) (t_1 (sqrt t_0)))
(+
(pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0)
(pow (* b (cos (* (cbrt t_0) (* t_1 (cbrt t_1))))) 2.0))))angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = angle_m * (((double) M_PI) * 0.005555555555555556);
double t_1 = sqrt(t_0);
return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos((cbrt(t_0) * (t_1 * cbrt(t_1))))), 2.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);
double t_1 = Math.sqrt(t_0);
return Math.pow((a * Math.sin(((angle_m / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos((Math.cbrt(t_0) * (t_1 * Math.cbrt(t_1))))), 2.0);
}
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(angle_m * Float64(pi * 0.005555555555555556)) t_1 = sqrt(t_0) return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(cbrt(t_0) * Float64(t_1 * cbrt(t_1))))) ^ 2.0)) end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[t$95$0], $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[Power[t$95$0, 1/3], $MachinePrecision] * N[(t$95$1 * N[Power[t$95$1, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\\
t_1 := \sqrt{t\_0}\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\sqrt[3]{t\_0} \cdot \left(t\_1 \cdot \sqrt[3]{t\_1}\right)\right)\right)}^{2}
\end{array}
\end{array}
Initial program 77.8%
associate-*l/77.8%
associate-*r/77.8%
add-exp-log39.1%
div-inv39.1%
metadata-eval39.1%
Applied egg-rr39.1%
rem-exp-log77.8%
add-sqr-sqrt39.1%
add-cbrt-cube35.6%
add-sqr-sqrt35.6%
cbrt-prod39.1%
rem-exp-log39.1%
associate-*l*39.1%
rem-exp-log39.1%
Applied egg-rr39.1%
Final simplification39.1%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* a (sin (expm1 (log1p (* PI (* angle_m 0.005555555555555556)))))) 2.0) (pow (* b (cos (exp (log (* angle_m (* PI 0.005555555555555556)))))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((a * sin(expm1(log1p((((double) M_PI) * (angle_m * 0.005555555555555556)))))), 2.0) + pow((b * cos(exp(log((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 * Math.sin(Math.expm1(Math.log1p((Math.PI * (angle_m * 0.005555555555555556)))))), 2.0) + Math.pow((b * Math.cos(Math.exp(Math.log((angle_m * (Math.PI * 0.005555555555555556)))))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((a * math.sin(math.expm1(math.log1p((math.pi * (angle_m * 0.005555555555555556)))))), 2.0) + math.pow((b * math.cos(math.exp(math.log((angle_m * (math.pi * 0.005555555555555556)))))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(a * sin(expm1(log1p(Float64(pi * Float64(angle_m * 0.005555555555555556)))))) ^ 2.0) + (Float64(b * cos(exp(log(Float64(angle_m * Float64(pi * 0.005555555555555556)))))) ^ 2.0)) end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(Exp[N[Log[1 + N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[Exp[N[Log[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(a \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right)}^{2} + {\left(b \cdot \cos \left(e^{\log \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*l/77.8%
associate-*r/77.8%
add-exp-log39.1%
div-inv39.1%
metadata-eval39.1%
Applied egg-rr39.1%
expm1-log1p-u39.2%
expm1-undefine32.3%
associate-*l/32.3%
associate-*r/32.3%
div-inv32.3%
metadata-eval32.3%
Applied egg-rr32.3%
expm1-define39.2%
associate-*r*39.2%
*-commutative39.2%
associate-*r*39.2%
Simplified39.2%
Final simplification39.2%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0) (pow (* b (cos (exp (log (* angle_m (* PI 0.005555555555555556)))))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(exp(log((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 * Math.sin(((angle_m / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(Math.exp(Math.log((angle_m * (Math.PI * 0.005555555555555556)))))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((a * math.sin(((angle_m / 180.0) * math.pi))), 2.0) + math.pow((b * math.cos(math.exp(math.log((angle_m * (math.pi * 0.005555555555555556)))))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(exp(log(Float64(angle_m * Float64(pi * 0.005555555555555556)))))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((a * sin(((angle_m / 180.0) * pi))) ^ 2.0) + ((b * cos(exp(log((angle_m * (pi * 0.005555555555555556)))))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[Exp[N[Log[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(e^{\log \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*l/77.8%
associate-*r/77.8%
add-exp-log39.1%
div-inv39.1%
metadata-eval39.1%
Applied egg-rr39.1%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0) (pow (* b (cos (/ 1.0 (/ 180.0 (* angle_m PI))))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos((1.0 / (180.0 / (angle_m * ((double) M_PI)))))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((a * Math.sin(((angle_m / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos((1.0 / (180.0 / (angle_m * Math.PI))))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((a * math.sin(((angle_m / 180.0) * math.pi))), 2.0) + math.pow((b * math.cos((1.0 / (180.0 / (angle_m * math.pi))))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(1.0 / Float64(180.0 / Float64(angle_m * pi))))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((a * sin(((angle_m / 180.0) * pi))) ^ 2.0) + ((b * cos((1.0 / (180.0 / (angle_m * pi))))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(1.0 / N[(180.0 / N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{1}{\frac{180}{angle\_m \cdot \pi}}\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*l/77.8%
clear-num77.9%
Applied egg-rr77.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0) (* b (* b (pow (cos (* angle_m (* PI 0.005555555555555556))) 2.0)))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + (b * (b * pow(cos((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 * Math.sin(((angle_m / 180.0) * Math.PI))), 2.0) + (b * (b * Math.pow(Math.cos((angle_m * (Math.PI * 0.005555555555555556))), 2.0)));
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((a * math.sin(((angle_m / 180.0) * math.pi))), 2.0) + (b * (b * math.pow(math.cos((angle_m * (math.pi * 0.005555555555555556))), 2.0)))
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + Float64(b * Float64(b * (cos(Float64(angle_m * Float64(pi * 0.005555555555555556))) ^ 2.0)))) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((a * sin(((angle_m / 180.0) * pi))) ^ 2.0) + (b * (b * (cos((angle_m * (pi * 0.005555555555555556))) ^ 2.0))); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(b * N[(b * N[Power[N[Cos[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + b \cdot \left(b \cdot {\cos \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}^{2}\right)
\end{array}
Initial program 77.8%
associate-*l/77.8%
associate-*r/77.8%
add-exp-log39.1%
div-inv39.1%
metadata-eval39.1%
Applied egg-rr39.1%
unpow-prod-down39.1%
unpow239.1%
associate-*l*39.1%
rem-exp-log77.9%
pow277.9%
sqr-cos-a77.9%
associate-*r*77.9%
metadata-eval77.9%
div-inv77.9%
associate-*l/77.9%
sqr-cos-a77.8%
pow277.8%
Applied egg-rr77.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0) (pow (* b (cos (/ (* angle_m PI) 180.0))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(((angle_m * ((double) M_PI)) / 180.0))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((a * Math.sin(((angle_m / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((angle_m * Math.PI) / 180.0))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((a * math.sin(((angle_m / 180.0) * math.pi))), 2.0) + math.pow((b * math.cos(((angle_m * math.pi) / 180.0))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle_m * pi) / 180.0))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((a * sin(((angle_m / 180.0) * pi))) ^ 2.0) + ((b * cos(((angle_m * pi) / 180.0))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle$95$m * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle\_m \cdot \pi}{180}\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*l/77.8%
Applied egg-rr77.8%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (let* ((t_0 (* (/ angle_m 180.0) PI))) (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = (angle_m / 180.0) * ((double) M_PI);
return pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double t_0 = (angle_m / 180.0) * Math.PI;
return Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): t_0 = (angle_m / 180.0) * math.pi return math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(Float64(angle_m / 180.0) * pi) return Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) t_0 = (angle_m / 180.0) * pi; tmp = ((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := \frac{angle\_m}{180} \cdot \pi\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Initial program 77.8%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (let* ((t_0 (* angle_m (* PI 0.005555555555555556)))) (pow (hypot (* a (sin t_0)) (* b (cos t_0))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = angle_m * (((double) M_PI) * 0.005555555555555556);
return pow(hypot((a * sin(t_0)), (b * cos(t_0))), 2.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);
return Math.pow(Math.hypot((a * Math.sin(t_0)), (b * Math.cos(t_0))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): t_0 = angle_m * (math.pi * 0.005555555555555556) return math.pow(math.hypot((a * math.sin(t_0)), (b * math.cos(t_0))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(angle_m * Float64(pi * 0.005555555555555556)) return hypot(Float64(a * sin(t_0)), Float64(b * cos(t_0))) ^ 2.0 end
angle_m = abs(angle); function tmp = code(a, b, angle_m) t_0 = angle_m * (pi * 0.005555555555555556); tmp = hypot((a * sin(t_0)), (b * cos(t_0))) ^ 2.0; end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[Power[N[Sqrt[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\\
{\left(\mathsf{hypot}\left(a \cdot \sin t\_0, b \cdot \cos t\_0\right)\right)}^{2}
\end{array}
\end{array}
Initial program 77.8%
unpow277.8%
associate-*l/77.8%
associate-/l*77.8%
unpow277.8%
Simplified77.8%
Applied egg-rr77.8%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= a 2.5e+169) (* (pow b 2.0) (pow (cos (* PI (* angle_m 0.005555555555555556))) 2.0)) (pow (* a (sin (* 0.005555555555555556 (* angle_m PI)))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double tmp;
if (a <= 2.5e+169) {
tmp = pow(b, 2.0) * pow(cos((((double) M_PI) * (angle_m * 0.005555555555555556))), 2.0);
} else {
tmp = pow((a * sin((0.005555555555555556 * (angle_m * ((double) M_PI))))), 2.0);
}
return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double tmp;
if (a <= 2.5e+169) {
tmp = Math.pow(b, 2.0) * Math.pow(Math.cos((Math.PI * (angle_m * 0.005555555555555556))), 2.0);
} else {
tmp = Math.pow((a * Math.sin((0.005555555555555556 * (angle_m * Math.PI)))), 2.0);
}
return tmp;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): tmp = 0 if a <= 2.5e+169: tmp = math.pow(b, 2.0) * math.pow(math.cos((math.pi * (angle_m * 0.005555555555555556))), 2.0) else: tmp = math.pow((a * math.sin((0.005555555555555556 * (angle_m * math.pi)))), 2.0) return tmp
angle_m = abs(angle) function code(a, b, angle_m) tmp = 0.0 if (a <= 2.5e+169) tmp = Float64((b ^ 2.0) * (cos(Float64(pi * Float64(angle_m * 0.005555555555555556))) ^ 2.0)); else tmp = Float64(a * sin(Float64(0.005555555555555556 * Float64(angle_m * pi)))) ^ 2.0; end return tmp end
angle_m = abs(angle); function tmp_2 = code(a, b, angle_m) tmp = 0.0; if (a <= 2.5e+169) tmp = (b ^ 2.0) * (cos((pi * (angle_m * 0.005555555555555556))) ^ 2.0); else tmp = (a * sin((0.005555555555555556 * (angle_m * pi)))) ^ 2.0; end tmp_2 = tmp; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := If[LessEqual[a, 2.5e+169], N[(N[Power[b, 2.0], $MachinePrecision] * N[Power[N[Cos[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(a * N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.5 \cdot 10^{+169}:\\
\;\;\;\;{b}^{2} \cdot {\cos \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}\\
\end{array}
\end{array}
if a < 2.50000000000000009e169Initial program 76.3%
unpow276.3%
associate-*l/76.3%
associate-/l*76.3%
unpow276.3%
Simplified76.3%
Taylor expanded in a around 0 56.7%
associate-*r*56.7%
Simplified56.7%
if 2.50000000000000009e169 < a Initial program 94.8%
unpow294.8%
associate-*l/94.7%
associate-/l*94.8%
unpow294.8%
Simplified94.8%
Taylor expanded in a around inf 58.2%
unpow258.2%
*-commutative58.2%
associate-*r*58.2%
unpow258.2%
swap-sqr85.6%
unpow285.6%
associate-*r*85.6%
*-commutative85.6%
Simplified85.6%
Final simplification59.1%
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle_m PI))))
(if (<= a 2.1e+169)
(* (pow b 2.0) (pow (cos t_0) 2.0))
(pow (* a (sin t_0)) 2.0))))angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = 0.005555555555555556 * (angle_m * ((double) M_PI));
double tmp;
if (a <= 2.1e+169) {
tmp = pow(b, 2.0) * pow(cos(t_0), 2.0);
} else {
tmp = pow((a * sin(t_0)), 2.0);
}
return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double t_0 = 0.005555555555555556 * (angle_m * Math.PI);
double tmp;
if (a <= 2.1e+169) {
tmp = Math.pow(b, 2.0) * Math.pow(Math.cos(t_0), 2.0);
} else {
tmp = Math.pow((a * Math.sin(t_0)), 2.0);
}
return tmp;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): t_0 = 0.005555555555555556 * (angle_m * math.pi) tmp = 0 if a <= 2.1e+169: tmp = math.pow(b, 2.0) * math.pow(math.cos(t_0), 2.0) else: tmp = math.pow((a * math.sin(t_0)), 2.0) return tmp
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(0.005555555555555556 * Float64(angle_m * pi)) tmp = 0.0 if (a <= 2.1e+169) tmp = Float64((b ^ 2.0) * (cos(t_0) ^ 2.0)); else tmp = Float64(a * sin(t_0)) ^ 2.0; end return tmp end
angle_m = abs(angle); function tmp_2 = code(a, b, angle_m) t_0 = 0.005555555555555556 * (angle_m * pi); tmp = 0.0; if (a <= 2.1e+169) tmp = (b ^ 2.0) * (cos(t_0) ^ 2.0); else tmp = (a * sin(t_0)) ^ 2.0; end tmp_2 = tmp; end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 2.1e+169], N[(N[Power[b, 2.0], $MachinePrecision] * N[Power[N[Cos[t$95$0], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\\
\mathbf{if}\;a \leq 2.1 \cdot 10^{+169}:\\
\;\;\;\;{b}^{2} \cdot {\cos t\_0}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(a \cdot \sin t\_0\right)}^{2}\\
\end{array}
\end{array}
if a < 2.1000000000000001e169Initial program 76.3%
unpow276.3%
associate-*l/76.3%
associate-/l*76.3%
unpow276.3%
Simplified76.3%
Taylor expanded in a around 0 56.7%
if 2.1000000000000001e169 < a Initial program 94.8%
unpow294.8%
associate-*l/94.7%
associate-/l*94.8%
unpow294.8%
Simplified94.8%
Taylor expanded in a around inf 58.2%
unpow258.2%
*-commutative58.2%
associate-*r*58.2%
unpow258.2%
swap-sqr85.6%
unpow285.6%
associate-*r*85.6%
*-commutative85.6%
Simplified85.6%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* a (sin (* (/ angle_m 180.0) PI))) 2.0) (pow b 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((a * sin(((angle_m / 180.0) * ((double) M_PI)))), 2.0) + pow(b, 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return Math.pow((a * Math.sin(((angle_m / 180.0) * Math.PI))), 2.0) + Math.pow(b, 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((a * math.sin(((angle_m / 180.0) * math.pi))), 2.0) + math.pow(b, 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(a * sin(Float64(Float64(angle_m / 180.0) * pi))) ^ 2.0) + (b ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((a * sin(((angle_m / 180.0) * pi))) ^ 2.0) + (b ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(a \cdot \sin \left(\frac{angle\_m}{180} \cdot \pi\right)\right)}^{2} + {b}^{2}
\end{array}
Initial program 77.8%
associate-*l/77.8%
associate-*r/77.8%
add-exp-log39.1%
div-inv39.1%
metadata-eval39.1%
Applied egg-rr39.1%
Taylor expanded in angle around 0 77.8%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (let* ((t_0 (* 0.005555555555555556 (* angle_m PI)))) (if (<= a 2.1e+169) (pow (* b (cos t_0)) 2.0) (pow (* a (sin t_0)) 2.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double t_0 = 0.005555555555555556 * (angle_m * ((double) M_PI));
double tmp;
if (a <= 2.1e+169) {
tmp = pow((b * cos(t_0)), 2.0);
} else {
tmp = pow((a * sin(t_0)), 2.0);
}
return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double t_0 = 0.005555555555555556 * (angle_m * Math.PI);
double tmp;
if (a <= 2.1e+169) {
tmp = Math.pow((b * Math.cos(t_0)), 2.0);
} else {
tmp = Math.pow((a * Math.sin(t_0)), 2.0);
}
return tmp;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): t_0 = 0.005555555555555556 * (angle_m * math.pi) tmp = 0 if a <= 2.1e+169: tmp = math.pow((b * math.cos(t_0)), 2.0) else: tmp = math.pow((a * math.sin(t_0)), 2.0) return tmp
angle_m = abs(angle) function code(a, b, angle_m) t_0 = Float64(0.005555555555555556 * Float64(angle_m * pi)) tmp = 0.0 if (a <= 2.1e+169) tmp = Float64(b * cos(t_0)) ^ 2.0; else tmp = Float64(a * sin(t_0)) ^ 2.0; end return tmp end
angle_m = abs(angle); function tmp_2 = code(a, b, angle_m) t_0 = 0.005555555555555556 * (angle_m * pi); tmp = 0.0; if (a <= 2.1e+169) tmp = (b * cos(t_0)) ^ 2.0; else tmp = (a * sin(t_0)) ^ 2.0; end tmp_2 = tmp; end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 2.1e+169], N[Power[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\\
\mathbf{if}\;a \leq 2.1 \cdot 10^{+169}:\\
\;\;\;\;{\left(b \cdot \cos t\_0\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(a \cdot \sin t\_0\right)}^{2}\\
\end{array}
\end{array}
if a < 2.1000000000000001e169Initial program 76.3%
unpow276.3%
associate-*l/76.3%
associate-/l*76.3%
unpow276.3%
Simplified76.3%
Taylor expanded in a around 0 56.7%
*-commutative56.7%
associate-*r*56.7%
unpow256.7%
unpow256.7%
swap-sqr56.7%
unpow256.7%
associate-*r*56.7%
*-commutative56.7%
Simplified56.7%
if 2.1000000000000001e169 < a Initial program 94.8%
unpow294.8%
associate-*l/94.7%
associate-/l*94.8%
unpow294.8%
Simplified94.8%
Taylor expanded in a around inf 58.2%
unpow258.2%
*-commutative58.2%
associate-*r*58.2%
unpow258.2%
swap-sqr85.6%
unpow285.6%
associate-*r*85.6%
*-commutative85.6%
Simplified85.6%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= a 2.3e+169) (* b b) (pow (* a (sin (* 0.005555555555555556 (* angle_m PI)))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double tmp;
if (a <= 2.3e+169) {
tmp = b * b;
} else {
tmp = pow((a * sin((0.005555555555555556 * (angle_m * ((double) M_PI))))), 2.0);
}
return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double tmp;
if (a <= 2.3e+169) {
tmp = b * b;
} else {
tmp = Math.pow((a * Math.sin((0.005555555555555556 * (angle_m * Math.PI)))), 2.0);
}
return tmp;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): tmp = 0 if a <= 2.3e+169: tmp = b * b else: tmp = math.pow((a * math.sin((0.005555555555555556 * (angle_m * math.pi)))), 2.0) return tmp
angle_m = abs(angle) function code(a, b, angle_m) tmp = 0.0 if (a <= 2.3e+169) tmp = Float64(b * b); else tmp = Float64(a * sin(Float64(0.005555555555555556 * Float64(angle_m * pi)))) ^ 2.0; end return tmp end
angle_m = abs(angle); function tmp_2 = code(a, b, angle_m) tmp = 0.0; if (a <= 2.3e+169) tmp = b * b; else tmp = (a * sin((0.005555555555555556 * (angle_m * pi)))) ^ 2.0; end tmp_2 = tmp; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := If[LessEqual[a, 2.3e+169], N[(b * b), $MachinePrecision], N[Power[N[(a * N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.3 \cdot 10^{+169}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;{\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}\\
\end{array}
\end{array}
if a < 2.2999999999999999e169Initial program 76.3%
unpow276.3%
associate-*l/76.3%
associate-/l*76.3%
unpow276.3%
Simplified76.3%
Taylor expanded in angle around 0 56.6%
unpow256.6%
Applied egg-rr56.6%
if 2.2999999999999999e169 < a Initial program 94.8%
unpow294.8%
associate-*l/94.7%
associate-/l*94.8%
unpow294.8%
Simplified94.8%
Taylor expanded in a around inf 58.2%
unpow258.2%
*-commutative58.2%
associate-*r*58.2%
unpow258.2%
swap-sqr85.6%
unpow285.6%
associate-*r*85.6%
*-commutative85.6%
Simplified85.6%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= a 7.2e+154) (* b b) (pow (pow b 6.0) 0.3333333333333333)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double tmp;
if (a <= 7.2e+154) {
tmp = b * b;
} else {
tmp = pow(pow(b, 6.0), 0.3333333333333333);
}
return tmp;
}
angle_m = abs(angle)
real(8) function code(a, b, angle_m)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: angle_m
real(8) :: tmp
if (a <= 7.2d+154) then
tmp = b * b
else
tmp = (b ** 6.0d0) ** 0.3333333333333333d0
end if
code = tmp
end function
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double tmp;
if (a <= 7.2e+154) {
tmp = b * b;
} else {
tmp = Math.pow(Math.pow(b, 6.0), 0.3333333333333333);
}
return tmp;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): tmp = 0 if a <= 7.2e+154: tmp = b * b else: tmp = math.pow(math.pow(b, 6.0), 0.3333333333333333) return tmp
angle_m = abs(angle) function code(a, b, angle_m) tmp = 0.0 if (a <= 7.2e+154) tmp = Float64(b * b); else tmp = (b ^ 6.0) ^ 0.3333333333333333; end return tmp end
angle_m = abs(angle); function tmp_2 = code(a, b, angle_m) tmp = 0.0; if (a <= 7.2e+154) tmp = b * b; else tmp = (b ^ 6.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := If[LessEqual[a, 7.2e+154], N[(b * b), $MachinePrecision], N[Power[N[Power[b, 6.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.2 \cdot 10^{+154}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;{\left({b}^{6}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if a < 7.2000000000000001e154Initial program 76.0%
unpow276.0%
associate-*l/76.0%
associate-/l*76.0%
unpow276.0%
Simplified76.0%
Taylor expanded in angle around 0 56.9%
unpow256.9%
Applied egg-rr56.9%
if 7.2000000000000001e154 < a Initial program 95.4%
unpow295.4%
associate-*l/95.4%
associate-/l*95.4%
unpow295.4%
Simplified95.4%
Taylor expanded in angle around 0 40.4%
add-sqr-sqrt40.4%
sqrt-unprod52.1%
pow-prod-up52.1%
metadata-eval52.1%
Applied egg-rr52.1%
sqrt-pow140.4%
metadata-eval40.4%
add-cbrt-cube51.9%
pow1/351.9%
pow-prod-up51.9%
metadata-eval51.9%
pow-prod-up51.9%
metadata-eval51.9%
Applied egg-rr51.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= a 1.6e+154) (* b b) (cbrt (pow b 6.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double tmp;
if (a <= 1.6e+154) {
tmp = b * b;
} else {
tmp = cbrt(pow(b, 6.0));
}
return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double tmp;
if (a <= 1.6e+154) {
tmp = b * b;
} else {
tmp = Math.cbrt(Math.pow(b, 6.0));
}
return tmp;
}
angle_m = abs(angle) function code(a, b, angle_m) tmp = 0.0 if (a <= 1.6e+154) tmp = Float64(b * b); else tmp = cbrt((b ^ 6.0)); end return tmp end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := If[LessEqual[a, 1.6e+154], N[(b * b), $MachinePrecision], N[Power[N[Power[b, 6.0], $MachinePrecision], 1/3], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.6 \cdot 10^{+154}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{b}^{6}}\\
\end{array}
\end{array}
if a < 1.6e154Initial program 76.0%
unpow276.0%
associate-*l/76.0%
associate-/l*76.0%
unpow276.0%
Simplified76.0%
Taylor expanded in angle around 0 56.9%
unpow256.9%
Applied egg-rr56.9%
if 1.6e154 < a Initial program 95.4%
unpow295.4%
associate-*l/95.4%
associate-/l*95.4%
unpow295.4%
Simplified95.4%
Taylor expanded in angle around 0 40.4%
add-sqr-sqrt40.4%
sqrt-unprod52.1%
pow-prod-up52.1%
metadata-eval52.1%
Applied egg-rr52.1%
sqrt-pow140.4%
metadata-eval40.4%
add-cbrt-cube51.9%
pow1/351.9%
pow-prod-up51.9%
metadata-eval51.9%
pow-prod-up51.9%
metadata-eval51.9%
Applied egg-rr51.9%
unpow1/351.9%
Simplified51.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (* b b))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return b * b;
}
angle_m = abs(angle)
real(8) function code(a, b, angle_m)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: angle_m
code = b * b
end function
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return b * b;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return b * b
angle_m = abs(angle) function code(a, b, angle_m) return Float64(b * b) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = b * b; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(b * b), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
b \cdot b
\end{array}
Initial program 77.8%
unpow277.8%
associate-*l/77.8%
associate-/l*77.8%
unpow277.8%
Simplified77.8%
Taylor expanded in angle around 0 55.4%
unpow255.4%
Applied egg-rr55.4%
herbie shell --seed 2024181
(FPCore (a b angle)
:name "ab-angle->ABCF A"
:precision binary64
(+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)))