
(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 16 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
(+
(pow
(*
a
(cos (* (sqrt angle_m) (* (* PI 0.005555555555555556) (sqrt angle_m)))))
2.0)
(pow (* b (sin (/ (* PI angle_m) 180.0))) 2.0)))angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((a * cos((sqrt(angle_m) * ((((double) M_PI) * 0.005555555555555556) * sqrt(angle_m))))), 2.0) + pow((b * sin(((((double) M_PI) * angle_m) / 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.cos((Math.sqrt(angle_m) * ((Math.PI * 0.005555555555555556) * Math.sqrt(angle_m))))), 2.0) + Math.pow((b * Math.sin(((Math.PI * angle_m) / 180.0))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((a * math.cos((math.sqrt(angle_m) * ((math.pi * 0.005555555555555556) * math.sqrt(angle_m))))), 2.0) + math.pow((b * math.sin(((math.pi * angle_m) / 180.0))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(a * cos(Float64(sqrt(angle_m) * Float64(Float64(pi * 0.005555555555555556) * sqrt(angle_m))))) ^ 2.0) + (Float64(b * sin(Float64(Float64(pi * angle_m) / 180.0))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((a * cos((sqrt(angle_m) * ((pi * 0.005555555555555556) * sqrt(angle_m))))) ^ 2.0) + ((b * sin(((pi * angle_m) / 180.0))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Cos[N[(N[Sqrt[angle$95$m], $MachinePrecision] * N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * N[Sqrt[angle$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(a \cdot \cos \left(\sqrt{angle\_m} \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot \sqrt{angle\_m}\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{\pi \cdot angle\_m}{180}\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
metadata-eval77.9%
div-inv77.8%
associate-*r/78.1%
Applied egg-rr78.1%
metadata-eval78.1%
div-inv78.0%
clear-num78.1%
un-div-inv78.1%
Applied egg-rr78.1%
associate-/r/78.1%
add-sqr-sqrt38.9%
associate-*r*38.9%
div-inv38.9%
metadata-eval38.9%
Applied egg-rr38.9%
Final simplification38.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (/ (* PI angle_m) 180.0))) 2.0) (pow (* a (cos (pow (sqrt (* PI (* 0.005555555555555556 angle_m))) 2.0))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((b * sin(((((double) M_PI) * angle_m) / 180.0))), 2.0) + pow((a * cos(pow(sqrt((((double) M_PI) * (0.005555555555555556 * angle_m))), 2.0))), 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 * angle_m) / 180.0))), 2.0) + Math.pow((a * Math.cos(Math.pow(Math.sqrt((Math.PI * (0.005555555555555556 * angle_m))), 2.0))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((b * math.sin(((math.pi * angle_m) / 180.0))), 2.0) + math.pow((a * math.cos(math.pow(math.sqrt((math.pi * (0.005555555555555556 * angle_m))), 2.0))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(b * sin(Float64(Float64(pi * angle_m) / 180.0))) ^ 2.0) + (Float64(a * cos((sqrt(Float64(pi * Float64(0.005555555555555556 * angle_m))) ^ 2.0))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((b * sin(((pi * angle_m) / 180.0))) ^ 2.0) + ((a * cos((sqrt((pi * (0.005555555555555556 * angle_m))) ^ 2.0))) ^ 2.0); end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[Power[N[Sqrt[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(b \cdot \sin \left(\frac{\pi \cdot angle\_m}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left({\left(\sqrt{\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)}\right)}^{2}\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
metadata-eval77.9%
div-inv77.8%
associate-*r/78.1%
Applied egg-rr78.1%
metadata-eval78.1%
div-inv78.0%
clear-num78.1%
un-div-inv78.1%
Applied egg-rr78.1%
div-inv78.1%
clear-num78.0%
div-inv78.1%
metadata-eval78.1%
add-sqr-sqrt38.8%
pow238.8%
Applied egg-rr38.8%
Final simplification38.8%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (/ (* PI angle_m) 180.0))) 2.0) (pow (* a (cbrt (pow (cos (* angle_m (/ PI 180.0))) 3.0))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((b * sin(((((double) M_PI) * angle_m) / 180.0))), 2.0) + pow((a * cbrt(pow(cos((angle_m * (((double) M_PI) / 180.0))), 3.0))), 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 * angle_m) / 180.0))), 2.0) + Math.pow((a * Math.cbrt(Math.pow(Math.cos((angle_m * (Math.PI / 180.0))), 3.0))), 2.0);
}
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(b * sin(Float64(Float64(pi * angle_m) / 180.0))) ^ 2.0) + (Float64(a * cbrt((cos(Float64(angle_m * Float64(pi / 180.0))) ^ 3.0))) ^ 2.0)) end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Power[N[Power[N[Cos[N[(angle$95$m * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(b \cdot \sin \left(\frac{\pi \cdot angle\_m}{180}\right)\right)}^{2} + {\left(a \cdot \sqrt[3]{{\cos \left(angle\_m \cdot \frac{\pi}{180}\right)}^{3}}\right)}^{2}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
metadata-eval77.9%
div-inv77.8%
associate-*r/78.1%
Applied egg-rr78.1%
metadata-eval78.1%
div-inv78.0%
clear-num78.1%
un-div-inv78.1%
Applied egg-rr78.1%
add-cube-cbrt78.1%
div-inv78.1%
times-frac78.0%
pow278.0%
Applied egg-rr78.0%
add-cube-cbrt78.0%
cbrt-unprod78.0%
pow278.0%
cbrt-prod78.0%
Applied egg-rr78.1%
Final simplification78.1%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (/ (* PI angle_m) 180.0))) 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) * angle_m) / 180.0))), 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 * angle_m) / 180.0))), 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 * angle_m) / 180.0))), 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(Float64(pi * angle_m) / 180.0))) ^ 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 * angle_m) / 180.0))) ^ 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[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $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(\frac{\pi \cdot angle\_m}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
metadata-eval77.9%
div-inv77.8%
associate-*r/78.1%
Applied egg-rr78.1%
metadata-eval78.1%
div-inv78.0%
clear-num78.1%
un-div-inv78.1%
Applied egg-rr78.1%
Final simplification78.1%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (/ (* PI angle_m) 180.0))) 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(((((double) M_PI) * angle_m) / 180.0))), 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(((Math.PI * angle_m) / 180.0))), 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(((math.pi * angle_m) / 180.0))), 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(Float64(pi * angle_m) / 180.0))) ^ 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(((pi * angle_m) / 180.0))) ^ 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[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $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(\frac{\pi \cdot angle\_m}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
metadata-eval77.9%
div-inv77.8%
associate-*r/78.1%
Applied egg-rr78.1%
Final simplification78.1%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* a (cos (* PI (* 0.005555555555555556 angle_m)))) 2.0) (pow (* b (sin (* angle_m (/ PI 180.0)))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow((a * cos((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0) + pow((b * sin((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.cos((Math.PI * (0.005555555555555556 * angle_m)))), 2.0) + Math.pow((b * Math.sin((angle_m * (Math.PI / 180.0)))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow((a * math.cos((math.pi * (0.005555555555555556 * angle_m)))), 2.0) + math.pow((b * math.sin((angle_m * (math.pi / 180.0)))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(a * cos(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0) + (Float64(b * sin(Float64(angle_m * Float64(pi / 180.0)))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((a * cos((pi * (0.005555555555555556 * angle_m)))) ^ 2.0) + ((b * sin((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[Cos[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(angle$95$m * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(angle\_m \cdot \frac{\pi}{180}\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
metadata-eval78.1%
div-inv78.0%
clear-num78.1%
un-div-inv78.1%
Applied egg-rr78.0%
associate-/r/78.0%
Simplified78.0%
Final simplification78.0%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (pow (hypot (* b (sin (* PI (* 0.005555555555555556 angle_m)))) (* a (cos (* angle_m (/ PI 180.0))))) 2.0))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow(hypot((b * sin((((double) M_PI) * (0.005555555555555556 * angle_m)))), (a * 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(Math.hypot((b * Math.sin((Math.PI * (0.005555555555555556 * angle_m)))), (a * Math.cos((angle_m * (Math.PI / 180.0))))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow(math.hypot((b * math.sin((math.pi * (0.005555555555555556 * angle_m)))), (a * math.cos((angle_m * (math.pi / 180.0))))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return hypot(Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle_m)))), Float64(a * cos(Float64(angle_m * Float64(pi / 180.0))))) ^ 2.0 end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = hypot((b * sin((pi * (0.005555555555555556 * angle_m)))), (a * cos((angle_m * (pi / 180.0))))) ^ 2.0; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[Power[N[Sqrt[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2 + N[(a * N[Cos[N[(angle$95$m * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision], 2.0], $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{\left(\mathsf{hypot}\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right), a \cdot \cos \left(angle\_m \cdot \frac{\pi}{180}\right)\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
metadata-eval77.9%
div-inv77.8%
associate-*r/78.1%
Applied egg-rr78.1%
metadata-eval78.1%
div-inv78.0%
clear-num78.1%
un-div-inv78.1%
Applied egg-rr78.1%
add-cube-cbrt78.1%
div-inv78.1%
times-frac78.0%
pow278.0%
Applied egg-rr78.0%
Applied egg-rr77.9%
Final simplification77.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (let* ((t_0 (* PI (* 0.005555555555555556 angle_m)))) (pow (hypot (* a (cos t_0)) (* 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);
return pow(hypot((a * cos(t_0)), (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);
return Math.pow(Math.hypot((a * Math.cos(t_0)), (b * Math.sin(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(math.hypot((a * math.cos(t_0)), (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)) return hypot(Float64(a * cos(t_0)), Float64(b * sin(t_0))) ^ 2.0 end
angle_m = abs(angle); function tmp = code(a, b, angle_m) t_0 = pi * (0.005555555555555556 * angle_m); tmp = hypot((a * cos(t_0)), (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]}, 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}
angle_m = \left|angle\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
{\left(\mathsf{hypot}\left(a \cdot \cos t\_0, b \cdot \sin t\_0\right)\right)}^{2}
\end{array}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
metadata-eval77.9%
div-inv77.8%
associate-*r/78.1%
Applied egg-rr78.1%
Applied egg-rr77.9%
Final simplification77.9%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow (* b (sin (/ (* PI angle_m) 180.0))) 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) * angle_m) / 180.0))), 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 * angle_m) / 180.0))), 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 * angle_m) / 180.0))), 2.0) + math.pow(a, 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((Float64(b * sin(Float64(Float64(pi * angle_m) / 180.0))) ^ 2.0) + (a ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = ((b * sin(((pi * angle_m) / 180.0))) ^ 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[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $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(\frac{\pi \cdot angle\_m}{180}\right)\right)}^{2} + {a}^{2}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
metadata-eval77.9%
div-inv77.8%
associate-*r/78.1%
Applied egg-rr78.1%
Taylor expanded in angle around 0 77.8%
Final simplification77.8%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (+ (pow a 2.0) (pow (* b (sin (* PI (* 0.005555555555555556 angle_m)))) 2.0)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return pow(a, 2.0) + pow((b * sin((((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(a, 2.0) + Math.pow((b * Math.sin((Math.PI * (0.005555555555555556 * angle_m)))), 2.0);
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return math.pow(a, 2.0) + math.pow((b * math.sin((math.pi * (0.005555555555555556 * angle_m)))), 2.0)
angle_m = abs(angle) function code(a, b, angle_m) return Float64((a ^ 2.0) + (Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0)) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = (a ^ 2.0) + ((b * sin((pi * (0.005555555555555556 * angle_m)))) ^ 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[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
{a}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2}
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
Taylor expanded in angle around 0 77.6%
Final simplification77.6%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= b 1.15e+147) (pow (* a (cos (* PI (* 0.005555555555555556 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) {
double tmp;
if (b <= 1.15e+147) {
tmp = pow((a * cos((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0);
} else {
tmp = pow((b * sin((0.005555555555555556 * (((double) M_PI) * angle_m)))), 2.0);
}
return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double tmp;
if (b <= 1.15e+147) {
tmp = Math.pow((a * Math.cos((Math.PI * (0.005555555555555556 * angle_m)))), 2.0);
} else {
tmp = Math.pow((b * Math.sin((0.005555555555555556 * (Math.PI * angle_m)))), 2.0);
}
return tmp;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): tmp = 0 if b <= 1.15e+147: tmp = math.pow((a * math.cos((math.pi * (0.005555555555555556 * angle_m)))), 2.0) else: tmp = math.pow((b * math.sin((0.005555555555555556 * (math.pi * angle_m)))), 2.0) return tmp
angle_m = abs(angle) function code(a, b, angle_m) tmp = 0.0 if (b <= 1.15e+147) tmp = Float64(a * cos(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0; else tmp = Float64(b * sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))) ^ 2.0; end return tmp end
angle_m = abs(angle); function tmp_2 = code(a, b, angle_m) tmp = 0.0; if (b <= 1.15e+147) tmp = (a * cos((pi * (0.005555555555555556 * angle_m)))) ^ 2.0; else tmp = (b * sin((0.005555555555555556 * (pi * angle_m)))) ^ 2.0; end tmp_2 = tmp; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := If[LessEqual[b, 1.15e+147], N[Power[N[(a * N[Cos[N[(Pi * N[(0.005555555555555556 * 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]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.15 \cdot 10^{+147}:\\
\;\;\;\;{\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)}^{2}\\
\end{array}
\end{array}
if b < 1.15e147Initial program 74.2%
associate-*r/74.2%
metadata-eval74.2%
metadata-eval74.2%
distribute-neg-frac274.2%
distribute-frac-neg74.2%
distribute-rgt-neg-out74.2%
associate-/l*74.2%
neg-mul-174.2%
*-commutative74.2%
associate-/l*74.3%
metadata-eval74.3%
metadata-eval74.3%
Simplified74.3%
metadata-eval74.3%
div-inv74.3%
associate-*r/74.5%
Applied egg-rr74.5%
metadata-eval74.5%
div-inv74.5%
clear-num74.6%
un-div-inv74.5%
Applied egg-rr74.5%
associate-/r/74.6%
add-sqr-sqrt37.2%
associate-*r*37.2%
div-inv37.2%
metadata-eval37.2%
Applied egg-rr37.2%
Taylor expanded in a around inf 55.3%
unpow255.3%
unpow255.3%
unpow255.3%
associate-*r*55.3%
*-commutative55.3%
associate-*r*55.3%
unpow255.3%
swap-sqr55.3%
unpow255.3%
associate-*r*55.3%
Simplified55.3%
if 1.15e147 < b Initial program 99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-neg-frac299.6%
distribute-frac-neg99.6%
distribute-rgt-neg-out99.6%
associate-/l*99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.7%
Taylor expanded in a around 0 59.4%
*-commutative59.4%
unpow259.4%
unpow259.4%
swap-sqr79.0%
unpow279.0%
*-commutative79.0%
Simplified79.0%
Final simplification58.7%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= b 2.4e+154) (pow (* a (cos (* PI (* 0.005555555555555556 angle_m)))) 2.0) (pow (pow a 6.0) 0.3333333333333333)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double tmp;
if (b <= 2.4e+154) {
tmp = pow((a * cos((((double) M_PI) * (0.005555555555555556 * angle_m)))), 2.0);
} else {
tmp = pow(pow(a, 6.0), 0.3333333333333333);
}
return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double tmp;
if (b <= 2.4e+154) {
tmp = Math.pow((a * Math.cos((Math.PI * (0.005555555555555556 * angle_m)))), 2.0);
} else {
tmp = Math.pow(Math.pow(a, 6.0), 0.3333333333333333);
}
return tmp;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): tmp = 0 if b <= 2.4e+154: tmp = math.pow((a * math.cos((math.pi * (0.005555555555555556 * angle_m)))), 2.0) else: tmp = math.pow(math.pow(a, 6.0), 0.3333333333333333) return tmp
angle_m = abs(angle) function code(a, b, angle_m) tmp = 0.0 if (b <= 2.4e+154) tmp = Float64(a * cos(Float64(pi * Float64(0.005555555555555556 * angle_m)))) ^ 2.0; else tmp = (a ^ 6.0) ^ 0.3333333333333333; end return tmp end
angle_m = abs(angle); function tmp_2 = code(a, b, angle_m) tmp = 0.0; if (b <= 2.4e+154) tmp = (a * cos((pi * (0.005555555555555556 * angle_m)))) ^ 2.0; else tmp = (a ^ 6.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := If[LessEqual[b, 2.4e+154], N[Power[N[(a * N[Cos[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.4 \cdot 10^{+154}:\\
\;\;\;\;{\left(a \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left({a}^{6}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if b < 2.40000000000000015e154Initial program 74.2%
associate-*r/74.2%
metadata-eval74.2%
metadata-eval74.2%
distribute-neg-frac274.2%
distribute-frac-neg74.2%
distribute-rgt-neg-out74.2%
associate-/l*74.2%
neg-mul-174.2%
*-commutative74.2%
associate-/l*74.3%
metadata-eval74.3%
metadata-eval74.3%
Simplified74.3%
metadata-eval74.3%
div-inv74.3%
associate-*r/74.5%
Applied egg-rr74.5%
metadata-eval74.5%
div-inv74.5%
clear-num74.6%
un-div-inv74.5%
Applied egg-rr74.5%
associate-/r/74.6%
add-sqr-sqrt37.2%
associate-*r*37.2%
div-inv37.2%
metadata-eval37.2%
Applied egg-rr37.2%
Taylor expanded in a around inf 55.3%
unpow255.3%
unpow255.3%
unpow255.3%
associate-*r*55.3%
*-commutative55.3%
associate-*r*55.3%
unpow255.3%
swap-sqr55.3%
unpow255.3%
associate-*r*55.3%
Simplified55.3%
if 2.40000000000000015e154 < b Initial program 99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-neg-frac299.6%
distribute-frac-neg99.6%
distribute-rgt-neg-out99.6%
associate-/l*99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.7%
Taylor expanded in angle around 0 40.8%
add-sqr-sqrt40.8%
sqrt-unprod38.2%
pow-prod-up38.2%
metadata-eval38.2%
Applied egg-rr38.2%
add-cbrt-cube43.5%
pow1/343.5%
add-sqr-sqrt43.5%
sqrt-pow143.5%
metadata-eval43.5%
pow-prod-up43.5%
metadata-eval43.5%
Applied egg-rr43.5%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= b 1.8e+154) (pow (* a (cos (* 0.005555555555555556 (* PI angle_m)))) 2.0) (pow (pow a 6.0) 0.3333333333333333)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double tmp;
if (b <= 1.8e+154) {
tmp = pow((a * cos((0.005555555555555556 * (((double) M_PI) * angle_m)))), 2.0);
} else {
tmp = pow(pow(a, 6.0), 0.3333333333333333);
}
return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double tmp;
if (b <= 1.8e+154) {
tmp = Math.pow((a * Math.cos((0.005555555555555556 * (Math.PI * angle_m)))), 2.0);
} else {
tmp = Math.pow(Math.pow(a, 6.0), 0.3333333333333333);
}
return tmp;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): tmp = 0 if b <= 1.8e+154: tmp = math.pow((a * math.cos((0.005555555555555556 * (math.pi * angle_m)))), 2.0) else: tmp = math.pow(math.pow(a, 6.0), 0.3333333333333333) return tmp
angle_m = abs(angle) function code(a, b, angle_m) tmp = 0.0 if (b <= 1.8e+154) tmp = Float64(a * cos(Float64(0.005555555555555556 * Float64(pi * angle_m)))) ^ 2.0; else tmp = (a ^ 6.0) ^ 0.3333333333333333; end return tmp end
angle_m = abs(angle); function tmp_2 = code(a, b, angle_m) tmp = 0.0; if (b <= 1.8e+154) tmp = (a * cos((0.005555555555555556 * (pi * angle_m)))) ^ 2.0; else tmp = (a ^ 6.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := If[LessEqual[b, 1.8e+154], N[Power[N[(a * N[Cos[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.8 \cdot 10^{+154}:\\
\;\;\;\;{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left({a}^{6}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if b < 1.8e154Initial program 74.2%
associate-*r/74.2%
metadata-eval74.2%
metadata-eval74.2%
distribute-neg-frac274.2%
distribute-frac-neg74.2%
distribute-rgt-neg-out74.2%
associate-/l*74.2%
neg-mul-174.2%
*-commutative74.2%
associate-/l*74.3%
metadata-eval74.3%
metadata-eval74.3%
Simplified74.3%
Taylor expanded in a around inf 55.3%
unpow255.3%
*-commutative55.3%
unpow255.3%
swap-sqr55.3%
unpow255.3%
*-commutative55.3%
Simplified55.3%
if 1.8e154 < b Initial program 99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-neg-frac299.6%
distribute-frac-neg99.6%
distribute-rgt-neg-out99.6%
associate-/l*99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.7%
Taylor expanded in angle around 0 40.8%
add-sqr-sqrt40.8%
sqrt-unprod38.2%
pow-prod-up38.2%
metadata-eval38.2%
Applied egg-rr38.2%
add-cbrt-cube43.5%
pow1/343.5%
add-sqr-sqrt43.5%
sqrt-pow143.5%
metadata-eval43.5%
pow-prod-up43.5%
metadata-eval43.5%
Applied egg-rr43.5%
Final simplification53.6%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= b 7e+155) (* a a) (pow (pow a 6.0) 0.3333333333333333)))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double tmp;
if (b <= 7e+155) {
tmp = a * a;
} else {
tmp = pow(pow(a, 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 (b <= 7d+155) then
tmp = a * a
else
tmp = (a ** 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 (b <= 7e+155) {
tmp = a * a;
} else {
tmp = Math.pow(Math.pow(a, 6.0), 0.3333333333333333);
}
return tmp;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): tmp = 0 if b <= 7e+155: tmp = a * a else: tmp = math.pow(math.pow(a, 6.0), 0.3333333333333333) return tmp
angle_m = abs(angle) function code(a, b, angle_m) tmp = 0.0 if (b <= 7e+155) tmp = Float64(a * a); else tmp = (a ^ 6.0) ^ 0.3333333333333333; end return tmp end
angle_m = abs(angle); function tmp_2 = code(a, b, angle_m) tmp = 0.0; if (b <= 7e+155) tmp = a * a; else tmp = (a ^ 6.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := If[LessEqual[b, 7e+155], N[(a * a), $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7 \cdot 10^{+155}:\\
\;\;\;\;a \cdot a\\
\mathbf{else}:\\
\;\;\;\;{\left({a}^{6}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if b < 6.99999999999999969e155Initial program 74.2%
associate-*r/74.2%
metadata-eval74.2%
metadata-eval74.2%
distribute-neg-frac274.2%
distribute-frac-neg74.2%
distribute-rgt-neg-out74.2%
associate-/l*74.2%
neg-mul-174.2%
*-commutative74.2%
associate-/l*74.3%
metadata-eval74.3%
metadata-eval74.3%
Simplified74.3%
Taylor expanded in angle around 0 55.1%
unpow255.1%
Applied egg-rr55.1%
if 6.99999999999999969e155 < b Initial program 99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-neg-frac299.6%
distribute-frac-neg99.6%
distribute-rgt-neg-out99.6%
associate-/l*99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.7%
Taylor expanded in angle around 0 40.8%
add-sqr-sqrt40.8%
sqrt-unprod38.2%
pow-prod-up38.2%
metadata-eval38.2%
Applied egg-rr38.2%
add-cbrt-cube43.5%
pow1/343.5%
add-sqr-sqrt43.5%
sqrt-pow143.5%
metadata-eval43.5%
pow-prod-up43.5%
metadata-eval43.5%
Applied egg-rr43.5%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (if (<= b 3.4e+157) (* a a) (cbrt (pow a 6.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
double tmp;
if (b <= 3.4e+157) {
tmp = a * a;
} else {
tmp = cbrt(pow(a, 6.0));
}
return tmp;
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
double tmp;
if (b <= 3.4e+157) {
tmp = a * a;
} else {
tmp = Math.cbrt(Math.pow(a, 6.0));
}
return tmp;
}
angle_m = abs(angle) function code(a, b, angle_m) tmp = 0.0 if (b <= 3.4e+157) tmp = Float64(a * a); else tmp = cbrt((a ^ 6.0)); end return tmp end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := If[LessEqual[b, 3.4e+157], N[(a * a), $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 1/3], $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.4 \cdot 10^{+157}:\\
\;\;\;\;a \cdot a\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{a}^{6}}\\
\end{array}
\end{array}
if b < 3.39999999999999979e157Initial program 74.2%
associate-*r/74.2%
metadata-eval74.2%
metadata-eval74.2%
distribute-neg-frac274.2%
distribute-frac-neg74.2%
distribute-rgt-neg-out74.2%
associate-/l*74.2%
neg-mul-174.2%
*-commutative74.2%
associate-/l*74.3%
metadata-eval74.3%
metadata-eval74.3%
Simplified74.3%
Taylor expanded in angle around 0 55.1%
unpow255.1%
Applied egg-rr55.1%
if 3.39999999999999979e157 < b Initial program 99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-neg-frac299.6%
distribute-frac-neg99.6%
distribute-rgt-neg-out99.6%
associate-/l*99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.7%
Taylor expanded in angle around 0 40.8%
add-sqr-sqrt40.8%
sqrt-unprod38.2%
pow-prod-up38.2%
metadata-eval38.2%
Applied egg-rr38.2%
add-cbrt-cube43.5%
pow1/343.5%
add-sqr-sqrt43.5%
sqrt-pow143.5%
metadata-eval43.5%
pow-prod-up43.5%
metadata-eval43.5%
Applied egg-rr43.5%
unpow1/343.5%
Simplified43.5%
angle_m = (fabs.f64 angle) (FPCore (a b angle_m) :precision binary64 (* a a))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
return a * a;
}
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 = a * a
end function
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
return a * a;
}
angle_m = math.fabs(angle) def code(a, b, angle_m): return a * a
angle_m = abs(angle) function code(a, b, angle_m) return Float64(a * a) end
angle_m = abs(angle); function tmp = code(a, b, angle_m) tmp = a * a; end
angle_m = N[Abs[angle], $MachinePrecision] code[a_, b_, angle$95$m_] := N[(a * a), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
a \cdot a
\end{array}
Initial program 77.8%
associate-*r/77.8%
metadata-eval77.8%
metadata-eval77.8%
distribute-neg-frac277.8%
distribute-frac-neg77.8%
distribute-rgt-neg-out77.8%
associate-/l*77.8%
neg-mul-177.8%
*-commutative77.8%
associate-/l*77.8%
metadata-eval77.8%
metadata-eval77.8%
Simplified77.9%
Taylor expanded in angle around 0 53.1%
unpow253.1%
Applied egg-rr53.1%
herbie shell --seed 2024181
(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)))