
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (/ angle 180.0) PI))) (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = (angle / 180.0) * ((double) M_PI);
return pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = (angle / 180.0) * Math.PI;
return Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0);
}
def code(a, b, angle): t_0 = (angle / 180.0) * math.pi return math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)
function code(a, b, angle) t_0 = Float64(Float64(angle / 180.0) * pi) return Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = (angle / 180.0) * pi; tmp = ((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* (/ angle 180.0) PI))) (+ (pow (* a (sin t_0)) 2.0) (pow (* b (cos t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = (angle / 180.0) * ((double) M_PI);
return pow((a * sin(t_0)), 2.0) + pow((b * cos(t_0)), 2.0);
}
public static double code(double a, double b, double angle) {
double t_0 = (angle / 180.0) * Math.PI;
return Math.pow((a * Math.sin(t_0)), 2.0) + Math.pow((b * Math.cos(t_0)), 2.0);
}
def code(a, b, angle): t_0 = (angle / 180.0) * math.pi return math.pow((a * math.sin(t_0)), 2.0) + math.pow((b * math.cos(t_0)), 2.0)
function code(a, b, angle) t_0 = Float64(Float64(angle / 180.0) * pi) return Float64((Float64(a * sin(t_0)) ^ 2.0) + (Float64(b * cos(t_0)) ^ 2.0)) end
function tmp = code(a, b, angle) t_0 = (angle / 180.0) * pi; tmp = ((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (sqrt PI) (/ (* angle (sqrt PI)) 180.0)))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos((sqrt(((double) M_PI)) * ((angle * sqrt(((double) M_PI))) / 180.0)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos((Math.sqrt(Math.PI) * ((angle * Math.sqrt(Math.PI)) / 180.0)))), 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin(((angle / 180.0) * math.pi))), 2.0) + math.pow((b * math.cos((math.sqrt(math.pi) * ((angle * math.sqrt(math.pi)) / 180.0)))), 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(sqrt(pi) * Float64(Float64(angle * sqrt(pi)) / 180.0)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin(((angle / 180.0) * pi))) ^ 2.0) + ((b * cos((sqrt(pi) * ((angle * sqrt(pi)) / 180.0)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(angle * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\sqrt{\pi} \cdot \frac{angle \cdot \sqrt{\pi}}{180}\right)\right)}^{2}
\end{array}
Initial program 78.8%
add-sqr-sqrtN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f6478.9%
Applied egg-rr78.9%
Final simplification78.9%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (* angle (sqrt PI)) (/ (sqrt PI) 180.0)))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(((angle * sqrt(((double) M_PI))) * (sqrt(((double) M_PI)) / 180.0)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((angle * Math.sqrt(Math.PI)) * (Math.sqrt(Math.PI) / 180.0)))), 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin(((angle / 180.0) * math.pi))), 2.0) + math.pow((b * math.cos(((angle * math.sqrt(math.pi)) * (math.sqrt(math.pi) / 180.0)))), 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle * sqrt(pi)) * Float64(sqrt(pi) / 180.0)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin(((angle / 180.0) * pi))) ^ 2.0) + ((b * cos(((angle * sqrt(pi)) * (sqrt(pi) / 180.0)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[Pi], $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(angle \cdot \sqrt{\pi}\right) \cdot \frac{\sqrt{\pi}}{180}\right)\right)}^{2}
\end{array}
Initial program 78.8%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f6478.8%
Applied egg-rr78.8%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (/ (/ PI 180.0) (/ 1.0 angle)))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin(((((double) M_PI) / 180.0) / (1.0 / angle)))), 2.0) + pow((b * cos(((angle / 180.0) * ((double) M_PI)))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin(((Math.PI / 180.0) / (1.0 / angle)))), 2.0) + Math.pow((b * Math.cos(((angle / 180.0) * Math.PI))), 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin(((math.pi / 180.0) / (1.0 / angle)))), 2.0) + math.pow((b * math.cos(((angle / 180.0) * math.pi))), 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(Float64(pi / 180.0) / Float64(1.0 / angle)))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle / 180.0) * pi))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin(((pi / 180.0) / (1.0 / angle)))) ^ 2.0) + ((b * cos(((angle / 180.0) * pi))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(Pi / 180.0), $MachinePrecision] / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\frac{\frac{\pi}{180}}{\frac{1}{angle}}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}
\end{array}
Initial program 78.8%
*-commutativeN/A
clear-numN/A
un-div-invN/A
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6478.8%
Applied egg-rr78.8%
(FPCore (a b angle) :precision binary64 (+ (pow (* b (cos (* (/ angle 180.0) PI))) 2.0) (pow (* a (sin (/ (* angle PI) 180.0))) 2.0)))
double code(double a, double b, double angle) {
return pow((b * cos(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((a * sin(((angle * ((double) M_PI)) / 180.0))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((b * Math.cos(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((a * Math.sin(((angle * Math.PI) / 180.0))), 2.0);
}
def code(a, b, angle): return math.pow((b * math.cos(((angle / 180.0) * math.pi))), 2.0) + math.pow((a * math.sin(((angle * math.pi) / 180.0))), 2.0)
function code(a, b, angle) return Float64((Float64(b * cos(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(a * sin(Float64(Float64(angle * pi) / 180.0))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((b * cos(((angle / 180.0) * pi))) ^ 2.0) + ((a * sin(((angle * pi) / 180.0))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(N[(angle * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2}
\end{array}
Initial program 78.8%
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6478.8%
Applied egg-rr78.8%
Final simplification78.8%
(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}
Initial program 78.8%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (* angle PI) 0.005555555555555556))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(((angle * ((double) M_PI)) * 0.005555555555555556))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((angle * Math.PI) * 0.005555555555555556))), 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin(((angle / 180.0) * math.pi))), 2.0) + math.pow((b * math.cos(((angle * math.pi) * 0.005555555555555556))), 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle * pi) * 0.005555555555555556))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin(((angle / 180.0) * pi))) ^ 2.0) + ((b * cos(((angle * pi) * 0.005555555555555556))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}^{2}
\end{array}
Initial program 78.8%
associate-*l/N/A
div-invN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
metadata-eval78.7%
Applied egg-rr78.7%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (/ (/ PI 180.0) (/ 1.0 angle)))) 2.0) (pow b 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin(((((double) M_PI) / 180.0) / (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(((Math.PI / 180.0) / (1.0 / angle)))), 2.0) + Math.pow(b, 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin(((math.pi / 180.0) / (1.0 / angle)))), 2.0) + math.pow(b, 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(Float64(pi / 180.0) / Float64(1.0 / angle)))) ^ 2.0) + (b ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin(((pi / 180.0) / (1.0 / angle)))) ^ 2.0) + (b ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(Pi / 180.0), $MachinePrecision] / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\frac{\frac{\pi}{180}}{\frac{1}{angle}}\right)\right)}^{2} + {b}^{2}
\end{array}
Initial program 78.8%
*-commutativeN/A
clear-numN/A
un-div-invN/A
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6478.8%
Applied egg-rr78.8%
Taylor expanded in angle around 0
Simplified78.6%
Final simplification78.6%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (/ (* angle PI) 180.0))) 2.0) (pow b 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin(((angle * ((double) M_PI)) / 180.0))), 2.0) + pow(b, 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin(((angle * Math.PI) / 180.0))), 2.0) + Math.pow(b, 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin(((angle * math.pi) / 180.0))), 2.0) + math.pow(b, 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(Float64(angle * pi) / 180.0))) ^ 2.0) + (b ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin(((angle * pi) / 180.0))) ^ 2.0) + (b ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {b}^{2}
\end{array}
Initial program 78.8%
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6478.8%
Applied egg-rr78.8%
Taylor expanded in angle around 0
Simplified78.6%
Final simplification78.6%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow b 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin(((angle / 180.0) * ((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(((angle / 180.0) * Math.PI))), 2.0) + Math.pow(b, 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin(((angle / 180.0) * math.pi))), 2.0) + math.pow(b, 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (b ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin(((angle / 180.0) * pi))) ^ 2.0) + (b ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {b}^{2}
\end{array}
Initial program 78.8%
Taylor expanded in angle around 0
Simplified78.5%
Final simplification78.5%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (cos (* PI (* angle 0.011111111111111112)))))
(if (<= (/ angle 180.0) 5e-161)
(* b b)
(if (<= (/ angle 180.0) 2e-9)
(+
(* b b)
(* (* angle angle) (pow (* 0.005555555555555556 (* a PI)) 2.0)))
(+ (* (* b b) (+ 0.5 (* 0.5 t_0))) (* (* a a) (+ 0.5 (* t_0 -0.5))))))))
double code(double a, double b, double angle) {
double t_0 = cos((((double) M_PI) * (angle * 0.011111111111111112)));
double tmp;
if ((angle / 180.0) <= 5e-161) {
tmp = b * b;
} else if ((angle / 180.0) <= 2e-9) {
tmp = (b * b) + ((angle * angle) * pow((0.005555555555555556 * (a * ((double) M_PI))), 2.0));
} else {
tmp = ((b * b) * (0.5 + (0.5 * t_0))) + ((a * a) * (0.5 + (t_0 * -0.5)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.cos((Math.PI * (angle * 0.011111111111111112)));
double tmp;
if ((angle / 180.0) <= 5e-161) {
tmp = b * b;
} else if ((angle / 180.0) <= 2e-9) {
tmp = (b * b) + ((angle * angle) * Math.pow((0.005555555555555556 * (a * Math.PI)), 2.0));
} else {
tmp = ((b * b) * (0.5 + (0.5 * t_0))) + ((a * a) * (0.5 + (t_0 * -0.5)));
}
return tmp;
}
def code(a, b, angle): t_0 = math.cos((math.pi * (angle * 0.011111111111111112))) tmp = 0 if (angle / 180.0) <= 5e-161: tmp = b * b elif (angle / 180.0) <= 2e-9: tmp = (b * b) + ((angle * angle) * math.pow((0.005555555555555556 * (a * math.pi)), 2.0)) else: tmp = ((b * b) * (0.5 + (0.5 * t_0))) + ((a * a) * (0.5 + (t_0 * -0.5))) return tmp
function code(a, b, angle) t_0 = cos(Float64(pi * Float64(angle * 0.011111111111111112))) tmp = 0.0 if (Float64(angle / 180.0) <= 5e-161) tmp = Float64(b * b); elseif (Float64(angle / 180.0) <= 2e-9) tmp = Float64(Float64(b * b) + Float64(Float64(angle * angle) * (Float64(0.005555555555555556 * Float64(a * pi)) ^ 2.0))); else tmp = Float64(Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * t_0))) + Float64(Float64(a * a) * Float64(0.5 + Float64(t_0 * -0.5)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = cos((pi * (angle * 0.011111111111111112))); tmp = 0.0; if ((angle / 180.0) <= 5e-161) tmp = b * b; elseif ((angle / 180.0) <= 2e-9) tmp = (b * b) + ((angle * angle) * ((0.005555555555555556 * (a * pi)) ^ 2.0)); else tmp = ((b * b) * (0.5 + (0.5 * t_0))) + ((a * a) * (0.5 + (t_0 * -0.5))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[Cos[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-161], N[(b * b), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-9], N[(N[(b * b), $MachinePrecision] + N[(N[(angle * angle), $MachinePrecision] * N[Power[N[(0.005555555555555556 * N[(a * Pi), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(0.5 + N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-161}:\\
\;\;\;\;b \cdot b\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-9}:\\
\;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot {\left(0.005555555555555556 \cdot \left(a \cdot \pi\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot t\_0\right) + \left(a \cdot a\right) \cdot \left(0.5 + t\_0 \cdot -0.5\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 4.9999999999999999e-161Initial program 84.1%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6464.8%
Simplified64.8%
if 4.9999999999999999e-161 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000012e-9Initial program 99.6%
rem-exp-logN/A
unpow1N/A
log-powN/A
log-powN/A
*-commutativeN/A
exp-prodN/A
pow-lowering-pow.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
unpow1N/A
pow-to-expN/A
rem-log-expN/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr35.5%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
log-EN/A
*-lft-identityN/A
distribute-rgt-inN/A
exp-sumN/A
exp-to-powN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
Simplified93.4%
if 2.00000000000000012e-9 < (/.f64 angle #s(literal 180 binary64)) Initial program 60.3%
*-commutativeN/A
clear-numN/A
un-div-invN/A
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6460.3%
Applied egg-rr60.3%
clear-numN/A
inv-powN/A
frac-2negN/A
associate-/r/N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
Applied egg-rr60.4%
Applied egg-rr60.4%
Final simplification66.8%
(FPCore (a b angle)
:precision binary64
(if (<= (/ angle 180.0) 5e-161)
(* b b)
(if (<= (/ angle 180.0) 2e-9)
(+
(* b b)
(* (* angle angle) (pow (* 0.005555555555555556 (* a PI)) 2.0)))
(+
(pow b 2.0)
(* (* a a) (- 0.5 (* 0.5 (cos (* PI (/ 2.0 (/ 180.0 angle)))))))))))
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 5e-161) {
tmp = b * b;
} else if ((angle / 180.0) <= 2e-9) {
tmp = (b * b) + ((angle * angle) * pow((0.005555555555555556 * (a * ((double) M_PI))), 2.0));
} else {
tmp = pow(b, 2.0) + ((a * a) * (0.5 - (0.5 * cos((((double) M_PI) * (2.0 / (180.0 / angle)))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 5e-161) {
tmp = b * b;
} else if ((angle / 180.0) <= 2e-9) {
tmp = (b * b) + ((angle * angle) * Math.pow((0.005555555555555556 * (a * Math.PI)), 2.0));
} else {
tmp = Math.pow(b, 2.0) + ((a * a) * (0.5 - (0.5 * Math.cos((Math.PI * (2.0 / (180.0 / angle)))))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (angle / 180.0) <= 5e-161: tmp = b * b elif (angle / 180.0) <= 2e-9: tmp = (b * b) + ((angle * angle) * math.pow((0.005555555555555556 * (a * math.pi)), 2.0)) else: tmp = math.pow(b, 2.0) + ((a * a) * (0.5 - (0.5 * math.cos((math.pi * (2.0 / (180.0 / angle))))))) return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 5e-161) tmp = Float64(b * b); elseif (Float64(angle / 180.0) <= 2e-9) tmp = Float64(Float64(b * b) + Float64(Float64(angle * angle) * (Float64(0.005555555555555556 * Float64(a * pi)) ^ 2.0))); else tmp = Float64((b ^ 2.0) + Float64(Float64(a * a) * Float64(0.5 - Float64(0.5 * cos(Float64(pi * Float64(2.0 / Float64(180.0 / angle)))))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((angle / 180.0) <= 5e-161) tmp = b * b; elseif ((angle / 180.0) <= 2e-9) tmp = (b * b) + ((angle * angle) * ((0.005555555555555556 * (a * pi)) ^ 2.0)); else tmp = (b ^ 2.0) + ((a * a) * (0.5 - (0.5 * cos((pi * (2.0 / (180.0 / angle))))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-161], N[(b * b), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-9], N[(N[(b * b), $MachinePrecision] + N[(N[(angle * angle), $MachinePrecision] * N[Power[N[(0.005555555555555556 * N[(a * Pi), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[b, 2.0], $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(0.5 - N[(0.5 * N[Cos[N[(Pi * N[(2.0 / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-161}:\\
\;\;\;\;b \cdot b\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-9}:\\
\;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot {\left(0.005555555555555556 \cdot \left(a \cdot \pi\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{b}^{2} + \left(a \cdot a\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(\pi \cdot \frac{2}{\frac{180}{angle}}\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 4.9999999999999999e-161Initial program 84.1%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6464.8%
Simplified64.8%
if 4.9999999999999999e-161 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000012e-9Initial program 99.6%
rem-exp-logN/A
unpow1N/A
log-powN/A
log-powN/A
*-commutativeN/A
exp-prodN/A
pow-lowering-pow.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
unpow1N/A
pow-to-expN/A
rem-log-expN/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr35.5%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
log-EN/A
*-lft-identityN/A
distribute-rgt-inN/A
exp-sumN/A
exp-to-powN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
Simplified93.4%
if 2.00000000000000012e-9 < (/.f64 angle #s(literal 180 binary64)) Initial program 60.3%
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr60.1%
metadata-evalN/A
times-fracN/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6460.2%
Applied egg-rr60.2%
Taylor expanded in angle around 0
Simplified61.3%
Final simplification67.1%
(FPCore (a b angle)
:precision binary64
(if (<= (/ angle 180.0) 5e-161)
(* b b)
(if (<= (/ angle 180.0) 2e-9)
(+
(* b b)
(* (* angle angle) (pow (* 0.005555555555555556 (* a PI)) 2.0)))
(+
(pow b 2.0)
(* (* a a) (- 0.5 (* 0.5 (cos (* 2.0 (/ PI (/ 180.0 angle)))))))))))
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 5e-161) {
tmp = b * b;
} else if ((angle / 180.0) <= 2e-9) {
tmp = (b * b) + ((angle * angle) * pow((0.005555555555555556 * (a * ((double) M_PI))), 2.0));
} else {
tmp = pow(b, 2.0) + ((a * a) * (0.5 - (0.5 * cos((2.0 * (((double) M_PI) / (180.0 / angle)))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 5e-161) {
tmp = b * b;
} else if ((angle / 180.0) <= 2e-9) {
tmp = (b * b) + ((angle * angle) * Math.pow((0.005555555555555556 * (a * Math.PI)), 2.0));
} else {
tmp = Math.pow(b, 2.0) + ((a * a) * (0.5 - (0.5 * Math.cos((2.0 * (Math.PI / (180.0 / angle)))))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (angle / 180.0) <= 5e-161: tmp = b * b elif (angle / 180.0) <= 2e-9: tmp = (b * b) + ((angle * angle) * math.pow((0.005555555555555556 * (a * math.pi)), 2.0)) else: tmp = math.pow(b, 2.0) + ((a * a) * (0.5 - (0.5 * math.cos((2.0 * (math.pi / (180.0 / angle))))))) return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 5e-161) tmp = Float64(b * b); elseif (Float64(angle / 180.0) <= 2e-9) tmp = Float64(Float64(b * b) + Float64(Float64(angle * angle) * (Float64(0.005555555555555556 * Float64(a * pi)) ^ 2.0))); else tmp = Float64((b ^ 2.0) + Float64(Float64(a * a) * Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * Float64(pi / Float64(180.0 / angle)))))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((angle / 180.0) <= 5e-161) tmp = b * b; elseif ((angle / 180.0) <= 2e-9) tmp = (b * b) + ((angle * angle) * ((0.005555555555555556 * (a * pi)) ^ 2.0)); else tmp = (b ^ 2.0) + ((a * a) * (0.5 - (0.5 * cos((2.0 * (pi / (180.0 / angle))))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-161], N[(b * b), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-9], N[(N[(b * b), $MachinePrecision] + N[(N[(angle * angle), $MachinePrecision] * N[Power[N[(0.005555555555555556 * N[(a * Pi), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[b, 2.0], $MachinePrecision] + N[(N[(a * a), $MachinePrecision] * N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-161}:\\
\;\;\;\;b \cdot b\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-9}:\\
\;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot {\left(0.005555555555555556 \cdot \left(a \cdot \pi\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{b}^{2} + \left(a \cdot a\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \frac{\pi}{\frac{180}{angle}}\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 4.9999999999999999e-161Initial program 84.1%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6464.8%
Simplified64.8%
if 4.9999999999999999e-161 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000012e-9Initial program 99.6%
rem-exp-logN/A
unpow1N/A
log-powN/A
log-powN/A
*-commutativeN/A
exp-prodN/A
pow-lowering-pow.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
unpow1N/A
pow-to-expN/A
rem-log-expN/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr35.5%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
log-EN/A
*-lft-identityN/A
distribute-rgt-inN/A
exp-sumN/A
exp-to-powN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
Simplified93.4%
if 2.00000000000000012e-9 < (/.f64 angle #s(literal 180 binary64)) Initial program 60.3%
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr60.1%
Taylor expanded in angle around 0
Simplified61.3%
Final simplification67.1%
(FPCore (a b angle)
:precision binary64
(if (<= b 2.25e-153)
(pow (* a (sin (* angle (* PI 0.005555555555555556)))) 2.0)
(if (<= b 1.4e+136)
(+
(* b b)
(* (* angle angle) (pow (* 0.005555555555555556 (* a PI)) 2.0)))
(* b b))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 2.25e-153) {
tmp = pow((a * sin((angle * (((double) M_PI) * 0.005555555555555556)))), 2.0);
} else if (b <= 1.4e+136) {
tmp = (b * b) + ((angle * angle) * pow((0.005555555555555556 * (a * ((double) M_PI))), 2.0));
} else {
tmp = b * b;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2.25e-153) {
tmp = Math.pow((a * Math.sin((angle * (Math.PI * 0.005555555555555556)))), 2.0);
} else if (b <= 1.4e+136) {
tmp = (b * b) + ((angle * angle) * Math.pow((0.005555555555555556 * (a * Math.PI)), 2.0));
} else {
tmp = b * b;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 2.25e-153: tmp = math.pow((a * math.sin((angle * (math.pi * 0.005555555555555556)))), 2.0) elif b <= 1.4e+136: tmp = (b * b) + ((angle * angle) * math.pow((0.005555555555555556 * (a * math.pi)), 2.0)) else: tmp = b * b return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 2.25e-153) tmp = Float64(a * sin(Float64(angle * Float64(pi * 0.005555555555555556)))) ^ 2.0; elseif (b <= 1.4e+136) tmp = Float64(Float64(b * b) + Float64(Float64(angle * angle) * (Float64(0.005555555555555556 * Float64(a * pi)) ^ 2.0))); else tmp = Float64(b * b); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2.25e-153) tmp = (a * sin((angle * (pi * 0.005555555555555556)))) ^ 2.0; elseif (b <= 1.4e+136) tmp = (b * b) + ((angle * angle) * ((0.005555555555555556 * (a * pi)) ^ 2.0)); else tmp = b * b; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 2.25e-153], N[Power[N[(a * N[Sin[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[b, 1.4e+136], N[(N[(b * b), $MachinePrecision] + N[(N[(angle * angle), $MachinePrecision] * N[Power[N[(0.005555555555555556 * N[(a * Pi), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.25 \cdot 10^{-153}:\\
\;\;\;\;{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{+136}:\\
\;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot {\left(0.005555555555555556 \cdot \left(a \cdot \pi\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;b \cdot b\\
\end{array}
\end{array}
if b < 2.25e-153Initial program 78.8%
*-commutativeN/A
clear-numN/A
un-div-invN/A
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6478.9%
Applied egg-rr78.9%
clear-numN/A
inv-powN/A
frac-2negN/A
associate-/r/N/A
unpow-prod-downN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
Applied egg-rr78.8%
Taylor expanded in a around inf
unpow2N/A
unpow2N/A
unswap-sqrN/A
unpow2N/A
rem-exp-logN/A
pow-lowering-pow.f64N/A
rem-exp-logN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6443.7%
Simplified43.7%
if 2.25e-153 < b < 1.4000000000000001e136Initial program 66.2%
rem-exp-logN/A
unpow1N/A
log-powN/A
log-powN/A
*-commutativeN/A
exp-prodN/A
pow-lowering-pow.f64N/A
exp-1-eN/A
E-lowering-E.f64N/A
unpow1N/A
pow-to-expN/A
rem-log-expN/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr29.0%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
log-EN/A
*-lft-identityN/A
distribute-rgt-inN/A
exp-sumN/A
exp-to-powN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-to-powN/A
pow-lowering-pow.f64N/A
Simplified53.4%
if 1.4000000000000001e136 < b Initial program 97.9%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6497.9%
Simplified97.9%
Final simplification54.0%
(FPCore (a b angle)
:precision binary64
(if (<= a 1.1e-54)
(* b b)
(if (<= a 1.35e+154)
(+
(* b b)
(* (* angle angle) (* PI (* PI (* (* a a) 3.08641975308642e-5)))))
(if (<= a 6e+200)
(* a (* a (* (* angle angle) (* PI (* PI 3.08641975308642e-5)))))
(* (* angle (* a a)) (* (* angle PI) (* PI 3.08641975308642e-5)))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 1.1e-54) {
tmp = b * b;
} else if (a <= 1.35e+154) {
tmp = (b * b) + ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((a * a) * 3.08641975308642e-5))));
} else if (a <= 6e+200) {
tmp = a * (a * ((angle * angle) * (((double) M_PI) * (((double) M_PI) * 3.08641975308642e-5))));
} else {
tmp = (angle * (a * a)) * ((angle * ((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 <= 1.1e-54) {
tmp = b * b;
} else if (a <= 1.35e+154) {
tmp = (b * b) + ((angle * angle) * (Math.PI * (Math.PI * ((a * a) * 3.08641975308642e-5))));
} else if (a <= 6e+200) {
tmp = a * (a * ((angle * angle) * (Math.PI * (Math.PI * 3.08641975308642e-5))));
} else {
tmp = (angle * (a * a)) * ((angle * Math.PI) * (Math.PI * 3.08641975308642e-5));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 1.1e-54: tmp = b * b elif a <= 1.35e+154: tmp = (b * b) + ((angle * angle) * (math.pi * (math.pi * ((a * a) * 3.08641975308642e-5)))) elif a <= 6e+200: tmp = a * (a * ((angle * angle) * (math.pi * (math.pi * 3.08641975308642e-5)))) else: tmp = (angle * (a * a)) * ((angle * math.pi) * (math.pi * 3.08641975308642e-5)) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 1.1e-54) tmp = Float64(b * b); elseif (a <= 1.35e+154) tmp = Float64(Float64(b * b) + Float64(Float64(angle * angle) * Float64(pi * Float64(pi * Float64(Float64(a * a) * 3.08641975308642e-5))))); elseif (a <= 6e+200) tmp = Float64(a * Float64(a * Float64(Float64(angle * angle) * Float64(pi * Float64(pi * 3.08641975308642e-5))))); else tmp = Float64(Float64(angle * Float64(a * a)) * Float64(Float64(angle * pi) * Float64(pi * 3.08641975308642e-5))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 1.1e-54) tmp = b * b; elseif (a <= 1.35e+154) tmp = (b * b) + ((angle * angle) * (pi * (pi * ((a * a) * 3.08641975308642e-5)))); elseif (a <= 6e+200) tmp = a * (a * ((angle * angle) * (pi * (pi * 3.08641975308642e-5)))); else tmp = (angle * (a * a)) * ((angle * pi) * (pi * 3.08641975308642e-5)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 1.1e-54], N[(b * b), $MachinePrecision], If[LessEqual[a, 1.35e+154], N[(N[(b * b), $MachinePrecision] + N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * N[(N[(a * a), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e+200], N[(a * N[(a * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.1 \cdot 10^{-54}:\\
\;\;\;\;b \cdot b\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\\
\mathbf{elif}\;a \leq 6 \cdot 10^{+200}:\\
\;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot \left(a \cdot a\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\\
\end{array}
\end{array}
if a < 1.1e-54Initial program 77.2%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6460.9%
Simplified60.9%
if 1.1e-54 < a < 1.35000000000000003e154Initial program 70.3%
add-sqr-sqrtN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f6470.5%
Applied egg-rr70.5%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified28.7%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.7%
Simplified61.7%
if 1.35000000000000003e154 < a < 5.99999999999999982e200Initial program 99.3%
add-sqr-sqrtN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f6499.3%
Applied egg-rr99.3%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified20.1%
Taylor expanded in b around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6447.3%
Simplified47.3%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6476.9%
Applied egg-rr76.9%
if 5.99999999999999982e200 < a Initial program 100.0%
add-sqr-sqrtN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64100.0%
Applied egg-rr100.0%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified61.1%
Taylor expanded in b around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6477.8%
Simplified77.8%
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6489.4%
Applied egg-rr89.4%
Final simplification63.7%
(FPCore (a b angle) :precision binary64 (if (<= a 1.95e+174) (* b b) (* (* angle (* a a)) (* (* angle PI) (* PI 3.08641975308642e-5)))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 1.95e+174) {
tmp = b * b;
} else {
tmp = (angle * (a * a)) * ((angle * ((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 <= 1.95e+174) {
tmp = b * b;
} else {
tmp = (angle * (a * a)) * ((angle * Math.PI) * (Math.PI * 3.08641975308642e-5));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 1.95e+174: tmp = b * b else: tmp = (angle * (a * a)) * ((angle * math.pi) * (math.pi * 3.08641975308642e-5)) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 1.95e+174) tmp = Float64(b * b); else tmp = Float64(Float64(angle * Float64(a * a)) * Float64(Float64(angle * pi) * Float64(pi * 3.08641975308642e-5))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 1.95e+174) tmp = b * b; else tmp = (angle * (a * a)) * ((angle * pi) * (pi * 3.08641975308642e-5)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 1.95e+174], N[(b * b), $MachinePrecision], N[(N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.95 \cdot 10^{+174}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot \left(a \cdot a\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\\
\end{array}
\end{array}
if a < 1.9499999999999999e174Initial program 76.5%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6459.0%
Simplified59.0%
if 1.9499999999999999e174 < a Initial program 99.8%
add-sqr-sqrtN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f6499.8%
Applied egg-rr99.8%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified52.4%
Taylor expanded in b around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6472.4%
Simplified72.4%
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6480.9%
Applied egg-rr80.9%
Final simplification61.1%
(FPCore (a b angle) :precision binary64 (if (<= a 3.1e+168) (* b b) (* a (* a (* (* angle angle) (* PI (* PI 3.08641975308642e-5)))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 3.1e+168) {
tmp = b * b;
} else {
tmp = a * (a * ((angle * angle) * (((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 <= 3.1e+168) {
tmp = b * b;
} else {
tmp = a * (a * ((angle * angle) * (Math.PI * (Math.PI * 3.08641975308642e-5))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 3.1e+168: tmp = b * b else: tmp = a * (a * ((angle * angle) * (math.pi * (math.pi * 3.08641975308642e-5)))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 3.1e+168) tmp = Float64(b * b); else tmp = Float64(a * Float64(a * Float64(Float64(angle * angle) * Float64(pi * Float64(pi * 3.08641975308642e-5))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 3.1e+168) tmp = b * b; else tmp = a * (a * ((angle * angle) * (pi * (pi * 3.08641975308642e-5)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 3.1e+168], N[(b * b), $MachinePrecision], N[(a * N[(a * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.1 \cdot 10^{+168}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 3.09999999999999996e168Initial program 76.3%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6459.0%
Simplified59.0%
if 3.09999999999999996e168 < a Initial program 99.7%
add-sqr-sqrtN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f6499.7%
Applied egg-rr99.7%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified48.7%
Taylor expanded in b around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6470.9%
Simplified70.9%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6476.2%
Applied egg-rr76.2%
Final simplification60.8%
(FPCore (a b angle) :precision binary64 (if (<= a 1.95e+174) (* b b) (* (* a a) (* PI (* (* angle angle) (* PI 3.08641975308642e-5))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 1.95e+174) {
tmp = b * b;
} else {
tmp = (a * a) * (((double) M_PI) * ((angle * angle) * (((double) M_PI) * 3.08641975308642e-5)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 1.95e+174) {
tmp = b * b;
} else {
tmp = (a * a) * (Math.PI * ((angle * angle) * (Math.PI * 3.08641975308642e-5)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 1.95e+174: tmp = b * b else: tmp = (a * a) * (math.pi * ((angle * angle) * (math.pi * 3.08641975308642e-5))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 1.95e+174) tmp = Float64(b * b); else tmp = Float64(Float64(a * a) * Float64(pi * Float64(Float64(angle * angle) * Float64(pi * 3.08641975308642e-5)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 1.95e+174) tmp = b * b; else tmp = (a * a) * (pi * ((angle * angle) * (pi * 3.08641975308642e-5))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 1.95e+174], N[(b * b), $MachinePrecision], N[(N[(a * a), $MachinePrecision] * N[(Pi * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.95 \cdot 10^{+174}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot a\right) \cdot \left(\pi \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\\
\end{array}
\end{array}
if a < 1.9499999999999999e174Initial program 76.5%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6459.0%
Simplified59.0%
if 1.9499999999999999e174 < a Initial program 99.8%
add-sqr-sqrtN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f64N/A
sqrt-lowering-sqrt.f64N/A
PI-lowering-PI.f6499.8%
Applied egg-rr99.8%
Taylor expanded in angle around 0
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
Simplified52.4%
Taylor expanded in b around 0
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6472.4%
Simplified72.4%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f6472.4%
Applied egg-rr72.4%
Final simplification60.3%
(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 78.8%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6457.0%
Simplified57.0%
herbie shell --seed 2024191
(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)))