
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t_0\right) \cdot \cos t_0
\end{array}
\end{array}
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* PI angle)))
(t_1 (* PI (/ angle 180.0)))
(t_2 (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_1)) (cos t_1))))
(if (<= t_2 2e+160)
(* 2.0 (* (- b a) (* (cos t_0) (* (+ b a) (sin t_0)))))
(if (<= t_2 INFINITY)
(*
2.0
(*
(- b a)
(*
(+ b a)
(sin (* PI (pow (cbrt (* angle 0.005555555555555556)) 3.0))))))
(* 0.011111111111111112 (* angle (* (- b a) (* b PI))))))))
double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (((double) M_PI) * angle);
double t_1 = ((double) M_PI) * (angle / 180.0);
double t_2 = ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_1)) * cos(t_1);
double tmp;
if (t_2 <= 2e+160) {
tmp = 2.0 * ((b - a) * (cos(t_0) * ((b + a) * sin(t_0))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = 2.0 * ((b - a) * ((b + a) * sin((((double) M_PI) * pow(cbrt((angle * 0.005555555555555556)), 3.0)))));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * ((double) M_PI))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (Math.PI * angle);
double t_1 = Math.PI * (angle / 180.0);
double t_2 = ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_1)) * Math.cos(t_1);
double tmp;
if (t_2 <= 2e+160) {
tmp = 2.0 * ((b - a) * (Math.cos(t_0) * ((b + a) * Math.sin(t_0))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * ((b - a) * ((b + a) * Math.sin((Math.PI * Math.pow(Math.cbrt((angle * 0.005555555555555556)), 3.0)))));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * Math.PI)));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(0.005555555555555556 * Float64(pi * angle)) t_1 = Float64(pi * Float64(angle / 180.0)) t_2 = Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_1)) * cos(t_1)) tmp = 0.0 if (t_2 <= 2e+160) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(t_0) * Float64(Float64(b + a) * sin(t_0))))); elseif (t_2 <= Inf) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(pi * (cbrt(Float64(angle * 0.005555555555555556)) ^ 3.0)))))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(b * pi)))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e+160], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[Power[N[Power[N[(angle * 0.005555555555555556), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\
t_1 := \pi \cdot \frac{angle}{180}\\
t_2 := \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t_1\right) \cdot \cos t_1\\
\mathbf{if}\;t_2 \leq 2 \cdot 10^{+160}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_0 \cdot \left(\left(b + a\right) \cdot \sin t_0\right)\right)\right)\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot {\left(\sqrt[3]{angle \cdot 0.005555555555555556}\right)}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b \cdot \pi\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)))) < 2.00000000000000001e160Initial program 63.8%
associate-*l*63.8%
unpow263.8%
unpow263.8%
difference-of-squares63.8%
Simplified63.8%
Taylor expanded in angle around inf 70.7%
if 2.00000000000000001e160 < (*.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 43.8%
associate-*l*43.8%
unpow243.8%
unpow243.8%
difference-of-squares43.8%
Simplified43.8%
Taylor expanded in angle around inf 57.5%
associate-*r*57.5%
*-commutative57.5%
*-commutative57.5%
associate-*r*57.7%
*-commutative57.7%
*-commutative57.7%
*-commutative57.7%
associate-*r*63.2%
*-commutative63.2%
+-commutative63.2%
Simplified63.2%
*-commutative63.2%
metadata-eval63.2%
div-inv65.0%
add-cube-cbrt63.3%
pow361.8%
div-inv63.6%
metadata-eval63.6%
*-commutative63.6%
Applied egg-rr63.6%
Taylor expanded in angle around 0 73.9%
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 0.0%
associate-*l*0.0%
unpow20.0%
unpow20.0%
difference-of-squares46.2%
Simplified46.2%
Taylor expanded in angle around 0 76.9%
Taylor expanded in a around 0 92.3%
*-commutative92.3%
Simplified92.3%
Final simplification72.6%
(FPCore (a b angle)
:precision binary64
(if (<= (- (pow b 2.0) (pow a 2.0)) -3e+252)
(*
2.0
(*
(- b a)
(*
(sin (* PI (pow (* (cbrt angle) (cbrt 0.005555555555555556)) 3.0)))
(+ b a))))
(*
2.0
(*
(* (- b a) (cos (* (pow (sqrt PI) 2.0) (* angle 0.005555555555555556))))
(*
(+ b a)
(sin (* PI (pow (cbrt (* angle 0.005555555555555556)) 3.0))))))))
double code(double a, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a, 2.0)) <= -3e+252) {
tmp = 2.0 * ((b - a) * (sin((((double) M_PI) * pow((cbrt(angle) * cbrt(0.005555555555555556)), 3.0))) * (b + a)));
} else {
tmp = 2.0 * (((b - a) * cos((pow(sqrt(((double) M_PI)), 2.0) * (angle * 0.005555555555555556)))) * ((b + a) * sin((((double) M_PI) * pow(cbrt((angle * 0.005555555555555556)), 3.0)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a, 2.0)) <= -3e+252) {
tmp = 2.0 * ((b - a) * (Math.sin((Math.PI * Math.pow((Math.cbrt(angle) * Math.cbrt(0.005555555555555556)), 3.0))) * (b + a)));
} else {
tmp = 2.0 * (((b - a) * Math.cos((Math.pow(Math.sqrt(Math.PI), 2.0) * (angle * 0.005555555555555556)))) * ((b + a) * Math.sin((Math.PI * Math.pow(Math.cbrt((angle * 0.005555555555555556)), 3.0)))));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a ^ 2.0)) <= -3e+252) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(sin(Float64(pi * (Float64(cbrt(angle) * cbrt(0.005555555555555556)) ^ 3.0))) * Float64(b + a)))); else tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * cos(Float64((sqrt(pi) ^ 2.0) * Float64(angle * 0.005555555555555556)))) * Float64(Float64(b + a) * sin(Float64(pi * (cbrt(Float64(angle * 0.005555555555555556)) ^ 3.0)))))); end return tmp end
code[a_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], -3e+252], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(Pi * N[Power[N[(N[Power[angle, 1/3], $MachinePrecision] * N[Power[0.005555555555555556, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[Power[N[Power[N[(angle * 0.005555555555555556), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a}^{2} \leq -3 \cdot 10^{+252}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot {\left(\sqrt[3]{angle} \cdot \sqrt[3]{0.005555555555555556}\right)}^{3}\right) \cdot \left(b + a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left({\left(\sqrt{\pi}\right)}^{2} \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot {\left(\sqrt[3]{angle \cdot 0.005555555555555556}\right)}^{3}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < -2.99999999999999989e252Initial program 60.2%
associate-*l*60.2%
unpow260.2%
unpow260.2%
difference-of-squares60.2%
Simplified60.2%
Taylor expanded in angle around inf 79.4%
associate-*r*79.4%
*-commutative79.4%
*-commutative79.4%
associate-*r*79.4%
*-commutative79.4%
*-commutative79.4%
*-commutative79.4%
associate-*r*83.2%
*-commutative83.2%
+-commutative83.2%
Simplified83.2%
*-commutative83.2%
metadata-eval83.2%
div-inv83.1%
add-cube-cbrt77.3%
pow375.1%
div-inv77.1%
metadata-eval77.1%
*-commutative77.1%
Applied egg-rr77.1%
Taylor expanded in angle around 0 86.9%
*-commutative86.9%
cbrt-prod88.1%
Applied egg-rr88.1%
if -2.99999999999999989e252 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) Initial program 54.2%
associate-*l*54.2%
unpow254.2%
unpow254.2%
difference-of-squares57.1%
Simplified57.1%
Taylor expanded in angle around inf 63.5%
associate-*r*63.5%
*-commutative63.5%
*-commutative63.5%
associate-*r*61.7%
*-commutative61.7%
*-commutative61.7%
*-commutative61.7%
associate-*r*62.9%
*-commutative62.9%
+-commutative62.9%
Simplified62.9%
*-commutative62.9%
metadata-eval62.9%
div-inv63.4%
add-cube-cbrt64.0%
pow364.6%
div-inv65.1%
metadata-eval65.1%
*-commutative65.1%
Applied egg-rr65.1%
add-sqr-sqrt66.7%
pow266.7%
Applied egg-rr66.7%
Final simplification71.1%
(FPCore (a b angle)
:precision binary64
(if (<= a 2.4e-109)
(*
2.0
(*
(- b a)
(* (+ b a) (sin (* PI (pow (cbrt (* angle 0.005555555555555556)) 3.0))))))
(*
2.0
(*
(* (- b a) (cos (* 0.005555555555555556 (* PI angle))))
(* (+ b a) (sin (* PI (* angle 0.005555555555555556))))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 2.4e-109) {
tmp = 2.0 * ((b - a) * ((b + a) * sin((((double) M_PI) * pow(cbrt((angle * 0.005555555555555556)), 3.0)))));
} else {
tmp = 2.0 * (((b - a) * cos((0.005555555555555556 * (((double) M_PI) * angle)))) * ((b + a) * sin((((double) M_PI) * (angle * 0.005555555555555556)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 2.4e-109) {
tmp = 2.0 * ((b - a) * ((b + a) * Math.sin((Math.PI * Math.pow(Math.cbrt((angle * 0.005555555555555556)), 3.0)))));
} else {
tmp = 2.0 * (((b - a) * Math.cos((0.005555555555555556 * (Math.PI * angle)))) * ((b + a) * Math.sin((Math.PI * (angle * 0.005555555555555556)))));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (a <= 2.4e-109) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(pi * (cbrt(Float64(angle * 0.005555555555555556)) ^ 3.0)))))); else tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * cos(Float64(0.005555555555555556 * Float64(pi * angle)))) * Float64(Float64(b + a) * sin(Float64(pi * Float64(angle * 0.005555555555555556)))))); end return tmp end
code[a_, b_, angle_] := If[LessEqual[a, 2.4e-109], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[Power[N[Power[N[(angle * 0.005555555555555556), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.4 \cdot 10^{-109}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot {\left(\sqrt[3]{angle \cdot 0.005555555555555556}\right)}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.39999999999999989e-109Initial program 56.6%
associate-*l*56.6%
unpow256.6%
unpow256.6%
difference-of-squares58.3%
Simplified58.3%
Taylor expanded in angle around inf 66.9%
associate-*r*66.9%
*-commutative66.9%
*-commutative66.9%
associate-*r*65.9%
*-commutative65.9%
*-commutative65.9%
*-commutative65.9%
associate-*r*66.8%
*-commutative66.8%
+-commutative66.8%
Simplified66.8%
*-commutative66.8%
metadata-eval66.8%
div-inv67.3%
add-cube-cbrt69.9%
pow369.8%
div-inv71.1%
metadata-eval71.1%
*-commutative71.1%
Applied egg-rr71.1%
Taylor expanded in angle around 0 71.4%
if 2.39999999999999989e-109 < a Initial program 53.1%
associate-*l*53.1%
unpow253.1%
unpow253.1%
difference-of-squares56.6%
Simplified56.6%
Taylor expanded in angle around inf 66.7%
associate-*r*66.7%
*-commutative66.7%
*-commutative66.7%
associate-*r*64.1%
*-commutative64.1%
*-commutative64.1%
*-commutative64.1%
associate-*r*67.6%
*-commutative67.6%
+-commutative67.6%
Simplified67.6%
Taylor expanded in angle around inf 67.9%
Final simplification70.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* PI angle))))
(if (<= (/ angle 180.0) -2e+197)
(* 2.0 (* (sin t_0) (* (cos t_0) (* b b))))
(* 2.0 (* (- b a) (* (+ b a) (sin (* PI (/ 1.0 (/ 180.0 angle))))))))))
double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (((double) M_PI) * angle);
double tmp;
if ((angle / 180.0) <= -2e+197) {
tmp = 2.0 * (sin(t_0) * (cos(t_0) * (b * b)));
} else {
tmp = 2.0 * ((b - a) * ((b + a) * sin((((double) M_PI) * (1.0 / (180.0 / angle))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (Math.PI * angle);
double tmp;
if ((angle / 180.0) <= -2e+197) {
tmp = 2.0 * (Math.sin(t_0) * (Math.cos(t_0) * (b * b)));
} else {
tmp = 2.0 * ((b - a) * ((b + a) * Math.sin((Math.PI * (1.0 / (180.0 / angle))))));
}
return tmp;
}
def code(a, b, angle): t_0 = 0.005555555555555556 * (math.pi * angle) tmp = 0 if (angle / 180.0) <= -2e+197: tmp = 2.0 * (math.sin(t_0) * (math.cos(t_0) * (b * b))) else: tmp = 2.0 * ((b - a) * ((b + a) * math.sin((math.pi * (1.0 / (180.0 / angle)))))) return tmp
function code(a, b, angle) t_0 = Float64(0.005555555555555556 * Float64(pi * angle)) tmp = 0.0 if (Float64(angle / 180.0) <= -2e+197) tmp = Float64(2.0 * Float64(sin(t_0) * Float64(cos(t_0) * Float64(b * b)))); else tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(pi * Float64(1.0 / Float64(180.0 / angle))))))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = 0.005555555555555556 * (pi * angle); tmp = 0.0; if ((angle / 180.0) <= -2e+197) tmp = 2.0 * (sin(t_0) * (cos(t_0) * (b * b))); else tmp = 2.0 * ((b - a) * ((b + a) * sin((pi * (1.0 / (180.0 / angle)))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+197], N[(2.0 * N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[(1.0 / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+197}:\\
\;\;\;\;2 \cdot \left(\sin t_0 \cdot \left(\cos t_0 \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \frac{1}{\frac{180}{angle}}\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -1.9999999999999999e197Initial program 16.2%
*-commutative16.2%
associate-*l*16.2%
unpow216.2%
fma-neg30.5%
unpow230.5%
Simplified30.5%
Taylor expanded in b around inf 45.3%
unpow245.3%
associate-*r*45.3%
*-commutative45.3%
*-commutative45.3%
*-commutative45.3%
associate-*r*30.8%
*-commutative30.8%
associate-*r*45.3%
*-commutative45.3%
*-commutative45.3%
Simplified45.3%
if -1.9999999999999999e197 < (/.f64 angle 180) Initial program 57.7%
associate-*l*57.7%
unpow257.7%
unpow257.7%
difference-of-squares59.8%
Simplified59.8%
Taylor expanded in angle around inf 68.5%
associate-*r*68.5%
*-commutative68.5%
*-commutative68.5%
associate-*r*68.1%
*-commutative68.1%
*-commutative68.1%
*-commutative68.1%
associate-*r*69.6%
*-commutative69.6%
+-commutative69.6%
Simplified69.6%
*-commutative69.6%
metadata-eval69.6%
div-inv69.9%
add-cube-cbrt68.8%
pow368.9%
div-inv69.7%
metadata-eval69.7%
*-commutative69.7%
Applied egg-rr69.7%
Taylor expanded in angle around 0 70.2%
rem-cube-cbrt67.9%
*-commutative67.9%
metadata-eval67.9%
div-inv68.3%
clear-num69.1%
Applied egg-rr69.1%
Final simplification67.8%
(FPCore (a b angle) :precision binary64 (* 2.0 (* (- b a) (* (+ b a) (sin (* PI (pow (cbrt (* angle 0.005555555555555556)) 3.0)))))))
double code(double a, double b, double angle) {
return 2.0 * ((b - a) * ((b + a) * sin((((double) M_PI) * pow(cbrt((angle * 0.005555555555555556)), 3.0)))));
}
public static double code(double a, double b, double angle) {
return 2.0 * ((b - a) * ((b + a) * Math.sin((Math.PI * Math.pow(Math.cbrt((angle * 0.005555555555555556)), 3.0)))));
}
function code(a, b, angle) return Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(pi * (cbrt(Float64(angle * 0.005555555555555556)) ^ 3.0)))))) end
code[a_, b_, angle_] := N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[Power[N[Power[N[(angle * 0.005555555555555556), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot {\left(\sqrt[3]{angle \cdot 0.005555555555555556}\right)}^{3}\right)\right)\right)
\end{array}
Initial program 55.4%
associate-*l*55.4%
unpow255.4%
unpow255.4%
difference-of-squares57.8%
Simplified57.8%
Taylor expanded in angle around inf 66.8%
associate-*r*66.8%
*-commutative66.8%
*-commutative66.8%
associate-*r*65.3%
*-commutative65.3%
*-commutative65.3%
*-commutative65.3%
associate-*r*67.1%
*-commutative67.1%
+-commutative67.1%
Simplified67.1%
*-commutative67.1%
metadata-eval67.1%
div-inv67.4%
add-cube-cbrt66.7%
pow366.8%
div-inv67.6%
metadata-eval67.6%
*-commutative67.6%
Applied egg-rr67.6%
Taylor expanded in angle around 0 68.1%
Final simplification68.1%
(FPCore (a b angle)
:precision binary64
(if (<= a -1.02e+212)
(pow
(cbrt (* 0.011111111111111112 (* (* (- b a) angle) (* PI (+ b a)))))
3.0)
(* 2.0 (* (- b a) (* (+ b a) (sin (* PI (/ 1.0 (/ 180.0 angle)))))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= -1.02e+212) {
tmp = pow(cbrt((0.011111111111111112 * (((b - a) * angle) * (((double) M_PI) * (b + a))))), 3.0);
} else {
tmp = 2.0 * ((b - a) * ((b + a) * sin((((double) M_PI) * (1.0 / (180.0 / angle))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= -1.02e+212) {
tmp = Math.pow(Math.cbrt((0.011111111111111112 * (((b - a) * angle) * (Math.PI * (b + a))))), 3.0);
} else {
tmp = 2.0 * ((b - a) * ((b + a) * Math.sin((Math.PI * (1.0 / (180.0 / angle))))));
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (a <= -1.02e+212) tmp = cbrt(Float64(0.011111111111111112 * Float64(Float64(Float64(b - a) * angle) * Float64(pi * Float64(b + a))))) ^ 3.0; else tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(pi * Float64(1.0 / Float64(180.0 / angle))))))); end return tmp end
code[a_, b_, angle_] := If[LessEqual[a, -1.02e+212], N[Power[N[Power[N[(0.011111111111111112 * N[(N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[(1.0 / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{+212}:\\
\;\;\;\;{\left(\sqrt[3]{0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot angle\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \frac{1}{\frac{180}{angle}}\right)\right)\right)\\
\end{array}
\end{array}
if a < -1.01999999999999992e212Initial program 48.3%
associate-*l*48.3%
unpow248.3%
unpow248.3%
difference-of-squares61.4%
Simplified61.4%
Taylor expanded in angle around 0 87.5%
add-cube-cbrt87.5%
pow387.5%
*-commutative87.5%
associate-*r*91.3%
+-commutative91.3%
Applied egg-rr91.3%
if -1.01999999999999992e212 < a Initial program 56.1%
associate-*l*56.1%
unpow256.1%
unpow256.1%
difference-of-squares57.4%
Simplified57.4%
Taylor expanded in angle around inf 66.1%
associate-*r*66.1%
*-commutative66.1%
*-commutative66.1%
associate-*r*64.5%
*-commutative64.5%
*-commutative64.5%
*-commutative64.5%
associate-*r*66.8%
*-commutative66.8%
+-commutative66.8%
Simplified66.8%
*-commutative66.8%
metadata-eval66.8%
div-inv67.2%
add-cube-cbrt64.7%
pow364.4%
div-inv64.8%
metadata-eval64.8%
*-commutative64.8%
Applied egg-rr64.8%
Taylor expanded in angle around 0 66.2%
rem-cube-cbrt64.1%
*-commutative64.1%
metadata-eval64.1%
div-inv64.7%
clear-num65.1%
Applied egg-rr65.1%
Final simplification67.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* PI angle))))
(if (<= (/ angle 180.0) -1e+31)
(* 2.0 (* (- b a) (* (+ b a) (sin t_0))))
(if (<= (/ angle 180.0) 2e+100)
(* 2.0 (* (- b a) (* (+ b a) t_0)))
(* -2.0 (* (sin (* PI (* angle 0.005555555555555556))) (* a a)))))))
double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (((double) M_PI) * angle);
double tmp;
if ((angle / 180.0) <= -1e+31) {
tmp = 2.0 * ((b - a) * ((b + a) * sin(t_0)));
} else if ((angle / 180.0) <= 2e+100) {
tmp = 2.0 * ((b - a) * ((b + a) * t_0));
} else {
tmp = -2.0 * (sin((((double) M_PI) * (angle * 0.005555555555555556))) * (a * a));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 0.005555555555555556 * (Math.PI * angle);
double tmp;
if ((angle / 180.0) <= -1e+31) {
tmp = 2.0 * ((b - a) * ((b + a) * Math.sin(t_0)));
} else if ((angle / 180.0) <= 2e+100) {
tmp = 2.0 * ((b - a) * ((b + a) * t_0));
} else {
tmp = -2.0 * (Math.sin((Math.PI * (angle * 0.005555555555555556))) * (a * a));
}
return tmp;
}
def code(a, b, angle): t_0 = 0.005555555555555556 * (math.pi * angle) tmp = 0 if (angle / 180.0) <= -1e+31: tmp = 2.0 * ((b - a) * ((b + a) * math.sin(t_0))) elif (angle / 180.0) <= 2e+100: tmp = 2.0 * ((b - a) * ((b + a) * t_0)) else: tmp = -2.0 * (math.sin((math.pi * (angle * 0.005555555555555556))) * (a * a)) return tmp
function code(a, b, angle) t_0 = Float64(0.005555555555555556 * Float64(pi * angle)) tmp = 0.0 if (Float64(angle / 180.0) <= -1e+31) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(t_0)))); elseif (Float64(angle / 180.0) <= 2e+100) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * t_0))); else tmp = Float64(-2.0 * Float64(sin(Float64(pi * Float64(angle * 0.005555555555555556))) * Float64(a * a))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = 0.005555555555555556 * (pi * angle); tmp = 0.0; if ((angle / 180.0) <= -1e+31) tmp = 2.0 * ((b - a) * ((b + a) * sin(t_0))); elseif ((angle / 180.0) <= 2e+100) tmp = 2.0 * ((b - a) * ((b + a) * t_0)); else tmp = -2.0 * (sin((pi * (angle * 0.005555555555555556))) * (a * a)); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1e+31], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+100], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+31}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin t_0\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+100}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot a\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -9.9999999999999996e30Initial program 26.5%
associate-*l*26.5%
unpow226.5%
unpow226.5%
difference-of-squares28.3%
Simplified28.3%
Taylor expanded in angle around inf 28.0%
associate-*r*28.0%
*-commutative28.0%
*-commutative28.0%
associate-*r*22.0%
*-commutative22.0%
*-commutative22.0%
*-commutative22.0%
associate-*r*28.0%
*-commutative28.0%
+-commutative28.0%
Simplified28.0%
*-commutative28.0%
metadata-eval28.0%
div-inv28.8%
add-cube-cbrt27.7%
pow329.7%
div-inv31.8%
metadata-eval31.8%
*-commutative31.8%
Applied egg-rr31.8%
Taylor expanded in angle around 0 34.6%
Taylor expanded in angle around inf 28.9%
if -9.9999999999999996e30 < (/.f64 angle 180) < 2.00000000000000003e100Initial program 72.1%
associate-*l*72.2%
unpow272.2%
unpow272.2%
difference-of-squares74.0%
Simplified74.0%
Taylor expanded in angle around inf 88.3%
associate-*r*88.3%
*-commutative88.3%
*-commutative88.3%
associate-*r*88.3%
*-commutative88.3%
*-commutative88.3%
*-commutative88.3%
associate-*r*88.7%
*-commutative88.7%
+-commutative88.7%
Simplified88.7%
*-commutative88.7%
metadata-eval88.7%
div-inv89.3%
add-cube-cbrt87.5%
pow387.0%
div-inv87.7%
metadata-eval87.7%
*-commutative87.7%
Applied egg-rr87.7%
Taylor expanded in angle around 0 88.1%
Taylor expanded in angle around 0 89.8%
if 2.00000000000000003e100 < (/.f64 angle 180) Initial program 26.7%
*-commutative26.7%
associate-*l*26.7%
unpow226.7%
fma-neg29.3%
unpow229.3%
Simplified29.3%
Taylor expanded in b around 0 25.0%
unpow225.0%
associate-*r*25.0%
*-commutative25.0%
*-commutative25.0%
associate-*r*24.4%
*-commutative24.4%
*-commutative24.4%
*-commutative24.4%
associate-*r*24.6%
*-commutative24.6%
Simplified24.6%
Taylor expanded in angle around 0 33.6%
Final simplification68.2%
(FPCore (a b angle) :precision binary64 (* 2.0 (* (- b a) (* (+ b a) (sin (* PI (/ 1.0 (/ 180.0 angle))))))))
double code(double a, double b, double angle) {
return 2.0 * ((b - a) * ((b + a) * sin((((double) M_PI) * (1.0 / (180.0 / angle))))));
}
public static double code(double a, double b, double angle) {
return 2.0 * ((b - a) * ((b + a) * Math.sin((Math.PI * (1.0 / (180.0 / angle))))));
}
def code(a, b, angle): return 2.0 * ((b - a) * ((b + a) * math.sin((math.pi * (1.0 / (180.0 / angle))))))
function code(a, b, angle) return Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(pi * Float64(1.0 / Float64(180.0 / angle))))))) end
function tmp = code(a, b, angle) tmp = 2.0 * ((b - a) * ((b + a) * sin((pi * (1.0 / (180.0 / angle)))))); end
code[a_, b_, angle_] := N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[(1.0 / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \frac{1}{\frac{180}{angle}}\right)\right)\right)
\end{array}
Initial program 55.4%
associate-*l*55.4%
unpow255.4%
unpow255.4%
difference-of-squares57.8%
Simplified57.8%
Taylor expanded in angle around inf 66.8%
associate-*r*66.8%
*-commutative66.8%
*-commutative66.8%
associate-*r*65.3%
*-commutative65.3%
*-commutative65.3%
*-commutative65.3%
associate-*r*67.1%
*-commutative67.1%
+-commutative67.1%
Simplified67.1%
*-commutative67.1%
metadata-eval67.1%
div-inv67.4%
add-cube-cbrt66.7%
pow366.8%
div-inv67.6%
metadata-eval67.6%
*-commutative67.6%
Applied egg-rr67.6%
Taylor expanded in angle around 0 68.1%
rem-cube-cbrt64.6%
*-commutative64.6%
metadata-eval64.6%
div-inv65.1%
clear-num65.8%
Applied egg-rr65.8%
Final simplification65.8%
(FPCore (a b angle)
:precision binary64
(if (<= angle -5e+35)
(* (* PI (pow (+ b a) 2.0)) (* angle 0.011111111111111112))
(if (<= angle 4.6e+108)
(* 2.0 (* (- b a) (* (+ b a) (* 0.005555555555555556 (* PI angle)))))
(* -2.0 (* (sin (* PI (* angle 0.005555555555555556))) (* a a))))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= -5e+35) {
tmp = (((double) M_PI) * pow((b + a), 2.0)) * (angle * 0.011111111111111112);
} else if (angle <= 4.6e+108) {
tmp = 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (((double) M_PI) * angle))));
} else {
tmp = -2.0 * (sin((((double) M_PI) * (angle * 0.005555555555555556))) * (a * a));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= -5e+35) {
tmp = (Math.PI * Math.pow((b + a), 2.0)) * (angle * 0.011111111111111112);
} else if (angle <= 4.6e+108) {
tmp = 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (Math.PI * angle))));
} else {
tmp = -2.0 * (Math.sin((Math.PI * (angle * 0.005555555555555556))) * (a * a));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= -5e+35: tmp = (math.pi * math.pow((b + a), 2.0)) * (angle * 0.011111111111111112) elif angle <= 4.6e+108: tmp = 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (math.pi * angle)))) else: tmp = -2.0 * (math.sin((math.pi * (angle * 0.005555555555555556))) * (a * a)) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= -5e+35) tmp = Float64(Float64(pi * (Float64(b + a) ^ 2.0)) * Float64(angle * 0.011111111111111112)); elseif (angle <= 4.6e+108) tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(0.005555555555555556 * Float64(pi * angle))))); else tmp = Float64(-2.0 * Float64(sin(Float64(pi * Float64(angle * 0.005555555555555556))) * Float64(a * a))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= -5e+35) tmp = (pi * ((b + a) ^ 2.0)) * (angle * 0.011111111111111112); elseif (angle <= 4.6e+108) tmp = 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (pi * angle)))); else tmp = -2.0 * (sin((pi * (angle * 0.005555555555555556))) * (a * a)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, -5e+35], N[(N[(Pi * N[Power[N[(b + a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 4.6e+108], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq -5 \cdot 10^{+35}:\\
\;\;\;\;\left(\pi \cdot {\left(b + a\right)}^{2}\right) \cdot \left(angle \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;angle \leq 4.6 \cdot 10^{+108}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a \cdot a\right)\right)\\
\end{array}
\end{array}
if angle < -5.00000000000000021e35Initial program 26.4%
*-commutative26.4%
associate-*l*26.4%
unpow226.4%
fma-neg31.9%
unpow231.9%
Simplified31.9%
fma-neg26.4%
add-exp-log16.0%
difference-of-squares17.8%
sub-neg17.8%
distribute-lft-in16.0%
add-sqr-sqrt6.9%
sqrt-unprod21.3%
sqr-neg21.3%
sqrt-prod14.4%
add-sqr-sqrt26.9%
distribute-lft-in28.7%
pow228.7%
Applied egg-rr28.7%
Taylor expanded in angle around 0 26.0%
associate-*r*26.0%
*-commutative26.0%
*-commutative26.0%
+-commutative26.0%
*-commutative26.0%
Simplified26.0%
if -5.00000000000000021e35 < angle < 4.5999999999999998e108Initial program 71.9%
associate-*l*71.9%
unpow271.9%
unpow271.9%
difference-of-squares73.7%
Simplified73.7%
Taylor expanded in angle around inf 87.9%
associate-*r*87.9%
*-commutative87.9%
*-commutative87.9%
associate-*r*87.9%
*-commutative87.9%
*-commutative87.9%
*-commutative87.9%
associate-*r*88.4%
*-commutative88.4%
+-commutative88.4%
Simplified88.4%
*-commutative88.4%
metadata-eval88.4%
div-inv88.9%
add-cube-cbrt87.0%
pow386.6%
div-inv87.4%
metadata-eval87.4%
*-commutative87.4%
Applied egg-rr87.4%
Taylor expanded in angle around 0 87.7%
Taylor expanded in angle around 0 89.3%
if 4.5999999999999998e108 < angle Initial program 26.7%
*-commutative26.7%
associate-*l*26.7%
unpow226.7%
fma-neg29.3%
unpow229.3%
Simplified29.3%
Taylor expanded in b around 0 25.0%
unpow225.0%
associate-*r*25.0%
*-commutative25.0%
*-commutative25.0%
associate-*r*24.4%
*-commutative24.4%
*-commutative24.4%
*-commutative24.4%
associate-*r*24.6%
*-commutative24.6%
Simplified24.6%
Taylor expanded in angle around 0 33.6%
Final simplification67.5%
(FPCore (a b angle) :precision binary64 (if (<= angle -5e+35) (* (* PI (pow (+ b a) 2.0)) (* angle 0.011111111111111112)) (* 2.0 (* (- b a) (* (+ b a) (* 0.005555555555555556 (* PI angle)))))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= -5e+35) {
tmp = (((double) M_PI) * pow((b + a), 2.0)) * (angle * 0.011111111111111112);
} else {
tmp = 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (((double) M_PI) * angle))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= -5e+35) {
tmp = (Math.PI * Math.pow((b + a), 2.0)) * (angle * 0.011111111111111112);
} else {
tmp = 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (Math.PI * angle))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= -5e+35: tmp = (math.pi * math.pow((b + a), 2.0)) * (angle * 0.011111111111111112) else: tmp = 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (math.pi * angle)))) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= -5e+35) tmp = Float64(Float64(pi * (Float64(b + a) ^ 2.0)) * Float64(angle * 0.011111111111111112)); else tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(0.005555555555555556 * Float64(pi * angle))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= -5e+35) tmp = (pi * ((b + a) ^ 2.0)) * (angle * 0.011111111111111112); else tmp = 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (pi * angle)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, -5e+35], N[(N[(Pi * N[Power[N[(b + a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq -5 \cdot 10^{+35}:\\
\;\;\;\;\left(\pi \cdot {\left(b + a\right)}^{2}\right) \cdot \left(angle \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\\
\end{array}
\end{array}
if angle < -5.00000000000000021e35Initial program 26.4%
*-commutative26.4%
associate-*l*26.4%
unpow226.4%
fma-neg31.9%
unpow231.9%
Simplified31.9%
fma-neg26.4%
add-exp-log16.0%
difference-of-squares17.8%
sub-neg17.8%
distribute-lft-in16.0%
add-sqr-sqrt6.9%
sqrt-unprod21.3%
sqr-neg21.3%
sqrt-prod14.4%
add-sqr-sqrt26.9%
distribute-lft-in28.7%
pow228.7%
Applied egg-rr28.7%
Taylor expanded in angle around 0 26.0%
associate-*r*26.0%
*-commutative26.0%
*-commutative26.0%
+-commutative26.0%
*-commutative26.0%
Simplified26.0%
if -5.00000000000000021e35 < angle Initial program 63.3%
associate-*l*63.3%
unpow263.3%
unpow263.4%
difference-of-squares65.8%
Simplified65.8%
Taylor expanded in angle around inf 77.5%
associate-*r*77.5%
*-commutative77.5%
*-commutative77.5%
associate-*r*77.2%
*-commutative77.2%
*-commutative77.2%
*-commutative77.2%
associate-*r*77.8%
*-commutative77.8%
+-commutative77.8%
Simplified77.8%
*-commutative77.8%
metadata-eval77.8%
div-inv78.0%
add-cube-cbrt77.3%
pow376.9%
div-inv77.4%
metadata-eval77.4%
*-commutative77.4%
Applied egg-rr77.4%
Taylor expanded in angle around 0 77.1%
Taylor expanded in angle around 0 76.3%
Final simplification65.5%
(FPCore (a b angle) :precision binary64 (if (or (<= b -7.5e+153) (not (<= b 1.8e+133))) (* 0.011111111111111112 (* b (* b (* PI angle)))) (* 0.011111111111111112 (* angle (* (- b a) (* PI (+ b a)))))))
double code(double a, double b, double angle) {
double tmp;
if ((b <= -7.5e+153) || !(b <= 1.8e+133)) {
tmp = 0.011111111111111112 * (b * (b * (((double) M_PI) * angle)));
} 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 <= -7.5e+153) || !(b <= 1.8e+133)) {
tmp = 0.011111111111111112 * (b * (b * (Math.PI * angle)));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (Math.PI * (b + a))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (b <= -7.5e+153) or not (b <= 1.8e+133): tmp = 0.011111111111111112 * (b * (b * (math.pi * angle))) else: tmp = 0.011111111111111112 * (angle * ((b - a) * (math.pi * (b + a)))) return tmp
function code(a, b, angle) tmp = 0.0 if ((b <= -7.5e+153) || !(b <= 1.8e+133)) tmp = Float64(0.011111111111111112 * Float64(b * Float64(b * Float64(pi * angle)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(pi * Float64(b + a))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((b <= -7.5e+153) || ~((b <= 1.8e+133))) tmp = 0.011111111111111112 * (b * (b * (pi * angle))); else tmp = 0.011111111111111112 * (angle * ((b - a) * (pi * (b + a)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[Or[LessEqual[b, -7.5e+153], N[Not[LessEqual[b, 1.8e+133]], $MachinePrecision]], N[(0.011111111111111112 * N[(b * N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+153} \lor \neg \left(b \leq 1.8 \cdot 10^{+133}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\\
\end{array}
\end{array}
if b < -7.50000000000000065e153 or 1.79999999999999989e133 < b Initial program 39.0%
associate-*l*39.0%
unpow239.0%
unpow239.0%
difference-of-squares48.3%
Simplified48.3%
Taylor expanded in angle around 0 48.0%
Taylor expanded in b around inf 48.0%
*-commutative48.0%
unpow248.0%
Simplified48.0%
Taylor expanded in angle around 0 48.0%
associate-*r*48.0%
unpow248.0%
Simplified48.0%
Taylor expanded in angle around 0 48.0%
unpow248.0%
associate-*r*48.0%
*-commutative48.0%
associate-*r*48.0%
associate-*l*69.4%
Simplified69.4%
if -7.50000000000000065e153 < b < 1.79999999999999989e133Initial program 61.0%
associate-*l*61.0%
unpow261.0%
unpow261.0%
difference-of-squares61.0%
Simplified61.0%
Taylor expanded in angle around 0 58.5%
Final simplification61.3%
(FPCore (a b angle) :precision binary64 (if (or (<= b -3.4e+27) (not (<= b 2.5e+41))) (* 0.011111111111111112 (* b (* b (* PI angle)))) (* -2.0 (* angle (* 0.005555555555555556 (* PI (* a a)))))))
double code(double a, double b, double angle) {
double tmp;
if ((b <= -3.4e+27) || !(b <= 2.5e+41)) {
tmp = 0.011111111111111112 * (b * (b * (((double) M_PI) * angle)));
} else {
tmp = -2.0 * (angle * (0.005555555555555556 * (((double) M_PI) * (a * a))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((b <= -3.4e+27) || !(b <= 2.5e+41)) {
tmp = 0.011111111111111112 * (b * (b * (Math.PI * angle)));
} else {
tmp = -2.0 * (angle * (0.005555555555555556 * (Math.PI * (a * a))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (b <= -3.4e+27) or not (b <= 2.5e+41): tmp = 0.011111111111111112 * (b * (b * (math.pi * angle))) else: tmp = -2.0 * (angle * (0.005555555555555556 * (math.pi * (a * a)))) return tmp
function code(a, b, angle) tmp = 0.0 if ((b <= -3.4e+27) || !(b <= 2.5e+41)) tmp = Float64(0.011111111111111112 * Float64(b * Float64(b * Float64(pi * angle)))); else tmp = Float64(-2.0 * Float64(angle * Float64(0.005555555555555556 * Float64(pi * Float64(a * a))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((b <= -3.4e+27) || ~((b <= 2.5e+41))) tmp = 0.011111111111111112 * (b * (b * (pi * angle))); else tmp = -2.0 * (angle * (0.005555555555555556 * (pi * (a * a)))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[Or[LessEqual[b, -3.4e+27], N[Not[LessEqual[b, 2.5e+41]], $MachinePrecision]], N[(0.011111111111111112 * N[(b * N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(angle * N[(0.005555555555555556 * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+27} \lor \neg \left(b \leq 2.5 \cdot 10^{+41}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\right)\\
\end{array}
\end{array}
if b < -3.4e27 or 2.50000000000000011e41 < b Initial program 45.1%
associate-*l*45.1%
unpow245.1%
unpow245.1%
difference-of-squares50.8%
Simplified50.8%
Taylor expanded in angle around 0 51.4%
Taylor expanded in b around inf 47.2%
*-commutative47.2%
unpow247.2%
Simplified47.2%
Taylor expanded in angle around 0 47.2%
associate-*r*47.3%
unpow247.3%
Simplified47.3%
Taylor expanded in angle around 0 47.2%
unpow247.2%
associate-*r*47.3%
*-commutative47.3%
associate-*r*47.3%
associate-*l*60.6%
Simplified60.6%
if -3.4e27 < b < 2.50000000000000011e41Initial program 62.5%
*-commutative62.5%
associate-*l*62.5%
unpow262.5%
fma-neg62.5%
unpow262.5%
Simplified62.5%
Taylor expanded in b around 0 52.1%
unpow252.1%
associate-*r*52.1%
*-commutative52.1%
*-commutative52.1%
associate-*r*52.0%
*-commutative52.0%
*-commutative52.0%
*-commutative52.0%
associate-*r*53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in angle around 0 50.3%
associate-*r*50.3%
*-commutative50.3%
associate-*l*50.3%
*-commutative50.3%
unpow250.3%
Simplified50.3%
Final simplification54.5%
(FPCore (a b angle) :precision binary64 (* 2.0 (* (- b a) (* (+ b a) (* 0.005555555555555556 (* PI angle))))))
double code(double a, double b, double angle) {
return 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (((double) M_PI) * angle))));
}
public static double code(double a, double b, double angle) {
return 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (Math.PI * angle))));
}
def code(a, b, angle): return 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (math.pi * angle))))
function code(a, b, angle) return Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * Float64(0.005555555555555556 * Float64(pi * angle))))) end
function tmp = code(a, b, angle) tmp = 2.0 * ((b - a) * ((b + a) * (0.005555555555555556 * (pi * angle)))); end
code[a_, b_, angle_] := N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)
\end{array}
Initial program 55.4%
associate-*l*55.4%
unpow255.4%
unpow255.4%
difference-of-squares57.8%
Simplified57.8%
Taylor expanded in angle around inf 66.8%
associate-*r*66.8%
*-commutative66.8%
*-commutative66.8%
associate-*r*65.3%
*-commutative65.3%
*-commutative65.3%
*-commutative65.3%
associate-*r*67.1%
*-commutative67.1%
+-commutative67.1%
Simplified67.1%
*-commutative67.1%
metadata-eval67.1%
div-inv67.4%
add-cube-cbrt66.7%
pow366.8%
div-inv67.6%
metadata-eval67.6%
*-commutative67.6%
Applied egg-rr67.6%
Taylor expanded in angle around 0 68.1%
Taylor expanded in angle around 0 63.8%
Final simplification63.8%
(FPCore (a b angle) :precision binary64 (if (or (<= b -3.4e+27) (not (<= b 1.1e+39))) (* 0.011111111111111112 (* b (* b (* PI angle)))) (* (* angle (* PI (* a a))) -0.011111111111111112)))
double code(double a, double b, double angle) {
double tmp;
if ((b <= -3.4e+27) || !(b <= 1.1e+39)) {
tmp = 0.011111111111111112 * (b * (b * (((double) M_PI) * angle)));
} else {
tmp = (angle * (((double) M_PI) * (a * a))) * -0.011111111111111112;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((b <= -3.4e+27) || !(b <= 1.1e+39)) {
tmp = 0.011111111111111112 * (b * (b * (Math.PI * angle)));
} else {
tmp = (angle * (Math.PI * (a * a))) * -0.011111111111111112;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (b <= -3.4e+27) or not (b <= 1.1e+39): tmp = 0.011111111111111112 * (b * (b * (math.pi * angle))) else: tmp = (angle * (math.pi * (a * a))) * -0.011111111111111112 return tmp
function code(a, b, angle) tmp = 0.0 if ((b <= -3.4e+27) || !(b <= 1.1e+39)) tmp = Float64(0.011111111111111112 * Float64(b * Float64(b * Float64(pi * angle)))); else tmp = Float64(Float64(angle * Float64(pi * Float64(a * a))) * -0.011111111111111112); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((b <= -3.4e+27) || ~((b <= 1.1e+39))) tmp = 0.011111111111111112 * (b * (b * (pi * angle))); else tmp = (angle * (pi * (a * a))) * -0.011111111111111112; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[Or[LessEqual[b, -3.4e+27], N[Not[LessEqual[b, 1.1e+39]], $MachinePrecision]], N[(0.011111111111111112 * N[(b * N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+27} \lor \neg \left(b \leq 1.1 \cdot 10^{+39}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right) \cdot -0.011111111111111112\\
\end{array}
\end{array}
if b < -3.4e27 or 1.1000000000000001e39 < b Initial program 45.1%
associate-*l*45.1%
unpow245.1%
unpow245.1%
difference-of-squares50.8%
Simplified50.8%
Taylor expanded in angle around 0 51.4%
Taylor expanded in b around inf 47.2%
*-commutative47.2%
unpow247.2%
Simplified47.2%
Taylor expanded in angle around 0 47.2%
associate-*r*47.3%
unpow247.3%
Simplified47.3%
Taylor expanded in angle around 0 47.2%
unpow247.2%
associate-*r*47.3%
*-commutative47.3%
associate-*r*47.3%
associate-*l*60.6%
Simplified60.6%
if -3.4e27 < b < 1.1000000000000001e39Initial program 62.5%
associate-*l*62.5%
unpow262.5%
unpow262.5%
difference-of-squares62.5%
Simplified62.5%
Taylor expanded in angle around 0 58.9%
Taylor expanded in b around 0 50.3%
*-commutative50.3%
*-commutative50.3%
unpow250.3%
Simplified50.3%
Final simplification54.5%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* (* (- b a) angle) (* PI (+ b a)))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (((b - a) * angle) * (((double) M_PI) * (b + a)));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (((b - a) * angle) * (Math.PI * (b + a)));
}
def code(a, b, angle): return 0.011111111111111112 * (((b - a) * angle) * (math.pi * (b + a)))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(Float64(b - a) * angle) * Float64(pi * Float64(b + a)))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (((b - a) * angle) * (pi * (b + a))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot angle\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)
\end{array}
Initial program 55.4%
associate-*l*55.4%
unpow255.4%
unpow255.4%
difference-of-squares57.8%
Simplified57.8%
Taylor expanded in angle around 0 55.9%
associate-*r*63.8%
*-commutative63.8%
+-commutative63.8%
Simplified63.8%
Final simplification63.8%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* angle (* b (* b PI)))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (b * (b * ((double) M_PI))));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (b * (b * Math.PI)));
}
def code(a, b, angle): return 0.011111111111111112 * (angle * (b * (b * math.pi)))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(b * Float64(b * pi)))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (angle * (b * (b * pi))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(b * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)
\end{array}
Initial program 55.4%
associate-*l*55.4%
unpow255.4%
unpow255.4%
difference-of-squares57.8%
Simplified57.8%
Taylor expanded in angle around 0 55.9%
Taylor expanded in b around inf 37.0%
*-commutative37.0%
unpow237.0%
Simplified37.0%
Taylor expanded in angle around 0 37.0%
associate-*r*37.0%
unpow237.0%
Simplified37.0%
Taylor expanded in angle around 0 37.0%
unpow237.0%
associate-*l*37.0%
Simplified37.0%
Final simplification37.0%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* b (* b (* PI angle)))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (b * (b * (((double) M_PI) * angle)));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (b * (b * (Math.PI * angle)));
}
def code(a, b, angle): return 0.011111111111111112 * (b * (b * (math.pi * angle)))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(b * Float64(b * Float64(pi * angle)))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (b * (b * (pi * angle))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(b * N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right)
\end{array}
Initial program 55.4%
associate-*l*55.4%
unpow255.4%
unpow255.4%
difference-of-squares57.8%
Simplified57.8%
Taylor expanded in angle around 0 55.9%
Taylor expanded in b around inf 37.0%
*-commutative37.0%
unpow237.0%
Simplified37.0%
Taylor expanded in angle around 0 37.0%
associate-*r*37.0%
unpow237.0%
Simplified37.0%
Taylor expanded in angle around 0 37.0%
unpow237.0%
associate-*r*37.0%
*-commutative37.0%
associate-*r*37.0%
associate-*l*41.0%
Simplified41.0%
Final simplification41.0%
herbie shell --seed 2023175
(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)))))