
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (cbrt (pow PI 1.5))))
(if (<= (pow b 2.0) 0.0)
(*
(* (* 2.0 (sin (/ PI (/ 180.0 angle)))) (+ b a))
(* (cos (/ (* t_0 t_0) (/ 180.0 angle))) (- b a)))
(* (- b a) (* (+ b a) (sin (* 0.011111111111111112 (* PI angle))))))))
double code(double a, double b, double angle) {
double t_0 = cbrt(pow(((double) M_PI), 1.5));
double tmp;
if (pow(b, 2.0) <= 0.0) {
tmp = ((2.0 * sin((((double) M_PI) / (180.0 / angle)))) * (b + a)) * (cos(((t_0 * t_0) / (180.0 / angle))) * (b - a));
} else {
tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.cbrt(Math.pow(Math.PI, 1.5));
double tmp;
if (Math.pow(b, 2.0) <= 0.0) {
tmp = ((2.0 * Math.sin((Math.PI / (180.0 / angle)))) * (b + a)) * (Math.cos(((t_0 * t_0) / (180.0 / angle))) * (b - a));
} else {
tmp = (b - a) * ((b + a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
}
return tmp;
}
function code(a, b, angle) t_0 = cbrt((pi ^ 1.5)) tmp = 0.0 if ((b ^ 2.0) <= 0.0) tmp = Float64(Float64(Float64(2.0 * sin(Float64(pi / Float64(180.0 / angle)))) * Float64(b + a)) * Float64(cos(Float64(Float64(t_0 * t_0) / Float64(180.0 / angle))) * Float64(b - a))); else tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(0.011111111111111112 * Float64(pi * angle))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[Power[N[Power[Pi, 1.5], $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 0.0], N[(N[(N[(2.0 * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[N[(N[(t$95$0 * t$95$0), $MachinePrecision] / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{{\pi}^{1.5}}\\
\mathbf{if}\;{b}^{2} \leq 0:\\
\;\;\;\;\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{t\_0 \cdot t\_0}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 0.0Initial program 71.7%
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
associate-*r*N/A
difference-of-squaresN/A
associate-*l*N/A
Applied egg-rr75.6%
add-cbrt-cubeN/A
add-sqr-sqrtN/A
unswap-sqrN/A
cbrt-prodN/A
*-lowering-*.f64N/A
cbrt-lowering-cbrt.f64N/A
pow1N/A
pow1/2N/A
pow-prod-upN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
PI-lowering-PI.f64N/A
metadata-evalN/A
cbrt-lowering-cbrt.f64N/A
pow1N/A
pow1/2N/A
pow-prod-upN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
Applied egg-rr84.6%
if 0.0 < (pow.f64 b #s(literal 2 binary64)) Initial program 55.4%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr72.1%
Final simplification75.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))))
(if (<=
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
5e+131)
(* (- b a) (* (+ b a) (sin (* 0.011111111111111112 (* PI angle)))))
(*
(* (* 2.0 (sin (/ PI (/ 180.0 angle)))) (+ b a))
(* (- b a) (cos (- (/ (+ PI 1.0) (/ 180.0 angle)) (/ angle 180.0))))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= 5e+131) {
tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
} else {
tmp = ((2.0 * sin((((double) M_PI) / (180.0 / angle)))) * (b + a)) * ((b - a) * cos((((((double) M_PI) + 1.0) / (180.0 / angle)) - (angle / 180.0))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double tmp;
if ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0)) <= 5e+131) {
tmp = (b - a) * ((b + a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
} else {
tmp = ((2.0 * Math.sin((Math.PI / (180.0 / angle)))) * (b + a)) * ((b - a) * Math.cos((((Math.PI + 1.0) / (180.0 / angle)) - (angle / 180.0))));
}
return tmp;
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) tmp = 0 if (((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)) <= 5e+131: tmp = (b - a) * ((b + a) * math.sin((0.011111111111111112 * (math.pi * angle)))) else: tmp = ((2.0 * math.sin((math.pi / (180.0 / angle)))) * (b + a)) * ((b - a) * math.cos((((math.pi + 1.0) / (180.0 / angle)) - (angle / 180.0)))) return tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 5e+131) tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(0.011111111111111112 * Float64(pi * angle))))); else tmp = Float64(Float64(Float64(2.0 * sin(Float64(pi / Float64(180.0 / angle)))) * Float64(b + a)) * Float64(Float64(b - a) * cos(Float64(Float64(Float64(pi + 1.0) / Float64(180.0 / angle)) - Float64(angle / 180.0))))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = 0.0; if ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 5e+131) tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (pi * angle)))); else tmp = ((2.0 * sin((pi / (180.0 / angle)))) * (b + a)) * ((b - a) * cos((((pi + 1.0) / (180.0 / angle)) - (angle / 180.0)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 5e+131], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[N[(N[(N[(Pi + 1.0), $MachinePrecision] / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision] - N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 5 \cdot 10^{+131}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi + 1}{\frac{180}{angle}} - \frac{angle}{180}\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 4.99999999999999995e131Initial program 61.5%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr71.1%
if 4.99999999999999995e131 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 53.9%
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
associate-*r*N/A
difference-of-squaresN/A
associate-*l*N/A
Applied egg-rr78.2%
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
+-lowering-+.f64N/A
PI-lowering-PI.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6478.6%
Applied egg-rr78.6%
Final simplification73.2%
(FPCore (a b angle)
:precision binary64
(if (<= b 6.1e-108)
(*
(* (+ b a) (* 2.0 (sin (* PI (/ angle 180.0)))))
(* (- b a) (cos (/ PI (/ 180.0 angle)))))
(* (- b a) (* (+ b a) (sin (* 0.011111111111111112 (* PI angle)))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 6.1e-108) {
tmp = ((b + a) * (2.0 * sin((((double) M_PI) * (angle / 180.0))))) * ((b - a) * cos((((double) M_PI) / (180.0 / angle))));
} else {
tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 6.1e-108) {
tmp = ((b + a) * (2.0 * Math.sin((Math.PI * (angle / 180.0))))) * ((b - a) * Math.cos((Math.PI / (180.0 / angle))));
} else {
tmp = (b - a) * ((b + a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 6.1e-108: tmp = ((b + a) * (2.0 * math.sin((math.pi * (angle / 180.0))))) * ((b - a) * math.cos((math.pi / (180.0 / angle)))) else: tmp = (b - a) * ((b + a) * math.sin((0.011111111111111112 * (math.pi * angle)))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 6.1e-108) tmp = Float64(Float64(Float64(b + a) * Float64(2.0 * sin(Float64(pi * Float64(angle / 180.0))))) * Float64(Float64(b - a) * cos(Float64(pi / Float64(180.0 / angle))))); else tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(0.011111111111111112 * Float64(pi * angle))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 6.1e-108) tmp = ((b + a) * (2.0 * sin((pi * (angle / 180.0))))) * ((b - a) * cos((pi / (180.0 / angle)))); else tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (pi * angle)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 6.1e-108], N[(N[(N[(b + a), $MachinePrecision] * N[(2.0 * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 6.1 \cdot 10^{-108}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if b < 6.10000000000000007e-108Initial program 59.9%
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
associate-*r*N/A
difference-of-squaresN/A
associate-*l*N/A
Applied egg-rr70.6%
clear-numN/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
PI-lowering-PI.f6471.7%
Applied egg-rr71.7%
if 6.10000000000000007e-108 < b Initial program 58.4%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr75.2%
Final simplification72.9%
(FPCore (a b angle) :precision binary64 (if (<= b 2.7e-134) (* (* (* 2.0 (sin (/ PI (/ 180.0 angle)))) (+ b a)) (- b a)) (* (- b a) (* (+ b a) (sin (* 0.011111111111111112 (* PI angle)))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 2.7e-134) {
tmp = ((2.0 * sin((((double) M_PI) / (180.0 / angle)))) * (b + a)) * (b - a);
} else {
tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2.7e-134) {
tmp = ((2.0 * Math.sin((Math.PI / (180.0 / angle)))) * (b + a)) * (b - a);
} else {
tmp = (b - a) * ((b + a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 2.7e-134: tmp = ((2.0 * math.sin((math.pi / (180.0 / angle)))) * (b + a)) * (b - a) else: tmp = (b - a) * ((b + a) * math.sin((0.011111111111111112 * (math.pi * angle)))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 2.7e-134) tmp = Float64(Float64(Float64(2.0 * sin(Float64(pi / Float64(180.0 / angle)))) * Float64(b + a)) * Float64(b - a)); else tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(0.011111111111111112 * Float64(pi * angle))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2.7e-134) tmp = ((2.0 * sin((pi / (180.0 / angle)))) * (b + a)) * (b - a); else tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (pi * angle)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 2.7e-134], N[(N[(N[(2.0 * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.7 \cdot 10^{-134}:\\
\;\;\;\;\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.6999999999999998e-134Initial program 60.6%
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
associate-*r*N/A
difference-of-squaresN/A
associate-*l*N/A
Applied egg-rr71.7%
Taylor expanded in angle around 0
Simplified71.8%
if 2.6999999999999998e-134 < b Initial program 57.2%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr73.0%
Final simplification72.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* PI angle))))
(if (<= a 1.85e-94)
(* b (* (+ b a) (sin t_0)))
(* (- b a) (* (+ b a) t_0)))))
double code(double a, double b, double angle) {
double t_0 = 0.011111111111111112 * (((double) M_PI) * angle);
double tmp;
if (a <= 1.85e-94) {
tmp = b * ((b + a) * sin(t_0));
} else {
tmp = (b - a) * ((b + a) * t_0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 0.011111111111111112 * (Math.PI * angle);
double tmp;
if (a <= 1.85e-94) {
tmp = b * ((b + a) * Math.sin(t_0));
} else {
tmp = (b - a) * ((b + a) * t_0);
}
return tmp;
}
def code(a, b, angle): t_0 = 0.011111111111111112 * (math.pi * angle) tmp = 0 if a <= 1.85e-94: tmp = b * ((b + a) * math.sin(t_0)) else: tmp = (b - a) * ((b + a) * t_0) return tmp
function code(a, b, angle) t_0 = Float64(0.011111111111111112 * Float64(pi * angle)) tmp = 0.0 if (a <= 1.85e-94) tmp = Float64(b * Float64(Float64(b + a) * sin(t_0))); else tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * t_0)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = 0.011111111111111112 * (pi * angle); tmp = 0.0; if (a <= 1.85e-94) tmp = b * ((b + a) * sin(t_0)); else tmp = (b - a) * ((b + a) * t_0); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.85e-94], N[(b * N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(\pi \cdot angle\right)\\
\mathbf{if}\;a \leq 1.85 \cdot 10^{-94}:\\
\;\;\;\;b \cdot \left(\left(b + a\right) \cdot \sin t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot t\_0\right)\\
\end{array}
\end{array}
if a < 1.8499999999999999e-94Initial program 63.6%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr76.1%
Taylor expanded in b around inf
Simplified58.5%
if 1.8499999999999999e-94 < a Initial program 50.7%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr66.9%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6467.3%
Simplified67.3%
Final simplification61.4%
(FPCore (a b angle) :precision binary64 (* (- b a) (* (+ b a) (sin (* 0.011111111111111112 (* PI angle))))))
double code(double a, double b, double angle) {
return (b - a) * ((b + a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
}
public static double code(double a, double b, double angle) {
return (b - a) * ((b + a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
}
def code(a, b, angle): return (b - a) * ((b + a) * math.sin((0.011111111111111112 * (math.pi * angle))))
function code(a, b, angle) return Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(0.011111111111111112 * Float64(pi * angle))))) end
function tmp = code(a, b, angle) tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (pi * angle)))); end
code[a_, b_, angle_] := N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)
\end{array}
Initial program 59.4%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr73.1%
Final simplification73.1%
(FPCore (a b angle) :precision binary64 (* (- b a) (* (+ b a) (sin (* angle (* PI 0.011111111111111112))))))
double code(double a, double b, double angle) {
return (b - a) * ((b + a) * sin((angle * (((double) M_PI) * 0.011111111111111112))));
}
public static double code(double a, double b, double angle) {
return (b - a) * ((b + a) * Math.sin((angle * (Math.PI * 0.011111111111111112))));
}
def code(a, b, angle): return (b - a) * ((b + a) * math.sin((angle * (math.pi * 0.011111111111111112))))
function code(a, b, angle) return Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(angle * Float64(pi * 0.011111111111111112))))) end
function tmp = code(a, b, angle) tmp = (b - a) * ((b + a) * sin((angle * (pi * 0.011111111111111112)))); end
code[a_, b_, angle_] := N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)
\end{array}
Initial program 59.4%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr73.1%
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6472.3%
Applied egg-rr72.3%
Final simplification72.3%
(FPCore (a b angle)
:precision binary64
(if (<= b 1.85e-84)
(*
(/ 1.0 (/ 1.0 (- b a)))
(* 0.011111111111111112 (* angle (* PI (+ b a)))))
(*
(- b a)
(*
(+ b a)
(*
angle
(+
(* (* -2.2862368541380886e-7 (* angle angle)) (* PI (* PI PI)))
(* PI 0.011111111111111112)))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.85e-84) {
tmp = (1.0 / (1.0 / (b - a))) * (0.011111111111111112 * (angle * (((double) M_PI) * (b + a))));
} else {
tmp = (b - a) * ((b + a) * (angle * (((-2.2862368541380886e-7 * (angle * angle)) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))) + (((double) M_PI) * 0.011111111111111112))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 1.85e-84) {
tmp = (1.0 / (1.0 / (b - a))) * (0.011111111111111112 * (angle * (Math.PI * (b + a))));
} else {
tmp = (b - a) * ((b + a) * (angle * (((-2.2862368541380886e-7 * (angle * angle)) * (Math.PI * (Math.PI * Math.PI))) + (Math.PI * 0.011111111111111112))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 1.85e-84: tmp = (1.0 / (1.0 / (b - a))) * (0.011111111111111112 * (angle * (math.pi * (b + a)))) else: tmp = (b - a) * ((b + a) * (angle * (((-2.2862368541380886e-7 * (angle * angle)) * (math.pi * (math.pi * math.pi))) + (math.pi * 0.011111111111111112)))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 1.85e-84) tmp = Float64(Float64(1.0 / Float64(1.0 / Float64(b - a))) * Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b + a))))); else tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(angle * Float64(Float64(Float64(-2.2862368541380886e-7 * Float64(angle * angle)) * Float64(pi * Float64(pi * pi))) + Float64(pi * 0.011111111111111112))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 1.85e-84) tmp = (1.0 / (1.0 / (b - a))) * (0.011111111111111112 * (angle * (pi * (b + a)))); else tmp = (b - a) * ((b + a) * (angle * (((-2.2862368541380886e-7 * (angle * angle)) * (pi * (pi * pi))) + (pi * 0.011111111111111112)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 1.85e-84], N[(N[(1.0 / N[(1.0 / N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(angle * N[(N[(N[(-2.2862368541380886e-7 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.85 \cdot 10^{-84}:\\
\;\;\;\;\frac{1}{\frac{1}{b - a}} \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \left(\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right) + \pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.85e-84Initial program 60.2%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr72.1%
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6472.1%
Applied egg-rr72.1%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
+-lowering-+.f6467.1%
Simplified67.1%
if 1.85e-84 < b Initial program 57.6%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr75.1%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6473.3%
Simplified73.3%
Final simplification69.1%
(FPCore (a b angle)
:precision binary64
(if (<= b 2e+264)
(* (- b a) (* (+ b a) (* 0.011111111111111112 (* PI angle))))
(*
(* 2.0 (* b b))
(*
angle
(+
(* (* PI (* PI PI)) (* (* angle angle) -2.8577960676726107e-8))
(* PI 0.005555555555555556))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+264) {
tmp = (b - a) * ((b + a) * (0.011111111111111112 * (((double) M_PI) * angle)));
} else {
tmp = (2.0 * (b * b)) * (angle * (((((double) M_PI) * (((double) M_PI) * ((double) M_PI))) * ((angle * angle) * -2.8577960676726107e-8)) + (((double) M_PI) * 0.005555555555555556)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+264) {
tmp = (b - a) * ((b + a) * (0.011111111111111112 * (Math.PI * angle)));
} else {
tmp = (2.0 * (b * b)) * (angle * (((Math.PI * (Math.PI * Math.PI)) * ((angle * angle) * -2.8577960676726107e-8)) + (Math.PI * 0.005555555555555556)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 2e+264: tmp = (b - a) * ((b + a) * (0.011111111111111112 * (math.pi * angle))) else: tmp = (2.0 * (b * b)) * (angle * (((math.pi * (math.pi * math.pi)) * ((angle * angle) * -2.8577960676726107e-8)) + (math.pi * 0.005555555555555556))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 2e+264) tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(pi * angle)))); else tmp = Float64(Float64(2.0 * Float64(b * b)) * Float64(angle * Float64(Float64(Float64(pi * Float64(pi * pi)) * Float64(Float64(angle * angle) * -2.8577960676726107e-8)) + Float64(pi * 0.005555555555555556)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2e+264) tmp = (b - a) * ((b + a) * (0.011111111111111112 * (pi * angle))); else tmp = (2.0 * (b * b)) * (angle * (((pi * (pi * pi)) * ((angle * angle) * -2.8577960676726107e-8)) + (pi * 0.005555555555555556))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 2e+264], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(b * b), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(N[(N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[(angle * angle), $MachinePrecision] * -2.8577960676726107e-8), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2 \cdot 10^{+264}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(b \cdot b\right)\right) \cdot \left(angle \cdot \left(\left(\pi \cdot \left(\pi \cdot \pi\right)\right) \cdot \left(\left(angle \cdot angle\right) \cdot -2.8577960676726107 \cdot 10^{-8}\right) + \pi \cdot 0.005555555555555556\right)\right)\\
\end{array}
\end{array}
if b < 2.00000000000000009e264Initial program 59.3%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr72.2%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6465.7%
Simplified65.7%
if 2.00000000000000009e264 < b Initial program 62.5%
Taylor expanded in b around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6475.0%
Simplified75.0%
Taylor expanded in angle around 0
Simplified62.5%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
PI-lowering-PI.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64100.0%
Simplified100.0%
Final simplification66.7%
(FPCore (a b angle) :precision binary64 (if (<= b 4.3e+117) (* (* angle 0.011111111111111112) (* PI (- (* b b) (* a a)))) (* b (* (* angle 0.011111111111111112) (* b PI)))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 4.3e+117) {
tmp = (angle * 0.011111111111111112) * (((double) M_PI) * ((b * b) - (a * a)));
} else {
tmp = b * ((angle * 0.011111111111111112) * (b * ((double) M_PI)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 4.3e+117) {
tmp = (angle * 0.011111111111111112) * (Math.PI * ((b * b) - (a * a)));
} else {
tmp = b * ((angle * 0.011111111111111112) * (b * Math.PI));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 4.3e+117: tmp = (angle * 0.011111111111111112) * (math.pi * ((b * b) - (a * a))) else: tmp = b * ((angle * 0.011111111111111112) * (b * math.pi)) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 4.3e+117) tmp = Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(Float64(b * b) - Float64(a * a)))); else tmp = Float64(b * Float64(Float64(angle * 0.011111111111111112) * Float64(b * pi))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 4.3e+117) tmp = (angle * 0.011111111111111112) * (pi * ((b * b) - (a * a))); else tmp = b * ((angle * 0.011111111111111112) * (b * pi)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 4.3e+117], N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 4.3 \cdot 10^{+117}:\\
\;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right)\right)\\
\end{array}
\end{array}
if b < 4.29999999999999998e117Initial program 60.9%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6458.2%
Simplified58.2%
if 4.29999999999999998e117 < b Initial program 51.7%
Taylor expanded in b around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.2%
Simplified54.2%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f6449.0%
Simplified49.0%
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6473.6%
Applied egg-rr73.6%
Final simplification60.7%
(FPCore (a b angle) :precision binary64 (if (<= b 8e+153) (* (* PI 0.011111111111111112) (* angle (- (* b b) (* a a)))) (* b (* (* angle 0.011111111111111112) (* b PI)))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 8e+153) {
tmp = (((double) M_PI) * 0.011111111111111112) * (angle * ((b * b) - (a * a)));
} else {
tmp = b * ((angle * 0.011111111111111112) * (b * ((double) M_PI)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 8e+153) {
tmp = (Math.PI * 0.011111111111111112) * (angle * ((b * b) - (a * a)));
} else {
tmp = b * ((angle * 0.011111111111111112) * (b * Math.PI));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 8e+153: tmp = (math.pi * 0.011111111111111112) * (angle * ((b * b) - (a * a))) else: tmp = b * ((angle * 0.011111111111111112) * (b * math.pi)) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 8e+153) tmp = Float64(Float64(pi * 0.011111111111111112) * Float64(angle * Float64(Float64(b * b) - Float64(a * a)))); else tmp = Float64(b * Float64(Float64(angle * 0.011111111111111112) * Float64(b * pi))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 8e+153) tmp = (pi * 0.011111111111111112) * (angle * ((b * b) - (a * a))); else tmp = b * ((angle * 0.011111111111111112) * (b * pi)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 8e+153], N[(N[(Pi * 0.011111111111111112), $MachinePrecision] * N[(angle * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 8 \cdot 10^{+153}:\\
\;\;\;\;\left(\pi \cdot 0.011111111111111112\right) \cdot \left(angle \cdot \left(b \cdot b - a \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right)\right)\\
\end{array}
\end{array}
if b < 8e153Initial program 61.5%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr70.8%
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6470.8%
Applied egg-rr70.8%
Taylor expanded in angle around 0
*-commutativeN/A
+-commutativeN/A
difference-of-squaresN/A
unpow2N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.4%
Simplified58.4%
if 8e153 < b Initial program 45.8%
Taylor expanded in b around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6452.3%
Simplified52.3%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f6443.0%
Simplified43.0%
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6473.3%
Applied egg-rr73.3%
Final simplification60.4%
(FPCore (a b angle) :precision binary64 (if (<= a 2.1e+92) (* b (* (* angle 0.011111111111111112) (* b PI))) (* (* a (* a (* PI angle))) -0.011111111111111112)))
double code(double a, double b, double angle) {
double tmp;
if (a <= 2.1e+92) {
tmp = b * ((angle * 0.011111111111111112) * (b * ((double) M_PI)));
} else {
tmp = (a * (a * (((double) M_PI) * angle))) * -0.011111111111111112;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 2.1e+92) {
tmp = b * ((angle * 0.011111111111111112) * (b * Math.PI));
} else {
tmp = (a * (a * (Math.PI * angle))) * -0.011111111111111112;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 2.1e+92: tmp = b * ((angle * 0.011111111111111112) * (b * math.pi)) else: tmp = (a * (a * (math.pi * angle))) * -0.011111111111111112 return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 2.1e+92) tmp = Float64(b * Float64(Float64(angle * 0.011111111111111112) * Float64(b * pi))); else tmp = Float64(Float64(a * Float64(a * Float64(pi * angle))) * -0.011111111111111112); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 2.1e+92) tmp = b * ((angle * 0.011111111111111112) * (b * pi)); else tmp = (a * (a * (pi * angle))) * -0.011111111111111112; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 2.1e+92], N[(b * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.1 \cdot 10^{+92}:\\
\;\;\;\;b \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right) \cdot -0.011111111111111112\\
\end{array}
\end{array}
if a < 2.09999999999999986e92Initial program 60.1%
Taylor expanded in b around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.0%
Simplified46.0%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f6442.2%
Simplified42.2%
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f6447.2%
Applied egg-rr47.2%
if 2.09999999999999986e92 < a Initial program 55.2%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.5%
Simplified57.5%
Taylor expanded in b around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6463.0%
Simplified63.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6473.0%
Applied egg-rr73.0%
Final simplification51.0%
(FPCore (a b angle) :precision binary64 (if (<= a 2.3e+92) (* 0.011111111111111112 (* (* b PI) (* b angle))) (* (* a (* a (* PI angle))) -0.011111111111111112)))
double code(double a, double b, double angle) {
double tmp;
if (a <= 2.3e+92) {
tmp = 0.011111111111111112 * ((b * ((double) M_PI)) * (b * angle));
} else {
tmp = (a * (a * (((double) M_PI) * angle))) * -0.011111111111111112;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 2.3e+92) {
tmp = 0.011111111111111112 * ((b * Math.PI) * (b * angle));
} else {
tmp = (a * (a * (Math.PI * angle))) * -0.011111111111111112;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 2.3e+92: tmp = 0.011111111111111112 * ((b * math.pi) * (b * angle)) else: tmp = (a * (a * (math.pi * angle))) * -0.011111111111111112 return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 2.3e+92) tmp = Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(b * angle))); else tmp = Float64(Float64(a * Float64(a * Float64(pi * angle))) * -0.011111111111111112); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 2.3e+92) tmp = 0.011111111111111112 * ((b * pi) * (b * angle)); else tmp = (a * (a * (pi * angle))) * -0.011111111111111112; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 2.3e+92], N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.3 \cdot 10^{+92}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right) \cdot -0.011111111111111112\\
\end{array}
\end{array}
if a < 2.29999999999999998e92Initial program 60.1%
Taylor expanded in b around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.0%
Simplified46.0%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f6442.2%
Simplified42.2%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f6447.2%
Applied egg-rr47.2%
if 2.29999999999999998e92 < a Initial program 55.2%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.5%
Simplified57.5%
Taylor expanded in b around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6463.0%
Simplified63.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6473.0%
Applied egg-rr73.0%
(FPCore (a b angle) :precision binary64 (if (<= a 6.8e+92) (* 0.011111111111111112 (* (* b PI) (* b angle))) (* (* a (* PI angle)) (* a -0.011111111111111112))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 6.8e+92) {
tmp = 0.011111111111111112 * ((b * ((double) M_PI)) * (b * angle));
} else {
tmp = (a * (((double) M_PI) * angle)) * (a * -0.011111111111111112);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 6.8e+92) {
tmp = 0.011111111111111112 * ((b * Math.PI) * (b * angle));
} else {
tmp = (a * (Math.PI * angle)) * (a * -0.011111111111111112);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 6.8e+92: tmp = 0.011111111111111112 * ((b * math.pi) * (b * angle)) else: tmp = (a * (math.pi * angle)) * (a * -0.011111111111111112) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 6.8e+92) tmp = Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(b * angle))); else tmp = Float64(Float64(a * Float64(pi * angle)) * Float64(a * -0.011111111111111112)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 6.8e+92) tmp = 0.011111111111111112 * ((b * pi) * (b * angle)); else tmp = (a * (pi * angle)) * (a * -0.011111111111111112); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 6.8e+92], N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision] * N[(a * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.8 \cdot 10^{+92}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(\pi \cdot angle\right)\right) \cdot \left(a \cdot -0.011111111111111112\right)\\
\end{array}
\end{array}
if a < 6.7999999999999996e92Initial program 60.1%
Taylor expanded in b around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.0%
Simplified46.0%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f6442.2%
Simplified42.2%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f6447.2%
Applied egg-rr47.2%
if 6.7999999999999996e92 < a Initial program 55.2%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.5%
Simplified57.5%
Taylor expanded in b around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6463.0%
Simplified63.0%
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6473.0%
Applied egg-rr73.0%
Final simplification50.9%
(FPCore (a b angle) :precision binary64 (if (<= a 4.6e+91) (* 0.011111111111111112 (* (* b PI) (* b angle))) (* (* PI angle) (* (* a a) -0.011111111111111112))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 4.6e+91) {
tmp = 0.011111111111111112 * ((b * ((double) M_PI)) * (b * angle));
} else {
tmp = (((double) M_PI) * angle) * ((a * a) * -0.011111111111111112);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 4.6e+91) {
tmp = 0.011111111111111112 * ((b * Math.PI) * (b * angle));
} else {
tmp = (Math.PI * angle) * ((a * a) * -0.011111111111111112);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 4.6e+91: tmp = 0.011111111111111112 * ((b * math.pi) * (b * angle)) else: tmp = (math.pi * angle) * ((a * a) * -0.011111111111111112) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 4.6e+91) tmp = Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(b * angle))); else tmp = Float64(Float64(pi * angle) * Float64(Float64(a * a) * -0.011111111111111112)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 4.6e+91) tmp = 0.011111111111111112 * ((b * pi) * (b * angle)); else tmp = (pi * angle) * ((a * a) * -0.011111111111111112); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 4.6e+91], N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.6 \cdot 10^{+91}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\
\end{array}
\end{array}
if a < 4.59999999999999982e91Initial program 60.1%
Taylor expanded in b around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.0%
Simplified46.0%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f6442.2%
Simplified42.2%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f6447.2%
Applied egg-rr47.2%
if 4.59999999999999982e91 < a Initial program 55.2%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6457.5%
Simplified57.5%
Taylor expanded in b around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6463.0%
Simplified63.0%
Final simplification49.5%
(FPCore (a b angle) :precision binary64 (* (- b a) (* (+ b a) (* 0.011111111111111112 (* PI angle)))))
double code(double a, double b, double angle) {
return (b - a) * ((b + a) * (0.011111111111111112 * (((double) M_PI) * angle)));
}
public static double code(double a, double b, double angle) {
return (b - a) * ((b + a) * (0.011111111111111112 * (Math.PI * angle)));
}
def code(a, b, angle): return (b - a) * ((b + a) * (0.011111111111111112 * (math.pi * angle)))
function code(a, b, angle) return Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(pi * angle)))) end
function tmp = code(a, b, angle) tmp = (b - a) * ((b + a) * (0.011111111111111112 * (pi * angle))); end
code[a_, b_, angle_] := N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)
\end{array}
Initial program 59.4%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr73.1%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6465.6%
Simplified65.6%
Final simplification65.6%
(FPCore (a b angle) :precision binary64 (* (- b a) (* (* PI (+ b a)) (* angle 0.011111111111111112))))
double code(double a, double b, double angle) {
return (b - a) * ((((double) M_PI) * (b + a)) * (angle * 0.011111111111111112));
}
public static double code(double a, double b, double angle) {
return (b - a) * ((Math.PI * (b + a)) * (angle * 0.011111111111111112));
}
def code(a, b, angle): return (b - a) * ((math.pi * (b + a)) * (angle * 0.011111111111111112))
function code(a, b, angle) return Float64(Float64(b - a) * Float64(Float64(pi * Float64(b + a)) * Float64(angle * 0.011111111111111112))) end
function tmp = code(a, b, angle) tmp = (b - a) * ((pi * (b + a)) * (angle * 0.011111111111111112)); end
code[a_, b_, angle_] := N[(N[(b - a), $MachinePrecision] * N[(N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(b - a\right) \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right)
\end{array}
Initial program 59.4%
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
pow2N/A
pow2N/A
associate-*r*N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
difference-of-squaresN/A
Applied egg-rr73.1%
Taylor expanded in angle around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
+-lowering-+.f6465.5%
Simplified65.5%
Final simplification65.5%
(FPCore (a b angle) :precision binary64 (* PI (* (+ b a) (* (- b a) (* angle 0.011111111111111112)))))
double code(double a, double b, double angle) {
return ((double) M_PI) * ((b + a) * ((b - a) * (angle * 0.011111111111111112)));
}
public static double code(double a, double b, double angle) {
return Math.PI * ((b + a) * ((b - a) * (angle * 0.011111111111111112)));
}
def code(a, b, angle): return math.pi * ((b + a) * ((b - a) * (angle * 0.011111111111111112)))
function code(a, b, angle) return Float64(pi * Float64(Float64(b + a) * Float64(Float64(b - a) * Float64(angle * 0.011111111111111112)))) end
function tmp = code(a, b, angle) tmp = pi * ((b + a) * ((b - a) * (angle * 0.011111111111111112))); end
code[a_, b_, angle_] := N[(Pi * N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\pi \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)
\end{array}
Initial program 59.4%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6455.1%
Simplified55.1%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
difference-of-squaresN/A
associate-*l*N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
PI-lowering-PI.f6465.5%
Applied egg-rr65.5%
Final simplification65.5%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* (* b PI) (* b angle))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * ((b * ((double) M_PI)) * (b * angle));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * ((b * Math.PI) * (b * angle));
}
def code(a, b, angle): return 0.011111111111111112 * ((b * math.pi) * (b * angle))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(b * angle))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * ((b * pi) * (b * angle)); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)
\end{array}
Initial program 59.4%
Taylor expanded in b around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.5%
Simplified40.5%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f6437.9%
Simplified37.9%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
*-lowering-*.f6442.9%
Applied egg-rr42.9%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* angle (* PI (* b b)))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
def code(a, b, angle): return 0.011111111111111112 * (angle * (math.pi * (b * b)))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Initial program 59.4%
Taylor expanded in b around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.5%
Simplified40.5%
Taylor expanded in angle around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
PI-lowering-PI.f64N/A
unpow2N/A
*-lowering-*.f6437.9%
Simplified37.9%
herbie shell --seed 2024152
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))