
(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 19 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 (/ 0.005555555555555556 (/ -1.0 (/ PI (/ -1.0 angle)))))) 2.0) (pow (* b (cos (/ (* PI angle) 180.0))) 2.0)))
double code(double a, double b, double angle) {
return pow((a * sin((0.005555555555555556 / (-1.0 / (((double) M_PI) / (-1.0 / angle)))))), 2.0) + pow((b * cos(((((double) M_PI) * angle) / 180.0))), 2.0);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin((0.005555555555555556 / (-1.0 / (Math.PI / (-1.0 / angle)))))), 2.0) + Math.pow((b * Math.cos(((Math.PI * angle) / 180.0))), 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin((0.005555555555555556 / (-1.0 / (math.pi / (-1.0 / angle)))))), 2.0) + math.pow((b * math.cos(((math.pi * angle) / 180.0))), 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(0.005555555555555556 / Float64(-1.0 / Float64(pi / Float64(-1.0 / angle)))))) ^ 2.0) + (Float64(b * cos(Float64(Float64(pi * angle) / 180.0))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin((0.005555555555555556 / (-1.0 / (pi / (-1.0 / angle)))))) ^ 2.0) + ((b * cos(((pi * angle) / 180.0))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(0.005555555555555556 / N[(-1.0 / N[(Pi / N[(-1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\frac{0.005555555555555556}{\frac{-1}{\frac{\pi}{\frac{-1}{angle}}}}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{\pi \cdot angle}{180}\right)\right)}^{2}
\end{array}
Initial program 79.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified79.8%
clear-numN/A
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-evalN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6479.9%
Applied egg-rr79.9%
associate-/l/N/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
remove-double-divN/A
distribute-neg-frac2N/A
associate-/l/N/A
distribute-neg-fracN/A
clear-numN/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6479.9%
Applied egg-rr79.9%
Final simplification79.9%
(FPCore (a b angle) :precision binary64 (+ (pow (* b (cos (/ (* PI angle) 180.0))) 2.0) (pow (* a (sin (/ (* 0.005555555555555556 angle) (/ 1.0 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(((0.005555555555555556 * angle) / (1.0 / ((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(((0.005555555555555556 * angle) / (1.0 / 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(((0.005555555555555556 * angle) / (1.0 / math.pi)))), 2.0)
function code(a, b, angle) return Float64((Float64(b * cos(Float64(Float64(pi * angle) / 180.0))) ^ 2.0) + (Float64(a * sin(Float64(Float64(0.005555555555555556 * angle) / Float64(1.0 / pi)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((b * cos(((pi * angle) / 180.0))) ^ 2.0) + ((a * sin(((0.005555555555555556 * angle) / (1.0 / pi)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Cos[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] / N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(b \cdot \cos \left(\frac{\pi \cdot angle}{180}\right)\right)}^{2} + {\left(a \cdot \sin \left(\frac{0.005555555555555556 \cdot angle}{\frac{1}{\pi}}\right)\right)}^{2}
\end{array}
Initial program 79.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified79.8%
*-commutativeN/A
associate-*l/N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6479.9%
Applied egg-rr79.9%
*-un-lft-identityN/A
div-invN/A
times-fracN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6479.8%
Applied egg-rr79.8%
clear-numN/A
div-invN/A
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6479.9%
Applied egg-rr79.9%
Final simplification79.9%
(FPCore (a b angle) :precision binary64 (+ (pow (* b (cos (/ (* PI angle) 180.0))) 2.0) (pow (* a (sin (/ 0.005555555555555556 (/ 1.0 (* 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 / (1.0 / (((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 / (1.0 / (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 / (1.0 / (math.pi * angle))))), 2.0)
function code(a, b, angle) return Float64((Float64(b * cos(Float64(Float64(pi * angle) / 180.0))) ^ 2.0) + (Float64(a * sin(Float64(0.005555555555555556 / Float64(1.0 / 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 / (1.0 / (pi * angle))))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Cos[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(0.005555555555555556 / N[(1.0 / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(b \cdot \cos \left(\frac{\pi \cdot angle}{180}\right)\right)}^{2} + {\left(a \cdot \sin \left(\frac{0.005555555555555556}{\frac{1}{\pi \cdot angle}}\right)\right)}^{2}
\end{array}
Initial program 79.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified79.8%
*-commutativeN/A
associate-*l/N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6479.9%
Applied egg-rr79.9%
*-un-lft-identityN/A
div-invN/A
times-fracN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6479.8%
Applied egg-rr79.8%
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6479.9%
Applied egg-rr79.9%
Final simplification79.9%
(FPCore (a b angle) :precision binary64 (+ (pow (* b (cos (/ (* PI angle) 180.0))) 2.0) (pow (* a (sin (/ PI (/ 180.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((((double) M_PI) / (180.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((Math.PI / (180.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((math.pi / (180.0 / angle)))), 2.0)
function code(a, b, angle) return Float64((Float64(b * cos(Float64(Float64(pi * angle) / 180.0))) ^ 2.0) + (Float64(a * sin(Float64(pi / Float64(180.0 / angle)))) ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((b * cos(((pi * angle) / 180.0))) ^ 2.0) + ((a * sin((pi / (180.0 / angle)))) ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Cos[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(b \cdot \cos \left(\frac{\pi \cdot angle}{180}\right)\right)}^{2} + {\left(a \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2}
\end{array}
Initial program 79.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified79.8%
*-commutativeN/A
associate-*l/N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6479.9%
Applied egg-rr79.9%
Final simplification79.9%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (+ (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 = ((double) M_PI) * (angle / 180.0);
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 = Math.PI * (angle / 180.0);
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 = math.pi * (angle / 180.0) 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(pi * Float64(angle / 180.0)) 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 = pi * (angle / 180.0); tmp = ((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[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 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Initial program 79.9%
Final simplification79.9%
(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(Float64(pi * 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[(N[(Pi * angle), $MachinePrecision] / 180.0), $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(\frac{\pi \cdot 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 79.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified79.8%
div-invN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
metadata-eval79.8%
Applied egg-rr79.8%
Final simplification79.8%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (/ PI (/ 180.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 / 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 / angle)))), 2.0) + Math.pow(b, 2.0);
}
def code(a, b, angle): return math.pow((a * math.sin((math.pi / (180.0 / angle)))), 2.0) + math.pow(b, 2.0)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(pi / Float64(180.0 / angle)))) ^ 2.0) + (b ^ 2.0)) end
function tmp = code(a, b, angle) tmp = ((a * sin((pi / (180.0 / angle)))) ^ 2.0) + (b ^ 2.0); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(Pi / N[(180.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{\pi}{\frac{180}{angle}}\right)\right)}^{2} + {b}^{2}
\end{array}
Initial program 79.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified79.8%
*-commutativeN/A
associate-*l/N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f6479.9%
Applied egg-rr79.9%
Taylor expanded in angle around 0
Simplified79.8%
Final simplification79.8%
(FPCore (a b angle)
:precision binary64
(if (<= a 6.1e-93)
(* (* b b) (pow (cos (* 0.005555555555555556 (* PI angle))) 2.0))
(+
(* (* b b) (+ 0.5 (* 0.5 (cos (* 2.0 (* PI (/ angle 180.0)))))))
(* a (* a (* (* angle angle) (* (* PI PI) 3.08641975308642e-5)))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 6.1e-93) {
tmp = (b * b) * pow(cos((0.005555555555555556 * (((double) M_PI) * angle))), 2.0);
} else {
tmp = ((b * b) * (0.5 + (0.5 * cos((2.0 * (((double) M_PI) * (angle / 180.0))))))) + (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 <= 6.1e-93) {
tmp = (b * b) * Math.pow(Math.cos((0.005555555555555556 * (Math.PI * angle))), 2.0);
} else {
tmp = ((b * b) * (0.5 + (0.5 * Math.cos((2.0 * (Math.PI * (angle / 180.0))))))) + (a * (a * ((angle * angle) * ((Math.PI * Math.PI) * 3.08641975308642e-5))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 6.1e-93: tmp = (b * b) * math.pow(math.cos((0.005555555555555556 * (math.pi * angle))), 2.0) else: tmp = ((b * b) * (0.5 + (0.5 * math.cos((2.0 * (math.pi * (angle / 180.0))))))) + (a * (a * ((angle * angle) * ((math.pi * math.pi) * 3.08641975308642e-5)))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 6.1e-93) tmp = Float64(Float64(b * b) * (cos(Float64(0.005555555555555556 * Float64(pi * angle))) ^ 2.0)); else tmp = Float64(Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * Float64(pi * Float64(angle / 180.0))))))) + Float64(a * Float64(a * Float64(Float64(angle * angle) * Float64(Float64(pi * pi) * 3.08641975308642e-5))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 6.1e-93) tmp = (b * b) * (cos((0.005555555555555556 * (pi * angle))) ^ 2.0); else tmp = ((b * b) * (0.5 + (0.5 * cos((2.0 * (pi * (angle / 180.0))))))) + (a * (a * ((angle * angle) * ((pi * pi) * 3.08641975308642e-5)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 6.1e-93], N[(N[(b * b), $MachinePrecision] * N[Power[N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(a * N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.1 \cdot 10^{-93}:\\
\;\;\;\;\left(b \cdot b\right) \cdot {\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)\right) + a \cdot \left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\\
\end{array}
\end{array}
if a < 6.09999999999999971e-93Initial program 80.1%
Taylor expanded in a around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*r*N/A
cos-lowering-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6464.1%
Simplified64.1%
if 6.09999999999999971e-93 < a Initial program 79.4%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified79.4%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
add-cube-cbrtN/A
sqrt-prodN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr79.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6475.4%
Simplified75.4%
Applied egg-rr71.1%
Final simplification66.4%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (/ (* PI angle) 180.0))) 2.0) (* b b)))
double code(double a, double b, double angle) {
return pow((a * sin(((((double) M_PI) * angle) / 180.0))), 2.0) + (b * b);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin(((Math.PI * angle) / 180.0))), 2.0) + (b * b);
}
def code(a, b, angle): return math.pow((a * math.sin(((math.pi * angle) / 180.0))), 2.0) + (b * b)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(Float64(pi * angle) / 180.0))) ^ 2.0) + Float64(b * b)) end
function tmp = code(a, b, angle) tmp = ((a * sin(((pi * angle) / 180.0))) ^ 2.0) + (b * b); end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\right)}^{2} + b \cdot b
\end{array}
Initial program 79.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified79.8%
clear-numN/A
associate-/r*N/A
clear-numN/A
expm1-log1p-uN/A
expm1-undefineN/A
div-subN/A
clear-numN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
log1p-undefineN/A
rem-exp-logN/A
+-commutativeN/A
+-lowering-+.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6479.8%
Applied egg-rr79.8%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6479.7%
Simplified79.7%
Final simplification79.7%
(FPCore (a b angle) :precision binary64 (+ (pow (* a (sin (* PI (/ angle 180.0)))) 2.0) (* b b)))
double code(double a, double b, double angle) {
return pow((a * sin((((double) M_PI) * (angle / 180.0)))), 2.0) + (b * b);
}
public static double code(double a, double b, double angle) {
return Math.pow((a * Math.sin((Math.PI * (angle / 180.0)))), 2.0) + (b * b);
}
def code(a, b, angle): return math.pow((a * math.sin((math.pi * (angle / 180.0)))), 2.0) + (b * b)
function code(a, b, angle) return Float64((Float64(a * sin(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + Float64(b * b)) end
function tmp = code(a, b, angle) tmp = ((a * sin((pi * (angle / 180.0)))) ^ 2.0) + (b * b); 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[(b * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(a \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + b \cdot b
\end{array}
Initial program 79.9%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6473.5%
Simplified73.5%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6479.7%
Simplified79.7%
Final simplification79.7%
(FPCore (a b angle)
:precision binary64
(if (<= a 1.35e-95)
(* b b)
(+
(* (* b b) (+ 0.5 (* 0.5 (cos (* 2.0 (* PI (/ angle 180.0)))))))
(* a (* a (* (* angle angle) (* (* PI PI) 3.08641975308642e-5)))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 1.35e-95) {
tmp = b * b;
} else {
tmp = ((b * b) * (0.5 + (0.5 * cos((2.0 * (((double) M_PI) * (angle / 180.0))))))) + (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 <= 1.35e-95) {
tmp = b * b;
} else {
tmp = ((b * b) * (0.5 + (0.5 * Math.cos((2.0 * (Math.PI * (angle / 180.0))))))) + (a * (a * ((angle * angle) * ((Math.PI * Math.PI) * 3.08641975308642e-5))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 1.35e-95: tmp = b * b else: tmp = ((b * b) * (0.5 + (0.5 * math.cos((2.0 * (math.pi * (angle / 180.0))))))) + (a * (a * ((angle * angle) * ((math.pi * math.pi) * 3.08641975308642e-5)))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 1.35e-95) tmp = Float64(b * b); else tmp = Float64(Float64(Float64(b * b) * Float64(0.5 + Float64(0.5 * cos(Float64(2.0 * Float64(pi * Float64(angle / 180.0))))))) + Float64(a * Float64(a * Float64(Float64(angle * angle) * Float64(Float64(pi * pi) * 3.08641975308642e-5))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 1.35e-95) tmp = b * b; else tmp = ((b * b) * (0.5 + (0.5 * cos((2.0 * (pi * (angle / 180.0))))))) + (a * (a * ((angle * angle) * ((pi * pi) * 3.08641975308642e-5)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 1.35e-95], N[(b * b), $MachinePrecision], N[(N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(0.5 * N[Cos[N[(2.0 * N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(a * N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.35 \cdot 10^{-95}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)\right) + a \cdot \left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\\
\end{array}
\end{array}
if a < 1.35e-95Initial program 80.1%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6464.0%
Simplified64.0%
if 1.35e-95 < a Initial program 79.4%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified79.4%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
add-cube-cbrtN/A
sqrt-prodN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr79.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6475.4%
Simplified75.4%
Applied egg-rr71.1%
(FPCore (a b angle)
:precision binary64
(if (<= a 1.16e-93)
(* b b)
(+
(* (* (* PI PI) 3.08641975308642e-5) (* a (* a (* angle angle))))
(pow
(* b (+ 1.0 (* (* angle angle) (* (* PI PI) -1.54320987654321e-5))))
2.0))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 1.16e-93) {
tmp = b * b;
} else {
tmp = (((((double) M_PI) * ((double) M_PI)) * 3.08641975308642e-5) * (a * (a * (angle * angle)))) + pow((b * (1.0 + ((angle * angle) * ((((double) M_PI) * ((double) M_PI)) * -1.54320987654321e-5)))), 2.0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 1.16e-93) {
tmp = b * b;
} else {
tmp = (((Math.PI * Math.PI) * 3.08641975308642e-5) * (a * (a * (angle * angle)))) + Math.pow((b * (1.0 + ((angle * angle) * ((Math.PI * Math.PI) * -1.54320987654321e-5)))), 2.0);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 1.16e-93: tmp = b * b else: tmp = (((math.pi * math.pi) * 3.08641975308642e-5) * (a * (a * (angle * angle)))) + math.pow((b * (1.0 + ((angle * angle) * ((math.pi * math.pi) * -1.54320987654321e-5)))), 2.0) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 1.16e-93) tmp = Float64(b * b); else tmp = Float64(Float64(Float64(Float64(pi * pi) * 3.08641975308642e-5) * Float64(a * Float64(a * Float64(angle * angle)))) + (Float64(b * Float64(1.0 + Float64(Float64(angle * angle) * Float64(Float64(pi * pi) * -1.54320987654321e-5)))) ^ 2.0)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 1.16e-93) tmp = b * b; else tmp = (((pi * pi) * 3.08641975308642e-5) * (a * (a * (angle * angle)))) + ((b * (1.0 + ((angle * angle) * ((pi * pi) * -1.54320987654321e-5)))) ^ 2.0); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 1.16e-93], N[(b * b), $MachinePrecision], N[(N[(N[(N[(Pi * Pi), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision] * N[(a * N[(a * N[(angle * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[N[(b * N[(1.0 + N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * -1.54320987654321e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.16 \cdot 10^{-93}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot \pi\right) \cdot 3.08641975308642 \cdot 10^{-5}\right) \cdot \left(a \cdot \left(a \cdot \left(angle \cdot angle\right)\right)\right) + {\left(b \cdot \left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5}\right)\right)\right)}^{2}\\
\end{array}
\end{array}
if a < 1.15999999999999998e-93Initial program 80.1%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6464.0%
Simplified64.0%
if 1.15999999999999998e-93 < a Initial program 79.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6477.2%
Simplified77.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f6471.0%
Simplified71.0%
Final simplification66.3%
(FPCore (a b angle)
:precision binary64
(if (<= b 7.5e+90)
(+
(* b b)
(*
angle
(*
angle
(*
(* PI PI)
(+ (* (* b b) -3.08641975308642e-5) (* 3.08641975308642e-5 (* a a)))))))
(* b b)))
double code(double a, double b, double angle) {
double tmp;
if (b <= 7.5e+90) {
tmp = (b * b) + (angle * (angle * ((((double) M_PI) * ((double) M_PI)) * (((b * b) * -3.08641975308642e-5) + (3.08641975308642e-5 * (a * a))))));
} else {
tmp = b * b;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 7.5e+90) {
tmp = (b * b) + (angle * (angle * ((Math.PI * Math.PI) * (((b * b) * -3.08641975308642e-5) + (3.08641975308642e-5 * (a * a))))));
} else {
tmp = b * b;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 7.5e+90: tmp = (b * b) + (angle * (angle * ((math.pi * math.pi) * (((b * b) * -3.08641975308642e-5) + (3.08641975308642e-5 * (a * a)))))) else: tmp = b * b return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 7.5e+90) tmp = Float64(Float64(b * b) + Float64(angle * Float64(angle * Float64(Float64(pi * pi) * Float64(Float64(Float64(b * b) * -3.08641975308642e-5) + Float64(3.08641975308642e-5 * Float64(a * a))))))); else tmp = Float64(b * b); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 7.5e+90) tmp = (b * b) + (angle * (angle * ((pi * pi) * (((b * b) * -3.08641975308642e-5) + (3.08641975308642e-5 * (a * a)))))); else tmp = b * b; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 7.5e+90], N[(N[(b * b), $MachinePrecision] + N[(angle * N[(angle * N[(N[(Pi * Pi), $MachinePrecision] * N[(N[(N[(b * b), $MachinePrecision] * -3.08641975308642e-5), $MachinePrecision] + N[(3.08641975308642e-5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 7.5 \cdot 10^{+90}:\\
\;\;\;\;b \cdot b + angle \cdot \left(angle \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(\left(b \cdot b\right) \cdot -3.08641975308642 \cdot 10^{-5} + 3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot b\\
\end{array}
\end{array}
if b < 7.50000000000000014e90Initial program 77.1%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified77.1%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
add-cube-cbrtN/A
sqrt-prodN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr77.1%
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
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
+-lowering-+.f64N/A
Simplified50.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr52.6%
if 7.50000000000000014e90 < b Initial program 95.6%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6493.5%
Simplified93.5%
Final simplification58.6%
(FPCore (a b angle)
:precision binary64
(if (<= a 1.55e-96)
(* b b)
(if (<= a 5.4e+179)
(+
(* b b)
(* (* angle angle) (* (* PI PI) (* 3.08641975308642e-5 (* a a)))))
(* (* a angle) (* (* PI (* PI 3.08641975308642e-5)) (* a angle))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 1.55e-96) {
tmp = b * b;
} else if (a <= 5.4e+179) {
tmp = (b * b) + ((angle * angle) * ((((double) M_PI) * ((double) M_PI)) * (3.08641975308642e-5 * (a * a))));
} else {
tmp = (a * angle) * ((((double) M_PI) * (((double) M_PI) * 3.08641975308642e-5)) * (a * angle));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 1.55e-96) {
tmp = b * b;
} else if (a <= 5.4e+179) {
tmp = (b * b) + ((angle * angle) * ((Math.PI * Math.PI) * (3.08641975308642e-5 * (a * a))));
} else {
tmp = (a * angle) * ((Math.PI * (Math.PI * 3.08641975308642e-5)) * (a * angle));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 1.55e-96: tmp = b * b elif a <= 5.4e+179: tmp = (b * b) + ((angle * angle) * ((math.pi * math.pi) * (3.08641975308642e-5 * (a * a)))) else: tmp = (a * angle) * ((math.pi * (math.pi * 3.08641975308642e-5)) * (a * angle)) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 1.55e-96) tmp = Float64(b * b); elseif (a <= 5.4e+179) tmp = Float64(Float64(b * b) + Float64(Float64(angle * angle) * Float64(Float64(pi * pi) * Float64(3.08641975308642e-5 * Float64(a * a))))); else tmp = Float64(Float64(a * angle) * Float64(Float64(pi * Float64(pi * 3.08641975308642e-5)) * Float64(a * angle))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 1.55e-96) tmp = b * b; elseif (a <= 5.4e+179) tmp = (b * b) + ((angle * angle) * ((pi * pi) * (3.08641975308642e-5 * (a * a)))); else tmp = (a * angle) * ((pi * (pi * 3.08641975308642e-5)) * (a * angle)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 1.55e-96], N[(b * b), $MachinePrecision], If[LessEqual[a, 5.4e+179], N[(N[(b * b), $MachinePrecision] + N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * N[(3.08641975308642e-5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * angle), $MachinePrecision] * N[(N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision] * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.55 \cdot 10^{-96}:\\
\;\;\;\;b \cdot b\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{+179}:\\
\;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot angle\right) \cdot \left(\left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right) \cdot \left(a \cdot angle\right)\right)\\
\end{array}
\end{array}
if a < 1.55e-96Initial program 80.1%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6464.0%
Simplified64.0%
if 1.55e-96 < a < 5.39999999999999964e179Initial program 70.5%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified70.5%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
add-cube-cbrtN/A
sqrt-prodN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr70.4%
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
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
+-lowering-+.f64N/A
Simplified35.9%
Taylor expanded in b around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.5%
Simplified59.5%
if 5.39999999999999964e179 < a Initial program 96.4%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified96.4%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
add-cube-cbrtN/A
sqrt-prodN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr96.4%
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
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
+-lowering-+.f64N/A
Simplified51.9%
Taylor expanded in b around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6476.1%
Simplified76.1%
*-commutativeN/A
associate-*r*N/A
pow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
pow2N/A
unswap-sqrN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr86.5%
Final simplification65.5%
(FPCore (a b angle) :precision binary64 (if (<= a 2.06e+127) (* b b) (* (* a angle) (* (* PI (* PI 3.08641975308642e-5)) (* a angle)))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 2.06e+127) {
tmp = b * b;
} else {
tmp = (a * angle) * ((((double) M_PI) * (((double) M_PI) * 3.08641975308642e-5)) * (a * angle));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 2.06e+127) {
tmp = b * b;
} else {
tmp = (a * angle) * ((Math.PI * (Math.PI * 3.08641975308642e-5)) * (a * angle));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 2.06e+127: tmp = b * b else: tmp = (a * angle) * ((math.pi * (math.pi * 3.08641975308642e-5)) * (a * angle)) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 2.06e+127) tmp = Float64(b * b); else tmp = Float64(Float64(a * angle) * Float64(Float64(pi * Float64(pi * 3.08641975308642e-5)) * Float64(a * angle))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 2.06e+127) tmp = b * b; else tmp = (a * angle) * ((pi * (pi * 3.08641975308642e-5)) * (a * angle)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 2.06e+127], N[(b * b), $MachinePrecision], N[(N[(a * angle), $MachinePrecision] * N[(N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision] * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.06 \cdot 10^{+127}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot angle\right) \cdot \left(\left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right) \cdot \left(a \cdot angle\right)\right)\\
\end{array}
\end{array}
if a < 2.06000000000000001e127Initial program 77.6%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6461.4%
Simplified61.4%
if 2.06000000000000001e127 < a Initial program 92.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified92.9%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
add-cube-cbrtN/A
sqrt-prodN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr92.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
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
+-lowering-+.f64N/A
Simplified48.1%
Taylor expanded in b around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.2%
Simplified69.2%
*-commutativeN/A
associate-*r*N/A
pow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
pow2N/A
unswap-sqrN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr77.2%
Final simplification63.8%
(FPCore (a b angle) :precision binary64 (if (<= a 8.2e+126) (* b b) (* angle (* (* PI angle) (* PI (* 3.08641975308642e-5 (* a a)))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 8.2e+126) {
tmp = b * b;
} else {
tmp = angle * ((((double) M_PI) * angle) * (((double) M_PI) * (3.08641975308642e-5 * (a * a))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 8.2e+126) {
tmp = b * b;
} else {
tmp = angle * ((Math.PI * angle) * (Math.PI * (3.08641975308642e-5 * (a * a))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 8.2e+126: tmp = b * b else: tmp = angle * ((math.pi * angle) * (math.pi * (3.08641975308642e-5 * (a * a)))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 8.2e+126) tmp = Float64(b * b); else tmp = Float64(angle * Float64(Float64(pi * angle) * Float64(pi * Float64(3.08641975308642e-5 * Float64(a * a))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 8.2e+126) tmp = b * b; else tmp = angle * ((pi * angle) * (pi * (3.08641975308642e-5 * (a * a)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 8.2e+126], N[(b * b), $MachinePrecision], N[(angle * N[(N[(Pi * angle), $MachinePrecision] * N[(Pi * N[(3.08641975308642e-5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.2 \cdot 10^{+126}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot angle\right) \cdot \left(\pi \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 8.2000000000000001e126Initial program 77.6%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6461.4%
Simplified61.4%
if 8.2000000000000001e126 < a Initial program 92.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified92.9%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
add-cube-cbrtN/A
sqrt-prodN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr92.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
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
+-lowering-+.f64N/A
Simplified48.1%
Taylor expanded in b around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.2%
Simplified69.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow2N/A
*-lowering-*.f64N/A
pow2N/A
*-lowering-*.f6477.3%
Applied egg-rr77.3%
Final simplification63.8%
(FPCore (a b angle) :precision binary64 (if (<= a 9e+123) (* b b) (* (* a a) (* (* angle angle) (* PI (* PI 3.08641975308642e-5))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 9e+123) {
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 <= 9e+123) {
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 <= 9e+123: 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 <= 9e+123) tmp = Float64(b * b); else tmp = Float64(Float64(a * 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 <= 9e+123) 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, 9e+123], N[(b * b), $MachinePrecision], N[(N[(a * a), $MachinePrecision] * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9 \cdot 10^{+123}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot a\right) \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\\
\end{array}
\end{array}
if a < 8.99999999999999965e123Initial program 77.6%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6461.4%
Simplified61.4%
if 8.99999999999999965e123 < a Initial program 92.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified92.9%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
add-cube-cbrtN/A
sqrt-prodN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr92.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
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
+-lowering-+.f64N/A
Simplified48.1%
Taylor expanded in b around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.2%
Simplified69.2%
*-commutativeN/A
associate-*r*N/A
pow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr69.2%
Final simplification62.6%
(FPCore (a b angle) :precision binary64 (if (<= a 5.5e+124) (* b b) (* (* angle angle) (* PI (* PI (* 3.08641975308642e-5 (* a a)))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 5.5e+124) {
tmp = b * b;
} else {
tmp = (angle * angle) * (((double) M_PI) * (((double) M_PI) * (3.08641975308642e-5 * (a * a))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 5.5e+124) {
tmp = b * b;
} else {
tmp = (angle * angle) * (Math.PI * (Math.PI * (3.08641975308642e-5 * (a * a))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 5.5e+124: tmp = b * b else: tmp = (angle * angle) * (math.pi * (math.pi * (3.08641975308642e-5 * (a * a)))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 5.5e+124) tmp = Float64(b * b); else tmp = Float64(Float64(angle * angle) * Float64(pi * Float64(pi * Float64(3.08641975308642e-5 * Float64(a * a))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 5.5e+124) tmp = b * b; else tmp = (angle * angle) * (pi * (pi * (3.08641975308642e-5 * (a * a)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 5.5e+124], N[(b * b), $MachinePrecision], N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * N[(3.08641975308642e-5 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.5 \cdot 10^{+124}:\\
\;\;\;\;b \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 5.49999999999999977e124Initial program 77.6%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6461.4%
Simplified61.4%
if 5.49999999999999977e124 < a Initial program 92.9%
+-lowering-+.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
pow-lowering-pow.f64N/A
Simplified92.9%
associate-*l/N/A
add-sqr-sqrtN/A
associate-*r*N/A
add-cube-cbrtN/A
sqrt-prodN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr92.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
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
+-lowering-+.f64N/A
Simplified48.1%
Taylor expanded in b around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.2%
Simplified69.2%
(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 79.9%
Taylor expanded in angle around 0
unpow2N/A
*-lowering-*.f6458.5%
Simplified58.5%
herbie shell --seed 2024150
(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)))