
(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 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t_0\right) \cdot \cos t_0
\end{array}
\end{array}
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (cbrt PI) (pow (cbrt PI) 2.0)))
(t_1 (* 2.0 (* (+ b a) (- b a))))
(t_2 (* PI (/ angle 180.0)))
(t_3 (cos t_2)))
(if (<= (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_2)) t_3) 5e+290)
(*
(* t_1 (sin (* 0.005555555555555556 (* PI angle))))
(cos (* (/ angle 180.0) t_0)))
(* t_3 (* t_1 (sin (* (/ angle 180.0) (pow (sqrt t_0) 2.0))))))))
double code(double a, double b, double angle) {
double t_0 = cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0);
double t_1 = 2.0 * ((b + a) * (b - a));
double t_2 = ((double) M_PI) * (angle / 180.0);
double t_3 = cos(t_2);
double tmp;
if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_2)) * t_3) <= 5e+290) {
tmp = (t_1 * sin((0.005555555555555556 * (((double) M_PI) * angle)))) * cos(((angle / 180.0) * t_0));
} else {
tmp = t_3 * (t_1 * sin(((angle / 180.0) * pow(sqrt(t_0), 2.0))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0);
double t_1 = 2.0 * ((b + a) * (b - a));
double t_2 = Math.PI * (angle / 180.0);
double t_3 = Math.cos(t_2);
double tmp;
if ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_2)) * t_3) <= 5e+290) {
tmp = (t_1 * Math.sin((0.005555555555555556 * (Math.PI * angle)))) * Math.cos(((angle / 180.0) * t_0));
} else {
tmp = t_3 * (t_1 * Math.sin(((angle / 180.0) * Math.pow(Math.sqrt(t_0), 2.0))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(cbrt(pi) * (cbrt(pi) ^ 2.0)) t_1 = Float64(2.0 * Float64(Float64(b + a) * Float64(b - a))) t_2 = Float64(pi * Float64(angle / 180.0)) t_3 = cos(t_2) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_2)) * t_3) <= 5e+290) tmp = Float64(Float64(t_1 * sin(Float64(0.005555555555555556 * Float64(pi * angle)))) * cos(Float64(Float64(angle / 180.0) * t_0))); else tmp = Float64(t_3 * Float64(t_1 * sin(Float64(Float64(angle / 180.0) * (sqrt(t_0) ^ 2.0))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], 5e+290], N[(N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[(t$95$1 * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * N[Power[N[Sqrt[t$95$0], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\\
t_1 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
t_2 := \pi \cdot \frac{angle}{180}\\
t_3 := \cos t_2\\
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t_2\right) \cdot t_3 \leq 5 \cdot 10^{+290}:\\
\;\;\;\;\left(t_1 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \left(t_1 \cdot \sin \left(\frac{angle}{180} \cdot {\left(\sqrt{t_0}\right)}^{2}\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)))) < 4.9999999999999998e290Initial program 56.3%
unpow256.3%
unpow256.3%
difference-of-squares56.3%
Applied egg-rr56.3%
Taylor expanded in angle around inf 56.8%
add-cube-cbrt60.2%
pow260.2%
Applied egg-rr60.2%
if 4.9999999999999998e290 < (*.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 39.9%
unpow239.9%
unpow239.9%
difference-of-squares54.5%
Applied egg-rr54.5%
add-sqr-sqrt47.4%
pow247.4%
Applied egg-rr47.4%
add-cube-cbrt47.4%
pow247.4%
Applied egg-rr60.2%
Final simplification60.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (+ b a) (- b a))))
(if (<= (- (pow b 2.0) (pow a 2.0)) -2e+280)
(* 0.011111111111111112 (* angle (* PI t_0)))
(*
(cos (* PI (/ angle 180.0)))
(* (* 2.0 t_0) (sin (* (/ angle 180.0) (pow (sqrt PI) 2.0))))))))
double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if ((pow(b, 2.0) - pow(a, 2.0)) <= -2e+280) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * t_0));
} else {
tmp = cos((((double) M_PI) * (angle / 180.0))) * ((2.0 * t_0) * sin(((angle / 180.0) * pow(sqrt(((double) M_PI)), 2.0))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a, 2.0)) <= -2e+280) {
tmp = 0.011111111111111112 * (angle * (Math.PI * t_0));
} else {
tmp = Math.cos((Math.PI * (angle / 180.0))) * ((2.0 * t_0) * Math.sin(((angle / 180.0) * Math.pow(Math.sqrt(Math.PI), 2.0))));
}
return tmp;
}
def code(a, b, angle): t_0 = (b + a) * (b - a) tmp = 0 if (math.pow(b, 2.0) - math.pow(a, 2.0)) <= -2e+280: tmp = 0.011111111111111112 * (angle * (math.pi * t_0)) else: tmp = math.cos((math.pi * (angle / 180.0))) * ((2.0 * t_0) * math.sin(((angle / 180.0) * math.pow(math.sqrt(math.pi), 2.0)))) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b + a) * Float64(b - a)) tmp = 0.0 if (Float64((b ^ 2.0) - (a ^ 2.0)) <= -2e+280) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_0))); else tmp = Float64(cos(Float64(pi * Float64(angle / 180.0))) * Float64(Float64(2.0 * t_0) * sin(Float64(Float64(angle / 180.0) * (sqrt(pi) ^ 2.0))))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b + a) * (b - a); tmp = 0.0; if (((b ^ 2.0) - (a ^ 2.0)) <= -2e+280) tmp = 0.011111111111111112 * (angle * (pi * t_0)); else tmp = cos((pi * (angle / 180.0))) * ((2.0 * t_0) * sin(((angle / 180.0) * (sqrt(pi) ^ 2.0)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], -2e+280], N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(2.0 * t$95$0), $MachinePrecision] * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(b - a\right)\\
\mathbf{if}\;{b}^{2} - {a}^{2} \leq -2 \cdot 10^{+280}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot t_0\right) \cdot \sin \left(\frac{angle}{180} \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < -2.0000000000000001e280Initial program 49.2%
Simplified43.3%
Taylor expanded in angle around 0 57.2%
unpow249.2%
unpow249.2%
difference-of-squares49.2%
Applied egg-rr57.2%
if -2.0000000000000001e280 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) Initial program 53.5%
unpow253.5%
unpow253.5%
difference-of-squares57.6%
Applied egg-rr57.6%
add-sqr-sqrt59.7%
pow259.7%
Applied egg-rr59.7%
Final simplification59.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 2.0 (* (+ b a) (- b a)))))
(if (<= (/ angle 180.0) 1e+83)
(*
(* t_0 (sin (* 0.005555555555555556 (* PI angle))))
(cos (* (/ angle 180.0) (* (cbrt PI) (pow (cbrt PI) 2.0)))))
(* t_0 (sin (* (/ angle 180.0) (cbrt (pow PI 3.0))))))))
double code(double a, double b, double angle) {
double t_0 = 2.0 * ((b + a) * (b - a));
double tmp;
if ((angle / 180.0) <= 1e+83) {
tmp = (t_0 * sin((0.005555555555555556 * (((double) M_PI) * angle)))) * cos(((angle / 180.0) * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))));
} else {
tmp = t_0 * sin(((angle / 180.0) * cbrt(pow(((double) M_PI), 3.0))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 2.0 * ((b + a) * (b - a));
double tmp;
if ((angle / 180.0) <= 1e+83) {
tmp = (t_0 * Math.sin((0.005555555555555556 * (Math.PI * angle)))) * Math.cos(((angle / 180.0) * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0))));
} else {
tmp = t_0 * Math.sin(((angle / 180.0) * Math.cbrt(Math.pow(Math.PI, 3.0))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(2.0 * Float64(Float64(b + a) * Float64(b - a))) tmp = 0.0 if (Float64(angle / 180.0) <= 1e+83) tmp = Float64(Float64(t_0 * sin(Float64(0.005555555555555556 * Float64(pi * angle)))) * cos(Float64(Float64(angle / 180.0) * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))); else tmp = Float64(t_0 * sin(Float64(Float64(angle / 180.0) * cbrt((pi ^ 3.0))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+83], N[(N[(t$95$0 * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 10^{+83}:\\
\;\;\;\;\left(t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(\frac{angle}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < 1.00000000000000003e83Initial program 57.7%
unpow257.7%
unpow257.7%
difference-of-squares60.6%
Applied egg-rr60.6%
Taylor expanded in angle around inf 61.1%
add-cube-cbrt64.2%
pow264.2%
Applied egg-rr64.2%
if 1.00000000000000003e83 < (/.f64 angle 180) Initial program 25.6%
unpow225.6%
unpow225.6%
difference-of-squares30.6%
Applied egg-rr30.6%
add-cbrt-cube24.8%
pow324.8%
Applied egg-rr24.8%
add-sqr-sqrt32.0%
pow232.0%
Applied egg-rr30.7%
Taylor expanded in angle around 0 36.0%
Final simplification59.8%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (+ b a) (- b a))))
(if (<= (- (pow b 2.0) (pow a 2.0)) -1e+287)
(* 0.011111111111111112 (* angle (* PI t_0)))
(*
2.0
(*
(sin (* PI (/ angle 180.0)))
(* t_0 (cos (* angle (/ PI -180.0)))))))))
double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if ((pow(b, 2.0) - pow(a, 2.0)) <= -1e+287) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * t_0));
} else {
tmp = 2.0 * (sin((((double) M_PI) * (angle / 180.0))) * (t_0 * cos((angle * (((double) M_PI) / -180.0)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a, 2.0)) <= -1e+287) {
tmp = 0.011111111111111112 * (angle * (Math.PI * t_0));
} else {
tmp = 2.0 * (Math.sin((Math.PI * (angle / 180.0))) * (t_0 * Math.cos((angle * (Math.PI / -180.0)))));
}
return tmp;
}
def code(a, b, angle): t_0 = (b + a) * (b - a) tmp = 0 if (math.pow(b, 2.0) - math.pow(a, 2.0)) <= -1e+287: tmp = 0.011111111111111112 * (angle * (math.pi * t_0)) else: tmp = 2.0 * (math.sin((math.pi * (angle / 180.0))) * (t_0 * math.cos((angle * (math.pi / -180.0))))) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b + a) * Float64(b - a)) tmp = 0.0 if (Float64((b ^ 2.0) - (a ^ 2.0)) <= -1e+287) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_0))); else tmp = Float64(2.0 * Float64(sin(Float64(pi * Float64(angle / 180.0))) * Float64(t_0 * cos(Float64(angle * Float64(pi / -180.0)))))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b + a) * (b - a); tmp = 0.0; if (((b ^ 2.0) - (a ^ 2.0)) <= -1e+287) tmp = 0.011111111111111112 * (angle * (pi * t_0)); else tmp = 2.0 * (sin((pi * (angle / 180.0))) * (t_0 * cos((angle * (pi / -180.0))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], -1e+287], N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Cos[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(b - a\right)\\
\mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{+287}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < -1.0000000000000001e287Initial program 49.1%
Simplified43.1%
Taylor expanded in angle around 0 57.3%
unpow249.1%
unpow249.1%
difference-of-squares49.1%
Applied egg-rr57.3%
if -1.0000000000000001e287 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) Initial program 53.5%
Simplified54.4%
unpow253.5%
unpow253.5%
difference-of-squares57.5%
Applied egg-rr58.4%
Final simplification58.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (+ b a) (- b a))))
(if (<= (- (pow b 2.0) (pow a 2.0)) -2e+286)
(* 0.011111111111111112 (* angle (* PI t_0)))
(*
(* (sin (* PI (/ angle 180.0))) (* 2.0 t_0))
(cos (* 0.005555555555555556 (* PI angle)))))))
double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if ((pow(b, 2.0) - pow(a, 2.0)) <= -2e+286) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * t_0));
} else {
tmp = (sin((((double) M_PI) * (angle / 180.0))) * (2.0 * t_0)) * cos((0.005555555555555556 * (((double) M_PI) * angle)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a, 2.0)) <= -2e+286) {
tmp = 0.011111111111111112 * (angle * (Math.PI * t_0));
} else {
tmp = (Math.sin((Math.PI * (angle / 180.0))) * (2.0 * t_0)) * Math.cos((0.005555555555555556 * (Math.PI * angle)));
}
return tmp;
}
def code(a, b, angle): t_0 = (b + a) * (b - a) tmp = 0 if (math.pow(b, 2.0) - math.pow(a, 2.0)) <= -2e+286: tmp = 0.011111111111111112 * (angle * (math.pi * t_0)) else: tmp = (math.sin((math.pi * (angle / 180.0))) * (2.0 * t_0)) * math.cos((0.005555555555555556 * (math.pi * angle))) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b + a) * Float64(b - a)) tmp = 0.0 if (Float64((b ^ 2.0) - (a ^ 2.0)) <= -2e+286) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_0))); else tmp = Float64(Float64(sin(Float64(pi * Float64(angle / 180.0))) * Float64(2.0 * t_0)) * cos(Float64(0.005555555555555556 * Float64(pi * angle)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b + a) * (b - a); tmp = 0.0; if (((b ^ 2.0) - (a ^ 2.0)) <= -2e+286) tmp = 0.011111111111111112 * (angle * (pi * t_0)); else tmp = (sin((pi * (angle / 180.0))) * (2.0 * t_0)) * cos((0.005555555555555556 * (pi * angle))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], -2e+286], N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(b - a\right)\\
\mathbf{if}\;{b}^{2} - {a}^{2} \leq -2 \cdot 10^{+286}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot t_0\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < -2.00000000000000007e286Initial program 48.2%
Simplified42.2%
Taylor expanded in angle around 0 56.4%
unpow248.2%
unpow248.2%
difference-of-squares48.2%
Applied egg-rr56.4%
if -2.00000000000000007e286 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) Initial program 53.8%
unpow253.8%
unpow253.8%
difference-of-squares57.8%
Applied egg-rr57.8%
Taylor expanded in angle around inf 59.3%
Final simplification58.8%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (+ b a) (- b a))))
(if (<= (pow b 2.0) 1e-196)
(* (* 2.0 t_0) (sin (* (/ angle 180.0) (cbrt (pow PI 3.0)))))
(*
(sin (* angle (/ PI -180.0)))
(* -2.0 (* t_0 (cos (* (* PI angle) -0.005555555555555556))))))))
double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if (pow(b, 2.0) <= 1e-196) {
tmp = (2.0 * t_0) * sin(((angle / 180.0) * cbrt(pow(((double) M_PI), 3.0))));
} else {
tmp = sin((angle * (((double) M_PI) / -180.0))) * (-2.0 * (t_0 * cos(((((double) M_PI) * angle) * -0.005555555555555556))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if (Math.pow(b, 2.0) <= 1e-196) {
tmp = (2.0 * t_0) * Math.sin(((angle / 180.0) * Math.cbrt(Math.pow(Math.PI, 3.0))));
} else {
tmp = Math.sin((angle * (Math.PI / -180.0))) * (-2.0 * (t_0 * Math.cos(((Math.PI * angle) * -0.005555555555555556))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(b + a) * Float64(b - a)) tmp = 0.0 if ((b ^ 2.0) <= 1e-196) tmp = Float64(Float64(2.0 * t_0) * sin(Float64(Float64(angle / 180.0) * cbrt((pi ^ 3.0))))); else tmp = Float64(sin(Float64(angle * Float64(pi / -180.0))) * Float64(-2.0 * Float64(t_0 * cos(Float64(Float64(pi * angle) * -0.005555555555555556))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 1e-196], N[(N[(2.0 * t$95$0), $MachinePrecision] * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-2.0 * N[(t$95$0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(b - a\right)\\
\mathbf{if}\;{b}^{2} \leq 10^{-196}:\\
\;\;\;\;\left(2 \cdot t_0\right) \cdot \sin \left(\frac{angle}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(-2 \cdot \left(t_0 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b 2) < 1e-196Initial program 63.8%
unpow263.8%
unpow263.8%
difference-of-squares63.8%
Applied egg-rr63.8%
add-cbrt-cube63.5%
pow363.5%
Applied egg-rr63.5%
add-sqr-sqrt65.1%
pow265.1%
Applied egg-rr67.2%
Taylor expanded in angle around 0 69.0%
if 1e-196 < (pow.f64 b 2) Initial program 45.4%
Simplified44.8%
unpow245.4%
unpow245.4%
difference-of-squares50.8%
Applied egg-rr50.2%
Taylor expanded in angle around inf 52.0%
*-commutative52.0%
Simplified52.0%
Final simplification58.7%
(FPCore (a b angle)
:precision binary64
(if (<= (pow a 2.0) 2e+278)
(*
2.0
(*
(- (pow b 2.0) (pow a 2.0))
(* (sin (* angle (* PI 0.011111111111111112))) 0.5)))
(* 0.011111111111111112 (* angle (* PI (* (+ b a) (- b a)))))))
double code(double a, double b, double angle) {
double tmp;
if (pow(a, 2.0) <= 2e+278) {
tmp = 2.0 * ((pow(b, 2.0) - pow(a, 2.0)) * (sin((angle * (((double) M_PI) * 0.011111111111111112))) * 0.5));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b + a) * (b - a))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.pow(a, 2.0) <= 2e+278) {
tmp = 2.0 * ((Math.pow(b, 2.0) - Math.pow(a, 2.0)) * (Math.sin((angle * (Math.PI * 0.011111111111111112))) * 0.5));
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * ((b + a) * (b - a))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if math.pow(a, 2.0) <= 2e+278: tmp = 2.0 * ((math.pow(b, 2.0) - math.pow(a, 2.0)) * (math.sin((angle * (math.pi * 0.011111111111111112))) * 0.5)) else: tmp = 0.011111111111111112 * (angle * (math.pi * ((b + a) * (b - a)))) return tmp
function code(a, b, angle) tmp = 0.0 if ((a ^ 2.0) <= 2e+278) tmp = Float64(2.0 * Float64(Float64((b ^ 2.0) - (a ^ 2.0)) * Float64(sin(Float64(angle * Float64(pi * 0.011111111111111112))) * 0.5))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b + a) * Float64(b - a))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((a ^ 2.0) <= 2e+278) tmp = 2.0 * (((b ^ 2.0) - (a ^ 2.0)) * (sin((angle * (pi * 0.011111111111111112))) * 0.5)); else tmp = 0.011111111111111112 * (angle * (pi * ((b + a) * (b - a)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 2e+278], N[(2.0 * N[(N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+278}:\\
\;\;\;\;2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a 2) < 1.99999999999999993e278Initial program 57.4%
Simplified58.3%
Applied egg-rr56.1%
associate-*r*56.2%
*-commutative56.2%
*-commutative56.2%
Simplified56.2%
Applied egg-rr29.8%
expm1-def45.9%
expm1-log1p57.0%
sin-057.0%
+-rgt-identity57.0%
associate-*r*58.1%
*-commutative58.1%
*-commutative58.1%
Simplified58.1%
if 1.99999999999999993e278 < (pow.f64 a 2) Initial program 38.7%
Simplified34.1%
Taylor expanded in angle around 0 45.0%
unpow238.7%
unpow238.7%
difference-of-squares51.5%
Applied egg-rr54.7%
Final simplification57.2%
(FPCore (a b angle) :precision binary64 (if (<= (pow a 2.0) 2e+278) (* (- (pow b 2.0) (pow a 2.0)) (sin (* PI (* angle 0.011111111111111112)))) (* 0.011111111111111112 (* angle (* PI (* (+ b a) (- b a)))))))
double code(double a, double b, double angle) {
double tmp;
if (pow(a, 2.0) <= 2e+278) {
tmp = (pow(b, 2.0) - pow(a, 2.0)) * sin((((double) M_PI) * (angle * 0.011111111111111112)));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b + a) * (b - a))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.pow(a, 2.0) <= 2e+278) {
tmp = (Math.pow(b, 2.0) - Math.pow(a, 2.0)) * Math.sin((Math.PI * (angle * 0.011111111111111112)));
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * ((b + a) * (b - a))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if math.pow(a, 2.0) <= 2e+278: tmp = (math.pow(b, 2.0) - math.pow(a, 2.0)) * math.sin((math.pi * (angle * 0.011111111111111112))) else: tmp = 0.011111111111111112 * (angle * (math.pi * ((b + a) * (b - a)))) return tmp
function code(a, b, angle) tmp = 0.0 if ((a ^ 2.0) <= 2e+278) tmp = Float64(Float64((b ^ 2.0) - (a ^ 2.0)) * sin(Float64(pi * Float64(angle * 0.011111111111111112)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b + a) * Float64(b - a))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((a ^ 2.0) <= 2e+278) tmp = ((b ^ 2.0) - (a ^ 2.0)) * sin((pi * (angle * 0.011111111111111112))); else tmp = 0.011111111111111112 * (angle * (pi * ((b + a) * (b - a)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 2e+278], N[(N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+278}:\\
\;\;\;\;\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a 2) < 1.99999999999999993e278Initial program 57.4%
associate-*l*57.4%
*-commutative57.4%
associate-*l*57.4%
Simplified57.4%
*-commutative57.4%
sub-neg57.4%
distribute-lft-in57.4%
2-sin57.4%
*-commutative57.4%
div-inv57.6%
metadata-eval57.6%
Applied egg-rr57.7%
distribute-lft-out57.7%
sub-neg57.7%
*-commutative57.7%
associate-*l*57.7%
associate-*l*57.7%
metadata-eval57.7%
Simplified57.7%
if 1.99999999999999993e278 < (pow.f64 a 2) Initial program 38.7%
Simplified34.1%
Taylor expanded in angle around 0 45.0%
unpow238.7%
unpow238.7%
difference-of-squares51.5%
Applied egg-rr54.7%
Final simplification56.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (+ b a) (- b a))))
(if (<= (pow a 2.0) 5e+140)
(* (sin (* angle (/ PI -180.0))) (* t_0 -2.0))
(* 0.011111111111111112 (* angle (* PI t_0))))))
double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if (pow(a, 2.0) <= 5e+140) {
tmp = sin((angle * (((double) M_PI) / -180.0))) * (t_0 * -2.0);
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * t_0));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b + a) * (b - a);
double tmp;
if (Math.pow(a, 2.0) <= 5e+140) {
tmp = Math.sin((angle * (Math.PI / -180.0))) * (t_0 * -2.0);
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * t_0));
}
return tmp;
}
def code(a, b, angle): t_0 = (b + a) * (b - a) tmp = 0 if math.pow(a, 2.0) <= 5e+140: tmp = math.sin((angle * (math.pi / -180.0))) * (t_0 * -2.0) else: tmp = 0.011111111111111112 * (angle * (math.pi * t_0)) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b + a) * Float64(b - a)) tmp = 0.0 if ((a ^ 2.0) <= 5e+140) tmp = Float64(sin(Float64(angle * Float64(pi / -180.0))) * Float64(t_0 * -2.0)); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_0))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b + a) * (b - a); tmp = 0.0; if ((a ^ 2.0) <= 5e+140) tmp = sin((angle * (pi / -180.0))) * (t_0 * -2.0); else tmp = 0.011111111111111112 * (angle * (pi * t_0)); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 5e+140], N[(N[Sin[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * -2.0), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b + a\right) \cdot \left(b - a\right)\\
\mathbf{if}\;{a}^{2} \leq 5 \cdot 10^{+140}:\\
\;\;\;\;\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(t_0 \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t_0\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a 2) < 5.00000000000000008e140Initial program 56.3%
Simplified57.4%
unpow256.3%
unpow256.3%
difference-of-squares56.3%
Applied egg-rr57.4%
Taylor expanded in angle around 0 57.7%
if 5.00000000000000008e140 < (pow.f64 a 2) Initial program 47.2%
Simplified43.8%
Taylor expanded in angle around 0 48.3%
unpow247.2%
unpow247.2%
difference-of-squares55.3%
Applied egg-rr54.5%
Final simplification56.4%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* angle (* PI (* (+ b a) (- b a))))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (((double) M_PI) * ((b + a) * (b - a))));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (Math.PI * ((b + a) * (b - a))));
}
def code(a, b, angle): return 0.011111111111111112 * (angle * (math.pi * ((b + a) * (b - a))))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b + a) * Float64(b - a))))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (angle * (pi * ((b + a) * (b - a)))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)
\end{array}
Initial program 52.7%
Simplified52.0%
Taylor expanded in angle around 0 51.8%
unpow252.7%
unpow252.7%
difference-of-squares55.9%
Applied egg-rr54.3%
Final simplification54.3%
(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 52.7%
Simplified52.0%
Taylor expanded in angle around 0 51.8%
Taylor expanded in b around inf 29.8%
unpow229.8%
Applied egg-rr29.8%
Final simplification29.8%
herbie shell --seed 2023301
(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)))))