
(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 28 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}
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (sqrt (sqrt PI))))
(+
(pow
(*
a
(sin
(*
0.005555555555555556
(* (/ t_0 (/ 1.0 angle)) (/ t_0 (/ 1.0 (sqrt PI)))))))
2.0)
(pow
(*
b
(cos
(*
(/ angle 180.0)
(*
(pow (* (sqrt PI) (* PI PI)) 0.3333333333333333)
(cbrt (sqrt PI))))))
2.0))))
double code(double a, double b, double angle) {
double t_0 = sqrt(sqrt(((double) M_PI)));
return pow((a * sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / sqrt(((double) M_PI)))))))), 2.0) + pow((b * cos(((angle / 180.0) * (pow((sqrt(((double) M_PI)) * (((double) M_PI) * ((double) M_PI))), 0.3333333333333333) * cbrt(sqrt(((double) M_PI))))))), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.sqrt(Math.sqrt(Math.PI));
return Math.pow((a * Math.sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / Math.sqrt(Math.PI))))))), 2.0) + Math.pow((b * Math.cos(((angle / 180.0) * (Math.pow((Math.sqrt(Math.PI) * (Math.PI * Math.PI)), 0.3333333333333333) * Math.cbrt(Math.sqrt(Math.PI)))))), 2.0);
}
function code(a, b, angle) t_0 = sqrt(sqrt(pi)) return Float64((Float64(a * sin(Float64(0.005555555555555556 * Float64(Float64(t_0 / Float64(1.0 / angle)) * Float64(t_0 / Float64(1.0 / sqrt(pi))))))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle / 180.0) * Float64((Float64(sqrt(pi) * Float64(pi * pi)) ^ 0.3333333333333333) * cbrt(sqrt(pi)))))) ^ 2.0)) end
code[a_, b_, angle_] := Block[{t$95$0 = N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(0.005555555555555556 * N[(N[(t$95$0 / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[Power[N[(N[Sqrt[Pi], $MachinePrecision] * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 0.3333333333333333], $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\sqrt{\pi}}\\
{\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(\frac{t\_0}{\frac{1}{angle}} \cdot \frac{t\_0}{\frac{1}{\sqrt{\pi}}}\right)\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \left({\left(\sqrt{\pi} \cdot \left(\pi \cdot \pi\right)\right)}^{0.3333333333333333} \cdot \sqrt[3]{\sqrt{\pi}}\right)\right)\right)}^{2}
\end{array}
\end{array}
Initial program 81.2%
lift-PI.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6481.3
Applied egg-rr81.3%
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
div-invN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-/.f64N/A
Applied egg-rr81.3%
add-cbrt-cubeN/A
pow1/3N/A
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
associate-*r*N/A
unpow-prod-downN/A
pow1/3N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lower-cbrt.f6481.4
Applied egg-rr81.4%
Final simplification81.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (sqrt (sqrt PI))))
(+
(pow
(*
a
(sin
(*
0.005555555555555556
(* (/ t_0 (/ 1.0 angle)) (/ t_0 (/ 1.0 (sqrt PI)))))))
2.0)
(pow (* b (cos (* PI (/ angle 180.0)))) 2.0))))
double code(double a, double b, double angle) {
double t_0 = sqrt(sqrt(((double) M_PI)));
return pow((a * sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / sqrt(((double) M_PI)))))))), 2.0) + pow((b * cos((((double) M_PI) * (angle / 180.0)))), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.sqrt(Math.sqrt(Math.PI));
return Math.pow((a * Math.sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / Math.sqrt(Math.PI))))))), 2.0) + Math.pow((b * Math.cos((Math.PI * (angle / 180.0)))), 2.0);
}
def code(a, b, angle): t_0 = math.sqrt(math.sqrt(math.pi)) return math.pow((a * math.sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / math.sqrt(math.pi))))))), 2.0) + math.pow((b * math.cos((math.pi * (angle / 180.0)))), 2.0)
function code(a, b, angle) t_0 = sqrt(sqrt(pi)) return Float64((Float64(a * sin(Float64(0.005555555555555556 * Float64(Float64(t_0 / Float64(1.0 / angle)) * Float64(t_0 / Float64(1.0 / sqrt(pi))))))) ^ 2.0) + (Float64(b * cos(Float64(pi * Float64(angle / 180.0)))) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = sqrt(sqrt(pi)); tmp = ((a * sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / sqrt(pi))))))) ^ 2.0) + ((b * cos((pi * (angle / 180.0)))) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(0.005555555555555556 * N[(N[(t$95$0 / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\sqrt{\pi}}\\
{\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(\frac{t\_0}{\frac{1}{angle}} \cdot \frac{t\_0}{\frac{1}{\sqrt{\pi}}}\right)\right)\right)}^{2} + {\left(b \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2}
\end{array}
\end{array}
Initial program 81.2%
lift-PI.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6481.3
Applied egg-rr81.3%
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
div-invN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-/.f64N/A
Applied egg-rr81.3%
Final simplification81.3%
(FPCore (a b angle) :precision binary64 (+ (pow (* b (cos (* PI (/ angle 180.0)))) 2.0) (pow (* a (sin (* (sqrt PI) (* angle (* 0.005555555555555556 (sqrt PI)))))) 2.0)))
double code(double a, double b, double angle) {
return pow((b * cos((((double) M_PI) * (angle / 180.0)))), 2.0) + pow((a * sin((sqrt(((double) M_PI)) * (angle * (0.005555555555555556 * sqrt(((double) M_PI))))))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((b * Math.cos((Math.PI * (angle / 180.0)))), 2.0) + Math.pow((a * Math.sin((Math.sqrt(Math.PI) * (angle * (0.005555555555555556 * Math.sqrt(Math.PI)))))), 2.0);
}
def code(a, b, angle): return math.pow((b * math.cos((math.pi * (angle / 180.0)))), 2.0) + math.pow((a * math.sin((math.sqrt(math.pi) * (angle * (0.005555555555555556 * math.sqrt(math.pi)))))), 2.0)
function code(a, b, angle) return Float64((Float64(b * cos(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (Float64(a * sin(Float64(sqrt(pi) * Float64(angle * Float64(0.005555555555555556 * sqrt(pi)))))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((b * cos((pi * (angle / 180.0)))) ^ 2.0) + ((a * sin((sqrt(pi) * (angle * (0.005555555555555556 * sqrt(pi)))))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(angle * N[(0.005555555555555556 * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(b \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \sin \left(\sqrt{\pi} \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \sqrt{\pi}\right)\right)\right)\right)}^{2}
\end{array}
Initial program 81.2%
lift-/.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6481.3
Applied egg-rr81.3%
Final simplification81.3%
(FPCore (a b angle) :precision binary64 (+ (pow (* b (cos (* PI (/ angle 180.0)))) 2.0) (pow (* a (sin (* 0.005555555555555556 (/ PI (/ 1.0 angle))))) 2.0)))
double code(double a, double b, double angle) {
return pow((b * cos((((double) M_PI) * (angle / 180.0)))), 2.0) + pow((a * sin((0.005555555555555556 * (((double) M_PI) / (1.0 / angle))))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((b * Math.cos((Math.PI * (angle / 180.0)))), 2.0) + Math.pow((a * Math.sin((0.005555555555555556 * (Math.PI / (1.0 / angle))))), 2.0);
}
def code(a, b, angle): return math.pow((b * math.cos((math.pi * (angle / 180.0)))), 2.0) + math.pow((a * math.sin((0.005555555555555556 * (math.pi / (1.0 / angle))))), 2.0)
function code(a, b, angle) return Float64((Float64(b * cos(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (Float64(a * sin(Float64(0.005555555555555556 * Float64(pi / Float64(1.0 / angle))))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((b * cos((pi * (angle / 180.0)))) ^ 2.0) + ((a * sin((0.005555555555555556 * (pi / (1.0 / angle))))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(0.005555555555555556 * N[(Pi / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(b \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \frac{\pi}{\frac{1}{angle}}\right)\right)}^{2}
\end{array}
Initial program 81.2%
lift-PI.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6481.3
Applied egg-rr81.3%
Final simplification81.3%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (* PI (/ angle 180.0)))) 2.0) (pow (* b (cos (* 0.005555555555555556 (* PI angle)))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin((((double) M_PI) * (angle / 180.0)))), 2.0) + pow((b * cos((0.005555555555555556 * (((double) M_PI) * angle)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin((Math.PI * (angle / 180.0)))), 2.0) + Math.pow((b * Math.cos((0.005555555555555556 * (Math.PI * angle)))), 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin((math.pi * (angle / 180.0)))), 2.0) + math.pow((b * math.cos((0.005555555555555556 * (math.pi * angle)))), 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (Float64(b * cos(Float64(0.005555555555555556 * Float64(pi * angle)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin((pi * (angle / 180.0)))) ^ 2.0) + ((b * cos((0.005555555555555556 * (pi * angle)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}
\end{array}
Initial program 81.2%
lift-PI.f64N/A
associate-*l/N/A
div-invN/A
lower-*.f64N/A
lower-*.f64N/A
metadata-eval81.3
Applied egg-rr81.3%
Final simplification81.3%
(FPCore (a b angle) :precision binary64 (+ (pow (* b (cos (* PI (/ angle 180.0)))) 2.0) (pow (* a (sin (* 0.005555555555555556 (* PI angle)))) 2.0)))
double code(double a, double b, double angle) {
return pow((b * cos((((double) M_PI) * (angle / 180.0)))), 2.0) + pow((a * sin((0.005555555555555556 * (((double) M_PI) * angle)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((b * Math.cos((Math.PI * (angle / 180.0)))), 2.0) + Math.pow((a * Math.sin((0.005555555555555556 * (Math.PI * angle)))), 2.0);
}
def code(a, b, angle): return math.pow((b * math.cos((math.pi * (angle / 180.0)))), 2.0) + math.pow((a * math.sin((0.005555555555555556 * (math.pi * angle)))), 2.0)
function code(a, b, angle) return Float64((Float64(b * cos(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (Float64(a * sin(Float64(0.005555555555555556 * Float64(pi * angle)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((b * cos((pi * (angle / 180.0)))) ^ 2.0) + ((a * sin((0.005555555555555556 * (pi * angle)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(b \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}
\end{array}
Initial program 81.2%
lift-PI.f64N/A
associate-*l/N/A
div-invN/A
lower-*.f64N/A
lower-*.f64N/A
metadata-eval81.2
Applied egg-rr81.2%
Final simplification81.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (sqrt (sqrt PI))))
(+
(pow
(*
a
(sin
(*
0.005555555555555556
(* (/ t_0 (/ 1.0 angle)) (/ t_0 (/ 1.0 (sqrt PI)))))))
2.0)
(pow b 2.0))))
double code(double a, double b, double angle) {
double t_0 = sqrt(sqrt(((double) M_PI)));
return pow((a * sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / sqrt(((double) M_PI)))))))), 2.0) + pow(b, 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.sqrt(Math.sqrt(Math.PI));
return Math.pow((a * Math.sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / Math.sqrt(Math.PI))))))), 2.0) + Math.pow(b, 2.0);
}
def code(a, b, angle): t_0 = math.sqrt(math.sqrt(math.pi)) return math.pow((a * math.sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / math.sqrt(math.pi))))))), 2.0) + math.pow(b, 2.0)
function code(a, b, angle) t_0 = sqrt(sqrt(pi)) return Float64((Float64(a * sin(Float64(0.005555555555555556 * Float64(Float64(t_0 / Float64(1.0 / angle)) * Float64(t_0 / Float64(1.0 / sqrt(pi))))))) ^ 2.0) + (b ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = sqrt(sqrt(pi)); tmp = ((a * sin((0.005555555555555556 * ((t_0 / (1.0 / angle)) * (t_0 / (1.0 / sqrt(pi))))))) ^ 2.0) + (b ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(0.005555555555555556 * N[(N[(t$95$0 / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\sqrt{\pi}}\\
{\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(\frac{t\_0}{\frac{1}{angle}} \cdot \frac{t\_0}{\frac{1}{\sqrt{\pi}}}\right)\right)\right)}^{2} + {b}^{2}
\end{array}
\end{array}
Initial program 81.2%
lift-PI.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6481.3
Applied egg-rr81.3%
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
div-invN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-/.f64N/A
Applied egg-rr81.3%
Taylor expanded in angle around 0
Simplified81.2%
Final simplification81.2%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (* (sqrt PI) (* angle (* 0.005555555555555556 (sqrt PI)))))) 2.0) (pow b 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin((sqrt(((double) M_PI)) * (angle * (0.005555555555555556 * sqrt(((double) M_PI))))))), 2.0) + pow(b, 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin((Math.sqrt(Math.PI) * (angle * (0.005555555555555556 * Math.sqrt(Math.PI)))))), 2.0) + Math.pow(b, 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin((math.sqrt(math.pi) * (angle * (0.005555555555555556 * math.sqrt(math.pi)))))), 2.0) + math.pow(b, 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(sqrt(pi) * Float64(angle * Float64(0.005555555555555556 * sqrt(pi)))))) ^ 2.0) + (b ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin((sqrt(pi) * (angle * (0.005555555555555556 * sqrt(pi)))))) ^ 2.0) + (b ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(angle * N[(0.005555555555555556 * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\sqrt{\pi} \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \sqrt{\pi}\right)\right)\right)\right)}^{2} + {b}^{2}
\end{array}
Initial program 81.2%
lift-/.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6481.3
Applied egg-rr81.3%
Taylor expanded in angle around 0
Simplified81.2%
Final simplification81.2%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (* 0.005555555555555556 (/ PI (/ 1.0 angle))))) 2.0) (pow b 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin((0.005555555555555556 * (((double) M_PI) / (1.0 / angle))))), 2.0) + pow(b, 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin((0.005555555555555556 * (Math.PI / (1.0 / angle))))), 2.0) + Math.pow(b, 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin((0.005555555555555556 * (math.pi / (1.0 / angle))))), 2.0) + math.pow(b, 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(0.005555555555555556 * Float64(pi / Float64(1.0 / angle))))) ^ 2.0) + (b ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin((0.005555555555555556 * (pi / (1.0 / angle))))) ^ 2.0) + (b ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(0.005555555555555556 * N[(Pi / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(0.005555555555555556 \cdot \frac{\pi}{\frac{1}{angle}}\right)\right)}^{2} + {b}^{2}
\end{array}
Initial program 81.2%
lift-PI.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6481.3
Applied egg-rr81.3%
Taylor expanded in angle around 0
Simplified81.2%
Final simplification81.2%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (* PI (/ angle 180.0)))) 2.0) (pow b 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin((((double) M_PI) * (angle / 180.0)))), 2.0) + pow(b, 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin((Math.PI * (angle / 180.0)))), 2.0) + Math.pow(b, 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin((math.pi * (angle / 180.0)))), 2.0) + math.pow(b, 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (b ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin((pi * (angle / 180.0)))) ^ 2.0) + (b ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {b}^{2}
\end{array}
Initial program 81.2%
Taylor expanded in angle around 0
Simplified81.1%
Final simplification81.1%
(FPCore (a b angle)
:precision binary64
(let* ((t_0
(*
(* b b)
(+ 0.5 (* 0.5 (cos (* 2.0 (* angle (* 0.005555555555555556 PI))))))))
(t_1 (* angle (* a 0.005555555555555556))))
(if (<= (/ angle 180.0) 1e-6)
(fma (* t_1 t_1) (* PI PI) t_0)
(fma
(-
0.5
(*
0.5
(cos
(* 2.0 (* angle (* 0.005555555555555556 (* (sqrt PI) (sqrt PI))))))))
(* a a)
t_0))))
double code(double a, double b, double angle) {
double t_0 = (b * b) * (0.5 + (0.5 * cos((2.0 * (angle * (0.005555555555555556 * ((double) M_PI)))))));
double t_1 = angle * (a * 0.005555555555555556);
double tmp;
if ((angle / 180.0) <= 1e-6) {
tmp = fma((t_1 * t_1), (((double) M_PI) * ((double) M_PI)), t_0);
} else {
tmp = fma((0.5 - (0.5 * cos((2.0 * (angle * (0.005555555555555556 * (sqrt(((double) M_PI)) * sqrt(((double) M_PI))))))))), (a * a), t_0);
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * Float64(angle * Float64(0.005555555555555556 * pi))))))) t_1 = Float64(angle * Float64(a * 0.005555555555555556)) tmp = 0.0 if (Float64(angle / 180.0) <= 1e-6) tmp = fma(Float64(t_1 * t_1), Float64(pi * pi), t_0); else tmp = fma(Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * Float64(angle * Float64(0.005555555555555556 * Float64(sqrt(pi) * sqrt(pi)))))))), Float64(a * a), t_0); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(angle * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-6], N[(N[(t$95$1 * t$95$1), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * N[(angle * N[(0.005555555555555556 * N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a * a), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\\
t_1 := angle \cdot \left(a \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(t\_1 \cdot t\_1, \pi \cdot \pi, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\right)\right), a \cdot a, t\_0\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999955e-7Initial program 87.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6484.3
Simplified84.3%
Applied egg-rr84.4%
if 9.99999999999999955e-7 < (/.f64 angle #s(literal 180 binary64)) Initial program 64.4%
lift-/.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6464.7
Applied egg-rr64.7%
Applied egg-rr64.5%
lift-PI.f6464.5
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lower-*.f6464.7
Applied egg-rr64.7%
Final simplification79.0%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 0.5 (cos (* 2.0 (* angle (* 0.005555555555555556 PI))))))
(t_1 (* angle (* a 0.005555555555555556))))
(if (<= (/ angle 180.0) 1e-6)
(fma (* t_1 t_1) (* PI PI) (* (* b b) (+ 0.5 t_0)))
(fma
(- 0.5 t_0)
(* a a)
(*
(* b b)
(+ 0.5 (* 0.5 (cos (* 0.005555555555555556 (* PI (* angle 2.0)))))))))))
double code(double a, double b, double angle) {
double t_0 = 0.5 * cos((2.0 * (angle * (0.005555555555555556 * ((double) M_PI)))));
double t_1 = angle * (a * 0.005555555555555556);
double tmp;
if ((angle / 180.0) <= 1e-6) {
tmp = fma((t_1 * t_1), (((double) M_PI) * ((double) M_PI)), ((b * b) * (0.5 + t_0)));
} else {
tmp = fma((0.5 - t_0), (a * a), ((b * b) * (0.5 + (0.5 * cos((0.005555555555555556 * (((double) M_PI) * (angle * 2.0))))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(0.5 * cos(Float64(2.0 * Float64(angle * Float64(0.005555555555555556 * pi))))) t_1 = Float64(angle * Float64(a * 0.005555555555555556)) tmp = 0.0 if (Float64(angle / 180.0) <= 1e-6) tmp = fma(Float64(t_1 * t_1), Float64(pi * pi), Float64(Float64(b * b) * Float64(0.5 + t_0))); else tmp = fma(Float64(0.5 - t_0), Float64(a * a), Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * cos(Float64(0.005555555555555556 * Float64(pi * Float64(angle * 2.0)))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.5 * N[Cos[N[(2.0 * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(angle * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-6], N[(N[(t$95$1 * t$95$1), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(0.5 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 - t$95$0), $MachinePrecision] * N[(a * a), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * N[Cos[N[(0.005555555555555556 * N[(Pi * N[(angle * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \cos \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\\
t_1 := angle \cdot \left(a \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(t\_1 \cdot t\_1, \pi \cdot \pi, \left(b \cdot b\right) \cdot \left(0.5 + t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5 - t\_0, a \cdot a, \left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot \left(angle \cdot 2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999955e-7Initial program 87.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6484.3
Simplified84.3%
Applied egg-rr84.4%
if 9.99999999999999955e-7 < (/.f64 angle #s(literal 180 binary64)) Initial program 64.4%
lift-/.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6464.7
Applied egg-rr64.7%
Applied egg-rr64.5%
lift-PI.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6464.6
Applied egg-rr64.6%
Final simplification78.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 0.5 (cos (* 2.0 (* angle (* 0.005555555555555556 PI))))))
(t_1 (* (* b b) (+ 0.5 t_0)))
(t_2 (* angle (* a 0.005555555555555556))))
(if (<= (/ angle 180.0) 1e-6)
(fma (* t_2 t_2) (* PI PI) t_1)
(fma (- 0.5 t_0) (* a a) t_1))))
double code(double a, double b, double angle) {
double t_0 = 0.5 * cos((2.0 * (angle * (0.005555555555555556 * ((double) M_PI)))));
double t_1 = (b * b) * (0.5 + t_0);
double t_2 = angle * (a * 0.005555555555555556);
double tmp;
if ((angle / 180.0) <= 1e-6) {
tmp = fma((t_2 * t_2), (((double) M_PI) * ((double) M_PI)), t_1);
} else {
tmp = fma((0.5 - t_0), (a * a), t_1);
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(0.5 * cos(Float64(2.0 * Float64(angle * Float64(0.005555555555555556 * pi))))) t_1 = Float64(Float64(b * b) * Float64(0.5 + t_0)) t_2 = Float64(angle * Float64(a * 0.005555555555555556)) tmp = 0.0 if (Float64(angle / 180.0) <= 1e-6) tmp = fma(Float64(t_2 * t_2), Float64(pi * pi), t_1); else tmp = fma(Float64(0.5 - t_0), Float64(a * a), t_1); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.5 * N[Cos[N[(2.0 * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b * b), $MachinePrecision] * N[(0.5 + t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(angle * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-6], N[(N[(t$95$2 * t$95$2), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(0.5 - t$95$0), $MachinePrecision] * N[(a * a), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \cos \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\\
t_1 := \left(b \cdot b\right) \cdot \left(0.5 + t\_0\right)\\
t_2 := angle \cdot \left(a \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(t\_2 \cdot t\_2, \pi \cdot \pi, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5 - t\_0, a \cdot a, t\_1\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999955e-7Initial program 87.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6484.3
Simplified84.3%
Applied egg-rr84.4%
if 9.99999999999999955e-7 < (/.f64 angle #s(literal 180 binary64)) Initial program 64.4%
lift-/.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6464.7
Applied egg-rr64.7%
Applied egg-rr64.5%
Final simplification78.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* angle (* a 0.005555555555555556)))
(t_1 (cos (* PI (* 2.0 (* 0.005555555555555556 angle))))))
(if (<= (/ angle 180.0) 1e-6)
(fma
(* t_0 t_0)
(* PI PI)
(*
(* b b)
(+ 0.5 (* 0.5 (cos (* 2.0 (* angle (* 0.005555555555555556 PI))))))))
(fma (* a (fma t_1 -0.5 0.5)) a (* (* b b) (fma 0.5 t_1 0.5))))))
double code(double a, double b, double angle) {
double t_0 = angle * (a * 0.005555555555555556);
double t_1 = cos((((double) M_PI) * (2.0 * (0.005555555555555556 * angle))));
double tmp;
if ((angle / 180.0) <= 1e-6) {
tmp = fma((t_0 * t_0), (((double) M_PI) * ((double) M_PI)), ((b * b) * (0.5 + (0.5 * cos((2.0 * (angle * (0.005555555555555556 * ((double) M_PI)))))))));
} else {
tmp = fma((a * fma(t_1, -0.5, 0.5)), a, ((b * b) * fma(0.5, t_1, 0.5)));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(angle * Float64(a * 0.005555555555555556)) t_1 = cos(Float64(pi * Float64(2.0 * Float64(0.005555555555555556 * angle)))) tmp = 0.0 if (Float64(angle / 180.0) <= 1e-6) tmp = fma(Float64(t_0 * t_0), Float64(pi * pi), Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * Float64(angle * Float64(0.005555555555555556 * pi)))))))); else tmp = fma(Float64(a * fma(t_1, -0.5, 0.5)), a, Float64(Float64(b * b) * fma(0.5, t_1, 0.5))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(Pi * N[(2.0 * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-6], N[(N[(t$95$0 * t$95$0), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(t$95$1 * -0.5 + 0.5), $MachinePrecision]), $MachinePrecision] * a + N[(N[(b * b), $MachinePrecision] * N[(0.5 * t$95$1 + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := angle \cdot \left(a \cdot 0.005555555555555556\right)\\
t_1 := \cos \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(t\_0 \cdot t\_0, \pi \cdot \pi, \left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot \mathsf{fma}\left(t\_1, -0.5, 0.5\right), a, \left(b \cdot b\right) \cdot \mathsf{fma}\left(0.5, t\_1, 0.5\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999955e-7Initial program 87.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6484.3
Simplified84.3%
Applied egg-rr84.4%
if 9.99999999999999955e-7 < (/.f64 angle #s(literal 180 binary64)) Initial program 64.4%
lift-PI.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6464.5
Applied egg-rr64.5%
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
div-invN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-/.f64N/A
Applied egg-rr64.6%
Applied egg-rr64.4%
Final simplification78.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* angle (* a 0.005555555555555556)))
(t_1 (cos (* PI (* angle 0.011111111111111112)))))
(if (<= (/ angle 180.0) 1e-6)
(fma
(* t_0 t_0)
(* PI PI)
(*
(* b b)
(+ 0.5 (* 0.5 (cos (* 2.0 (* angle (* 0.005555555555555556 PI))))))))
(fma (* b (fma 0.5 t_1 0.5)) b (* (* a a) (+ 0.5 (* -0.5 t_1)))))))
double code(double a, double b, double angle) {
double t_0 = angle * (a * 0.005555555555555556);
double t_1 = cos((((double) M_PI) * (angle * 0.011111111111111112)));
double tmp;
if ((angle / 180.0) <= 1e-6) {
tmp = fma((t_0 * t_0), (((double) M_PI) * ((double) M_PI)), ((b * b) * (0.5 + (0.5 * cos((2.0 * (angle * (0.005555555555555556 * ((double) M_PI)))))))));
} else {
tmp = fma((b * fma(0.5, t_1, 0.5)), b, ((a * a) * (0.5 + (-0.5 * t_1))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(angle * Float64(a * 0.005555555555555556)) t_1 = cos(Float64(pi * Float64(angle * 0.011111111111111112))) tmp = 0.0 if (Float64(angle / 180.0) <= 1e-6) tmp = fma(Float64(t_0 * t_0), Float64(pi * pi), Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * Float64(angle * Float64(0.005555555555555556 * pi)))))))); else tmp = fma(Float64(b * fma(0.5, t_1, 0.5)), b, Float64(Float64(a * a) * Float64(0.5 + Float64(-0.5 * t_1)))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-6], N[(N[(t$95$0 * t$95$0), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(0.5 * t$95$1 + 0.5), $MachinePrecision]), $MachinePrecision] * b + N[(N[(a * a), $MachinePrecision] * N[(0.5 + N[(-0.5 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := angle \cdot \left(a \cdot 0.005555555555555556\right)\\
t_1 := \cos \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(t\_0 \cdot t\_0, \pi \cdot \pi, \left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot \mathsf{fma}\left(0.5, t\_1, 0.5\right), b, \left(a \cdot a\right) \cdot \left(0.5 + -0.5 \cdot t\_1\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999955e-7Initial program 87.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6484.3
Simplified84.3%
Applied egg-rr84.4%
if 9.99999999999999955e-7 < (/.f64 angle #s(literal 180 binary64)) Initial program 64.4%
Applied egg-rr43.4%
Applied egg-rr64.4%
Final simplification78.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* angle (* a 0.005555555555555556))))
(if (<= a 3.15e-80)
(* b b)
(fma
(* t_0 t_0)
(* PI PI)
(*
(* b b)
(+ 0.5 (* 0.5 (cos (* 2.0 (* angle (* 0.005555555555555556 PI)))))))))))
double code(double a, double b, double angle) {
double t_0 = angle * (a * 0.005555555555555556);
double tmp;
if (a <= 3.15e-80) {
tmp = b * b;
} else {
tmp = fma((t_0 * t_0), (((double) M_PI) * ((double) M_PI)), ((b * b) * (0.5 + (0.5 * cos((2.0 * (angle * (0.005555555555555556 * ((double) M_PI)))))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(angle * Float64(a * 0.005555555555555556)) tmp = 0.0 if (a <= 3.15e-80) tmp = Float64(b * b); else tmp = fma(Float64(t_0 * t_0), Float64(pi * pi), Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * Float64(angle * Float64(0.005555555555555556 * pi)))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 3.15e-80], N[(b * b), $MachinePrecision], N[(N[(t$95$0 * t$95$0), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := angle \cdot \left(a \cdot 0.005555555555555556\right)\\
\mathbf{if}\;a \leq 3.15 \cdot 10^{-80}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0 \cdot t\_0, \pi \cdot \pi, \left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 3.14999999999999983e-80Initial program 80.7%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6466.3
Simplified66.3%
if 3.14999999999999983e-80 < a Initial program 82.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6479.5
Simplified79.5%
Applied egg-rr79.6%
Final simplification70.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* a (* PI angle))))
(if (<= a 3.15e-80)
(* b b)
(fma
(* t_0 t_0)
3.08641975308642e-5
(*
(* b b)
(+ 0.5 (* 0.5 (cos (* 2.0 (* angle (* 0.005555555555555556 PI)))))))))))
double code(double a, double b, double angle) {
double t_0 = a * (((double) M_PI) * angle);
double tmp;
if (a <= 3.15e-80) {
tmp = b * b;
} else {
tmp = fma((t_0 * t_0), 3.08641975308642e-5, ((b * b) * (0.5 + (0.5 * cos((2.0 * (angle * (0.005555555555555556 * ((double) M_PI)))))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(a * Float64(pi * angle)) tmp = 0.0 if (a <= 3.15e-80) tmp = Float64(b * b); else tmp = fma(Float64(t_0 * t_0), 3.08641975308642e-5, Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * Float64(angle * Float64(0.005555555555555556 * pi)))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 3.15e-80], N[(b * b), $MachinePrecision], N[(N[(t$95$0 * t$95$0), $MachinePrecision] * 3.08641975308642e-5 + N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot \left(\pi \cdot angle\right)\\
\mathbf{if}\;a \leq 3.15 \cdot 10^{-80}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0 \cdot t\_0, 3.08641975308642 \cdot 10^{-5}, \left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 3.14999999999999983e-80Initial program 80.7%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6466.3
Simplified66.3%
if 3.14999999999999983e-80 < a Initial program 82.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6479.5
Simplified79.5%
Applied egg-rr79.6%
Final simplification70.2%
(FPCore (a b angle)
:precision binary64
(if (<= a 3.15e-80)
(* b b)
(fma
(* (* PI PI) 3.08641975308642e-5)
(* (* a angle) (* a angle))
(*
(* b b)
(+ 0.5 (* 0.5 (cos (* 2.0 (* angle (* 0.005555555555555556 PI))))))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 3.15e-80) {
tmp = b * b;
} else {
tmp = fma(((((double) M_PI) * ((double) M_PI)) * 3.08641975308642e-5), ((a * angle) * (a * angle)), ((b * b) * (0.5 + (0.5 * cos((2.0 * (angle * (0.005555555555555556 * ((double) M_PI)))))))));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (a <= 3.15e-80) tmp = Float64(b * b); else tmp = fma(Float64(Float64(pi * pi) * 3.08641975308642e-5), Float64(Float64(a * angle) * Float64(a * angle)), Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * Float64(angle * Float64(0.005555555555555556 * pi)))))))); end return tmp end
code[a_, b_, angle_] := If[LessEqual[a, 3.15e-80], N[(b * b), $MachinePrecision], N[(N[(N[(Pi * Pi), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision] * N[(N[(a * angle), $MachinePrecision] * N[(a * angle), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.15 \cdot 10^{-80}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(\pi \cdot \pi\right) \cdot 3.08641975308642 \cdot 10^{-5}, \left(a \cdot angle\right) \cdot \left(a \cdot angle\right), \left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 3.14999999999999983e-80Initial program 80.7%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6466.3
Simplified66.3%
if 3.14999999999999983e-80 < a Initial program 82.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6479.5
Simplified79.5%
Applied egg-rr79.5%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* a (* PI angle))))
(if (<= a 3.15e-80)
(* b b)
(+ (pow b 2.0) (* (* t_0 t_0) 3.08641975308642e-5)))))
double code(double a, double b, double angle) {
double t_0 = a * (((double) M_PI) * angle);
double tmp;
if (a <= 3.15e-80) {
tmp = b * b;
} else {
tmp = pow(b, 2.0) + ((t_0 * t_0) * 3.08641975308642e-5);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = a * (Math.PI * angle);
double tmp;
if (a <= 3.15e-80) {
tmp = b * b;
} else {
tmp = Math.pow(b, 2.0) + ((t_0 * t_0) * 3.08641975308642e-5);
}
return tmp;
}
def code(a, b, angle): t_0 = a * (math.pi * angle) tmp = 0 if a <= 3.15e-80: tmp = b * b else: tmp = math.pow(b, 2.0) + ((t_0 * t_0) * 3.08641975308642e-5) return tmp
function code(a, b, angle) t_0 = Float64(a * Float64(pi * angle)) tmp = 0.0 if (a <= 3.15e-80) tmp = Float64(b * b); else tmp = Float64((b ^ 2.0) + Float64(Float64(t_0 * t_0) * 3.08641975308642e-5)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = a * (pi * angle); tmp = 0.0; if (a <= 3.15e-80) tmp = b * b; else tmp = (b ^ 2.0) + ((t_0 * t_0) * 3.08641975308642e-5); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 3.15e-80], N[(b * b), $MachinePrecision], N[(N[Power[b, 2.0], $MachinePrecision] + N[(N[(t$95$0 * t$95$0), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot \left(\pi \cdot angle\right)\\
\mathbf{if}\;a \leq 3.15 \cdot 10^{-80}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;{b}^{2} + \left(t\_0 \cdot t\_0\right) \cdot 3.08641975308642 \cdot 10^{-5}\\
\end{array}
\end{array}
if a < 3.14999999999999983e-80Initial program 80.7%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6466.3
Simplified66.3%
if 3.14999999999999983e-80 < a Initial program 82.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6479.5
Simplified79.5%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
unpow1N/A
metadata-evalN/A
metadata-evalN/A
unpow1N/A
unpow2N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
Applied egg-rr79.6%
Taylor expanded in angle around 0
Simplified79.6%
Final simplification70.2%
(FPCore (a b angle)
:precision binary64
(if (<= b 1.25e-107)
(*
angle
(*
(* a (* angle (* 0.005555555555555556 PI)))
(* PI (* a 0.005555555555555556))))
(if (<= b 5.5e+30)
(fma
(* angle angle)
(*
(* PI PI)
(fma (* b b) -3.08641975308642e-5 (* (* a a) 3.08641975308642e-5)))
(* b b))
(* (* b b) (fma 0.5 (cos (* (* PI angle) 0.011111111111111112)) 0.5)))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.25e-107) {
tmp = angle * ((a * (angle * (0.005555555555555556 * ((double) M_PI)))) * (((double) M_PI) * (a * 0.005555555555555556)));
} else if (b <= 5.5e+30) {
tmp = fma((angle * angle), ((((double) M_PI) * ((double) M_PI)) * fma((b * b), -3.08641975308642e-5, ((a * a) * 3.08641975308642e-5))), (b * b));
} else {
tmp = (b * b) * fma(0.5, cos(((((double) M_PI) * angle) * 0.011111111111111112)), 0.5);
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (b <= 1.25e-107) tmp = Float64(angle * Float64(Float64(a * Float64(angle * Float64(0.005555555555555556 * pi))) * Float64(pi * Float64(a * 0.005555555555555556)))); elseif (b <= 5.5e+30) tmp = fma(Float64(angle * angle), Float64(Float64(pi * pi) * fma(Float64(b * b), -3.08641975308642e-5, Float64(Float64(a * a) * 3.08641975308642e-5))), Float64(b * b)); else tmp = Float64(Float64(b * b) * fma(0.5, cos(Float64(Float64(pi * angle) * 0.011111111111111112)), 0.5)); end return tmp end
code[a_, b_, angle_] := If[LessEqual[b, 1.25e-107], N[(angle * N[(N[(a * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e+30], N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * -3.08641975308642e-5 + N[(N[(a * a), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], N[(N[(b * b), $MachinePrecision] * N[(0.5 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.25 \cdot 10^{-107}:\\
\;\;\;\;angle \cdot \left(\left(a \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \left(\pi \cdot \left(a \cdot 0.005555555555555556\right)\right)\right)\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(angle \cdot angle, \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(b \cdot b, -3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right), b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \mathsf{fma}\left(0.5, \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right), 0.5\right)\\
\end{array}
\end{array}
if b < 1.24999999999999993e-107Initial program 80.0%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6473.2
Simplified73.2%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6436.6
Simplified36.6%
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied egg-rr41.6%
if 1.24999999999999993e-107 < b < 5.50000000000000025e30Initial program 66.1%
lift-PI.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6465.7
Applied egg-rr65.7%
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
div-invN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-/.f64N/A
Applied egg-rr66.2%
Taylor expanded in angle around 0
lower-fma.f64N/A
Simplified59.1%
if 5.50000000000000025e30 < b Initial program 91.6%
Applied egg-rr52.3%
Taylor expanded in a around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6483.1
Simplified83.1%
Final simplification53.1%
(FPCore (a b angle)
:precision binary64
(if (<= b 1.25e-107)
(*
angle
(*
(* a (* angle (* 0.005555555555555556 PI)))
(* PI (* a 0.005555555555555556))))
(if (<= b 5.5e+30)
(fma
(* angle angle)
(*
(* PI PI)
(fma (* b b) -3.08641975308642e-5 (* (* a a) 3.08641975308642e-5)))
(* b b))
(* (* b b) (fma 0.5 (cos (* angle (* PI 0.011111111111111112))) 0.5)))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.25e-107) {
tmp = angle * ((a * (angle * (0.005555555555555556 * ((double) M_PI)))) * (((double) M_PI) * (a * 0.005555555555555556)));
} else if (b <= 5.5e+30) {
tmp = fma((angle * angle), ((((double) M_PI) * ((double) M_PI)) * fma((b * b), -3.08641975308642e-5, ((a * a) * 3.08641975308642e-5))), (b * b));
} else {
tmp = (b * b) * fma(0.5, cos((angle * (((double) M_PI) * 0.011111111111111112))), 0.5);
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (b <= 1.25e-107) tmp = Float64(angle * Float64(Float64(a * Float64(angle * Float64(0.005555555555555556 * pi))) * Float64(pi * Float64(a * 0.005555555555555556)))); elseif (b <= 5.5e+30) tmp = fma(Float64(angle * angle), Float64(Float64(pi * pi) * fma(Float64(b * b), -3.08641975308642e-5, Float64(Float64(a * a) * 3.08641975308642e-5))), Float64(b * b)); else tmp = Float64(Float64(b * b) * fma(0.5, cos(Float64(angle * Float64(pi * 0.011111111111111112))), 0.5)); end return tmp end
code[a_, b_, angle_] := If[LessEqual[b, 1.25e-107], N[(angle * N[(N[(a * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e+30], N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * -3.08641975308642e-5 + N[(N[(a * a), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], N[(N[(b * b), $MachinePrecision] * N[(0.5 * N[Cos[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.25 \cdot 10^{-107}:\\
\;\;\;\;angle \cdot \left(\left(a \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \left(\pi \cdot \left(a \cdot 0.005555555555555556\right)\right)\right)\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(angle \cdot angle, \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(b \cdot b, -3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right), b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \mathsf{fma}\left(0.5, \cos \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right), 0.5\right)\\
\end{array}
\end{array}
if b < 1.24999999999999993e-107Initial program 80.0%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6473.2
Simplified73.2%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6436.6
Simplified36.6%
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied egg-rr41.6%
if 1.24999999999999993e-107 < b < 5.50000000000000025e30Initial program 66.1%
lift-PI.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6465.7
Applied egg-rr65.7%
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
div-invN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-/.f64N/A
Applied egg-rr66.2%
Taylor expanded in angle around 0
lower-fma.f64N/A
Simplified59.1%
if 5.50000000000000025e30 < b Initial program 91.6%
lift-/.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6491.6
Applied egg-rr91.6%
Applied egg-rr78.1%
Taylor expanded in a around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-cos.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6483.1
Simplified83.1%
Final simplification53.1%
(FPCore (a b angle)
:precision binary64
(if (<= b 1.62e-108)
(*
angle
(*
(* a (* angle (* 0.005555555555555556 PI)))
(* PI (* a 0.005555555555555556))))
(if (<= b 2.7e+125)
(fma
(* angle angle)
(*
(* PI PI)
(fma (* b b) -3.08641975308642e-5 (* (* a a) 3.08641975308642e-5)))
(* b b))
(* b b))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.62e-108) {
tmp = angle * ((a * (angle * (0.005555555555555556 * ((double) M_PI)))) * (((double) M_PI) * (a * 0.005555555555555556)));
} else if (b <= 2.7e+125) {
tmp = fma((angle * angle), ((((double) M_PI) * ((double) M_PI)) * fma((b * b), -3.08641975308642e-5, ((a * a) * 3.08641975308642e-5))), (b * b));
} else {
tmp = b * b;
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (b <= 1.62e-108) tmp = Float64(angle * Float64(Float64(a * Float64(angle * Float64(0.005555555555555556 * pi))) * Float64(pi * Float64(a * 0.005555555555555556)))); elseif (b <= 2.7e+125) tmp = fma(Float64(angle * angle), Float64(Float64(pi * pi) * fma(Float64(b * b), -3.08641975308642e-5, Float64(Float64(a * a) * 3.08641975308642e-5))), Float64(b * b)); else tmp = Float64(b * b); end return tmp end
code[a_, b_, angle_] := If[LessEqual[b, 1.62e-108], N[(angle * N[(N[(a * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.7e+125], N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * -3.08641975308642e-5 + N[(N[(a * a), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], N[(b * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.62 \cdot 10^{-108}:\\
\;\;\;\;angle \cdot \left(\left(a \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \left(\pi \cdot \left(a \cdot 0.005555555555555556\right)\right)\right)\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{+125}:\\
\;\;\;\;\mathsf{fma}\left(angle \cdot angle, \left(\pi \cdot \pi\right) \cdot \mathsf{fma}\left(b \cdot b, -3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right), b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot b\\
\end{array}
\end{array}
if b < 1.62e-108Initial program 80.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6473.6
Simplified73.6%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6436.7
Simplified36.7%
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied egg-rr41.8%
if 1.62e-108 < b < 2.6999999999999999e125Initial program 73.4%
lift-PI.f64N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-/.f6473.1
Applied egg-rr73.1%
lift-PI.f64N/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
unpow1N/A
metadata-evalN/A
pow-prod-upN/A
div-invN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-/.f64N/A
Applied egg-rr73.5%
Taylor expanded in angle around 0
lower-fma.f64N/A
Simplified60.3%
if 2.6999999999999999e125 < b Initial program 93.9%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6493.7
Simplified93.7%
Final simplification53.4%
(FPCore (a b angle)
:precision binary64
(if (<= b 1.62e-108)
(*
angle
(*
(* a (* angle (* 0.005555555555555556 PI)))
(* PI (* a 0.005555555555555556))))
(if (<= b 2.7e+125)
(fma
(* angle angle)
(*
PI
(*
PI
(fma (* b b) -3.08641975308642e-5 (* (* a a) 3.08641975308642e-5))))
(* b b))
(* b b))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.62e-108) {
tmp = angle * ((a * (angle * (0.005555555555555556 * ((double) M_PI)))) * (((double) M_PI) * (a * 0.005555555555555556)));
} else if (b <= 2.7e+125) {
tmp = fma((angle * angle), (((double) M_PI) * (((double) M_PI) * fma((b * b), -3.08641975308642e-5, ((a * a) * 3.08641975308642e-5)))), (b * b));
} else {
tmp = b * b;
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (b <= 1.62e-108) tmp = Float64(angle * Float64(Float64(a * Float64(angle * Float64(0.005555555555555556 * pi))) * Float64(pi * Float64(a * 0.005555555555555556)))); elseif (b <= 2.7e+125) tmp = fma(Float64(angle * angle), Float64(pi * Float64(pi * fma(Float64(b * b), -3.08641975308642e-5, Float64(Float64(a * a) * 3.08641975308642e-5)))), Float64(b * b)); else tmp = Float64(b * b); end return tmp end
code[a_, b_, angle_] := If[LessEqual[b, 1.62e-108], N[(angle * N[(N[(a * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(a * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.7e+125], N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * N[(N[(b * b), $MachinePrecision] * -3.08641975308642e-5 + N[(N[(a * a), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], N[(b * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.62 \cdot 10^{-108}:\\
\;\;\;\;angle \cdot \left(\left(a \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right) \cdot \left(\pi \cdot \left(a \cdot 0.005555555555555556\right)\right)\right)\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{+125}:\\
\;\;\;\;\mathsf{fma}\left(angle \cdot angle, \pi \cdot \left(\pi \cdot \mathsf{fma}\left(b \cdot b, -3.08641975308642 \cdot 10^{-5}, \left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right), b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot b\\
\end{array}
\end{array}
if b < 1.62e-108Initial program 80.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6473.6
Simplified73.6%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6436.7
Simplified36.7%
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied egg-rr41.8%
if 1.62e-108 < b < 2.6999999999999999e125Initial program 73.4%
lift-/.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
lower-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6473.4
Applied egg-rr73.4%
Taylor expanded in angle around 0
lower-fma.f64N/A
Simplified60.3%
if 2.6999999999999999e125 < b Initial program 93.9%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6493.7
Simplified93.7%
Final simplification53.4%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* a (* angle (* 0.005555555555555556 PI))))) (if (<= a 5.6e+137) (* b b) (* t_0 t_0))))
double code(double a, double b, double angle) {
double t_0 = a * (angle * (0.005555555555555556 * ((double) M_PI)));
double tmp;
if (a <= 5.6e+137) {
tmp = b * b;
} else {
tmp = t_0 * t_0;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = a * (angle * (0.005555555555555556 * Math.PI));
double tmp;
if (a <= 5.6e+137) {
tmp = b * b;
} else {
tmp = t_0 * t_0;
}
return tmp;
}
def code(a, b, angle): t_0 = a * (angle * (0.005555555555555556 * math.pi)) tmp = 0 if a <= 5.6e+137: tmp = b * b else: tmp = t_0 * t_0 return tmp
function code(a, b, angle) t_0 = Float64(a * Float64(angle * Float64(0.005555555555555556 * pi))) tmp = 0.0 if (a <= 5.6e+137) tmp = Float64(b * b); else tmp = Float64(t_0 * t_0); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = a * (angle * (0.005555555555555556 * pi)); tmp = 0.0; if (a <= 5.6e+137) tmp = b * b; else tmp = t_0 * t_0; end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(a * N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 5.6e+137], N[(b * b), $MachinePrecision], N[(t$95$0 * t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\\
\mathbf{if}\;a \leq 5.6 \cdot 10^{+137}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot t\_0\\
\end{array}
\end{array}
if a < 5.60000000000000002e137Initial program 78.1%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6463.5
Simplified63.5%
if 5.60000000000000002e137 < a Initial program 97.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6497.6
Simplified97.6%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6471.7
Simplified71.7%
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied egg-rr86.0%
Final simplification67.1%
(FPCore (a b angle) :precision binary64 (if (<= a 5.6e+137) (* b b) (* (* (* PI angle) 3.08641975308642e-5) (* a (* a (* PI angle))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 5.6e+137) {
tmp = b * b;
} else {
tmp = ((((double) M_PI) * angle) * 3.08641975308642e-5) * (a * (a * (((double) M_PI) * angle)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 5.6e+137) {
tmp = b * b;
} else {
tmp = ((Math.PI * angle) * 3.08641975308642e-5) * (a * (a * (Math.PI * angle)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 5.6e+137: tmp = b * b else: tmp = ((math.pi * angle) * 3.08641975308642e-5) * (a * (a * (math.pi * angle))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 5.6e+137) tmp = Float64(b * b); else tmp = Float64(Float64(Float64(pi * angle) * 3.08641975308642e-5) * Float64(a * Float64(a * Float64(pi * angle)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 5.6e+137) tmp = b * b; else tmp = ((pi * angle) * 3.08641975308642e-5) * (a * (a * (pi * angle))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 5.6e+137], N[(b * b), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision] * N[(a * N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.6 \cdot 10^{+137}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 5.60000000000000002e137Initial program 78.1%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6463.5
Simplified63.5%
if 5.60000000000000002e137 < a Initial program 97.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6497.6
Simplified97.6%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6471.7
Simplified71.7%
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied egg-rr74.5%
Applied egg-rr83.9%
Final simplification66.8%
(FPCore (a b angle) :precision binary64 (if (<= a 5.6e+137) (* b b) (* angle (* (* a angle) (* a (* (* PI PI) 3.08641975308642e-5))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 5.6e+137) {
tmp = b * b;
} else {
tmp = angle * ((a * angle) * (a * ((((double) M_PI) * ((double) M_PI)) * 3.08641975308642e-5)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 5.6e+137) {
tmp = b * b;
} else {
tmp = angle * ((a * angle) * (a * ((Math.PI * Math.PI) * 3.08641975308642e-5)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 5.6e+137: tmp = b * b else: tmp = angle * ((a * angle) * (a * ((math.pi * math.pi) * 3.08641975308642e-5))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 5.6e+137) tmp = Float64(b * b); else tmp = Float64(angle * Float64(Float64(a * angle) * Float64(a * Float64(Float64(pi * pi) * 3.08641975308642e-5)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 5.6e+137) tmp = b * b; else tmp = angle * ((a * angle) * (a * ((pi * pi) * 3.08641975308642e-5))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 5.6e+137], N[(b * b), $MachinePrecision], N[(angle * N[(N[(a * angle), $MachinePrecision] * N[(a * N[(N[(Pi * Pi), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.6 \cdot 10^{+137}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\left(a \cdot angle\right) \cdot \left(a \cdot \left(\left(\pi \cdot \pi\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\\
\end{array}
\end{array}
if a < 5.60000000000000002e137Initial program 78.1%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6463.5
Simplified63.5%
if 5.60000000000000002e137 < a Initial program 97.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6497.6
Simplified97.6%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6471.7
Simplified71.7%
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied egg-rr74.5%
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6483.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6483.8
Applied egg-rr83.8%
Final simplification66.8%
(FPCore (a b angle) :precision binary64 (if (<= a 2.15e+145) (* b b) (* a (* a (* PI (* PI (* 3.08641975308642e-5 (* angle angle))))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 2.15e+145) {
tmp = b * b;
} else {
tmp = a * (a * (((double) M_PI) * (((double) M_PI) * (3.08641975308642e-5 * (angle * angle)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 2.15e+145) {
tmp = b * b;
} else {
tmp = a * (a * (Math.PI * (Math.PI * (3.08641975308642e-5 * (angle * angle)))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 2.15e+145: tmp = b * b else: tmp = a * (a * (math.pi * (math.pi * (3.08641975308642e-5 * (angle * angle))))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 2.15e+145) tmp = Float64(b * b); else tmp = Float64(a * Float64(a * Float64(pi * Float64(pi * Float64(3.08641975308642e-5 * Float64(angle * angle)))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 2.15e+145) tmp = b * b; else tmp = a * (a * (pi * (pi * (3.08641975308642e-5 * (angle * angle))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 2.15e+145], N[(b * b), $MachinePrecision], N[(a * N[(a * N[(Pi * N[(Pi * N[(3.08641975308642e-5 * N[(angle * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.15 \cdot 10^{+145}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(a \cdot \left(\pi \cdot \left(\pi \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.14999999999999999e145Initial program 78.1%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6463.5
Simplified63.5%
if 2.14999999999999999e145 < a Initial program 97.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f6497.6
Simplified97.6%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6471.7
Simplified71.7%
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
Applied egg-rr74.5%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6479.0
Simplified79.0%
Final simplification66.0%
(FPCore (a b angle) :precision binary64 (* b b))
double code(double a, double b, double angle) {
return b * b;
}
real(8) function code(a, b, angle)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: angle
code = b * b
end function
public static double code(double a, double b, double angle) {
return b * b;
}
def code(a, b, angle): return b * b
function code(a, b, angle) return Float64(b * b) end
function tmp = code(a, b, angle) tmp = b * b; end
code[a_, b_, angle_] := N[(b * b), $MachinePrecision]
\begin{array}{l}
\\
b \cdot b
\end{array}
Initial program 81.2%
Taylor expanded in angle around 0
unpow2N/A
lower-*.f6459.1
Simplified59.1%
herbie shell --seed 2024212
(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)))