
(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 (* 0.005555555555555556 (* angle PI)))
(t_1 (* PI (* angle 0.005555555555555556))))
(if (<= (/ angle 180.0) 50000000000000.0)
(* 2.0 (* (- b a) (* (cos t_0) (* (sin t_0) (+ b a)))))
(* (* (sin t_1) (* 2.0 (pow (+ b a) 2.0))) (cos (pow (cbrt t_1) 3.0))))))
double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = ((double) M_PI) * (angle * 0.005555555555555556);
double tmp;
if ((angle / 180.0) <= 50000000000000.0) {
tmp = 2.0 * ((b - a) * (cos(t_0) * (sin(t_0) * (b + a))));
} else {
tmp = (sin(t_1) * (2.0 * pow((b + a), 2.0))) * cos(pow(cbrt(t_1), 3.0));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.PI * (angle * 0.005555555555555556);
double tmp;
if ((angle / 180.0) <= 50000000000000.0) {
tmp = 2.0 * ((b - a) * (Math.cos(t_0) * (Math.sin(t_0) * (b + a))));
} else {
tmp = (Math.sin(t_1) * (2.0 * Math.pow((b + a), 2.0))) * Math.cos(Math.pow(Math.cbrt(t_1), 3.0));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = Float64(pi * Float64(angle * 0.005555555555555556)) tmp = 0.0 if (Float64(angle / 180.0) <= 50000000000000.0) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(t_0) * Float64(sin(t_0) * Float64(b + a))))); else tmp = Float64(Float64(sin(t_1) * Float64(2.0 * (Float64(b + a) ^ 2.0))) * cos((cbrt(t_1) ^ 3.0))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 50000000000000.0], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[t$95$1], $MachinePrecision] * N[(2.0 * N[Power[N[(b + a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 50000000000000:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_0 \cdot \left(\sin t_0 \cdot \left(b + a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin t_1 \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\right) \cdot \cos \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < 5e13Initial program 64.8%
associate-*l*64.8%
associate-*l*64.8%
unpow264.8%
unpow264.8%
difference-of-squares69.4%
Simplified69.4%
Taylor expanded in angle around inf 85.1%
if 5e13 < (/.f64 angle 180) Initial program 28.6%
*-commutative28.6%
associate-*l*28.6%
unpow228.6%
fma-neg32.0%
unpow232.0%
distribute-rgt-neg-in32.0%
Simplified32.0%
expm1-log1p-u24.0%
expm1-udef22.7%
Applied egg-rr18.2%
expm1-def19.6%
expm1-log1p30.8%
rem-exp-log30.8%
rem-exp-log30.8%
+-commutative30.8%
Simplified30.8%
add-cube-cbrt36.6%
pow342.0%
div-inv45.4%
metadata-eval45.4%
Applied egg-rr45.4%
Final simplification76.0%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (* angle 0.005555555555555556)))) (* 2.0 (* (* (+ b a) (sin t_0)) (* (- b a) (cos t_0))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
return 2.0 * (((b + a) * sin(t_0)) * ((b - a) * cos(t_0)));
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle * 0.005555555555555556);
return 2.0 * (((b + a) * Math.sin(t_0)) * ((b - a) * Math.cos(t_0)));
}
def code(a, b, angle): t_0 = math.pi * (angle * 0.005555555555555556) return 2.0 * (((b + a) * math.sin(t_0)) * ((b - a) * math.cos(t_0)))
function code(a, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) return Float64(2.0 * Float64(Float64(Float64(b + a) * sin(t_0)) * Float64(Float64(b - a) * cos(t_0)))) end
function tmp = code(a, b, angle) t_0 = pi * (angle * 0.005555555555555556); tmp = 2.0 * (((b + a) * sin(t_0)) * ((b - a) * cos(t_0))); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(2.0 * N[(N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
2 \cdot \left(\left(\left(b + a\right) \cdot \sin t_0\right) \cdot \left(\left(b - a\right) \cdot \cos t_0\right)\right)
\end{array}
\end{array}
Initial program 56.5%
associate-*l*56.5%
associate-*l*56.5%
unpow256.5%
unpow256.5%
difference-of-squares61.2%
Simplified61.2%
Taylor expanded in angle around inf 73.0%
associate-*r*73.0%
*-commutative73.0%
associate-*r*73.2%
*-commutative73.2%
*-commutative73.2%
*-commutative73.2%
associate-*r*72.8%
*-commutative72.8%
*-commutative72.8%
Simplified72.8%
Final simplification72.8%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* 0.005555555555555556 (* angle PI)))) (* 2.0 (* (- b a) (* (cos t_0) (* (sin t_0) (+ b a)))))))
double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
return 2.0 * ((b - a) * (cos(t_0) * (sin(t_0) * (b + a))));
}
public static double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
return 2.0 * ((b - a) * (Math.cos(t_0) * (Math.sin(t_0) * (b + a))));
}
def code(a, b, angle): t_0 = 0.005555555555555556 * (angle * math.pi) return 2.0 * ((b - a) * (math.cos(t_0) * (math.sin(t_0) * (b + a))))
function code(a, b, angle) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) return Float64(2.0 * Float64(Float64(b - a) * Float64(cos(t_0) * Float64(sin(t_0) * Float64(b + a))))) end
function tmp = code(a, b, angle) t_0 = 0.005555555555555556 * (angle * pi); tmp = 2.0 * ((b - a) * (cos(t_0) * (sin(t_0) * (b + a)))); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_0 \cdot \left(\sin t_0 \cdot \left(b + a\right)\right)\right)\right)
\end{array}
\end{array}
Initial program 56.5%
associate-*l*56.5%
associate-*l*56.5%
unpow256.5%
unpow256.5%
difference-of-squares61.2%
Simplified61.2%
Taylor expanded in angle around inf 73.0%
Final simplification73.0%
(FPCore (a b angle)
:precision binary64
(*
2.0
(*
(- b a)
(*
(cos (* 0.005555555555555556 (* angle PI)))
(* (+ b a) (sin (* angle (/ PI 180.0))))))))
double code(double a, double b, double angle) {
return 2.0 * ((b - a) * (cos((0.005555555555555556 * (angle * ((double) M_PI)))) * ((b + a) * sin((angle * (((double) M_PI) / 180.0))))));
}
public static double code(double a, double b, double angle) {
return 2.0 * ((b - a) * (Math.cos((0.005555555555555556 * (angle * Math.PI))) * ((b + a) * Math.sin((angle * (Math.PI / 180.0))))));
}
def code(a, b, angle): return 2.0 * ((b - a) * (math.cos((0.005555555555555556 * (angle * math.pi))) * ((b + a) * math.sin((angle * (math.pi / 180.0))))))
function code(a, b, angle) return Float64(2.0 * Float64(Float64(b - a) * Float64(cos(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(Float64(b + a) * sin(Float64(angle * Float64(pi / 180.0))))))) end
function tmp = code(a, b, angle) tmp = 2.0 * ((b - a) * (cos((0.005555555555555556 * (angle * pi))) * ((b + a) * sin((angle * (pi / 180.0)))))); end
code[a_, b_, angle_] := N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)\right)\right)
\end{array}
Initial program 56.5%
associate-*l*56.5%
associate-*l*56.5%
unpow256.5%
unpow256.5%
difference-of-squares61.2%
Simplified61.2%
Taylor expanded in angle around inf 73.0%
associate-*r*73.2%
*-commutative73.2%
metadata-eval73.2%
div-inv73.2%
*-commutative73.2%
clear-num72.5%
div-inv72.9%
clear-num73.0%
Applied egg-rr73.0%
clear-num72.9%
associate-/r/74.1%
Applied egg-rr74.1%
Final simplification74.1%
(FPCore (a b angle)
:precision binary64
(if (<= b 3.05e+164)
(* 2.0 (* (- b a) (* (+ b a) (sin (/ 1.0 (/ (/ 180.0 angle) PI))))))
(if (<= b 5.8e+266)
(*
2.0
(*
(- b a)
(*
(cos (* 0.005555555555555556 (* angle PI)))
(* (+ b a) (* angle (/ PI 180.0))))))
(* 0.011111111111111112 (* angle (* PI (* b b)))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 3.05e+164) {
tmp = 2.0 * ((b - a) * ((b + a) * sin((1.0 / ((180.0 / angle) / ((double) M_PI))))));
} else if (b <= 5.8e+266) {
tmp = 2.0 * ((b - a) * (cos((0.005555555555555556 * (angle * ((double) M_PI)))) * ((b + a) * (angle * (((double) M_PI) / 180.0)))));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 3.05e+164) {
tmp = 2.0 * ((b - a) * ((b + a) * Math.sin((1.0 / ((180.0 / angle) / Math.PI)))));
} else if (b <= 5.8e+266) {
tmp = 2.0 * ((b - a) * (Math.cos((0.005555555555555556 * (angle * Math.PI))) * ((b + a) * (angle * (Math.PI / 180.0)))));
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 3.05e+164: tmp = 2.0 * ((b - a) * ((b + a) * math.sin((1.0 / ((180.0 / angle) / math.pi))))) elif b <= 5.8e+266: tmp = 2.0 * ((b - a) * (math.cos((0.005555555555555556 * (angle * math.pi))) * ((b + a) * (angle * (math.pi / 180.0))))) else: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 3.05e+164) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(1.0 / Float64(Float64(180.0 / angle) / pi)))))); elseif (b <= 5.8e+266) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(Float64(b + a) * Float64(angle * Float64(pi / 180.0)))))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 3.05e+164) tmp = 2.0 * ((b - a) * ((b + a) * sin((1.0 / ((180.0 / angle) / pi))))); elseif (b <= 5.8e+266) tmp = 2.0 * ((b - a) * (cos((0.005555555555555556 * (angle * pi))) * ((b + a) * (angle * (pi / 180.0))))); else tmp = 0.011111111111111112 * (angle * (pi * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 3.05e+164], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(1.0 / N[(N[(180.0 / angle), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.8e+266], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.05 \cdot 10^{+164}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right)\right)\right)\\
\mathbf{elif}\;b \leq 5.8 \cdot 10^{+266}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \frac{\pi}{180}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if b < 3.0499999999999998e164Initial program 59.1%
associate-*l*59.1%
associate-*l*59.1%
unpow259.1%
unpow259.1%
difference-of-squares61.7%
Simplified61.7%
Taylor expanded in angle around inf 72.5%
associate-*r*73.1%
*-commutative73.1%
metadata-eval73.1%
div-inv72.7%
*-commutative72.7%
clear-num72.4%
div-inv72.8%
clear-num72.9%
Applied egg-rr72.9%
Taylor expanded in angle around 0 68.2%
if 3.0499999999999998e164 < b < 5.80000000000000035e266Initial program 27.4%
associate-*l*27.4%
associate-*l*27.4%
unpow227.4%
unpow227.4%
difference-of-squares49.0%
Simplified49.0%
Taylor expanded in angle around inf 83.9%
associate-*r*84.0%
*-commutative84.0%
metadata-eval84.0%
div-inv78.8%
*-commutative78.8%
clear-num84.0%
div-inv78.8%
clear-num78.8%
Applied egg-rr78.8%
Taylor expanded in angle around 0 94.4%
associate-*r*94.6%
metadata-eval94.6%
associate-/r/94.6%
associate-*l/94.6%
*-lft-identity94.6%
associate-/r/94.6%
*-commutative94.6%
Simplified94.6%
if 5.80000000000000035e266 < b Initial program 50.0%
*-commutative50.0%
associate-*l*50.0%
unpow250.0%
fma-neg62.5%
unpow262.5%
Simplified62.5%
Taylor expanded in angle around 0 62.5%
*-commutative62.5%
unpow262.5%
unpow262.5%
Simplified62.5%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
unpow2100.0%
Simplified100.0%
Final simplification71.1%
(FPCore (a b angle)
:precision binary64
(if (<= (/ angle 180.0) -4e+179)
(*
2.0
(*
(sin (* 2.0 (* PI (* angle 0.005555555555555556))))
(* (pow (+ b a) 2.0) 0.5)))
(* 2.0 (* (- b a) (* (+ b a) (sin (/ 1.0 (/ (/ 180.0 angle) PI))))))))
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -4e+179) {
tmp = 2.0 * (sin((2.0 * (((double) M_PI) * (angle * 0.005555555555555556)))) * (pow((b + a), 2.0) * 0.5));
} else {
tmp = 2.0 * ((b - a) * ((b + a) * sin((1.0 / ((180.0 / angle) / ((double) M_PI))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -4e+179) {
tmp = 2.0 * (Math.sin((2.0 * (Math.PI * (angle * 0.005555555555555556)))) * (Math.pow((b + a), 2.0) * 0.5));
} else {
tmp = 2.0 * ((b - a) * ((b + a) * Math.sin((1.0 / ((180.0 / angle) / Math.PI)))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (angle / 180.0) <= -4e+179: tmp = 2.0 * (math.sin((2.0 * (math.pi * (angle * 0.005555555555555556)))) * (math.pow((b + a), 2.0) * 0.5)) else: tmp = 2.0 * ((b - a) * ((b + a) * math.sin((1.0 / ((180.0 / angle) / math.pi))))) return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= -4e+179) tmp = Float64(2.0 * Float64(sin(Float64(2.0 * Float64(pi * Float64(angle * 0.005555555555555556)))) * Float64((Float64(b + a) ^ 2.0) * 0.5))); else tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(1.0 / Float64(Float64(180.0 / angle) / pi)))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((angle / 180.0) <= -4e+179) tmp = 2.0 * (sin((2.0 * (pi * (angle * 0.005555555555555556)))) * (((b + a) ^ 2.0) * 0.5)); else tmp = 2.0 * ((b - a) * ((b + a) * sin((1.0 / ((180.0 / angle) / pi))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], -4e+179], N[(2.0 * N[(N[Sin[N[(2.0 * N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[(b + a), $MachinePrecision], 2.0], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(1.0 / N[(N[(180.0 / angle), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{+179}:\\
\;\;\;\;2 \cdot \left(\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left({\left(b + a\right)}^{2} \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -3.99999999999999992e179Initial program 28.9%
*-commutative28.9%
associate-*l*28.9%
unpow228.9%
fma-neg40.0%
unpow240.0%
Simplified40.0%
Applied egg-rr14.6%
unpow214.6%
associate-*r*14.6%
*-commutative14.6%
associate-*r*14.6%
*-commutative14.6%
swap-sqr14.6%
Simplified45.0%
if -3.99999999999999992e179 < (/.f64 angle 180) Initial program 58.6%
associate-*l*58.6%
associate-*l*58.5%
unpow258.5%
unpow258.6%
difference-of-squares62.8%
Simplified62.8%
Taylor expanded in angle around inf 75.1%
associate-*r*75.7%
*-commutative75.7%
metadata-eval75.7%
div-inv75.7%
*-commutative75.7%
clear-num75.4%
div-inv75.0%
clear-num75.1%
Applied egg-rr75.1%
Taylor expanded in angle around 0 73.3%
Final simplification71.3%
(FPCore (a b angle)
:precision binary64
(if (<= (/ angle 180.0) -4e+179)
(* 0.011111111111111112 (* angle (* PI (fma 1.0 (* b b) (* a a)))))
(if (<= (/ angle 180.0) 50000000000000.0)
(*
2.0
(* (- b a) (* (sin (* 0.005555555555555556 (* angle PI))) (+ b a))))
(* 2.0 (* (* (- b a) (+ b a)) (sin (* (/ angle 180.0) PI)))))))
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -4e+179) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * fma(1.0, (b * b), (a * a))));
} else if ((angle / 180.0) <= 50000000000000.0) {
tmp = 2.0 * ((b - a) * (sin((0.005555555555555556 * (angle * ((double) M_PI)))) * (b + a)));
} else {
tmp = 2.0 * (((b - a) * (b + a)) * sin(((angle / 180.0) * ((double) M_PI))));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= -4e+179) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * fma(1.0, Float64(b * b), Float64(a * a))))); elseif (Float64(angle / 180.0) <= 50000000000000.0) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(b + a)))); else tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * Float64(b + a)) * sin(Float64(Float64(angle / 180.0) * pi)))); end return tmp end
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], -4e+179], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(1.0 * N[(b * b), $MachinePrecision] + N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 50000000000000.0], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{+179}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 50000000000000:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -3.99999999999999992e179Initial program 28.9%
*-commutative28.9%
associate-*l*28.9%
unpow228.9%
fma-neg40.0%
unpow240.0%
Simplified40.0%
Taylor expanded in angle around 0 18.2%
*-commutative18.2%
unpow218.2%
unpow218.2%
Simplified18.2%
*-un-lft-identity18.2%
fma-neg18.2%
add-sqr-sqrt11.5%
sqrt-unprod40.5%
sqr-neg40.5%
sqrt-unprod40.4%
add-sqr-sqrt40.4%
Applied egg-rr40.4%
if -3.99999999999999992e179 < (/.f64 angle 180) < 5e13Initial program 68.4%
associate-*l*68.4%
associate-*l*68.4%
unpow268.4%
unpow268.4%
difference-of-squares72.4%
Simplified72.4%
Taylor expanded in angle around inf 89.1%
Taylor expanded in angle around 0 83.9%
if 5e13 < (/.f64 angle 180) Initial program 28.6%
associate-*l*28.6%
associate-*l*28.6%
unpow228.6%
unpow228.6%
difference-of-squares33.7%
Simplified33.7%
Taylor expanded in angle around 0 42.8%
Final simplification71.4%
(FPCore (a b angle) :precision binary64 (if (<= (/ angle 180.0) -4e+179) (* 0.011111111111111112 (* angle (* PI (fma 1.0 (* b b) (* a a))))) (* 2.0 (* (- b a) (* (+ b a) (sin (/ 1.0 (/ (/ 180.0 angle) PI))))))))
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -4e+179) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * fma(1.0, (b * b), (a * a))));
} else {
tmp = 2.0 * ((b - a) * ((b + a) * sin((1.0 / ((180.0 / angle) / ((double) M_PI))))));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= -4e+179) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * fma(1.0, Float64(b * b), Float64(a * a))))); else tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(1.0 / Float64(Float64(180.0 / angle) / pi)))))); end return tmp end
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], -4e+179], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(1.0 * N[(b * b), $MachinePrecision] + N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(1.0 / N[(N[(180.0 / angle), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{+179}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -3.99999999999999992e179Initial program 28.9%
*-commutative28.9%
associate-*l*28.9%
unpow228.9%
fma-neg40.0%
unpow240.0%
Simplified40.0%
Taylor expanded in angle around 0 18.2%
*-commutative18.2%
unpow218.2%
unpow218.2%
Simplified18.2%
*-un-lft-identity18.2%
fma-neg18.2%
add-sqr-sqrt11.5%
sqrt-unprod40.5%
sqr-neg40.5%
sqrt-unprod40.4%
add-sqr-sqrt40.4%
Applied egg-rr40.4%
if -3.99999999999999992e179 < (/.f64 angle 180) Initial program 58.6%
associate-*l*58.6%
associate-*l*58.5%
unpow258.5%
unpow258.6%
difference-of-squares62.8%
Simplified62.8%
Taylor expanded in angle around inf 75.1%
associate-*r*75.7%
*-commutative75.7%
metadata-eval75.7%
div-inv75.7%
*-commutative75.7%
clear-num75.4%
div-inv75.0%
clear-num75.1%
Applied egg-rr75.1%
Taylor expanded in angle around 0 73.3%
Final simplification71.0%
(FPCore (a b angle)
:precision binary64
(if (<= angle 0.38)
(* 2.0 (* (* angle 0.005555555555555556) (* (+ b a) (* (- b a) PI))))
(if (<= angle 1.65e+53)
(* 2.0 (* 0.5 (* (* b b) (sin (* PI (* angle 0.011111111111111112))))))
(* 0.011111111111111112 (* angle (* PI (fma 1.0 (* b b) (* a a))))))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 0.38) {
tmp = 2.0 * ((angle * 0.005555555555555556) * ((b + a) * ((b - a) * ((double) M_PI))));
} else if (angle <= 1.65e+53) {
tmp = 2.0 * (0.5 * ((b * b) * sin((((double) M_PI) * (angle * 0.011111111111111112)))));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * fma(1.0, (b * b), (a * a))));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (angle <= 0.38) tmp = Float64(2.0 * Float64(Float64(angle * 0.005555555555555556) * Float64(Float64(b + a) * Float64(Float64(b - a) * pi)))); elseif (angle <= 1.65e+53) tmp = Float64(2.0 * Float64(0.5 * Float64(Float64(b * b) * sin(Float64(pi * Float64(angle * 0.011111111111111112)))))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * fma(1.0, Float64(b * b), Float64(a * a))))); end return tmp end
code[a_, b_, angle_] := If[LessEqual[angle, 0.38], N[(2.0 * N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 1.65e+53], N[(2.0 * N[(0.5 * N[(N[(b * b), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(1.0 * N[(b * b), $MachinePrecision] + N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 0.38:\\
\;\;\;\;2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\
\mathbf{elif}\;angle \leq 1.65 \cdot 10^{+53}:\\
\;\;\;\;2 \cdot \left(0.5 \cdot \left(\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\
\end{array}
\end{array}
if angle < 0.38Initial program 65.1%
associate-*l*65.2%
associate-*l*65.1%
unpow265.1%
unpow265.1%
difference-of-squares69.5%
Simplified69.5%
Taylor expanded in angle around 0 65.5%
associate-*r*65.5%
*-commutative65.5%
*-commutative65.5%
associate-*r*65.5%
+-commutative65.5%
*-commutative65.5%
+-commutative65.5%
*-commutative65.5%
Simplified65.5%
if 0.38 < angle < 1.6500000000000001e53Initial program 51.9%
associate-*l*51.9%
associate-*l*51.9%
unpow251.9%
unpow251.9%
difference-of-squares58.1%
Simplified58.1%
Applied egg-rr15.6%
Taylor expanded in b around inf 49.7%
*-commutative49.7%
*-commutative49.7%
unpow249.7%
associate-*r*49.9%
Simplified49.9%
if 1.6500000000000001e53 < angle Initial program 27.2%
*-commutative27.2%
associate-*l*27.2%
unpow227.2%
fma-neg31.0%
unpow231.0%
Simplified31.0%
Taylor expanded in angle around 0 25.8%
*-commutative25.8%
unpow225.8%
unpow225.8%
Simplified25.8%
*-un-lft-identity25.8%
fma-neg25.8%
add-sqr-sqrt11.6%
sqrt-unprod41.5%
sqr-neg41.5%
sqrt-unprod41.5%
add-sqr-sqrt41.5%
Applied egg-rr41.5%
Final simplification59.6%
(FPCore (a b angle) :precision binary64 (if (<= b 2.5e+199) (* 2.0 (* (* (- b a) (+ b a)) (sin (* (/ angle 180.0) PI)))) (* 2.0 (* 0.005555555555555556 (* angle (* (- b a) (* PI (+ b a))))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 2.5e+199) {
tmp = 2.0 * (((b - a) * (b + a)) * sin(((angle / 180.0) * ((double) M_PI))));
} else {
tmp = 2.0 * (0.005555555555555556 * (angle * ((b - a) * (((double) M_PI) * (b + a)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2.5e+199) {
tmp = 2.0 * (((b - a) * (b + a)) * Math.sin(((angle / 180.0) * Math.PI)));
} else {
tmp = 2.0 * (0.005555555555555556 * (angle * ((b - a) * (Math.PI * (b + a)))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 2.5e+199: tmp = 2.0 * (((b - a) * (b + a)) * math.sin(((angle / 180.0) * math.pi))) else: tmp = 2.0 * (0.005555555555555556 * (angle * ((b - a) * (math.pi * (b + a))))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 2.5e+199) tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * Float64(b + a)) * sin(Float64(Float64(angle / 180.0) * pi)))); else tmp = Float64(2.0 * Float64(0.005555555555555556 * Float64(angle * Float64(Float64(b - a) * Float64(pi * Float64(b + a)))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2.5e+199) tmp = 2.0 * (((b - a) * (b + a)) * sin(((angle / 180.0) * pi))); else tmp = 2.0 * (0.005555555555555556 * (angle * ((b - a) * (pi * (b + a))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 2.5e+199], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.5 \cdot 10^{+199}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.4999999999999999e199Initial program 58.1%
associate-*l*58.1%
associate-*l*58.1%
unpow258.1%
unpow258.1%
difference-of-squares61.5%
Simplified61.5%
Taylor expanded in angle around 0 58.9%
if 2.4999999999999999e199 < b Initial program 39.9%
associate-*l*39.9%
associate-*l*39.9%
unpow239.9%
unpow239.9%
difference-of-squares57.5%
Simplified57.5%
Taylor expanded in angle around 0 70.6%
Final simplification59.9%
(FPCore (a b angle) :precision binary64 (if (or (<= b 2.9e-40) (and (not (<= b 6.8e-17)) (<= b 1.46e+48))) (* -0.011111111111111112 (* PI (* angle (* a a)))) (* 0.011111111111111112 (* angle (* PI (* b b))))))
double code(double a, double b, double angle) {
double tmp;
if ((b <= 2.9e-40) || (!(b <= 6.8e-17) && (b <= 1.46e+48))) {
tmp = -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((b <= 2.9e-40) || (!(b <= 6.8e-17) && (b <= 1.46e+48))) {
tmp = -0.011111111111111112 * (Math.PI * (angle * (a * a)));
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (b <= 2.9e-40) or (not (b <= 6.8e-17) and (b <= 1.46e+48)): tmp = -0.011111111111111112 * (math.pi * (angle * (a * a))) else: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) return tmp
function code(a, b, angle) tmp = 0.0 if ((b <= 2.9e-40) || (!(b <= 6.8e-17) && (b <= 1.46e+48))) tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((b <= 2.9e-40) || (~((b <= 6.8e-17)) && (b <= 1.46e+48))) tmp = -0.011111111111111112 * (pi * (angle * (a * a))); else tmp = 0.011111111111111112 * (angle * (pi * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[Or[LessEqual[b, 2.9e-40], And[N[Not[LessEqual[b, 6.8e-17]], $MachinePrecision], LessEqual[b, 1.46e+48]]], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.9 \cdot 10^{-40} \lor \neg \left(b \leq 6.8 \cdot 10^{-17}\right) \land b \leq 1.46 \cdot 10^{+48}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.8999999999999999e-40 or 6.7999999999999996e-17 < b < 1.46e48Initial program 57.3%
associate-*l*57.3%
unpow257.3%
unpow257.3%
Simplified57.3%
clear-num56.2%
un-div-inv58.4%
Applied egg-rr58.4%
Taylor expanded in b around 0 43.0%
associate-*r*43.0%
*-commutative43.0%
associate-*r*44.4%
metadata-eval44.4%
associate-/r/43.9%
associate-*l/44.3%
*-lft-identity44.3%
associate-*r*45.5%
metadata-eval45.5%
associate-/r/44.9%
associate-*l/43.9%
*-lft-identity43.9%
*-commutative43.9%
unpow243.9%
Simplified43.9%
Taylor expanded in angle around 0 40.4%
associate-*r*40.4%
unpow240.4%
Simplified40.4%
if 2.8999999999999999e-40 < b < 6.7999999999999996e-17 or 1.46e48 < b Initial program 54.0%
*-commutative54.0%
associate-*l*54.0%
unpow254.0%
fma-neg60.5%
unpow260.5%
Simplified60.5%
Taylor expanded in angle around 0 50.4%
*-commutative50.4%
unpow250.4%
unpow250.4%
Simplified50.4%
Taylor expanded in b around inf 52.2%
*-commutative52.2%
unpow252.2%
Simplified52.2%
Final simplification43.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* -0.011111111111111112 (* PI (* angle (* a a))))))
(if (<= b 2.1e-40)
t_0
(if (<= b 6.2e-17)
(* 0.011111111111111112 (* PI (* angle (* b b))))
(if (<= b 1.7e+47)
t_0
(* 0.011111111111111112 (* angle (* PI (* b b)))))))))
double code(double a, double b, double angle) {
double t_0 = -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
double tmp;
if (b <= 2.1e-40) {
tmp = t_0;
} else if (b <= 6.2e-17) {
tmp = 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
} else if (b <= 1.7e+47) {
tmp = t_0;
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = -0.011111111111111112 * (Math.PI * (angle * (a * a)));
double tmp;
if (b <= 2.1e-40) {
tmp = t_0;
} else if (b <= 6.2e-17) {
tmp = 0.011111111111111112 * (Math.PI * (angle * (b * b)));
} else if (b <= 1.7e+47) {
tmp = t_0;
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
return tmp;
}
def code(a, b, angle): t_0 = -0.011111111111111112 * (math.pi * (angle * (a * a))) tmp = 0 if b <= 2.1e-40: tmp = t_0 elif b <= 6.2e-17: tmp = 0.011111111111111112 * (math.pi * (angle * (b * b))) elif b <= 1.7e+47: tmp = t_0 else: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) return tmp
function code(a, b, angle) t_0 = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a)))) tmp = 0.0 if (b <= 2.1e-40) tmp = t_0; elseif (b <= 6.2e-17) tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b)))); elseif (b <= 1.7e+47) tmp = t_0; else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = -0.011111111111111112 * (pi * (angle * (a * a))); tmp = 0.0; if (b <= 2.1e-40) tmp = t_0; elseif (b <= 6.2e-17) tmp = 0.011111111111111112 * (pi * (angle * (b * b))); elseif (b <= 1.7e+47) tmp = t_0; else tmp = 0.011111111111111112 * (angle * (pi * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 2.1e-40], t$95$0, If[LessEqual[b, 6.2e-17], N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e+47], t$95$0, N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{if}\;b \leq 2.1 \cdot 10^{-40}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{-17}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{+47}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.10000000000000018e-40 or 6.1999999999999997e-17 < b < 1.6999999999999999e47Initial program 57.3%
associate-*l*57.3%
unpow257.3%
unpow257.3%
Simplified57.3%
clear-num56.2%
un-div-inv58.4%
Applied egg-rr58.4%
Taylor expanded in b around 0 43.0%
associate-*r*43.0%
*-commutative43.0%
associate-*r*44.4%
metadata-eval44.4%
associate-/r/43.9%
associate-*l/44.3%
*-lft-identity44.3%
associate-*r*45.5%
metadata-eval45.5%
associate-/r/44.9%
associate-*l/43.9%
*-lft-identity43.9%
*-commutative43.9%
unpow243.9%
Simplified43.9%
Taylor expanded in angle around 0 40.4%
associate-*r*40.4%
unpow240.4%
Simplified40.4%
if 2.10000000000000018e-40 < b < 6.1999999999999997e-17Initial program 84.5%
*-commutative84.5%
associate-*l*84.5%
unpow284.5%
fma-neg84.5%
unpow284.5%
Simplified84.5%
Taylor expanded in angle around 0 66.9%
*-commutative66.9%
unpow266.9%
unpow266.9%
Simplified66.9%
Taylor expanded in b around inf 51.2%
*-commutative51.2%
unpow251.2%
Simplified51.2%
Taylor expanded in angle around 0 51.2%
associate-*r*51.3%
*-commutative51.3%
unpow251.3%
Simplified51.3%
if 1.6999999999999999e47 < b Initial program 46.9%
*-commutative46.9%
associate-*l*46.9%
unpow246.9%
fma-neg54.8%
unpow254.8%
Simplified54.8%
Taylor expanded in angle around 0 46.5%
*-commutative46.5%
unpow246.5%
unpow246.5%
Simplified46.5%
Taylor expanded in b around inf 52.5%
*-commutative52.5%
unpow252.5%
Simplified52.5%
Final simplification43.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (* b b)))
(t_1 (* -0.011111111111111112 (* PI (* angle (* a a))))))
(if (<= b 7.5e-41)
t_1
(if (<= b 3.4e-16)
(* angle (* 0.011111111111111112 t_0))
(if (<= b 8.4e+46) t_1 (* 0.011111111111111112 (* angle t_0)))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (b * b);
double t_1 = -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
double tmp;
if (b <= 7.5e-41) {
tmp = t_1;
} else if (b <= 3.4e-16) {
tmp = angle * (0.011111111111111112 * t_0);
} else if (b <= 8.4e+46) {
tmp = t_1;
} else {
tmp = 0.011111111111111112 * (angle * t_0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (b * b);
double t_1 = -0.011111111111111112 * (Math.PI * (angle * (a * a)));
double tmp;
if (b <= 7.5e-41) {
tmp = t_1;
} else if (b <= 3.4e-16) {
tmp = angle * (0.011111111111111112 * t_0);
} else if (b <= 8.4e+46) {
tmp = t_1;
} else {
tmp = 0.011111111111111112 * (angle * t_0);
}
return tmp;
}
def code(a, b, angle): t_0 = math.pi * (b * b) t_1 = -0.011111111111111112 * (math.pi * (angle * (a * a))) tmp = 0 if b <= 7.5e-41: tmp = t_1 elif b <= 3.4e-16: tmp = angle * (0.011111111111111112 * t_0) elif b <= 8.4e+46: tmp = t_1 else: tmp = 0.011111111111111112 * (angle * t_0) return tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(b * b)) t_1 = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a)))) tmp = 0.0 if (b <= 7.5e-41) tmp = t_1; elseif (b <= 3.4e-16) tmp = Float64(angle * Float64(0.011111111111111112 * t_0)); elseif (b <= 8.4e+46) tmp = t_1; else tmp = Float64(0.011111111111111112 * Float64(angle * t_0)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = pi * (b * b); t_1 = -0.011111111111111112 * (pi * (angle * (a * a))); tmp = 0.0; if (b <= 7.5e-41) tmp = t_1; elseif (b <= 3.4e-16) tmp = angle * (0.011111111111111112 * t_0); elseif (b <= 8.4e+46) tmp = t_1; else tmp = 0.011111111111111112 * (angle * t_0); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 7.5e-41], t$95$1, If[LessEqual[b, 3.4e-16], N[(angle * N[(0.011111111111111112 * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.4e+46], t$95$1, N[(0.011111111111111112 * N[(angle * t$95$0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(b \cdot b\right)\\
t_1 := -0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{if}\;b \leq 7.5 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-16}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot t_0\right)\\
\mathbf{elif}\;b \leq 8.4 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t_0\right)\\
\end{array}
\end{array}
if b < 7.50000000000000049e-41 or 3.4e-16 < b < 8.4e46Initial program 57.3%
associate-*l*57.3%
unpow257.3%
unpow257.3%
Simplified57.3%
clear-num56.2%
un-div-inv58.4%
Applied egg-rr58.4%
Taylor expanded in b around 0 43.0%
associate-*r*43.0%
*-commutative43.0%
associate-*r*44.4%
metadata-eval44.4%
associate-/r/43.9%
associate-*l/44.3%
*-lft-identity44.3%
associate-*r*45.5%
metadata-eval45.5%
associate-/r/44.9%
associate-*l/43.9%
*-lft-identity43.9%
*-commutative43.9%
unpow243.9%
Simplified43.9%
Taylor expanded in angle around 0 40.4%
associate-*r*40.4%
unpow240.4%
Simplified40.4%
if 7.50000000000000049e-41 < b < 3.4e-16Initial program 84.5%
*-commutative84.5%
associate-*l*84.5%
unpow284.5%
fma-neg84.5%
unpow284.5%
Simplified84.5%
Taylor expanded in angle around 0 66.9%
*-commutative66.9%
unpow266.9%
unpow266.9%
Simplified66.9%
Taylor expanded in b around inf 51.2%
*-commutative51.2%
unpow251.2%
Simplified51.2%
Taylor expanded in angle around 0 51.2%
*-commutative51.2%
*-commutative51.2%
unpow251.2%
associate-*l*51.3%
Simplified51.3%
if 8.4e46 < b Initial program 46.9%
*-commutative46.9%
associate-*l*46.9%
unpow246.9%
fma-neg54.8%
unpow254.8%
Simplified54.8%
Taylor expanded in angle around 0 46.5%
*-commutative46.5%
unpow246.5%
unpow246.5%
Simplified46.5%
Taylor expanded in b around inf 52.5%
*-commutative52.5%
unpow252.5%
Simplified52.5%
Final simplification43.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (* b b))))
(if (<= b 9e-42)
(* -0.011111111111111112 (* PI (* angle (* a a))))
(if (<= b 8.5e-17)
(* angle (* 0.011111111111111112 t_0))
(if (<= b 4.9e+45)
(* -0.011111111111111112 (* angle (* PI (* a a))))
(* 0.011111111111111112 (* angle t_0)))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (b * b);
double tmp;
if (b <= 9e-42) {
tmp = -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
} else if (b <= 8.5e-17) {
tmp = angle * (0.011111111111111112 * t_0);
} else if (b <= 4.9e+45) {
tmp = -0.011111111111111112 * (angle * (((double) M_PI) * (a * a)));
} else {
tmp = 0.011111111111111112 * (angle * t_0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (b * b);
double tmp;
if (b <= 9e-42) {
tmp = -0.011111111111111112 * (Math.PI * (angle * (a * a)));
} else if (b <= 8.5e-17) {
tmp = angle * (0.011111111111111112 * t_0);
} else if (b <= 4.9e+45) {
tmp = -0.011111111111111112 * (angle * (Math.PI * (a * a)));
} else {
tmp = 0.011111111111111112 * (angle * t_0);
}
return tmp;
}
def code(a, b, angle): t_0 = math.pi * (b * b) tmp = 0 if b <= 9e-42: tmp = -0.011111111111111112 * (math.pi * (angle * (a * a))) elif b <= 8.5e-17: tmp = angle * (0.011111111111111112 * t_0) elif b <= 4.9e+45: tmp = -0.011111111111111112 * (angle * (math.pi * (a * a))) else: tmp = 0.011111111111111112 * (angle * t_0) return tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(b * b)) tmp = 0.0 if (b <= 9e-42) tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a)))); elseif (b <= 8.5e-17) tmp = Float64(angle * Float64(0.011111111111111112 * t_0)); elseif (b <= 4.9e+45) tmp = Float64(-0.011111111111111112 * Float64(angle * Float64(pi * Float64(a * a)))); else tmp = Float64(0.011111111111111112 * Float64(angle * t_0)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = pi * (b * b); tmp = 0.0; if (b <= 9e-42) tmp = -0.011111111111111112 * (pi * (angle * (a * a))); elseif (b <= 8.5e-17) tmp = angle * (0.011111111111111112 * t_0); elseif (b <= 4.9e+45) tmp = -0.011111111111111112 * (angle * (pi * (a * a))); else tmp = 0.011111111111111112 * (angle * t_0); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 9e-42], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e-17], N[(angle * N[(0.011111111111111112 * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.9e+45], N[(-0.011111111111111112 * N[(angle * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(b \cdot b\right)\\
\mathbf{if}\;b \leq 9 \cdot 10^{-42}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-17}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot t_0\right)\\
\mathbf{elif}\;b \leq 4.9 \cdot 10^{+45}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t_0\right)\\
\end{array}
\end{array}
if b < 9e-42Initial program 57.9%
associate-*l*57.9%
unpow257.9%
unpow257.9%
Simplified57.9%
clear-num56.7%
un-div-inv59.1%
Applied egg-rr59.1%
Taylor expanded in b around 0 43.1%
associate-*r*43.1%
*-commutative43.1%
associate-*r*44.1%
metadata-eval44.1%
associate-/r/43.5%
associate-*l/44.0%
*-lft-identity44.0%
associate-*r*45.7%
metadata-eval45.7%
associate-/r/45.2%
associate-*l/44.1%
*-lft-identity44.1%
*-commutative44.1%
unpow244.1%
Simplified44.1%
Taylor expanded in angle around 0 39.9%
associate-*r*39.9%
unpow239.9%
Simplified39.9%
if 9e-42 < b < 8.5e-17Initial program 84.5%
*-commutative84.5%
associate-*l*84.5%
unpow284.5%
fma-neg84.5%
unpow284.5%
Simplified84.5%
Taylor expanded in angle around 0 66.9%
*-commutative66.9%
unpow266.9%
unpow266.9%
Simplified66.9%
Taylor expanded in b around inf 51.2%
*-commutative51.2%
unpow251.2%
Simplified51.2%
Taylor expanded in angle around 0 51.2%
*-commutative51.2%
*-commutative51.2%
unpow251.2%
associate-*l*51.3%
Simplified51.3%
if 8.5e-17 < b < 4.9000000000000002e45Initial program 48.3%
*-commutative48.3%
associate-*l*48.3%
unpow248.3%
fma-neg48.3%
unpow248.3%
Simplified48.3%
Taylor expanded in angle around 0 56.1%
*-commutative56.1%
unpow256.1%
unpow256.1%
Simplified56.1%
Taylor expanded in b around 0 48.5%
*-commutative48.5%
*-commutative48.5%
unpow248.5%
Simplified48.5%
if 4.9000000000000002e45 < b Initial program 46.9%
*-commutative46.9%
associate-*l*46.9%
unpow246.9%
fma-neg54.8%
unpow254.8%
Simplified54.8%
Taylor expanded in angle around 0 46.5%
*-commutative46.5%
unpow246.5%
unpow246.5%
Simplified46.5%
Taylor expanded in b around inf 52.5%
*-commutative52.5%
unpow252.5%
Simplified52.5%
Final simplification43.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (* b b))))
(if (<= b 2.8e-41)
(* -0.011111111111111112 (* PI (* angle (* a a))))
(if (<= b 3.6e-16)
(* t_0 (* angle 0.011111111111111112))
(if (<= b 8.5e+47)
(* -0.011111111111111112 (* angle (* PI (* a a))))
(* 0.011111111111111112 (* angle t_0)))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (b * b);
double tmp;
if (b <= 2.8e-41) {
tmp = -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
} else if (b <= 3.6e-16) {
tmp = t_0 * (angle * 0.011111111111111112);
} else if (b <= 8.5e+47) {
tmp = -0.011111111111111112 * (angle * (((double) M_PI) * (a * a)));
} else {
tmp = 0.011111111111111112 * (angle * t_0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (b * b);
double tmp;
if (b <= 2.8e-41) {
tmp = -0.011111111111111112 * (Math.PI * (angle * (a * a)));
} else if (b <= 3.6e-16) {
tmp = t_0 * (angle * 0.011111111111111112);
} else if (b <= 8.5e+47) {
tmp = -0.011111111111111112 * (angle * (Math.PI * (a * a)));
} else {
tmp = 0.011111111111111112 * (angle * t_0);
}
return tmp;
}
def code(a, b, angle): t_0 = math.pi * (b * b) tmp = 0 if b <= 2.8e-41: tmp = -0.011111111111111112 * (math.pi * (angle * (a * a))) elif b <= 3.6e-16: tmp = t_0 * (angle * 0.011111111111111112) elif b <= 8.5e+47: tmp = -0.011111111111111112 * (angle * (math.pi * (a * a))) else: tmp = 0.011111111111111112 * (angle * t_0) return tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(b * b)) tmp = 0.0 if (b <= 2.8e-41) tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a)))); elseif (b <= 3.6e-16) tmp = Float64(t_0 * Float64(angle * 0.011111111111111112)); elseif (b <= 8.5e+47) tmp = Float64(-0.011111111111111112 * Float64(angle * Float64(pi * Float64(a * a)))); else tmp = Float64(0.011111111111111112 * Float64(angle * t_0)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = pi * (b * b); tmp = 0.0; if (b <= 2.8e-41) tmp = -0.011111111111111112 * (pi * (angle * (a * a))); elseif (b <= 3.6e-16) tmp = t_0 * (angle * 0.011111111111111112); elseif (b <= 8.5e+47) tmp = -0.011111111111111112 * (angle * (pi * (a * a))); else tmp = 0.011111111111111112 * (angle * t_0); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 2.8e-41], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.6e-16], N[(t$95$0 * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e+47], N[(-0.011111111111111112 * N[(angle * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(b \cdot b\right)\\
\mathbf{if}\;b \leq 2.8 \cdot 10^{-41}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{-16}:\\
\;\;\;\;t_0 \cdot \left(angle \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+47}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t_0\right)\\
\end{array}
\end{array}
if b < 2.8000000000000002e-41Initial program 57.9%
associate-*l*57.9%
unpow257.9%
unpow257.9%
Simplified57.9%
clear-num56.7%
un-div-inv59.1%
Applied egg-rr59.1%
Taylor expanded in b around 0 43.1%
associate-*r*43.1%
*-commutative43.1%
associate-*r*44.1%
metadata-eval44.1%
associate-/r/43.5%
associate-*l/44.0%
*-lft-identity44.0%
associate-*r*45.7%
metadata-eval45.7%
associate-/r/45.2%
associate-*l/44.1%
*-lft-identity44.1%
*-commutative44.1%
unpow244.1%
Simplified44.1%
Taylor expanded in angle around 0 39.9%
associate-*r*39.9%
unpow239.9%
Simplified39.9%
if 2.8000000000000002e-41 < b < 3.59999999999999983e-16Initial program 84.5%
*-commutative84.5%
associate-*l*84.5%
unpow284.5%
fma-neg84.5%
unpow284.5%
Simplified84.5%
Taylor expanded in angle around 0 66.9%
*-commutative66.9%
unpow266.9%
unpow266.9%
Simplified66.9%
Taylor expanded in b around inf 51.2%
associate-*r*51.5%
*-commutative51.5%
*-commutative51.5%
unpow251.5%
*-commutative51.5%
Simplified51.5%
if 3.59999999999999983e-16 < b < 8.5000000000000008e47Initial program 48.3%
*-commutative48.3%
associate-*l*48.3%
unpow248.3%
fma-neg48.3%
unpow248.3%
Simplified48.3%
Taylor expanded in angle around 0 56.1%
*-commutative56.1%
unpow256.1%
unpow256.1%
Simplified56.1%
Taylor expanded in b around 0 48.5%
*-commutative48.5%
*-commutative48.5%
unpow248.5%
Simplified48.5%
if 8.5000000000000008e47 < b Initial program 46.9%
*-commutative46.9%
associate-*l*46.9%
unpow246.9%
fma-neg54.8%
unpow254.8%
Simplified54.8%
Taylor expanded in angle around 0 46.5%
*-commutative46.5%
unpow246.5%
unpow246.5%
Simplified46.5%
Taylor expanded in b around inf 52.5%
*-commutative52.5%
unpow252.5%
Simplified52.5%
Final simplification43.4%
(FPCore (a b angle) :precision binary64 (if (<= b 3e+139) (* 0.011111111111111112 (* angle (* PI (- (* b b) (* a a))))) (* 0.011111111111111112 (* angle (* PI (* b b))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 3e+139) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b * b) - (a * a))));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 3e+139) {
tmp = 0.011111111111111112 * (angle * (Math.PI * ((b * b) - (a * a))));
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 3e+139: tmp = 0.011111111111111112 * (angle * (math.pi * ((b * b) - (a * a)))) else: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 3e+139) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b * b) - Float64(a * a))))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 3e+139) tmp = 0.011111111111111112 * (angle * (pi * ((b * b) - (a * a)))); else tmp = 0.011111111111111112 * (angle * (pi * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 3e+139], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3 \cdot 10^{+139}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if b < 3e139Initial program 59.6%
*-commutative59.6%
associate-*l*59.6%
unpow259.6%
fma-neg60.9%
unpow260.9%
Simplified60.9%
Taylor expanded in angle around 0 53.1%
*-commutative53.1%
unpow253.1%
unpow253.1%
Simplified53.1%
if 3e139 < b Initial program 31.9%
*-commutative31.9%
associate-*l*31.9%
unpow231.9%
fma-neg45.9%
unpow245.9%
Simplified45.9%
Taylor expanded in angle around 0 35.4%
*-commutative35.4%
unpow235.4%
unpow235.4%
Simplified35.4%
Taylor expanded in b around inf 63.1%
*-commutative63.1%
unpow263.1%
Simplified63.1%
Final simplification54.2%
(FPCore (a b angle) :precision binary64 (if (<= b 1.4e+139) (* angle (* 0.011111111111111112 (* PI (- (* b b) (* a a))))) (* 0.011111111111111112 (* angle (* PI (* b b))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.4e+139) {
tmp = angle * (0.011111111111111112 * (((double) M_PI) * ((b * b) - (a * a))));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 1.4e+139) {
tmp = angle * (0.011111111111111112 * (Math.PI * ((b * b) - (a * a))));
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 1.4e+139: tmp = angle * (0.011111111111111112 * (math.pi * ((b * b) - (a * a)))) else: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 1.4e+139) tmp = Float64(angle * Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b * b) - Float64(a * a))))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 1.4e+139) tmp = angle * (0.011111111111111112 * (pi * ((b * b) - (a * a)))); else tmp = 0.011111111111111112 * (angle * (pi * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 1.4e+139], N[(angle * N[(0.011111111111111112 * N[(Pi * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.4 \cdot 10^{+139}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.3999999999999999e139Initial program 59.6%
*-commutative59.6%
associate-*l*59.6%
unpow259.6%
fma-neg60.9%
unpow260.9%
Simplified60.9%
Taylor expanded in angle around 0 53.1%
*-commutative53.1%
unpow253.1%
unpow253.1%
Simplified53.1%
Taylor expanded in angle around 0 53.1%
*-commutative53.1%
unpow253.1%
unpow253.1%
*-commutative53.1%
associate-*l*53.1%
Simplified53.1%
if 1.3999999999999999e139 < b Initial program 31.9%
*-commutative31.9%
associate-*l*31.9%
unpow231.9%
fma-neg45.9%
unpow245.9%
Simplified45.9%
Taylor expanded in angle around 0 35.4%
*-commutative35.4%
unpow235.4%
unpow235.4%
Simplified35.4%
Taylor expanded in b around inf 63.1%
*-commutative63.1%
unpow263.1%
Simplified63.1%
Final simplification54.2%
(FPCore (a b angle) :precision binary64 (* 2.0 (* 0.005555555555555556 (* angle (* (- b a) (* PI (+ b a)))))))
double code(double a, double b, double angle) {
return 2.0 * (0.005555555555555556 * (angle * ((b - a) * (((double) M_PI) * (b + a)))));
}
public static double code(double a, double b, double angle) {
return 2.0 * (0.005555555555555556 * (angle * ((b - a) * (Math.PI * (b + a)))));
}
def code(a, b, angle): return 2.0 * (0.005555555555555556 * (angle * ((b - a) * (math.pi * (b + a)))))
function code(a, b, angle) return Float64(2.0 * Float64(0.005555555555555556 * Float64(angle * Float64(Float64(b - a) * Float64(pi * Float64(b + a)))))) end
function tmp = code(a, b, angle) tmp = 2.0 * (0.005555555555555556 * (angle * ((b - a) * (pi * (b + a))))); end
code[a_, b_, angle_] := N[(2.0 * N[(0.005555555555555556 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\right)
\end{array}
Initial program 56.5%
associate-*l*56.5%
associate-*l*56.5%
unpow256.5%
unpow256.5%
difference-of-squares61.2%
Simplified61.2%
Taylor expanded in angle around 0 56.2%
Final simplification56.2%
(FPCore (a b angle) :precision binary64 (* 2.0 (* (* angle 0.005555555555555556) (* (+ b a) (* (- b a) PI)))))
double code(double a, double b, double angle) {
return 2.0 * ((angle * 0.005555555555555556) * ((b + a) * ((b - a) * ((double) M_PI))));
}
public static double code(double a, double b, double angle) {
return 2.0 * ((angle * 0.005555555555555556) * ((b + a) * ((b - a) * Math.PI)));
}
def code(a, b, angle): return 2.0 * ((angle * 0.005555555555555556) * ((b + a) * ((b - a) * math.pi)))
function code(a, b, angle) return Float64(2.0 * Float64(Float64(angle * 0.005555555555555556) * Float64(Float64(b + a) * Float64(Float64(b - a) * pi)))) end
function tmp = code(a, b, angle) tmp = 2.0 * ((angle * 0.005555555555555556) * ((b + a) * ((b - a) * pi))); end
code[a_, b_, angle_] := N[(2.0 * N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)
\end{array}
Initial program 56.5%
associate-*l*56.5%
associate-*l*56.5%
unpow256.5%
unpow256.5%
difference-of-squares61.2%
Simplified61.2%
Taylor expanded in angle around 0 56.2%
associate-*r*56.2%
*-commutative56.2%
*-commutative56.2%
associate-*r*56.2%
+-commutative56.2%
*-commutative56.2%
+-commutative56.2%
*-commutative56.2%
Simplified56.2%
Final simplification56.2%
(FPCore (a b angle) :precision binary64 (* -0.011111111111111112 (* PI (* angle (* a a)))))
double code(double a, double b, double angle) {
return -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
}
public static double code(double a, double b, double angle) {
return -0.011111111111111112 * (Math.PI * (angle * (a * a)));
}
def code(a, b, angle): return -0.011111111111111112 * (math.pi * (angle * (a * a)))
function code(a, b, angle) return Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a)))) end
function tmp = code(a, b, angle) tmp = -0.011111111111111112 * (pi * (angle * (a * a))); end
code[a_, b_, angle_] := N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)
\end{array}
Initial program 56.5%
associate-*l*56.5%
unpow256.5%
unpow256.5%
Simplified56.5%
clear-num55.5%
un-div-inv57.3%
Applied egg-rr57.3%
Taylor expanded in b around 0 38.2%
associate-*r*38.2%
*-commutative38.2%
associate-*r*40.0%
metadata-eval40.0%
associate-/r/39.2%
associate-*l/40.0%
*-lft-identity40.0%
associate-*r*40.5%
metadata-eval40.5%
associate-/r/40.1%
associate-*l/38.5%
*-lft-identity38.5%
*-commutative38.5%
unpow238.6%
Simplified38.6%
Taylor expanded in angle around 0 35.1%
associate-*r*35.1%
unpow235.1%
Simplified35.1%
Final simplification35.1%
herbie shell --seed 2023238
(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)))))