
(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 19 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 (* (- b a) 2.0))
(t_1 (* angle (* 0.005555555555555556 PI)))
(t_2 (* (- b a) (+ b a)))
(t_3 (cbrt (cbrt t_1)))
(t_4 (* (/ angle 180.0) PI))
(t_5 (cos t_4))
(t_6 (* 2.0 (sin t_4)))
(t_7 (* PI (* angle 0.005555555555555556)))
(t_8 (* (+ b a) (sin t_7))))
(if (<= (/ angle 180.0) -5e+254)
(* t_2 (* (* 2.0 t_1) t_5))
(if (<= (/ angle 180.0) -1e+172)
(fabs
(* (- b a) (* (+ b a) (sin (* (* angle PI) 0.011111111111111112)))))
(if (<= (/ angle 180.0) -2e+168)
(* t_2 (* t_6 (cos (* (pow (pow t_3 2.0) 3.0) (pow t_3 3.0)))))
(if (<= (/ angle 180.0) -5e+90)
(* t_2 (* t_6 (pow (cbrt (cos t_7)) 3.0)))
(if (<= (/ angle 180.0) -4e+34)
(* t_2 (* t_5 (* 2.0 (sin (sqrt (pow t_7 2.0))))))
(if (<= (/ angle 180.0) 5e+61)
(*
(*
t_8
(cos
(*
PI
(cbrt
(* (/ angle 180.0) (* (/ angle 180.0) (/ angle 180.0)))))))
t_0)
(*
t_0
(* t_8 (cos (* PI (expm1 (log1p (/ angle 180.0)))))))))))))))
double code(double a, double b, double angle) {
double t_0 = (b - a) * 2.0;
double t_1 = angle * (0.005555555555555556 * ((double) M_PI));
double t_2 = (b - a) * (b + a);
double t_3 = cbrt(cbrt(t_1));
double t_4 = (angle / 180.0) * ((double) M_PI);
double t_5 = cos(t_4);
double t_6 = 2.0 * sin(t_4);
double t_7 = ((double) M_PI) * (angle * 0.005555555555555556);
double t_8 = (b + a) * sin(t_7);
double tmp;
if ((angle / 180.0) <= -5e+254) {
tmp = t_2 * ((2.0 * t_1) * t_5);
} else if ((angle / 180.0) <= -1e+172) {
tmp = fabs(((b - a) * ((b + a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)))));
} else if ((angle / 180.0) <= -2e+168) {
tmp = t_2 * (t_6 * cos((pow(pow(t_3, 2.0), 3.0) * pow(t_3, 3.0))));
} else if ((angle / 180.0) <= -5e+90) {
tmp = t_2 * (t_6 * pow(cbrt(cos(t_7)), 3.0));
} else if ((angle / 180.0) <= -4e+34) {
tmp = t_2 * (t_5 * (2.0 * sin(sqrt(pow(t_7, 2.0)))));
} else if ((angle / 180.0) <= 5e+61) {
tmp = (t_8 * cos((((double) M_PI) * cbrt(((angle / 180.0) * ((angle / 180.0) * (angle / 180.0))))))) * t_0;
} else {
tmp = t_0 * (t_8 * cos((((double) M_PI) * expm1(log1p((angle / 180.0))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b - a) * 2.0;
double t_1 = angle * (0.005555555555555556 * Math.PI);
double t_2 = (b - a) * (b + a);
double t_3 = Math.cbrt(Math.cbrt(t_1));
double t_4 = (angle / 180.0) * Math.PI;
double t_5 = Math.cos(t_4);
double t_6 = 2.0 * Math.sin(t_4);
double t_7 = Math.PI * (angle * 0.005555555555555556);
double t_8 = (b + a) * Math.sin(t_7);
double tmp;
if ((angle / 180.0) <= -5e+254) {
tmp = t_2 * ((2.0 * t_1) * t_5);
} else if ((angle / 180.0) <= -1e+172) {
tmp = Math.abs(((b - a) * ((b + a) * Math.sin(((angle * Math.PI) * 0.011111111111111112)))));
} else if ((angle / 180.0) <= -2e+168) {
tmp = t_2 * (t_6 * Math.cos((Math.pow(Math.pow(t_3, 2.0), 3.0) * Math.pow(t_3, 3.0))));
} else if ((angle / 180.0) <= -5e+90) {
tmp = t_2 * (t_6 * Math.pow(Math.cbrt(Math.cos(t_7)), 3.0));
} else if ((angle / 180.0) <= -4e+34) {
tmp = t_2 * (t_5 * (2.0 * Math.sin(Math.sqrt(Math.pow(t_7, 2.0)))));
} else if ((angle / 180.0) <= 5e+61) {
tmp = (t_8 * Math.cos((Math.PI * Math.cbrt(((angle / 180.0) * ((angle / 180.0) * (angle / 180.0))))))) * t_0;
} else {
tmp = t_0 * (t_8 * Math.cos((Math.PI * Math.expm1(Math.log1p((angle / 180.0))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(b - a) * 2.0) t_1 = Float64(angle * Float64(0.005555555555555556 * pi)) t_2 = Float64(Float64(b - a) * Float64(b + a)) t_3 = cbrt(cbrt(t_1)) t_4 = Float64(Float64(angle / 180.0) * pi) t_5 = cos(t_4) t_6 = Float64(2.0 * sin(t_4)) t_7 = Float64(pi * Float64(angle * 0.005555555555555556)) t_8 = Float64(Float64(b + a) * sin(t_7)) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+254) tmp = Float64(t_2 * Float64(Float64(2.0 * t_1) * t_5)); elseif (Float64(angle / 180.0) <= -1e+172) tmp = abs(Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112))))); elseif (Float64(angle / 180.0) <= -2e+168) tmp = Float64(t_2 * Float64(t_6 * cos(Float64(((t_3 ^ 2.0) ^ 3.0) * (t_3 ^ 3.0))))); elseif (Float64(angle / 180.0) <= -5e+90) tmp = Float64(t_2 * Float64(t_6 * (cbrt(cos(t_7)) ^ 3.0))); elseif (Float64(angle / 180.0) <= -4e+34) tmp = Float64(t_2 * Float64(t_5 * Float64(2.0 * sin(sqrt((t_7 ^ 2.0)))))); elseif (Float64(angle / 180.0) <= 5e+61) tmp = Float64(Float64(t_8 * cos(Float64(pi * cbrt(Float64(Float64(angle / 180.0) * Float64(Float64(angle / 180.0) * Float64(angle / 180.0))))))) * t_0); else tmp = Float64(t_0 * Float64(t_8 * cos(Float64(pi * expm1(log1p(Float64(angle / 180.0))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$1 = N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$4 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$5 = N[Cos[t$95$4], $MachinePrecision]}, Block[{t$95$6 = N[(2.0 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$7], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+254], N[(t$95$2 * N[(N[(2.0 * t$95$1), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1e+172], N[Abs[N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+168], N[(t$95$2 * N[(t$95$6 * N[Cos[N[(N[Power[N[Power[t$95$3, 2.0], $MachinePrecision], 3.0], $MachinePrecision] * N[Power[t$95$3, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+90], N[(t$95$2 * N[(t$95$6 * N[Power[N[Power[N[Cos[t$95$7], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -4e+34], N[(t$95$2 * N[(t$95$5 * N[(2.0 * N[Sin[N[Sqrt[N[Power[t$95$7, 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+61], N[(N[(t$95$8 * N[Cos[N[(Pi * N[Power[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[(angle / 180.0), $MachinePrecision] * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$0 * N[(t$95$8 * N[Cos[N[(Pi * N[(Exp[N[Log[1 + N[(angle / 180.0), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot 2\\
t_1 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
t_2 := \left(b - a\right) \cdot \left(b + a\right)\\
t_3 := \sqrt[3]{\sqrt[3]{t_1}}\\
t_4 := \frac{angle}{180} \cdot \pi\\
t_5 := \cos t_4\\
t_6 := 2 \cdot \sin t_4\\
t_7 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_8 := \left(b + a\right) \cdot \sin t_7\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+254}:\\
\;\;\;\;t_2 \cdot \left(\left(2 \cdot t_1\right) \cdot t_5\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -1 \cdot 10^{+172}:\\
\;\;\;\;\left|\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\right|\\
\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+168}:\\
\;\;\;\;t_2 \cdot \left(t_6 \cdot \cos \left({\left({t_3}^{2}\right)}^{3} \cdot {t_3}^{3}\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{+90}:\\
\;\;\;\;t_2 \cdot \left(t_6 \cdot {\left(\sqrt[3]{\cos t_7}\right)}^{3}\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -4 \cdot 10^{+34}:\\
\;\;\;\;t_2 \cdot \left(t_5 \cdot \left(2 \cdot \sin \left(\sqrt{{t_7}^{2}}\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+61}:\\
\;\;\;\;\left(t_8 \cdot \cos \left(\pi \cdot \sqrt[3]{\frac{angle}{180} \cdot \left(\frac{angle}{180} \cdot \frac{angle}{180}\right)}\right)\right) \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(t_8 \cdot \cos \left(\pi \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{angle}{180}\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -4.99999999999999994e254Initial program 25.0%
*-commutative25.0%
associate-*l*25.0%
associate-*l*25.0%
unpow225.0%
unpow225.0%
difference-of-squares32.7%
Simplified32.7%
Taylor expanded in angle around 0 41.5%
associate-*r*41.5%
*-commutative41.5%
associate-*l*41.5%
Simplified41.5%
if -4.99999999999999994e254 < (/.f64 angle 180) < -1.0000000000000001e172Initial program 17.6%
*-commutative17.6%
associate-*l*17.6%
associate-*l*17.6%
unpow217.6%
unpow217.6%
difference-of-squares27.6%
Simplified27.6%
add-sqr-sqrt22.5%
sqrt-unprod53.6%
pow253.6%
Applied egg-rr53.6%
unpow253.6%
rem-sqrt-square55.3%
*-commutative55.3%
associate-*l*55.3%
+-commutative55.3%
*-commutative55.3%
associate-*r*55.4%
associate-*l*55.4%
*-commutative55.4%
metadata-eval55.4%
Simplified55.4%
if -1.0000000000000001e172 < (/.f64 angle 180) < -1.9999999999999999e168Initial program 27.1%
*-commutative27.1%
associate-*l*27.1%
associate-*l*27.1%
unpow227.1%
unpow227.1%
difference-of-squares27.1%
Simplified27.1%
add-cube-cbrt27.8%
pow321.1%
div-inv21.1%
metadata-eval21.1%
Applied egg-rr21.1%
add-cube-cbrt64.2%
unpow-prod-down64.5%
Applied egg-rr64.5%
if -1.9999999999999999e168 < (/.f64 angle 180) < -5.0000000000000004e90Initial program 46.2%
*-commutative46.2%
associate-*l*46.2%
associate-*l*46.2%
unpow246.2%
unpow246.2%
difference-of-squares51.0%
Simplified51.0%
add-cube-cbrt51.0%
pow351.0%
div-inv51.6%
metadata-eval51.6%
Applied egg-rr51.6%
if -5.0000000000000004e90 < (/.f64 angle 180) < -3.99999999999999978e34Initial program 11.4%
*-commutative11.4%
associate-*l*11.4%
associate-*l*11.4%
unpow211.4%
unpow211.4%
difference-of-squares11.4%
Simplified11.4%
add-sqr-sqrt0.0%
sqrt-unprod46.8%
pow246.8%
div-inv56.8%
metadata-eval56.8%
Applied egg-rr56.8%
if -3.99999999999999978e34 < (/.f64 angle 180) < 5.00000000000000018e61Initial program 75.8%
*-commutative75.8%
associate-*l*75.8%
associate-*l*75.8%
unpow275.8%
unpow275.8%
difference-of-squares79.1%
Simplified79.1%
add-cube-cbrt79.0%
pow379.0%
div-inv79.4%
metadata-eval79.4%
Applied egg-rr79.4%
Taylor expanded in angle around inf 88.5%
associate-*r*88.5%
*-commutative88.5%
*-commutative88.5%
*-commutative88.5%
+-commutative88.5%
*-commutative88.5%
*-commutative88.5%
associate-*r*89.2%
*-commutative89.2%
*-commutative89.2%
associate-*r*89.6%
Simplified89.6%
metadata-eval89.6%
div-inv89.8%
add-cbrt-cube90.5%
Applied egg-rr90.5%
if 5.00000000000000018e61 < (/.f64 angle 180) Initial program 30.5%
*-commutative30.5%
associate-*l*30.5%
associate-*l*30.5%
unpow230.5%
unpow230.5%
difference-of-squares32.4%
Simplified32.4%
add-cube-cbrt32.4%
pow332.4%
div-inv32.8%
metadata-eval32.8%
Applied egg-rr32.8%
Taylor expanded in angle around inf 26.7%
associate-*r*26.7%
*-commutative26.7%
*-commutative26.7%
*-commutative26.7%
+-commutative26.7%
*-commutative26.7%
*-commutative26.7%
associate-*r*25.2%
*-commutative25.2%
*-commutative25.2%
associate-*r*26.2%
Simplified26.2%
metadata-eval26.2%
div-inv31.1%
expm1-log1p-u45.7%
Applied egg-rr45.7%
Final simplification69.7%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (/ angle 180.0) PI)))
(if (<=
(* (cos t_0) (* (sin t_0) (* 2.0 (- (pow b 2.0) (pow a 2.0)))))
(- INFINITY))
(*
(- b a)
(*
(+ b a)
(fma
-2.2862368541380886e-7
(pow (* angle PI) 3.0)
(* (* angle PI) 0.011111111111111112))))
(* (- b a) (* (+ b a) (sin (* angle (* PI 0.011111111111111112))))))))
double code(double a, double b, double angle) {
double t_0 = (angle / 180.0) * ((double) M_PI);
double tmp;
if ((cos(t_0) * (sin(t_0) * (2.0 * (pow(b, 2.0) - pow(a, 2.0))))) <= -((double) INFINITY)) {
tmp = (b - a) * ((b + a) * fma(-2.2862368541380886e-7, pow((angle * ((double) M_PI)), 3.0), ((angle * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = (b - a) * ((b + a) * sin((angle * (((double) M_PI) * 0.011111111111111112))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(angle / 180.0) * pi) tmp = 0.0 if (Float64(cos(t_0) * Float64(sin(t_0) * Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))))) <= Float64(-Inf)) tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * fma(-2.2862368541380886e-7, (Float64(angle * pi) ^ 3.0), Float64(Float64(angle * pi) * 0.011111111111111112)))); else tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(angle * Float64(pi * 0.011111111111111112))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, If[LessEqual[N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(-2.2862368541380886e-7 * N[Power[N[(angle * Pi), $MachinePrecision], 3.0], $MachinePrecision] + N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
\mathbf{if}\;\cos t_0 \cdot \left(\sin t_0 \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \leq -\infty:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, {\left(angle \cdot \pi\right)}^{3}, \left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\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}
\end{array}
if (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) < -inf.0Initial program 59.5%
*-commutative59.5%
associate-*l*59.5%
associate-*l*59.5%
unpow259.5%
unpow259.5%
difference-of-squares59.5%
Simplified59.5%
difference-of-squares59.5%
*-commutative59.5%
sub-neg59.5%
distribute-lft-in59.5%
associate-*l*59.5%
2-sin59.5%
div-inv59.5%
metadata-eval59.5%
Applied egg-rr54.0%
distribute-lft-out54.0%
sub-neg54.0%
difference-of-squares54.0%
*-commutative54.0%
*-commutative54.0%
associate-*l*70.8%
+-commutative70.8%
*-commutative70.8%
associate-*r*65.4%
associate-*l*65.4%
*-commutative65.4%
metadata-eval65.4%
Simplified65.4%
Taylor expanded in angle around 0 81.7%
+-commutative81.7%
*-commutative81.7%
associate-*r*81.7%
fma-def81.7%
cube-prod81.7%
associate-*r*81.7%
*-commutative81.7%
Simplified81.7%
if -inf.0 < (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) Initial program 48.6%
*-commutative48.6%
associate-*l*48.6%
associate-*l*48.6%
unpow248.6%
unpow248.6%
difference-of-squares53.6%
Simplified53.6%
difference-of-squares48.6%
*-commutative48.6%
sub-neg48.6%
distribute-lft-in48.6%
associate-*l*48.6%
2-sin48.6%
div-inv48.5%
metadata-eval48.5%
Applied egg-rr48.4%
distribute-lft-out48.4%
sub-neg48.4%
difference-of-squares53.5%
*-commutative53.5%
*-commutative53.5%
associate-*l*55.3%
+-commutative55.3%
*-commutative55.3%
associate-*r*53.7%
associate-*l*53.7%
*-commutative53.7%
metadata-eval53.7%
Simplified53.7%
*-un-lft-identity53.7%
associate-*l*56.0%
Applied egg-rr56.0%
Final simplification61.5%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* angle (* 0.005555555555555556 PI)))
(t_1 (* (/ angle 180.0) PI))
(t_2 (cos t_1))
(t_3 (* (- b a) 2.0))
(t_4 (* (- b a) (+ b a)))
(t_5 (* PI (* angle 0.005555555555555556)))
(t_6 (* (+ b a) (sin t_5))))
(if (<= (/ angle 180.0) -5e+254)
(* t_4 (* (* 2.0 t_0) t_2))
(if (<= (/ angle 180.0) -4e+178)
(fabs
(* (- b a) (* (+ b a) (sin (* (* angle PI) 0.011111111111111112)))))
(if (<= (/ angle 180.0) -2e+168)
(* t_4 (* t_2 (* 2.0 (sin (fabs t_0)))))
(if (<= (/ angle 180.0) -5e+90)
(* t_4 (* t_2 (* 2.0 (sin t_1))))
(if (<= (/ angle 180.0) -4e+34)
(* t_4 (* t_2 (* 2.0 (sin (sqrt (pow t_5 2.0))))))
(if (<= (/ angle 180.0) 5e+61)
(*
(*
t_6
(cos
(*
PI
(cbrt
(* (/ angle 180.0) (* (/ angle 180.0) (/ angle 180.0)))))))
t_3)
(*
t_3
(* t_6 (cos (* PI (expm1 (log1p (/ angle 180.0)))))))))))))))
double code(double a, double b, double angle) {
double t_0 = angle * (0.005555555555555556 * ((double) M_PI));
double t_1 = (angle / 180.0) * ((double) M_PI);
double t_2 = cos(t_1);
double t_3 = (b - a) * 2.0;
double t_4 = (b - a) * (b + a);
double t_5 = ((double) M_PI) * (angle * 0.005555555555555556);
double t_6 = (b + a) * sin(t_5);
double tmp;
if ((angle / 180.0) <= -5e+254) {
tmp = t_4 * ((2.0 * t_0) * t_2);
} else if ((angle / 180.0) <= -4e+178) {
tmp = fabs(((b - a) * ((b + a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)))));
} else if ((angle / 180.0) <= -2e+168) {
tmp = t_4 * (t_2 * (2.0 * sin(fabs(t_0))));
} else if ((angle / 180.0) <= -5e+90) {
tmp = t_4 * (t_2 * (2.0 * sin(t_1)));
} else if ((angle / 180.0) <= -4e+34) {
tmp = t_4 * (t_2 * (2.0 * sin(sqrt(pow(t_5, 2.0)))));
} else if ((angle / 180.0) <= 5e+61) {
tmp = (t_6 * cos((((double) M_PI) * cbrt(((angle / 180.0) * ((angle / 180.0) * (angle / 180.0))))))) * t_3;
} else {
tmp = t_3 * (t_6 * cos((((double) M_PI) * expm1(log1p((angle / 180.0))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = angle * (0.005555555555555556 * Math.PI);
double t_1 = (angle / 180.0) * Math.PI;
double t_2 = Math.cos(t_1);
double t_3 = (b - a) * 2.0;
double t_4 = (b - a) * (b + a);
double t_5 = Math.PI * (angle * 0.005555555555555556);
double t_6 = (b + a) * Math.sin(t_5);
double tmp;
if ((angle / 180.0) <= -5e+254) {
tmp = t_4 * ((2.0 * t_0) * t_2);
} else if ((angle / 180.0) <= -4e+178) {
tmp = Math.abs(((b - a) * ((b + a) * Math.sin(((angle * Math.PI) * 0.011111111111111112)))));
} else if ((angle / 180.0) <= -2e+168) {
tmp = t_4 * (t_2 * (2.0 * Math.sin(Math.abs(t_0))));
} else if ((angle / 180.0) <= -5e+90) {
tmp = t_4 * (t_2 * (2.0 * Math.sin(t_1)));
} else if ((angle / 180.0) <= -4e+34) {
tmp = t_4 * (t_2 * (2.0 * Math.sin(Math.sqrt(Math.pow(t_5, 2.0)))));
} else if ((angle / 180.0) <= 5e+61) {
tmp = (t_6 * Math.cos((Math.PI * Math.cbrt(((angle / 180.0) * ((angle / 180.0) * (angle / 180.0))))))) * t_3;
} else {
tmp = t_3 * (t_6 * Math.cos((Math.PI * Math.expm1(Math.log1p((angle / 180.0))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(angle * Float64(0.005555555555555556 * pi)) t_1 = Float64(Float64(angle / 180.0) * pi) t_2 = cos(t_1) t_3 = Float64(Float64(b - a) * 2.0) t_4 = Float64(Float64(b - a) * Float64(b + a)) t_5 = Float64(pi * Float64(angle * 0.005555555555555556)) t_6 = Float64(Float64(b + a) * sin(t_5)) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+254) tmp = Float64(t_4 * Float64(Float64(2.0 * t_0) * t_2)); elseif (Float64(angle / 180.0) <= -4e+178) tmp = abs(Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112))))); elseif (Float64(angle / 180.0) <= -2e+168) tmp = Float64(t_4 * Float64(t_2 * Float64(2.0 * sin(abs(t_0))))); elseif (Float64(angle / 180.0) <= -5e+90) tmp = Float64(t_4 * Float64(t_2 * Float64(2.0 * sin(t_1)))); elseif (Float64(angle / 180.0) <= -4e+34) tmp = Float64(t_4 * Float64(t_2 * Float64(2.0 * sin(sqrt((t_5 ^ 2.0)))))); elseif (Float64(angle / 180.0) <= 5e+61) tmp = Float64(Float64(t_6 * cos(Float64(pi * cbrt(Float64(Float64(angle / 180.0) * Float64(Float64(angle / 180.0) * Float64(angle / 180.0))))))) * t_3); else tmp = Float64(t_3 * Float64(t_6 * cos(Float64(pi * expm1(log1p(Float64(angle / 180.0))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(N[(b - a), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+254], N[(t$95$4 * N[(N[(2.0 * t$95$0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -4e+178], N[Abs[N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+168], N[(t$95$4 * N[(t$95$2 * N[(2.0 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+90], N[(t$95$4 * N[(t$95$2 * N[(2.0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -4e+34], N[(t$95$4 * N[(t$95$2 * N[(2.0 * N[Sin[N[Sqrt[N[Power[t$95$5, 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+61], N[(N[(t$95$6 * N[Cos[N[(Pi * N[Power[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[(angle / 180.0), $MachinePrecision] * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], N[(t$95$3 * N[(t$95$6 * N[Cos[N[(Pi * N[(Exp[N[Log[1 + N[(angle / 180.0), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
t_1 := \frac{angle}{180} \cdot \pi\\
t_2 := \cos t_1\\
t_3 := \left(b - a\right) \cdot 2\\
t_4 := \left(b - a\right) \cdot \left(b + a\right)\\
t_5 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_6 := \left(b + a\right) \cdot \sin t_5\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+254}:\\
\;\;\;\;t_4 \cdot \left(\left(2 \cdot t_0\right) \cdot t_2\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -4 \cdot 10^{+178}:\\
\;\;\;\;\left|\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\right|\\
\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+168}:\\
\;\;\;\;t_4 \cdot \left(t_2 \cdot \left(2 \cdot \sin \left(\left|t_0\right|\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{+90}:\\
\;\;\;\;t_4 \cdot \left(t_2 \cdot \left(2 \cdot \sin t_1\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -4 \cdot 10^{+34}:\\
\;\;\;\;t_4 \cdot \left(t_2 \cdot \left(2 \cdot \sin \left(\sqrt{{t_5}^{2}}\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+61}:\\
\;\;\;\;\left(t_6 \cdot \cos \left(\pi \cdot \sqrt[3]{\frac{angle}{180} \cdot \left(\frac{angle}{180} \cdot \frac{angle}{180}\right)}\right)\right) \cdot t_3\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \left(t_6 \cdot \cos \left(\pi \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{angle}{180}\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -4.99999999999999994e254Initial program 25.0%
*-commutative25.0%
associate-*l*25.0%
associate-*l*25.0%
unpow225.0%
unpow225.0%
difference-of-squares32.7%
Simplified32.7%
Taylor expanded in angle around 0 41.5%
associate-*r*41.5%
*-commutative41.5%
associate-*l*41.5%
Simplified41.5%
if -4.99999999999999994e254 < (/.f64 angle 180) < -4.0000000000000002e178Initial program 15.6%
*-commutative15.6%
associate-*l*15.6%
associate-*l*15.6%
unpow215.6%
unpow215.6%
difference-of-squares27.2%
Simplified27.2%
add-sqr-sqrt22.1%
sqrt-unprod50.2%
pow250.2%
Applied egg-rr50.2%
unpow250.2%
rem-sqrt-square52.1%
*-commutative52.1%
associate-*l*52.1%
+-commutative52.1%
*-commutative52.1%
associate-*r*52.3%
associate-*l*52.3%
*-commutative52.3%
metadata-eval52.3%
Simplified52.3%
if -4.0000000000000002e178 < (/.f64 angle 180) < -1.9999999999999999e168Initial program 28.4%
*-commutative28.4%
associate-*l*28.4%
associate-*l*28.4%
unpow228.4%
unpow228.4%
difference-of-squares28.4%
Simplified28.4%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
pow20.0%
div-inv0.0%
metadata-eval0.0%
Applied egg-rr0.0%
unpow20.0%
rem-sqrt-square45.3%
*-commutative45.3%
associate-*l*67.6%
Simplified67.6%
if -1.9999999999999999e168 < (/.f64 angle 180) < -5.0000000000000004e90Initial program 46.2%
*-commutative46.2%
associate-*l*46.2%
associate-*l*46.2%
unpow246.2%
unpow246.2%
difference-of-squares51.0%
Simplified51.0%
if -5.0000000000000004e90 < (/.f64 angle 180) < -3.99999999999999978e34Initial program 11.4%
*-commutative11.4%
associate-*l*11.4%
associate-*l*11.4%
unpow211.4%
unpow211.4%
difference-of-squares11.4%
Simplified11.4%
add-sqr-sqrt0.0%
sqrt-unprod46.8%
pow246.8%
div-inv56.8%
metadata-eval56.8%
Applied egg-rr56.8%
if -3.99999999999999978e34 < (/.f64 angle 180) < 5.00000000000000018e61Initial program 75.8%
*-commutative75.8%
associate-*l*75.8%
associate-*l*75.8%
unpow275.8%
unpow275.8%
difference-of-squares79.1%
Simplified79.1%
add-cube-cbrt79.0%
pow379.0%
div-inv79.4%
metadata-eval79.4%
Applied egg-rr79.4%
Taylor expanded in angle around inf 88.5%
associate-*r*88.5%
*-commutative88.5%
*-commutative88.5%
*-commutative88.5%
+-commutative88.5%
*-commutative88.5%
*-commutative88.5%
associate-*r*89.2%
*-commutative89.2%
*-commutative89.2%
associate-*r*89.6%
Simplified89.6%
metadata-eval89.6%
div-inv89.8%
add-cbrt-cube90.5%
Applied egg-rr90.5%
if 5.00000000000000018e61 < (/.f64 angle 180) Initial program 30.5%
*-commutative30.5%
associate-*l*30.5%
associate-*l*30.5%
unpow230.5%
unpow230.5%
difference-of-squares32.4%
Simplified32.4%
add-cube-cbrt32.4%
pow332.4%
div-inv32.8%
metadata-eval32.8%
Applied egg-rr32.8%
Taylor expanded in angle around inf 26.7%
associate-*r*26.7%
*-commutative26.7%
*-commutative26.7%
*-commutative26.7%
+-commutative26.7%
*-commutative26.7%
*-commutative26.7%
associate-*r*25.2%
*-commutative25.2%
*-commutative25.2%
associate-*r*26.2%
Simplified26.2%
metadata-eval26.2%
div-inv31.1%
expm1-log1p-u45.7%
Applied egg-rr45.7%
Final simplification69.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* angle (* 0.005555555555555556 PI)))
(t_1 (* PI (* angle 0.005555555555555556)))
(t_2 (* (+ b a) (sin t_1)))
(t_3 (* (/ angle 180.0) PI))
(t_4 (cos t_3))
(t_5 (* (- b a) (+ b a)))
(t_6 (* (- b a) 2.0)))
(if (<= (/ angle 180.0) -5e+254)
(* t_5 (* (* 2.0 t_0) t_4))
(if (<= (/ angle 180.0) -1.5e+172)
(fabs
(* (- b a) (* (+ b a) (sin (* (* angle PI) 0.011111111111111112)))))
(if (<= (/ angle 180.0) -2e+168)
(* t_5 (* t_4 (* 2.0 (sin (fabs t_0)))))
(if (<= (/ angle 180.0) -5e+90)
(* t_5 (* (* 2.0 (sin t_3)) (pow (cbrt (cos t_1)) 3.0)))
(if (<= (/ angle 180.0) -4e+34)
(* t_5 (* t_4 (* 2.0 (sin (sqrt (pow t_1 2.0))))))
(if (<= (/ angle 180.0) 5e+61)
(*
(*
t_2
(cos
(*
PI
(cbrt
(* (/ angle 180.0) (* (/ angle 180.0) (/ angle 180.0)))))))
t_6)
(*
t_6
(* t_2 (cos (* PI (expm1 (log1p (/ angle 180.0)))))))))))))))
double code(double a, double b, double angle) {
double t_0 = angle * (0.005555555555555556 * ((double) M_PI));
double t_1 = ((double) M_PI) * (angle * 0.005555555555555556);
double t_2 = (b + a) * sin(t_1);
double t_3 = (angle / 180.0) * ((double) M_PI);
double t_4 = cos(t_3);
double t_5 = (b - a) * (b + a);
double t_6 = (b - a) * 2.0;
double tmp;
if ((angle / 180.0) <= -5e+254) {
tmp = t_5 * ((2.0 * t_0) * t_4);
} else if ((angle / 180.0) <= -1.5e+172) {
tmp = fabs(((b - a) * ((b + a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)))));
} else if ((angle / 180.0) <= -2e+168) {
tmp = t_5 * (t_4 * (2.0 * sin(fabs(t_0))));
} else if ((angle / 180.0) <= -5e+90) {
tmp = t_5 * ((2.0 * sin(t_3)) * pow(cbrt(cos(t_1)), 3.0));
} else if ((angle / 180.0) <= -4e+34) {
tmp = t_5 * (t_4 * (2.0 * sin(sqrt(pow(t_1, 2.0)))));
} else if ((angle / 180.0) <= 5e+61) {
tmp = (t_2 * cos((((double) M_PI) * cbrt(((angle / 180.0) * ((angle / 180.0) * (angle / 180.0))))))) * t_6;
} else {
tmp = t_6 * (t_2 * cos((((double) M_PI) * expm1(log1p((angle / 180.0))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = angle * (0.005555555555555556 * Math.PI);
double t_1 = Math.PI * (angle * 0.005555555555555556);
double t_2 = (b + a) * Math.sin(t_1);
double t_3 = (angle / 180.0) * Math.PI;
double t_4 = Math.cos(t_3);
double t_5 = (b - a) * (b + a);
double t_6 = (b - a) * 2.0;
double tmp;
if ((angle / 180.0) <= -5e+254) {
tmp = t_5 * ((2.0 * t_0) * t_4);
} else if ((angle / 180.0) <= -1.5e+172) {
tmp = Math.abs(((b - a) * ((b + a) * Math.sin(((angle * Math.PI) * 0.011111111111111112)))));
} else if ((angle / 180.0) <= -2e+168) {
tmp = t_5 * (t_4 * (2.0 * Math.sin(Math.abs(t_0))));
} else if ((angle / 180.0) <= -5e+90) {
tmp = t_5 * ((2.0 * Math.sin(t_3)) * Math.pow(Math.cbrt(Math.cos(t_1)), 3.0));
} else if ((angle / 180.0) <= -4e+34) {
tmp = t_5 * (t_4 * (2.0 * Math.sin(Math.sqrt(Math.pow(t_1, 2.0)))));
} else if ((angle / 180.0) <= 5e+61) {
tmp = (t_2 * Math.cos((Math.PI * Math.cbrt(((angle / 180.0) * ((angle / 180.0) * (angle / 180.0))))))) * t_6;
} else {
tmp = t_6 * (t_2 * Math.cos((Math.PI * Math.expm1(Math.log1p((angle / 180.0))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(angle * Float64(0.005555555555555556 * pi)) t_1 = Float64(pi * Float64(angle * 0.005555555555555556)) t_2 = Float64(Float64(b + a) * sin(t_1)) t_3 = Float64(Float64(angle / 180.0) * pi) t_4 = cos(t_3) t_5 = Float64(Float64(b - a) * Float64(b + a)) t_6 = Float64(Float64(b - a) * 2.0) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+254) tmp = Float64(t_5 * Float64(Float64(2.0 * t_0) * t_4)); elseif (Float64(angle / 180.0) <= -1.5e+172) tmp = abs(Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112))))); elseif (Float64(angle / 180.0) <= -2e+168) tmp = Float64(t_5 * Float64(t_4 * Float64(2.0 * sin(abs(t_0))))); elseif (Float64(angle / 180.0) <= -5e+90) tmp = Float64(t_5 * Float64(Float64(2.0 * sin(t_3)) * (cbrt(cos(t_1)) ^ 3.0))); elseif (Float64(angle / 180.0) <= -4e+34) tmp = Float64(t_5 * Float64(t_4 * Float64(2.0 * sin(sqrt((t_1 ^ 2.0)))))); elseif (Float64(angle / 180.0) <= 5e+61) tmp = Float64(Float64(t_2 * cos(Float64(pi * cbrt(Float64(Float64(angle / 180.0) * Float64(Float64(angle / 180.0) * Float64(angle / 180.0))))))) * t_6); else tmp = Float64(t_6 * Float64(t_2 * cos(Float64(pi * expm1(log1p(Float64(angle / 180.0))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(b - a), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+254], N[(t$95$5 * N[(N[(2.0 * t$95$0), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1.5e+172], N[Abs[N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+168], N[(t$95$5 * N[(t$95$4 * N[(2.0 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+90], N[(t$95$5 * N[(N[(2.0 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[N[Cos[t$95$1], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -4e+34], N[(t$95$5 * N[(t$95$4 * N[(2.0 * N[Sin[N[Sqrt[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+61], N[(N[(t$95$2 * N[Cos[N[(Pi * N[Power[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[(angle / 180.0), $MachinePrecision] * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$6), $MachinePrecision], N[(t$95$6 * N[(t$95$2 * N[Cos[N[(Pi * N[(Exp[N[Log[1 + N[(angle / 180.0), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := angle \cdot \left(0.005555555555555556 \cdot \pi\right)\\
t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_2 := \left(b + a\right) \cdot \sin t_1\\
t_3 := \frac{angle}{180} \cdot \pi\\
t_4 := \cos t_3\\
t_5 := \left(b - a\right) \cdot \left(b + a\right)\\
t_6 := \left(b - a\right) \cdot 2\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+254}:\\
\;\;\;\;t_5 \cdot \left(\left(2 \cdot t_0\right) \cdot t_4\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -1.5 \cdot 10^{+172}:\\
\;\;\;\;\left|\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\right|\\
\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+168}:\\
\;\;\;\;t_5 \cdot \left(t_4 \cdot \left(2 \cdot \sin \left(\left|t_0\right|\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{+90}:\\
\;\;\;\;t_5 \cdot \left(\left(2 \cdot \sin t_3\right) \cdot {\left(\sqrt[3]{\cos t_1}\right)}^{3}\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -4 \cdot 10^{+34}:\\
\;\;\;\;t_5 \cdot \left(t_4 \cdot \left(2 \cdot \sin \left(\sqrt{{t_1}^{2}}\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+61}:\\
\;\;\;\;\left(t_2 \cdot \cos \left(\pi \cdot \sqrt[3]{\frac{angle}{180} \cdot \left(\frac{angle}{180} \cdot \frac{angle}{180}\right)}\right)\right) \cdot t_6\\
\mathbf{else}:\\
\;\;\;\;t_6 \cdot \left(t_2 \cdot \cos \left(\pi \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{angle}{180}\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -4.99999999999999994e254Initial program 25.0%
*-commutative25.0%
associate-*l*25.0%
associate-*l*25.0%
unpow225.0%
unpow225.0%
difference-of-squares32.7%
Simplified32.7%
Taylor expanded in angle around 0 41.5%
associate-*r*41.5%
*-commutative41.5%
associate-*l*41.5%
Simplified41.5%
if -4.99999999999999994e254 < (/.f64 angle 180) < -1.5e172Initial program 18.2%
*-commutative18.2%
associate-*l*18.2%
associate-*l*18.2%
unpow218.2%
unpow218.2%
difference-of-squares28.5%
Simplified28.5%
add-sqr-sqrt23.2%
sqrt-unprod52.0%
pow252.0%
Applied egg-rr52.0%
unpow252.0%
rem-sqrt-square53.7%
*-commutative53.7%
associate-*l*53.7%
+-commutative53.7%
*-commutative53.7%
associate-*r*53.8%
associate-*l*53.8%
*-commutative53.8%
metadata-eval53.8%
Simplified53.8%
if -1.5e172 < (/.f64 angle 180) < -1.9999999999999999e168Initial program 22.6%
*-commutative22.6%
associate-*l*22.6%
associate-*l*22.6%
unpow222.6%
unpow222.6%
difference-of-squares22.6%
Simplified22.6%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
pow20.0%
div-inv0.0%
metadata-eval0.0%
Applied egg-rr0.0%
unpow20.0%
rem-sqrt-square50.9%
*-commutative50.9%
associate-*l*67.6%
Simplified67.6%
if -1.9999999999999999e168 < (/.f64 angle 180) < -5.0000000000000004e90Initial program 46.2%
*-commutative46.2%
associate-*l*46.2%
associate-*l*46.2%
unpow246.2%
unpow246.2%
difference-of-squares51.0%
Simplified51.0%
add-cube-cbrt51.0%
pow351.0%
div-inv51.6%
metadata-eval51.6%
Applied egg-rr51.6%
if -5.0000000000000004e90 < (/.f64 angle 180) < -3.99999999999999978e34Initial program 11.4%
*-commutative11.4%
associate-*l*11.4%
associate-*l*11.4%
unpow211.4%
unpow211.4%
difference-of-squares11.4%
Simplified11.4%
add-sqr-sqrt0.0%
sqrt-unprod46.8%
pow246.8%
div-inv56.8%
metadata-eval56.8%
Applied egg-rr56.8%
if -3.99999999999999978e34 < (/.f64 angle 180) < 5.00000000000000018e61Initial program 75.8%
*-commutative75.8%
associate-*l*75.8%
associate-*l*75.8%
unpow275.8%
unpow275.8%
difference-of-squares79.1%
Simplified79.1%
add-cube-cbrt79.0%
pow379.0%
div-inv79.4%
metadata-eval79.4%
Applied egg-rr79.4%
Taylor expanded in angle around inf 88.5%
associate-*r*88.5%
*-commutative88.5%
*-commutative88.5%
*-commutative88.5%
+-commutative88.5%
*-commutative88.5%
*-commutative88.5%
associate-*r*89.2%
*-commutative89.2%
*-commutative89.2%
associate-*r*89.6%
Simplified89.6%
metadata-eval89.6%
div-inv89.8%
add-cbrt-cube90.5%
Applied egg-rr90.5%
if 5.00000000000000018e61 < (/.f64 angle 180) Initial program 30.5%
*-commutative30.5%
associate-*l*30.5%
associate-*l*30.5%
unpow230.5%
unpow230.5%
difference-of-squares32.4%
Simplified32.4%
add-cube-cbrt32.4%
pow332.4%
div-inv32.8%
metadata-eval32.8%
Applied egg-rr32.8%
Taylor expanded in angle around inf 26.7%
associate-*r*26.7%
*-commutative26.7%
*-commutative26.7%
*-commutative26.7%
+-commutative26.7%
*-commutative26.7%
*-commutative26.7%
associate-*r*25.2%
*-commutative25.2%
*-commutative25.2%
associate-*r*26.2%
Simplified26.2%
metadata-eval26.2%
div-inv31.1%
expm1-log1p-u45.7%
Applied egg-rr45.7%
Final simplification69.6%
(FPCore (a b angle) :precision binary64 (if (<= b 2e+144) (* (- b a) (* (+ b a) (sin (* (* angle PI) 0.011111111111111112)))) (* 0.011111111111111112 (* (* angle (- b a)) (* PI (+ b a))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+144) {
tmp = (b - a) * ((b + a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (((double) M_PI) * (b + a)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+144) {
tmp = (b - a) * ((b + a) * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (Math.PI * (b + a)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 2e+144: tmp = (b - a) * ((b + a) * math.sin(((angle * math.pi) * 0.011111111111111112))) else: tmp = 0.011111111111111112 * ((angle * (b - a)) * (math.pi * (b + a))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 2e+144) tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(angle * Float64(b - a)) * Float64(pi * Float64(b + a)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2e+144) tmp = (b - a) * ((b + a) * sin(((angle * pi) * 0.011111111111111112))); else tmp = 0.011111111111111112 * ((angle * (b - a)) * (pi * (b + a))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 2e+144], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2 \cdot 10^{+144}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.00000000000000005e144Initial program 52.8%
*-commutative52.8%
associate-*l*52.8%
associate-*l*52.8%
unpow252.8%
unpow252.8%
difference-of-squares55.6%
Simplified55.6%
difference-of-squares52.8%
*-commutative52.8%
sub-neg52.8%
distribute-lft-in52.8%
associate-*l*52.8%
2-sin52.8%
div-inv51.8%
metadata-eval51.8%
Applied egg-rr50.4%
distribute-lft-out50.4%
sub-neg50.4%
difference-of-squares53.1%
*-commutative53.1%
*-commutative53.1%
associate-*l*56.6%
+-commutative56.6%
*-commutative56.6%
associate-*r*55.5%
associate-*l*55.5%
*-commutative55.5%
metadata-eval55.5%
Simplified55.5%
if 2.00000000000000005e144 < b Initial program 40.8%
*-commutative40.8%
associate-*l*40.8%
associate-*l*40.8%
unpow240.8%
unpow240.8%
difference-of-squares51.0%
Simplified51.0%
difference-of-squares40.8%
*-commutative40.8%
sub-neg40.8%
distribute-lft-in40.8%
associate-*l*40.8%
2-sin40.8%
div-inv45.8%
metadata-eval45.8%
Applied egg-rr45.8%
distribute-lft-out45.8%
sub-neg45.8%
difference-of-squares56.0%
*-commutative56.0%
*-commutative56.0%
associate-*l*69.8%
+-commutative69.8%
*-commutative69.8%
associate-*r*59.8%
associate-*l*59.8%
*-commutative59.8%
metadata-eval59.8%
Simplified59.8%
log1p-expm1-u59.8%
associate-*l*59.8%
Applied egg-rr59.8%
Taylor expanded in angle around 0 56.2%
associate-*r*70.1%
*-commutative70.1%
+-commutative70.1%
Simplified70.1%
Final simplification57.8%
(FPCore (a b angle) :precision binary64 (if (<= b 2e+144) (* (- b a) (* (+ b a) (sin (* angle (* PI 0.011111111111111112))))) (* 0.011111111111111112 (* (* angle (- b a)) (* PI (+ b a))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+144) {
tmp = (b - a) * ((b + a) * sin((angle * (((double) M_PI) * 0.011111111111111112))));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (((double) M_PI) * (b + a)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 2e+144) {
tmp = (b - a) * ((b + a) * Math.sin((angle * (Math.PI * 0.011111111111111112))));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (Math.PI * (b + a)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 2e+144: tmp = (b - a) * ((b + a) * math.sin((angle * (math.pi * 0.011111111111111112)))) else: tmp = 0.011111111111111112 * ((angle * (b - a)) * (math.pi * (b + a))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 2e+144) tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(angle * Float64(pi * 0.011111111111111112))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(angle * Float64(b - a)) * Float64(pi * Float64(b + a)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 2e+144) tmp = (b - a) * ((b + a) * sin((angle * (pi * 0.011111111111111112)))); else tmp = 0.011111111111111112 * ((angle * (b - a)) * (pi * (b + a))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 2e+144], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2 \cdot 10^{+144}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.00000000000000005e144Initial program 52.8%
*-commutative52.8%
associate-*l*52.8%
associate-*l*52.8%
unpow252.8%
unpow252.8%
difference-of-squares55.6%
Simplified55.6%
difference-of-squares52.8%
*-commutative52.8%
sub-neg52.8%
distribute-lft-in52.8%
associate-*l*52.8%
2-sin52.8%
div-inv51.8%
metadata-eval51.8%
Applied egg-rr50.4%
distribute-lft-out50.4%
sub-neg50.4%
difference-of-squares53.1%
*-commutative53.1%
*-commutative53.1%
associate-*l*56.6%
+-commutative56.6%
*-commutative56.6%
associate-*r*55.5%
associate-*l*55.5%
*-commutative55.5%
metadata-eval55.5%
Simplified55.5%
*-un-lft-identity55.5%
associate-*l*57.7%
Applied egg-rr57.7%
if 2.00000000000000005e144 < b Initial program 40.8%
*-commutative40.8%
associate-*l*40.8%
associate-*l*40.8%
unpow240.8%
unpow240.8%
difference-of-squares51.0%
Simplified51.0%
difference-of-squares40.8%
*-commutative40.8%
sub-neg40.8%
distribute-lft-in40.8%
associate-*l*40.8%
2-sin40.8%
div-inv45.8%
metadata-eval45.8%
Applied egg-rr45.8%
distribute-lft-out45.8%
sub-neg45.8%
difference-of-squares56.0%
*-commutative56.0%
*-commutative56.0%
associate-*l*69.8%
+-commutative69.8%
*-commutative69.8%
associate-*r*59.8%
associate-*l*59.8%
*-commutative59.8%
metadata-eval59.8%
Simplified59.8%
log1p-expm1-u59.8%
associate-*l*59.8%
Applied egg-rr59.8%
Taylor expanded in angle around 0 56.2%
associate-*r*70.1%
*-commutative70.1%
+-commutative70.1%
Simplified70.1%
Final simplification59.6%
(FPCore (a b angle) :precision binary64 (if (<= b 3.6e-118) (* (- b a) (* a (sin (* PI (* angle 0.011111111111111112))))) (* 0.011111111111111112 (* (* angle (- b a)) (* PI (+ b a))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 3.6e-118) {
tmp = (b - a) * (a * sin((((double) M_PI) * (angle * 0.011111111111111112))));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (((double) M_PI) * (b + a)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 3.6e-118) {
tmp = (b - a) * (a * Math.sin((Math.PI * (angle * 0.011111111111111112))));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (Math.PI * (b + a)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 3.6e-118: tmp = (b - a) * (a * math.sin((math.pi * (angle * 0.011111111111111112)))) else: tmp = 0.011111111111111112 * ((angle * (b - a)) * (math.pi * (b + a))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 3.6e-118) tmp = Float64(Float64(b - a) * Float64(a * sin(Float64(pi * Float64(angle * 0.011111111111111112))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(angle * Float64(b - a)) * Float64(pi * Float64(b + a)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 3.6e-118) tmp = (b - a) * (a * sin((pi * (angle * 0.011111111111111112)))); else tmp = 0.011111111111111112 * ((angle * (b - a)) * (pi * (b + a))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 3.6e-118], N[(N[(b - a), $MachinePrecision] * N[(a * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.6 \cdot 10^{-118}:\\
\;\;\;\;\left(b - a\right) \cdot \left(a \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
\end{array}
\end{array}
if b < 3.6000000000000002e-118Initial program 51.8%
*-commutative51.8%
associate-*l*51.8%
associate-*l*51.8%
unpow251.8%
unpow251.8%
difference-of-squares55.8%
Simplified55.8%
difference-of-squares51.8%
*-commutative51.8%
sub-neg51.8%
distribute-lft-in51.8%
associate-*l*51.8%
2-sin51.8%
div-inv50.5%
metadata-eval50.5%
Applied egg-rr49.1%
distribute-lft-out49.1%
sub-neg49.1%
difference-of-squares53.1%
*-commutative53.1%
*-commutative53.1%
associate-*l*57.4%
+-commutative57.4%
*-commutative57.4%
associate-*r*57.3%
associate-*l*57.3%
*-commutative57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in a around inf 38.5%
*-commutative38.5%
associate-*r*36.3%
Simplified36.3%
if 3.6000000000000002e-118 < b Initial program 49.7%
*-commutative49.7%
associate-*l*49.7%
associate-*l*49.7%
unpow249.7%
unpow249.7%
difference-of-squares53.6%
Simplified53.6%
difference-of-squares49.7%
*-commutative49.7%
sub-neg49.7%
distribute-lft-in49.7%
associate-*l*49.7%
2-sin49.7%
div-inv51.4%
metadata-eval51.4%
Applied egg-rr50.4%
distribute-lft-out50.4%
sub-neg50.4%
difference-of-squares54.2%
*-commutative54.2%
*-commutative54.2%
associate-*l*60.4%
+-commutative60.4%
*-commutative60.4%
associate-*r*54.7%
associate-*l*54.7%
*-commutative54.7%
metadata-eval54.7%
Simplified54.7%
log1p-expm1-u54.7%
associate-*l*57.1%
Applied egg-rr57.1%
Taylor expanded in angle around 0 52.4%
associate-*r*58.5%
*-commutative58.5%
+-commutative58.5%
Simplified58.5%
Final simplification45.5%
(FPCore (a b angle) :precision binary64 (if (<= b 1.52e-118) (* (- b a) (* a (sin (* (* angle PI) 0.011111111111111112)))) (* 0.011111111111111112 (* (* angle (- b a)) (* PI (+ b a))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.52e-118) {
tmp = (b - a) * (a * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (((double) M_PI) * (b + a)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 1.52e-118) {
tmp = (b - a) * (a * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (Math.PI * (b + a)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 1.52e-118: tmp = (b - a) * (a * math.sin(((angle * math.pi) * 0.011111111111111112))) else: tmp = 0.011111111111111112 * ((angle * (b - a)) * (math.pi * (b + a))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 1.52e-118) tmp = Float64(Float64(b - a) * Float64(a * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(angle * Float64(b - a)) * Float64(pi * Float64(b + a)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 1.52e-118) tmp = (b - a) * (a * sin(((angle * pi) * 0.011111111111111112))); else tmp = 0.011111111111111112 * ((angle * (b - a)) * (pi * (b + a))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 1.52e-118], N[(N[(b - a), $MachinePrecision] * N[(a * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.52 \cdot 10^{-118}:\\
\;\;\;\;\left(b - a\right) \cdot \left(a \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.5199999999999999e-118Initial program 51.8%
*-commutative51.8%
associate-*l*51.8%
associate-*l*51.8%
unpow251.8%
unpow251.8%
difference-of-squares55.8%
Simplified55.8%
difference-of-squares51.8%
*-commutative51.8%
sub-neg51.8%
distribute-lft-in51.8%
associate-*l*51.8%
2-sin51.8%
div-inv50.5%
metadata-eval50.5%
Applied egg-rr49.1%
distribute-lft-out49.1%
sub-neg49.1%
difference-of-squares53.1%
*-commutative53.1%
*-commutative53.1%
associate-*l*57.4%
+-commutative57.4%
*-commutative57.4%
associate-*r*57.3%
associate-*l*57.3%
*-commutative57.3%
metadata-eval57.3%
Simplified57.3%
Taylor expanded in a around inf 38.5%
if 1.5199999999999999e-118 < b Initial program 49.7%
*-commutative49.7%
associate-*l*49.7%
associate-*l*49.7%
unpow249.7%
unpow249.7%
difference-of-squares53.6%
Simplified53.6%
difference-of-squares49.7%
*-commutative49.7%
sub-neg49.7%
distribute-lft-in49.7%
associate-*l*49.7%
2-sin49.7%
div-inv51.4%
metadata-eval51.4%
Applied egg-rr50.4%
distribute-lft-out50.4%
sub-neg50.4%
difference-of-squares54.2%
*-commutative54.2%
*-commutative54.2%
associate-*l*60.4%
+-commutative60.4%
*-commutative60.4%
associate-*r*54.7%
associate-*l*54.7%
*-commutative54.7%
metadata-eval54.7%
Simplified54.7%
log1p-expm1-u54.7%
associate-*l*57.1%
Applied egg-rr57.1%
Taylor expanded in angle around 0 52.4%
associate-*r*58.5%
*-commutative58.5%
+-commutative58.5%
Simplified58.5%
Final simplification46.8%
(FPCore (a b angle) :precision binary64 (if (<= b 5.1e-118) (* (- b a) (* a (sin (* angle (* PI 0.011111111111111112))))) (* 0.011111111111111112 (* (* angle (- b a)) (* PI (+ b a))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 5.1e-118) {
tmp = (b - a) * (a * sin((angle * (((double) M_PI) * 0.011111111111111112))));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (((double) M_PI) * (b + a)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 5.1e-118) {
tmp = (b - a) * (a * Math.sin((angle * (Math.PI * 0.011111111111111112))));
} else {
tmp = 0.011111111111111112 * ((angle * (b - a)) * (Math.PI * (b + a)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 5.1e-118: tmp = (b - a) * (a * math.sin((angle * (math.pi * 0.011111111111111112)))) else: tmp = 0.011111111111111112 * ((angle * (b - a)) * (math.pi * (b + a))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 5.1e-118) tmp = Float64(Float64(b - a) * Float64(a * sin(Float64(angle * Float64(pi * 0.011111111111111112))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(angle * Float64(b - a)) * Float64(pi * Float64(b + a)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 5.1e-118) tmp = (b - a) * (a * sin((angle * (pi * 0.011111111111111112)))); else tmp = 0.011111111111111112 * ((angle * (b - a)) * (pi * (b + a))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 5.1e-118], N[(N[(b - a), $MachinePrecision] * N[(a * N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.1 \cdot 10^{-118}:\\
\;\;\;\;\left(b - a\right) \cdot \left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
\end{array}
\end{array}
if b < 5.09999999999999964e-118Initial program 51.8%
*-commutative51.8%
associate-*l*51.8%
associate-*l*51.8%
unpow251.8%
unpow251.8%
difference-of-squares55.8%
Simplified55.8%
difference-of-squares51.8%
*-commutative51.8%
sub-neg51.8%
distribute-lft-in51.8%
associate-*l*51.8%
2-sin51.8%
div-inv50.5%
metadata-eval50.5%
Applied egg-rr49.1%
distribute-lft-out49.1%
sub-neg49.1%
difference-of-squares53.1%
*-commutative53.1%
*-commutative53.1%
associate-*l*57.4%
+-commutative57.4%
*-commutative57.4%
associate-*r*57.3%
associate-*l*57.3%
*-commutative57.3%
metadata-eval57.3%
Simplified57.3%
log1p-expm1-u57.3%
associate-*l*58.7%
Applied egg-rr58.7%
Taylor expanded in a around inf 38.5%
*-commutative38.5%
associate-*r*40.0%
*-commutative40.0%
Simplified40.0%
if 5.09999999999999964e-118 < b Initial program 49.7%
*-commutative49.7%
associate-*l*49.7%
associate-*l*49.7%
unpow249.7%
unpow249.7%
difference-of-squares53.6%
Simplified53.6%
difference-of-squares49.7%
*-commutative49.7%
sub-neg49.7%
distribute-lft-in49.7%
associate-*l*49.7%
2-sin49.7%
div-inv51.4%
metadata-eval51.4%
Applied egg-rr50.4%
distribute-lft-out50.4%
sub-neg50.4%
difference-of-squares54.2%
*-commutative54.2%
*-commutative54.2%
associate-*l*60.4%
+-commutative60.4%
*-commutative60.4%
associate-*r*54.7%
associate-*l*54.7%
*-commutative54.7%
metadata-eval54.7%
Simplified54.7%
log1p-expm1-u54.7%
associate-*l*57.1%
Applied egg-rr57.1%
Taylor expanded in angle around 0 52.4%
associate-*r*58.5%
*-commutative58.5%
+-commutative58.5%
Simplified58.5%
Final simplification47.7%
(FPCore (a b angle) :precision binary64 (if (<= b 1.05e-147) (* (sin (* angle (* PI 0.011111111111111112))) (* a (- a))) (* (- b a) (* (+ b a) (* (* angle PI) 0.011111111111111112)))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.05e-147) {
tmp = sin((angle * (((double) M_PI) * 0.011111111111111112))) * (a * -a);
} else {
tmp = (b - a) * ((b + a) * ((angle * ((double) M_PI)) * 0.011111111111111112));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 1.05e-147) {
tmp = Math.sin((angle * (Math.PI * 0.011111111111111112))) * (a * -a);
} else {
tmp = (b - a) * ((b + a) * ((angle * Math.PI) * 0.011111111111111112));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 1.05e-147: tmp = math.sin((angle * (math.pi * 0.011111111111111112))) * (a * -a) else: tmp = (b - a) * ((b + a) * ((angle * math.pi) * 0.011111111111111112)) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 1.05e-147) tmp = Float64(sin(Float64(angle * Float64(pi * 0.011111111111111112))) * Float64(a * Float64(-a))); else tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(Float64(angle * pi) * 0.011111111111111112))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 1.05e-147) tmp = sin((angle * (pi * 0.011111111111111112))) * (a * -a); else tmp = (b - a) * ((b + a) * ((angle * pi) * 0.011111111111111112)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 1.05e-147], N[(N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a * (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.05 \cdot 10^{-147}:\\
\;\;\;\;\sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(a \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if b < 1.05e-147Initial program 51.1%
*-commutative51.1%
associate-*l*51.1%
associate-*l*51.1%
unpow251.1%
unpow251.1%
difference-of-squares55.3%
Simplified55.3%
difference-of-squares51.1%
*-commutative51.1%
sub-neg51.1%
distribute-lft-in51.1%
associate-*l*51.1%
2-sin51.1%
div-inv49.6%
metadata-eval49.6%
Applied egg-rr48.2%
distribute-lft-out48.2%
sub-neg48.2%
difference-of-squares52.4%
*-commutative52.4%
*-commutative52.4%
associate-*l*56.9%
+-commutative56.9%
*-commutative56.9%
associate-*r*56.8%
associate-*l*56.8%
*-commutative56.8%
metadata-eval56.8%
Simplified56.8%
log1p-expm1-u56.8%
associate-*l*57.6%
Applied egg-rr57.6%
Taylor expanded in b around 0 33.0%
mul-1-neg33.0%
distribute-rgt-neg-in33.0%
*-commutative33.0%
associate-*r*33.6%
*-commutative33.6%
unpow233.6%
distribute-rgt-neg-in33.6%
Simplified33.6%
if 1.05e-147 < b Initial program 50.8%
*-commutative50.8%
associate-*l*50.8%
associate-*l*50.8%
unpow250.8%
unpow250.8%
difference-of-squares54.4%
Simplified54.4%
difference-of-squares50.8%
*-commutative50.8%
sub-neg50.8%
distribute-lft-in50.8%
associate-*l*50.8%
2-sin50.8%
div-inv52.4%
metadata-eval52.4%
Applied egg-rr51.4%
distribute-lft-out51.4%
sub-neg51.4%
difference-of-squares55.0%
*-commutative55.0%
*-commutative55.0%
associate-*l*60.7%
+-commutative60.7%
*-commutative60.7%
associate-*r*55.4%
associate-*l*55.4%
*-commutative55.4%
metadata-eval55.4%
Simplified55.4%
Taylor expanded in angle around 0 58.9%
Final simplification44.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (* angle PI) 0.011111111111111112)))
(if (<= b 1.04e-147)
(* (sin t_0) (* a (- a)))
(* (- b a) (* (+ b a) t_0)))))
double code(double a, double b, double angle) {
double t_0 = (angle * ((double) M_PI)) * 0.011111111111111112;
double tmp;
if (b <= 1.04e-147) {
tmp = sin(t_0) * (a * -a);
} else {
tmp = (b - a) * ((b + a) * t_0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (angle * Math.PI) * 0.011111111111111112;
double tmp;
if (b <= 1.04e-147) {
tmp = Math.sin(t_0) * (a * -a);
} else {
tmp = (b - a) * ((b + a) * t_0);
}
return tmp;
}
def code(a, b, angle): t_0 = (angle * math.pi) * 0.011111111111111112 tmp = 0 if b <= 1.04e-147: tmp = math.sin(t_0) * (a * -a) else: tmp = (b - a) * ((b + a) * t_0) return tmp
function code(a, b, angle) t_0 = Float64(Float64(angle * pi) * 0.011111111111111112) tmp = 0.0 if (b <= 1.04e-147) tmp = Float64(sin(t_0) * Float64(a * Float64(-a))); 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 = (angle * pi) * 0.011111111111111112; tmp = 0.0; if (b <= 1.04e-147) tmp = sin(t_0) * (a * -a); else tmp = (b - a) * ((b + a) * t_0); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]}, If[LessEqual[b, 1.04e-147], N[(N[Sin[t$95$0], $MachinePrecision] * N[(a * (-a)), $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 := \left(angle \cdot \pi\right) \cdot 0.011111111111111112\\
\mathbf{if}\;b \leq 1.04 \cdot 10^{-147}:\\
\;\;\;\;\sin t_0 \cdot \left(a \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot t_0\right)\\
\end{array}
\end{array}
if b < 1.04000000000000003e-147Initial program 51.1%
*-commutative51.1%
associate-*l*51.1%
associate-*l*51.1%
unpow251.1%
unpow251.1%
difference-of-squares55.3%
Simplified55.3%
difference-of-squares51.1%
*-commutative51.1%
prod-diff42.4%
fma-neg42.4%
distribute-lft-in42.4%
Applied egg-rr42.4%
*-commutative42.4%
distribute-rgt-out42.4%
*-commutative42.4%
Simplified40.8%
Taylor expanded in b around 0 33.0%
mul-1-neg33.0%
unpow233.0%
distribute-rgt-neg-in33.0%
Simplified33.0%
if 1.04000000000000003e-147 < b Initial program 50.8%
*-commutative50.8%
associate-*l*50.8%
associate-*l*50.8%
unpow250.8%
unpow250.8%
difference-of-squares54.4%
Simplified54.4%
difference-of-squares50.8%
*-commutative50.8%
sub-neg50.8%
distribute-lft-in50.8%
associate-*l*50.8%
2-sin50.8%
div-inv52.4%
metadata-eval52.4%
Applied egg-rr51.4%
distribute-lft-out51.4%
sub-neg51.4%
difference-of-squares55.0%
*-commutative55.0%
*-commutative55.0%
associate-*l*60.7%
+-commutative60.7%
*-commutative60.7%
associate-*r*55.4%
associate-*l*55.4%
*-commutative55.4%
metadata-eval55.4%
Simplified55.4%
Taylor expanded in angle around 0 58.9%
Final simplification44.5%
(FPCore (a b angle) :precision binary64 (if (<= a 1.32e-40) (* 0.011111111111111112 (* angle (* PI (* b b)))) (* 0.011111111111111112 (* angle (* (- b a) (* a PI))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 1.32e-40) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * ((double) M_PI))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 1.32e-40) {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * Math.PI)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 1.32e-40: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) else: tmp = 0.011111111111111112 * (angle * ((b - a) * (a * math.pi))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 1.32e-40) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(a * pi)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 1.32e-40) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); else tmp = 0.011111111111111112 * (angle * ((b - a) * (a * pi))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 1.32e-40], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.32 \cdot 10^{-40}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if a < 1.32000000000000009e-40Initial program 52.9%
*-commutative52.9%
associate-*l*52.9%
associate-*l*52.9%
unpow252.9%
unpow252.9%
difference-of-squares55.2%
Simplified55.2%
Taylor expanded in angle around 0 51.6%
Taylor expanded in b around inf 37.8%
*-commutative37.8%
unpow237.8%
Simplified37.8%
if 1.32000000000000009e-40 < a Initial program 45.9%
*-commutative45.9%
associate-*l*45.9%
associate-*l*45.9%
unpow245.9%
unpow245.9%
difference-of-squares54.2%
Simplified54.2%
Taylor expanded in angle around 0 49.8%
Taylor expanded in a around inf 41.5%
*-commutative41.5%
Simplified41.5%
Final simplification38.8%
(FPCore (a b angle) :precision binary64 (if (<= a 8e-40) (* 0.011111111111111112 (* angle (* (- b a) (* b PI)))) (* 0.011111111111111112 (* angle (* (- b a) (* a PI))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 8e-40) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * ((double) M_PI))));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * ((double) M_PI))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 8e-40) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * Math.PI)));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * Math.PI)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 8e-40: tmp = 0.011111111111111112 * (angle * ((b - a) * (b * math.pi))) else: tmp = 0.011111111111111112 * (angle * ((b - a) * (a * math.pi))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 8e-40) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(b * pi)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(a * pi)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 8e-40) tmp = 0.011111111111111112 * (angle * ((b - a) * (b * pi))); else tmp = 0.011111111111111112 * (angle * ((b - a) * (a * pi))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 8e-40], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8 \cdot 10^{-40}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if a < 7.9999999999999994e-40Initial program 52.9%
*-commutative52.9%
associate-*l*52.9%
associate-*l*52.9%
unpow252.9%
unpow252.9%
difference-of-squares55.2%
Simplified55.2%
Taylor expanded in angle around 0 51.6%
Taylor expanded in a around 0 40.0%
*-commutative40.0%
Simplified40.0%
if 7.9999999999999994e-40 < a Initial program 45.9%
*-commutative45.9%
associate-*l*45.9%
associate-*l*45.9%
unpow245.9%
unpow245.9%
difference-of-squares54.2%
Simplified54.2%
Taylor expanded in angle around 0 49.8%
Taylor expanded in a around inf 41.5%
*-commutative41.5%
Simplified41.5%
Final simplification40.4%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* angle (* (- b a) (* PI (+ b a))))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * ((b - a) * (((double) M_PI) * (b + a))));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * ((b - a) * (Math.PI * (b + a))));
}
def code(a, b, angle): return 0.011111111111111112 * (angle * ((b - a) * (math.pi * (b + a))))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(pi * Float64(b + a))))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (angle * ((b - a) * (pi * (b + a)))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)
\end{array}
Initial program 51.0%
*-commutative51.0%
associate-*l*51.0%
associate-*l*51.0%
unpow251.0%
unpow251.0%
difference-of-squares54.9%
Simplified54.9%
Taylor expanded in angle around 0 51.1%
Final simplification51.1%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* (* angle (- b a)) (* PI (+ b a)))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * ((angle * (b - a)) * (((double) M_PI) * (b + a)));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * ((angle * (b - a)) * (Math.PI * (b + a)));
}
def code(a, b, angle): return 0.011111111111111112 * ((angle * (b - a)) * (math.pi * (b + a)))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(angle * Float64(b - a)) * Float64(pi * Float64(b + a)))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * ((angle * (b - a)) * (pi * (b + a))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)
\end{array}
Initial program 51.0%
*-commutative51.0%
associate-*l*51.0%
associate-*l*51.0%
unpow251.0%
unpow251.0%
difference-of-squares54.9%
Simplified54.9%
difference-of-squares51.0%
*-commutative51.0%
sub-neg51.0%
distribute-lft-in51.0%
associate-*l*51.0%
2-sin51.0%
div-inv50.9%
metadata-eval50.9%
Applied egg-rr49.6%
distribute-lft-out49.6%
sub-neg49.6%
difference-of-squares53.6%
*-commutative53.6%
*-commutative53.6%
associate-*l*58.6%
+-commutative58.6%
*-commutative58.6%
associate-*r*56.2%
associate-*l*56.2%
*-commutative56.2%
metadata-eval56.2%
Simplified56.2%
log1p-expm1-u56.2%
associate-*l*58.0%
Applied egg-rr58.0%
Taylor expanded in angle around 0 51.1%
associate-*r*55.4%
*-commutative55.4%
+-commutative55.4%
Simplified55.4%
Final simplification55.4%
(FPCore (a b angle) :precision binary64 (* (- b a) (* (+ b a) (* (* angle PI) 0.011111111111111112))))
double code(double a, double b, double angle) {
return (b - a) * ((b + a) * ((angle * ((double) M_PI)) * 0.011111111111111112));
}
public static double code(double a, double b, double angle) {
return (b - a) * ((b + a) * ((angle * Math.PI) * 0.011111111111111112));
}
def code(a, b, angle): return (b - a) * ((b + a) * ((angle * math.pi) * 0.011111111111111112))
function code(a, b, angle) return Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(Float64(angle * pi) * 0.011111111111111112))) end
function tmp = code(a, b, angle) tmp = (b - a) * ((b + a) * ((angle * pi) * 0.011111111111111112)); end
code[a_, b_, angle_] := N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)
\end{array}
Initial program 51.0%
*-commutative51.0%
associate-*l*51.0%
associate-*l*51.0%
unpow251.0%
unpow251.0%
difference-of-squares54.9%
Simplified54.9%
difference-of-squares51.0%
*-commutative51.0%
sub-neg51.0%
distribute-lft-in51.0%
associate-*l*51.0%
2-sin51.0%
div-inv50.9%
metadata-eval50.9%
Applied egg-rr49.6%
distribute-lft-out49.6%
sub-neg49.6%
difference-of-squares53.6%
*-commutative53.6%
*-commutative53.6%
associate-*l*58.6%
+-commutative58.6%
*-commutative58.6%
associate-*r*56.2%
associate-*l*56.2%
*-commutative56.2%
metadata-eval56.2%
Simplified56.2%
Taylor expanded in angle around 0 55.4%
Final simplification55.4%
(FPCore (a b angle) :precision binary64 (if (<= a 90000000000.0) (* 0.011111111111111112 (* angle (* PI (* b b)))) (* (* angle (* a a)) (* PI -0.011111111111111112))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 90000000000.0) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
} else {
tmp = (angle * (a * a)) * (((double) M_PI) * -0.011111111111111112);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 90000000000.0) {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
} else {
tmp = (angle * (a * a)) * (Math.PI * -0.011111111111111112);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 90000000000.0: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) else: tmp = (angle * (a * a)) * (math.pi * -0.011111111111111112) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 90000000000.0) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); else tmp = Float64(Float64(angle * Float64(a * a)) * Float64(pi * -0.011111111111111112)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 90000000000.0) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); else tmp = (angle * (a * a)) * (pi * -0.011111111111111112); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 90000000000.0], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 90000000000:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot -0.011111111111111112\right)\\
\end{array}
\end{array}
if a < 9e10Initial program 53.2%
*-commutative53.2%
associate-*l*53.2%
associate-*l*53.2%
unpow253.2%
unpow253.2%
difference-of-squares55.3%
Simplified55.3%
Taylor expanded in angle around 0 51.8%
Taylor expanded in b around inf 37.2%
*-commutative37.2%
unpow237.2%
Simplified37.2%
if 9e10 < a Initial program 43.0%
*-commutative43.0%
associate-*l*43.0%
associate-*l*43.0%
unpow243.0%
unpow243.0%
difference-of-squares53.5%
Simplified53.5%
Taylor expanded in angle around 0 48.4%
Taylor expanded in b around 0 41.4%
*-commutative41.4%
associate-*r*41.5%
associate-*l*41.5%
unpow241.5%
Simplified41.5%
Final simplification38.2%
(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 51.0%
*-commutative51.0%
associate-*l*51.0%
associate-*l*51.0%
unpow251.0%
unpow251.0%
difference-of-squares54.9%
Simplified54.9%
Taylor expanded in angle around 0 51.1%
Taylor expanded in b around inf 33.2%
*-commutative33.2%
unpow233.2%
Simplified33.2%
Final simplification33.2%
(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(Float64(angle * 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[(N[(angle * Pi), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(b \cdot b\right)\right)
\end{array}
Initial program 51.0%
*-commutative51.0%
associate-*l*51.0%
associate-*l*51.0%
unpow251.0%
unpow251.0%
difference-of-squares54.9%
Simplified54.9%
Taylor expanded in angle around 0 51.1%
Taylor expanded in b around inf 33.2%
associate-*r*33.2%
unpow233.2%
Simplified33.2%
Taylor expanded in angle around 0 33.2%
*-commutative33.2%
associate-*r*33.2%
unpow233.2%
Simplified33.2%
Final simplification33.2%
herbie shell --seed 2023274
(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)))))