
(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 22 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 (* 2.0 (- b a)))
(t_1 (* PI (* 0.005555555555555556 angle)))
(t_2 (sin t_1)))
(if (<= b -5e+218)
(* t_0 (* (* t_2 (cos (pow (cbrt t_1) 3.0))) (+ b a)))
(*
t_0
(*
(+ b a)
(*
t_2
(*
(sqrt (cbrt (pow (cos t_1) 4.0)))
(fabs
(cbrt
(cos
(* 0.005555555555555556 (* angle (cbrt (pow PI 3.0))))))))))))))
double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_2 = sin(t_1);
double tmp;
if (b <= -5e+218) {
tmp = t_0 * ((t_2 * cos(pow(cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * (sqrt(cbrt(pow(cos(t_1), 4.0))) * fabs(cbrt(cos((0.005555555555555556 * (angle * 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);
double t_1 = Math.PI * (0.005555555555555556 * angle);
double t_2 = Math.sin(t_1);
double tmp;
if (b <= -5e+218) {
tmp = t_0 * ((t_2 * Math.cos(Math.pow(Math.cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * (Math.sqrt(Math.cbrt(Math.pow(Math.cos(t_1), 4.0))) * Math.abs(Math.cbrt(Math.cos((0.005555555555555556 * (angle * Math.cbrt(Math.pow(Math.PI, 3.0))))))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(2.0 * Float64(b - a)) t_1 = Float64(pi * Float64(0.005555555555555556 * angle)) t_2 = sin(t_1) tmp = 0.0 if (b <= -5e+218) tmp = Float64(t_0 * Float64(Float64(t_2 * cos((cbrt(t_1) ^ 3.0))) * Float64(b + a))); else tmp = Float64(t_0 * Float64(Float64(b + a) * Float64(t_2 * Float64(sqrt(cbrt((cos(t_1) ^ 4.0))) * abs(cbrt(cos(Float64(0.005555555555555556 * Float64(angle * cbrt((pi ^ 3.0))))))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[b, -5e+218], N[(t$95$0 * N[(N[(t$95$2 * N[Cos[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(b + a), $MachinePrecision] * N[(t$95$2 * N[(N[Sqrt[N[Power[N[Power[N[Cos[t$95$1], $MachinePrecision], 4.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision] * N[Abs[N[Power[N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(b - a\right)\\
t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_2 := \sin t_1\\
\mathbf{if}\;b \leq -5 \cdot 10^{+218}:\\
\;\;\;\;t_0 \cdot \left(\left(t_2 \cdot \cos \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\right) \cdot \left(b + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\left(b + a\right) \cdot \left(t_2 \cdot \left(\sqrt{\sqrt[3]{{\cos t_1}^{4}}} \cdot \left|\sqrt[3]{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \sqrt[3]{{\pi}^{3}}\right)\right)}\right|\right)\right)\right)\\
\end{array}
\end{array}
if b < -4.99999999999999983e218Initial program 44.8%
associate-*l*44.8%
unpow244.8%
unpow244.8%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around inf 68.7%
associate-*r*68.7%
associate-*r*68.7%
*-commutative68.7%
associate-*r*62.4%
*-commutative62.4%
*-commutative62.4%
*-commutative62.4%
associate-*r*74.9%
*-commutative74.9%
*-commutative74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
add-cube-cbrt93.7%
pow399.9%
*-commutative99.9%
Applied egg-rr99.9%
if -4.99999999999999983e218 < b Initial program 52.9%
associate-*l*52.9%
unpow252.9%
unpow252.9%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around inf 65.8%
associate-*r*65.8%
associate-*r*65.7%
*-commutative65.7%
associate-*r*67.2%
*-commutative67.2%
*-commutative67.2%
*-commutative67.2%
associate-*r*67.0%
*-commutative67.0%
*-commutative67.0%
*-commutative67.0%
Simplified67.0%
*-commutative67.0%
pow167.0%
metadata-eval67.0%
sqrt-pow171.6%
pow1/271.6%
add-cube-cbrt71.6%
unpow-prod-down71.6%
Applied egg-rr71.6%
unpow1/271.6%
*-commutative71.6%
associate-*r*71.3%
unpow1/271.3%
unpow271.3%
rem-sqrt-square71.3%
*-commutative71.3%
associate-*r*71.2%
Simplified71.2%
expm1-log1p-u71.2%
expm1-udef71.2%
associate-*r*71.3%
*-commutative71.3%
Applied egg-rr71.3%
expm1-def71.3%
expm1-log1p71.3%
*-commutative71.3%
Simplified71.3%
add-cbrt-cube71.3%
pow371.3%
Applied egg-rr71.3%
Final simplification73.1%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 2.0 (- b a)))
(t_1 (* PI (* 0.005555555555555556 angle)))
(t_2 (sin t_1))
(t_3 (cos (* 0.005555555555555556 (* PI angle)))))
(if (<= b -2e+214)
(* t_0 (* (* t_2 (cos (pow (cbrt t_1) 3.0))) (+ b a)))
(*
t_0
(* (+ b a) (* t_2 (* (fabs (cbrt t_3)) (sqrt (cbrt (pow t_3 4.0))))))))))
double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_2 = sin(t_1);
double t_3 = cos((0.005555555555555556 * (((double) M_PI) * angle)));
double tmp;
if (b <= -2e+214) {
tmp = t_0 * ((t_2 * cos(pow(cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * (fabs(cbrt(t_3)) * sqrt(cbrt(pow(t_3, 4.0))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = Math.PI * (0.005555555555555556 * angle);
double t_2 = Math.sin(t_1);
double t_3 = Math.cos((0.005555555555555556 * (Math.PI * angle)));
double tmp;
if (b <= -2e+214) {
tmp = t_0 * ((t_2 * Math.cos(Math.pow(Math.cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * (Math.abs(Math.cbrt(t_3)) * Math.sqrt(Math.cbrt(Math.pow(t_3, 4.0))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(2.0 * Float64(b - a)) t_1 = Float64(pi * Float64(0.005555555555555556 * angle)) t_2 = sin(t_1) t_3 = cos(Float64(0.005555555555555556 * Float64(pi * angle))) tmp = 0.0 if (b <= -2e+214) tmp = Float64(t_0 * Float64(Float64(t_2 * cos((cbrt(t_1) ^ 3.0))) * Float64(b + a))); else tmp = Float64(t_0 * Float64(Float64(b + a) * Float64(t_2 * Float64(abs(cbrt(t_3)) * sqrt(cbrt((t_3 ^ 4.0))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b, -2e+214], N[(t$95$0 * N[(N[(t$95$2 * N[Cos[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(b + a), $MachinePrecision] * N[(t$95$2 * N[(N[Abs[N[Power[t$95$3, 1/3], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Power[N[Power[t$95$3, 4.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(b - a\right)\\
t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_2 := \sin t_1\\
t_3 := \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\\
\mathbf{if}\;b \leq -2 \cdot 10^{+214}:\\
\;\;\;\;t_0 \cdot \left(\left(t_2 \cdot \cos \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\right) \cdot \left(b + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\left(b + a\right) \cdot \left(t_2 \cdot \left(\left|\sqrt[3]{t_3}\right| \cdot \sqrt{\sqrt[3]{{t_3}^{4}}}\right)\right)\right)\\
\end{array}
\end{array}
if b < -1.9999999999999999e214Initial program 44.8%
associate-*l*44.8%
unpow244.8%
unpow244.8%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around inf 68.7%
associate-*r*68.7%
associate-*r*68.7%
*-commutative68.7%
associate-*r*62.4%
*-commutative62.4%
*-commutative62.4%
*-commutative62.4%
associate-*r*74.9%
*-commutative74.9%
*-commutative74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
add-cube-cbrt93.7%
pow399.9%
*-commutative99.9%
Applied egg-rr99.9%
if -1.9999999999999999e214 < b Initial program 52.9%
associate-*l*52.9%
unpow252.9%
unpow252.9%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around inf 65.8%
associate-*r*65.8%
associate-*r*65.7%
*-commutative65.7%
associate-*r*67.2%
*-commutative67.2%
*-commutative67.2%
*-commutative67.2%
associate-*r*67.0%
*-commutative67.0%
*-commutative67.0%
*-commutative67.0%
Simplified67.0%
*-commutative67.0%
pow167.0%
metadata-eval67.0%
sqrt-pow171.6%
pow1/271.6%
add-cube-cbrt71.6%
unpow-prod-down71.6%
Applied egg-rr71.6%
unpow1/271.6%
*-commutative71.6%
associate-*r*71.3%
unpow1/271.3%
unpow271.3%
rem-sqrt-square71.3%
*-commutative71.3%
associate-*r*71.2%
Simplified71.2%
Final simplification73.0%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 2.0 (- b a)))
(t_1 (* PI (* 0.005555555555555556 angle)))
(t_2 (sin t_1)))
(if (<= b -7.6e+216)
(* t_0 (* (* t_2 (cos (pow (cbrt t_1) 3.0))) (+ b a)))
(*
t_0
(*
(+ b a)
(*
t_2
(*
(sqrt (cbrt (pow (cos (* 0.005555555555555556 (* PI angle))) 4.0)))
(fabs (cbrt (cos t_1))))))))))
double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_2 = sin(t_1);
double tmp;
if (b <= -7.6e+216) {
tmp = t_0 * ((t_2 * cos(pow(cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * (sqrt(cbrt(pow(cos((0.005555555555555556 * (((double) M_PI) * angle))), 4.0))) * fabs(cbrt(cos(t_1))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = Math.PI * (0.005555555555555556 * angle);
double t_2 = Math.sin(t_1);
double tmp;
if (b <= -7.6e+216) {
tmp = t_0 * ((t_2 * Math.cos(Math.pow(Math.cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * (Math.sqrt(Math.cbrt(Math.pow(Math.cos((0.005555555555555556 * (Math.PI * angle))), 4.0))) * Math.abs(Math.cbrt(Math.cos(t_1))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(2.0 * Float64(b - a)) t_1 = Float64(pi * Float64(0.005555555555555556 * angle)) t_2 = sin(t_1) tmp = 0.0 if (b <= -7.6e+216) tmp = Float64(t_0 * Float64(Float64(t_2 * cos((cbrt(t_1) ^ 3.0))) * Float64(b + a))); else tmp = Float64(t_0 * Float64(Float64(b + a) * Float64(t_2 * Float64(sqrt(cbrt((cos(Float64(0.005555555555555556 * Float64(pi * angle))) ^ 4.0))) * abs(cbrt(cos(t_1))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[b, -7.6e+216], N[(t$95$0 * N[(N[(t$95$2 * N[Cos[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(b + a), $MachinePrecision] * N[(t$95$2 * N[(N[Sqrt[N[Power[N[Power[N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 4.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision] * N[Abs[N[Power[N[Cos[t$95$1], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(b - a\right)\\
t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_2 := \sin t_1\\
\mathbf{if}\;b \leq -7.6 \cdot 10^{+216}:\\
\;\;\;\;t_0 \cdot \left(\left(t_2 \cdot \cos \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\right) \cdot \left(b + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\left(b + a\right) \cdot \left(t_2 \cdot \left(\sqrt{\sqrt[3]{{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{4}}} \cdot \left|\sqrt[3]{\cos t_1}\right|\right)\right)\right)\\
\end{array}
\end{array}
if b < -7.60000000000000029e216Initial program 44.8%
associate-*l*44.8%
unpow244.8%
unpow244.8%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around inf 68.7%
associate-*r*68.7%
associate-*r*68.7%
*-commutative68.7%
associate-*r*62.4%
*-commutative62.4%
*-commutative62.4%
*-commutative62.4%
associate-*r*74.9%
*-commutative74.9%
*-commutative74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
add-cube-cbrt93.7%
pow399.9%
*-commutative99.9%
Applied egg-rr99.9%
if -7.60000000000000029e216 < b Initial program 52.9%
associate-*l*52.9%
unpow252.9%
unpow252.9%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around inf 65.8%
associate-*r*65.8%
associate-*r*65.7%
*-commutative65.7%
associate-*r*67.2%
*-commutative67.2%
*-commutative67.2%
*-commutative67.2%
associate-*r*67.0%
*-commutative67.0%
*-commutative67.0%
*-commutative67.0%
Simplified67.0%
*-commutative67.0%
pow167.0%
metadata-eval67.0%
sqrt-pow171.6%
pow1/271.6%
add-cube-cbrt71.6%
unpow-prod-down71.6%
Applied egg-rr71.6%
unpow1/271.6%
*-commutative71.6%
associate-*r*71.3%
unpow1/271.3%
unpow271.3%
rem-sqrt-square71.3%
*-commutative71.3%
associate-*r*71.2%
Simplified71.2%
expm1-log1p-u71.2%
expm1-udef71.2%
associate-*r*71.3%
*-commutative71.3%
Applied egg-rr71.3%
expm1-def71.3%
expm1-log1p71.3%
*-commutative71.3%
Simplified71.3%
Final simplification73.1%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 2.0 (- b a)))
(t_1 (* PI (* 0.005555555555555556 angle)))
(t_2 (sin t_1)))
(if (<= b -1e+211)
(* t_0 (* (* t_2 (cos (pow (cbrt t_1) 3.0))) (+ b a)))
(*
t_0
(*
(+ b a)
(*
t_2
(*
(sqrt (cbrt (pow (cos t_1) 4.0)))
(fabs (cbrt (cos (* 0.005555555555555556 (* PI angle))))))))))))
double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_2 = sin(t_1);
double tmp;
if (b <= -1e+211) {
tmp = t_0 * ((t_2 * cos(pow(cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * (sqrt(cbrt(pow(cos(t_1), 4.0))) * fabs(cbrt(cos((0.005555555555555556 * (((double) M_PI) * angle))))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = Math.PI * (0.005555555555555556 * angle);
double t_2 = Math.sin(t_1);
double tmp;
if (b <= -1e+211) {
tmp = t_0 * ((t_2 * Math.cos(Math.pow(Math.cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * (Math.sqrt(Math.cbrt(Math.pow(Math.cos(t_1), 4.0))) * Math.abs(Math.cbrt(Math.cos((0.005555555555555556 * (Math.PI * angle))))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(2.0 * Float64(b - a)) t_1 = Float64(pi * Float64(0.005555555555555556 * angle)) t_2 = sin(t_1) tmp = 0.0 if (b <= -1e+211) tmp = Float64(t_0 * Float64(Float64(t_2 * cos((cbrt(t_1) ^ 3.0))) * Float64(b + a))); else tmp = Float64(t_0 * Float64(Float64(b + a) * Float64(t_2 * Float64(sqrt(cbrt((cos(t_1) ^ 4.0))) * abs(cbrt(cos(Float64(0.005555555555555556 * Float64(pi * angle))))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[b, -1e+211], N[(t$95$0 * N[(N[(t$95$2 * N[Cos[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(b + a), $MachinePrecision] * N[(t$95$2 * N[(N[Sqrt[N[Power[N[Power[N[Cos[t$95$1], $MachinePrecision], 4.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision] * N[Abs[N[Power[N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(b - a\right)\\
t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_2 := \sin t_1\\
\mathbf{if}\;b \leq -1 \cdot 10^{+211}:\\
\;\;\;\;t_0 \cdot \left(\left(t_2 \cdot \cos \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\right) \cdot \left(b + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\left(b + a\right) \cdot \left(t_2 \cdot \left(\sqrt{\sqrt[3]{{\cos t_1}^{4}}} \cdot \left|\sqrt[3]{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right|\right)\right)\right)\\
\end{array}
\end{array}
if b < -9.9999999999999996e210Initial program 44.8%
associate-*l*44.8%
unpow244.8%
unpow244.8%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around inf 68.7%
associate-*r*68.7%
associate-*r*68.7%
*-commutative68.7%
associate-*r*62.4%
*-commutative62.4%
*-commutative62.4%
*-commutative62.4%
associate-*r*74.9%
*-commutative74.9%
*-commutative74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
add-cube-cbrt93.7%
pow399.9%
*-commutative99.9%
Applied egg-rr99.9%
if -9.9999999999999996e210 < b Initial program 52.9%
associate-*l*52.9%
unpow252.9%
unpow252.9%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around inf 65.8%
associate-*r*65.8%
associate-*r*65.7%
*-commutative65.7%
associate-*r*67.2%
*-commutative67.2%
*-commutative67.2%
*-commutative67.2%
associate-*r*67.0%
*-commutative67.0%
*-commutative67.0%
*-commutative67.0%
Simplified67.0%
*-commutative67.0%
pow167.0%
metadata-eval67.0%
sqrt-pow171.6%
pow1/271.6%
add-cube-cbrt71.6%
unpow-prod-down71.6%
Applied egg-rr71.6%
unpow1/271.6%
*-commutative71.6%
associate-*r*71.3%
unpow1/271.3%
unpow271.3%
rem-sqrt-square71.3%
*-commutative71.3%
associate-*r*71.2%
Simplified71.2%
expm1-log1p-u71.2%
expm1-udef71.2%
associate-*r*71.3%
*-commutative71.3%
Applied egg-rr71.3%
expm1-def71.3%
expm1-log1p71.3%
*-commutative71.3%
Simplified71.3%
Final simplification73.1%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 2.0 (- b a)))
(t_1 (* PI (* 0.005555555555555556 angle)))
(t_2 (sin t_1)))
(if (<= b -9.8e+214)
(* t_0 (* (* t_2 (cos (pow (cbrt t_1) 3.0))) (+ b a)))
(* t_0 (* (+ b a) (* t_2 (sqrt (cbrt (pow (cos t_1) 4.0)))))))))
double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_2 = sin(t_1);
double tmp;
if (b <= -9.8e+214) {
tmp = t_0 * ((t_2 * cos(pow(cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * sqrt(cbrt(pow(cos(t_1), 4.0)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = Math.PI * (0.005555555555555556 * angle);
double t_2 = Math.sin(t_1);
double tmp;
if (b <= -9.8e+214) {
tmp = t_0 * ((t_2 * Math.cos(Math.pow(Math.cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * ((b + a) * (t_2 * Math.sqrt(Math.cbrt(Math.pow(Math.cos(t_1), 4.0)))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(2.0 * Float64(b - a)) t_1 = Float64(pi * Float64(0.005555555555555556 * angle)) t_2 = sin(t_1) tmp = 0.0 if (b <= -9.8e+214) tmp = Float64(t_0 * Float64(Float64(t_2 * cos((cbrt(t_1) ^ 3.0))) * Float64(b + a))); else tmp = Float64(t_0 * Float64(Float64(b + a) * Float64(t_2 * sqrt(cbrt((cos(t_1) ^ 4.0)))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[b, -9.8e+214], N[(t$95$0 * N[(N[(t$95$2 * N[Cos[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(b + a), $MachinePrecision] * N[(t$95$2 * N[Sqrt[N[Power[N[Power[N[Cos[t$95$1], $MachinePrecision], 4.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(b - a\right)\\
t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_2 := \sin t_1\\
\mathbf{if}\;b \leq -9.8 \cdot 10^{+214}:\\
\;\;\;\;t_0 \cdot \left(\left(t_2 \cdot \cos \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\right) \cdot \left(b + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\left(b + a\right) \cdot \left(t_2 \cdot \sqrt{\sqrt[3]{{\cos t_1}^{4}}}\right)\right)\\
\end{array}
\end{array}
if b < -9.80000000000000065e214Initial program 44.8%
associate-*l*44.8%
unpow244.8%
unpow244.8%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around inf 68.7%
associate-*r*68.7%
associate-*r*68.7%
*-commutative68.7%
associate-*r*62.4%
*-commutative62.4%
*-commutative62.4%
*-commutative62.4%
associate-*r*74.9%
*-commutative74.9%
*-commutative74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
add-cube-cbrt93.7%
pow399.9%
*-commutative99.9%
Applied egg-rr99.9%
if -9.80000000000000065e214 < b Initial program 52.9%
associate-*l*52.9%
unpow252.9%
unpow252.9%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around inf 65.8%
associate-*r*65.8%
associate-*r*65.7%
*-commutative65.7%
associate-*r*67.2%
*-commutative67.2%
*-commutative67.2%
*-commutative67.2%
associate-*r*67.0%
*-commutative67.0%
*-commutative67.0%
*-commutative67.0%
Simplified67.0%
*-commutative67.0%
pow167.0%
metadata-eval67.0%
sqrt-pow171.6%
pow1/271.6%
add-cube-cbrt71.6%
unpow-prod-down71.6%
Applied egg-rr71.6%
unpow1/271.6%
*-commutative71.6%
associate-*r*71.3%
unpow1/271.3%
unpow271.3%
rem-sqrt-square71.3%
*-commutative71.3%
associate-*r*71.2%
Simplified71.2%
expm1-log1p-u71.2%
expm1-udef71.2%
associate-*r*71.3%
*-commutative71.3%
Applied egg-rr71.3%
expm1-def71.3%
expm1-log1p71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in angle around 0 71.0%
Final simplification72.8%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 2.0 (- b a)))
(t_1 (* PI (* 0.005555555555555556 angle)))
(t_2 (sin t_1)))
(if (<= b -5e+218)
(* t_0 (* (* t_2 (cos (pow (cbrt t_1) 3.0))) (+ b a)))
(* t_0 (* t_2 (+ b a))))))
double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_2 = sin(t_1);
double tmp;
if (b <= -5e+218) {
tmp = t_0 * ((t_2 * cos(pow(cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * (t_2 * (b + a));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 2.0 * (b - a);
double t_1 = Math.PI * (0.005555555555555556 * angle);
double t_2 = Math.sin(t_1);
double tmp;
if (b <= -5e+218) {
tmp = t_0 * ((t_2 * Math.cos(Math.pow(Math.cbrt(t_1), 3.0))) * (b + a));
} else {
tmp = t_0 * (t_2 * (b + a));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(2.0 * Float64(b - a)) t_1 = Float64(pi * Float64(0.005555555555555556 * angle)) t_2 = sin(t_1) tmp = 0.0 if (b <= -5e+218) tmp = Float64(t_0 * Float64(Float64(t_2 * cos((cbrt(t_1) ^ 3.0))) * Float64(b + a))); else tmp = Float64(t_0 * Float64(t_2 * Float64(b + a))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[b, -5e+218], N[(t$95$0 * N[(N[(t$95$2 * N[Cos[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(t$95$2 * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(b - a\right)\\
t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_2 := \sin t_1\\
\mathbf{if}\;b \leq -5 \cdot 10^{+218}:\\
\;\;\;\;t_0 \cdot \left(\left(t_2 \cdot \cos \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\right) \cdot \left(b + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(t_2 \cdot \left(b + a\right)\right)\\
\end{array}
\end{array}
if b < -4.99999999999999983e218Initial program 44.8%
associate-*l*44.8%
unpow244.8%
unpow244.8%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around inf 68.7%
associate-*r*68.7%
associate-*r*68.7%
*-commutative68.7%
associate-*r*62.4%
*-commutative62.4%
*-commutative62.4%
*-commutative62.4%
associate-*r*74.9%
*-commutative74.9%
*-commutative74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
add-cube-cbrt93.7%
pow399.9%
*-commutative99.9%
Applied egg-rr99.9%
if -4.99999999999999983e218 < b Initial program 52.9%
associate-*l*52.9%
unpow252.9%
unpow252.9%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around inf 65.8%
associate-*r*65.8%
associate-*r*65.7%
*-commutative65.7%
associate-*r*67.2%
*-commutative67.2%
*-commutative67.2%
*-commutative67.2%
associate-*r*67.0%
*-commutative67.0%
*-commutative67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in angle around 0 70.8%
Final simplification72.6%
(FPCore (a b angle)
:precision binary64
(if (<= b -8e+213)
(*
(* 2.0 (* (- b a) (+ b a)))
(*
(sin (* PI (/ angle 180.0)))
(+ 1.0 (* -1.54320987654321e-5 (* (* angle angle) (pow PI 2.0))))))
(*
(* 2.0 (- b a))
(* (sin (* PI (* 0.005555555555555556 angle))) (+ b a)))))
double code(double a, double b, double angle) {
double tmp;
if (b <= -8e+213) {
tmp = (2.0 * ((b - a) * (b + a))) * (sin((((double) M_PI) * (angle / 180.0))) * (1.0 + (-1.54320987654321e-5 * ((angle * angle) * pow(((double) M_PI), 2.0)))));
} else {
tmp = (2.0 * (b - a)) * (sin((((double) M_PI) * (0.005555555555555556 * angle))) * (b + a));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= -8e+213) {
tmp = (2.0 * ((b - a) * (b + a))) * (Math.sin((Math.PI * (angle / 180.0))) * (1.0 + (-1.54320987654321e-5 * ((angle * angle) * Math.pow(Math.PI, 2.0)))));
} else {
tmp = (2.0 * (b - a)) * (Math.sin((Math.PI * (0.005555555555555556 * angle))) * (b + a));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= -8e+213: tmp = (2.0 * ((b - a) * (b + a))) * (math.sin((math.pi * (angle / 180.0))) * (1.0 + (-1.54320987654321e-5 * ((angle * angle) * math.pow(math.pi, 2.0))))) else: tmp = (2.0 * (b - a)) * (math.sin((math.pi * (0.005555555555555556 * angle))) * (b + a)) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= -8e+213) tmp = Float64(Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))) * Float64(sin(Float64(pi * Float64(angle / 180.0))) * Float64(1.0 + Float64(-1.54320987654321e-5 * Float64(Float64(angle * angle) * (pi ^ 2.0)))))); else tmp = Float64(Float64(2.0 * Float64(b - a)) * Float64(sin(Float64(pi * Float64(0.005555555555555556 * angle))) * Float64(b + a))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= -8e+213) tmp = (2.0 * ((b - a) * (b + a))) * (sin((pi * (angle / 180.0))) * (1.0 + (-1.54320987654321e-5 * ((angle * angle) * (pi ^ 2.0))))); else tmp = (2.0 * (b - a)) * (sin((pi * (0.005555555555555556 * angle))) * (b + a)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, -8e+213], N[(N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(-1.54320987654321e-5 * N[(N[(angle * angle), $MachinePrecision] * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+213}:\\
\;\;\;\;\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot {\pi}^{2}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \left(b + a\right)\right)\\
\end{array}
\end{array}
if b < -7.99999999999999987e213Initial program 44.8%
associate-*l*44.8%
unpow244.8%
unpow244.8%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around 0 88.5%
unpow288.5%
Simplified88.5%
if -7.99999999999999987e213 < b Initial program 52.9%
associate-*l*52.9%
unpow252.9%
unpow252.9%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around inf 65.8%
associate-*r*65.8%
associate-*r*65.7%
*-commutative65.7%
associate-*r*67.2%
*-commutative67.2%
*-commutative67.2%
*-commutative67.2%
associate-*r*67.0%
*-commutative67.0%
*-commutative67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in angle around 0 70.8%
Final simplification71.9%
(FPCore (a b angle) :precision binary64 (if (<= (pow b 2.0) 4e+200) (* (* 2.0 (- b a)) (* (sin (* PI (* 0.005555555555555556 angle))) (+ b a))) (* 0.011111111111111112 (* (+ b a) (* PI (* (- b a) angle))))))
double code(double a, double b, double angle) {
double tmp;
if (pow(b, 2.0) <= 4e+200) {
tmp = (2.0 * (b - a)) * (sin((((double) M_PI) * (0.005555555555555556 * angle))) * (b + a));
} else {
tmp = 0.011111111111111112 * ((b + a) * (((double) M_PI) * ((b - a) * angle)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.pow(b, 2.0) <= 4e+200) {
tmp = (2.0 * (b - a)) * (Math.sin((Math.PI * (0.005555555555555556 * angle))) * (b + a));
} else {
tmp = 0.011111111111111112 * ((b + a) * (Math.PI * ((b - a) * angle)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if math.pow(b, 2.0) <= 4e+200: tmp = (2.0 * (b - a)) * (math.sin((math.pi * (0.005555555555555556 * angle))) * (b + a)) else: tmp = 0.011111111111111112 * ((b + a) * (math.pi * ((b - a) * angle))) return tmp
function code(a, b, angle) tmp = 0.0 if ((b ^ 2.0) <= 4e+200) tmp = Float64(Float64(2.0 * Float64(b - a)) * Float64(sin(Float64(pi * Float64(0.005555555555555556 * angle))) * Float64(b + a))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(pi * Float64(Float64(b - a) * angle)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((b ^ 2.0) <= 4e+200) tmp = (2.0 * (b - a)) * (sin((pi * (0.005555555555555556 * angle))) * (b + a)); else tmp = 0.011111111111111112 * ((b + a) * (pi * ((b - a) * angle))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 4e+200], N[(N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(Pi * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 4 \cdot 10^{+200}:\\
\;\;\;\;\left(2 \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \left(b + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b 2) < 3.9999999999999999e200Initial program 60.5%
associate-*l*60.5%
unpow260.5%
unpow260.5%
difference-of-squares60.5%
Simplified60.5%
Taylor expanded in angle around inf 62.1%
associate-*r*62.1%
associate-*r*62.1%
*-commutative62.1%
associate-*r*64.5%
*-commutative64.5%
*-commutative64.5%
*-commutative64.5%
associate-*r*63.6%
*-commutative63.6%
*-commutative63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in angle around 0 65.9%
if 3.9999999999999999e200 < (pow.f64 b 2) Initial program 37.4%
associate-*l*37.4%
unpow237.4%
unpow237.4%
difference-of-squares51.0%
Simplified51.0%
Taylor expanded in angle around 0 58.7%
Taylor expanded in angle around 0 58.7%
associate-*r*81.4%
*-commutative81.4%
associate-*r*81.4%
+-commutative81.4%
Simplified81.4%
Final simplification71.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- b a) angle)))
(if (<= b -1.25e+101)
(* 0.011111111111111112 (* t_0 (* PI (+ b a))))
(if (<= b 4.4e-177)
(* (* 2.0 (* (- b a) (+ b a))) (sin (* PI (/ angle 180.0))))
(* 0.011111111111111112 (* (+ b a) (* PI t_0)))))))
double code(double a, double b, double angle) {
double t_0 = (b - a) * angle;
double tmp;
if (b <= -1.25e+101) {
tmp = 0.011111111111111112 * (t_0 * (((double) M_PI) * (b + a)));
} else if (b <= 4.4e-177) {
tmp = (2.0 * ((b - a) * (b + a))) * sin((((double) M_PI) * (angle / 180.0)));
} else {
tmp = 0.011111111111111112 * ((b + a) * (((double) M_PI) * t_0));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b - a) * angle;
double tmp;
if (b <= -1.25e+101) {
tmp = 0.011111111111111112 * (t_0 * (Math.PI * (b + a)));
} else if (b <= 4.4e-177) {
tmp = (2.0 * ((b - a) * (b + a))) * Math.sin((Math.PI * (angle / 180.0)));
} else {
tmp = 0.011111111111111112 * ((b + a) * (Math.PI * t_0));
}
return tmp;
}
def code(a, b, angle): t_0 = (b - a) * angle tmp = 0 if b <= -1.25e+101: tmp = 0.011111111111111112 * (t_0 * (math.pi * (b + a))) elif b <= 4.4e-177: tmp = (2.0 * ((b - a) * (b + a))) * math.sin((math.pi * (angle / 180.0))) else: tmp = 0.011111111111111112 * ((b + a) * (math.pi * t_0)) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b - a) * angle) tmp = 0.0 if (b <= -1.25e+101) tmp = Float64(0.011111111111111112 * Float64(t_0 * Float64(pi * Float64(b + a)))); elseif (b <= 4.4e-177) tmp = Float64(Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))) * sin(Float64(pi * Float64(angle / 180.0)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(pi * t_0))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b - a) * angle; tmp = 0.0; if (b <= -1.25e+101) tmp = 0.011111111111111112 * (t_0 * (pi * (b + a))); elseif (b <= 4.4e-177) tmp = (2.0 * ((b - a) * (b + a))) * sin((pi * (angle / 180.0))); else tmp = 0.011111111111111112 * ((b + a) * (pi * t_0)); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[b, -1.25e+101], N[(0.011111111111111112 * N[(t$95$0 * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.4e-177], N[(N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot angle\\
\mathbf{if}\;b \leq -1.25 \cdot 10^{+101}:\\
\;\;\;\;0.011111111111111112 \cdot \left(t_0 \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
\mathbf{elif}\;b \leq 4.4 \cdot 10^{-177}:\\
\;\;\;\;\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot t_0\right)\right)\\
\end{array}
\end{array}
if b < -1.24999999999999997e101Initial program 37.0%
associate-*l*37.0%
unpow237.0%
unpow237.0%
difference-of-squares52.2%
Simplified52.2%
Taylor expanded in angle around 0 57.4%
*-commutative57.4%
associate-*r*83.1%
Simplified83.1%
if -1.24999999999999997e101 < b < 4.40000000000000023e-177Initial program 64.3%
associate-*l*64.3%
unpow264.3%
unpow264.3%
difference-of-squares64.3%
Simplified64.3%
Taylor expanded in angle around 0 67.0%
if 4.40000000000000023e-177 < b Initial program 45.0%
associate-*l*45.0%
unpow245.0%
unpow245.0%
difference-of-squares51.1%
Simplified51.1%
Taylor expanded in angle around 0 52.9%
Taylor expanded in angle around 0 52.9%
associate-*r*66.6%
*-commutative66.6%
associate-*r*66.7%
+-commutative66.7%
Simplified66.7%
Final simplification69.4%
(FPCore (a b angle)
:precision binary64
(if (<= angle -8.8e-128)
(* (* (- b a) (* PI (+ b a))) (* angle 0.011111111111111112))
(if (<= angle 48000000000000.0)
(* 0.011111111111111112 (* (+ b a) (* PI (* (- b a) angle))))
(* 0.011111111111111112 (* angle (* PI (pow (+ b a) 2.0)))))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= -8.8e-128) {
tmp = ((b - a) * (((double) M_PI) * (b + a))) * (angle * 0.011111111111111112);
} else if (angle <= 48000000000000.0) {
tmp = 0.011111111111111112 * ((b + a) * (((double) M_PI) * ((b - a) * angle)));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * pow((b + a), 2.0)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= -8.8e-128) {
tmp = ((b - a) * (Math.PI * (b + a))) * (angle * 0.011111111111111112);
} else if (angle <= 48000000000000.0) {
tmp = 0.011111111111111112 * ((b + a) * (Math.PI * ((b - a) * angle)));
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * Math.pow((b + a), 2.0)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= -8.8e-128: tmp = ((b - a) * (math.pi * (b + a))) * (angle * 0.011111111111111112) elif angle <= 48000000000000.0: tmp = 0.011111111111111112 * ((b + a) * (math.pi * ((b - a) * angle))) else: tmp = 0.011111111111111112 * (angle * (math.pi * math.pow((b + a), 2.0))) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= -8.8e-128) tmp = Float64(Float64(Float64(b - a) * Float64(pi * Float64(b + a))) * Float64(angle * 0.011111111111111112)); elseif (angle <= 48000000000000.0) tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(pi * Float64(Float64(b - a) * angle)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * (Float64(b + a) ^ 2.0)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= -8.8e-128) tmp = ((b - a) * (pi * (b + a))) * (angle * 0.011111111111111112); elseif (angle <= 48000000000000.0) tmp = 0.011111111111111112 * ((b + a) * (pi * ((b - a) * angle))); else tmp = 0.011111111111111112 * (angle * (pi * ((b + a) ^ 2.0))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, -8.8e-128], N[(N[(N[(b - a), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 48000000000000.0], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(Pi * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[Power[N[(b + a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq -8.8 \cdot 10^{-128}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;angle \leq 48000000000000:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot {\left(b + a\right)}^{2}\right)\right)\\
\end{array}
\end{array}
if angle < -8.80000000000000037e-128Initial program 58.3%
associate-*l*58.3%
unpow258.3%
unpow258.3%
difference-of-squares62.4%
Simplified62.4%
Taylor expanded in angle around 0 59.4%
associate-*r*59.4%
*-commutative59.4%
*-commutative59.4%
Simplified59.4%
if -8.80000000000000037e-128 < angle < 4.8e13Initial program 65.7%
associate-*l*65.7%
unpow265.7%
unpow265.7%
difference-of-squares72.3%
Simplified72.3%
Taylor expanded in angle around 0 72.0%
Taylor expanded in angle around 0 72.0%
associate-*r*99.2%
*-commutative99.2%
associate-*r*99.3%
+-commutative99.3%
Simplified99.3%
if 4.8e13 < angle Initial program 23.1%
*-commutative23.1%
associate-*l*23.1%
unpow223.1%
fma-neg27.8%
unpow227.8%
Simplified27.8%
Applied egg-rr21.4%
expm1-def22.7%
expm1-log1p30.1%
associate-*l*30.1%
sin-030.1%
+-lft-identity30.1%
associate-*l*30.1%
*-commutative30.1%
*-commutative30.1%
+-commutative30.1%
Simplified30.1%
Taylor expanded in angle around 0 35.5%
Final simplification68.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- b a) angle)))
(if (<= a -1e-55)
(* 0.011111111111111112 (* (+ b a) (* PI t_0)))
(if (<= a 1.36e-160)
(* b (* b (sin (* angle (* PI 0.011111111111111112)))))
(* 0.011111111111111112 (* t_0 (* PI (+ b a))))))))
double code(double a, double b, double angle) {
double t_0 = (b - a) * angle;
double tmp;
if (a <= -1e-55) {
tmp = 0.011111111111111112 * ((b + a) * (((double) M_PI) * t_0));
} else if (a <= 1.36e-160) {
tmp = b * (b * sin((angle * (((double) M_PI) * 0.011111111111111112))));
} else {
tmp = 0.011111111111111112 * (t_0 * (((double) M_PI) * (b + a)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b - a) * angle;
double tmp;
if (a <= -1e-55) {
tmp = 0.011111111111111112 * ((b + a) * (Math.PI * t_0));
} else if (a <= 1.36e-160) {
tmp = b * (b * Math.sin((angle * (Math.PI * 0.011111111111111112))));
} else {
tmp = 0.011111111111111112 * (t_0 * (Math.PI * (b + a)));
}
return tmp;
}
def code(a, b, angle): t_0 = (b - a) * angle tmp = 0 if a <= -1e-55: tmp = 0.011111111111111112 * ((b + a) * (math.pi * t_0)) elif a <= 1.36e-160: tmp = b * (b * math.sin((angle * (math.pi * 0.011111111111111112)))) else: tmp = 0.011111111111111112 * (t_0 * (math.pi * (b + a))) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b - a) * angle) tmp = 0.0 if (a <= -1e-55) tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(pi * t_0))); elseif (a <= 1.36e-160) tmp = Float64(b * Float64(b * sin(Float64(angle * Float64(pi * 0.011111111111111112))))); else tmp = Float64(0.011111111111111112 * Float64(t_0 * Float64(pi * Float64(b + a)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b - a) * angle; tmp = 0.0; if (a <= -1e-55) tmp = 0.011111111111111112 * ((b + a) * (pi * t_0)); elseif (a <= 1.36e-160) tmp = b * (b * sin((angle * (pi * 0.011111111111111112)))); else tmp = 0.011111111111111112 * (t_0 * (pi * (b + a))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[a, -1e-55], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.36e-160], N[(b * N[(b * N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(t$95$0 * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot angle\\
\mathbf{if}\;a \leq -1 \cdot 10^{-55}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot t_0\right)\right)\\
\mathbf{elif}\;a \leq 1.36 \cdot 10^{-160}:\\
\;\;\;\;b \cdot \left(b \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(t_0 \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
\end{array}
\end{array}
if a < -9.99999999999999995e-56Initial program 47.6%
associate-*l*47.6%
unpow247.6%
unpow247.6%
difference-of-squares53.4%
Simplified53.4%
Taylor expanded in angle around 0 49.0%
Taylor expanded in angle around 0 49.0%
associate-*r*61.0%
*-commutative61.0%
associate-*r*61.1%
+-commutative61.1%
Simplified61.1%
if -9.99999999999999995e-56 < a < 1.35999999999999993e-160Initial program 66.3%
*-commutative66.3%
associate-*l*66.3%
unpow266.3%
fma-neg66.3%
unpow266.3%
Simplified66.3%
Applied egg-rr42.1%
expm1-def54.3%
expm1-log1p66.1%
associate-*l*66.1%
sin-066.1%
+-lft-identity66.1%
associate-*l*66.1%
*-commutative66.1%
*-commutative66.1%
+-commutative66.1%
Simplified66.1%
Taylor expanded in a around 0 65.6%
*-commutative65.6%
unpow265.6%
associate-*l*69.0%
*-commutative69.0%
associate-*l*70.1%
Simplified70.1%
if 1.35999999999999993e-160 < a Initial program 44.9%
associate-*l*44.9%
unpow244.9%
unpow244.9%
difference-of-squares52.7%
Simplified52.7%
Taylor expanded in angle around 0 57.6%
*-commutative57.6%
associate-*r*71.5%
Simplified71.5%
Final simplification68.3%
(FPCore (a b angle) :precision binary64 (if (or (<= a -6e-84) (not (<= a 1.35e-171))) (* 0.011111111111111112 (* (+ b a) (* PI (* (- b a) angle)))) (* 0.011111111111111112 (* PI (* angle (* b b))))))
double code(double a, double b, double angle) {
double tmp;
if ((a <= -6e-84) || !(a <= 1.35e-171)) {
tmp = 0.011111111111111112 * ((b + a) * (((double) M_PI) * ((b - a) * angle)));
} else {
tmp = 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((a <= -6e-84) || !(a <= 1.35e-171)) {
tmp = 0.011111111111111112 * ((b + a) * (Math.PI * ((b - a) * angle)));
} else {
tmp = 0.011111111111111112 * (Math.PI * (angle * (b * b)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (a <= -6e-84) or not (a <= 1.35e-171): tmp = 0.011111111111111112 * ((b + a) * (math.pi * ((b - a) * angle))) else: tmp = 0.011111111111111112 * (math.pi * (angle * (b * b))) return tmp
function code(a, b, angle) tmp = 0.0 if ((a <= -6e-84) || !(a <= 1.35e-171)) tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(pi * Float64(Float64(b - a) * angle)))); else tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((a <= -6e-84) || ~((a <= 1.35e-171))) tmp = 0.011111111111111112 * ((b + a) * (pi * ((b - a) * angle))); else tmp = 0.011111111111111112 * (pi * (angle * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[Or[LessEqual[a, -6e-84], N[Not[LessEqual[a, 1.35e-171]], $MachinePrecision]], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(Pi * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-84} \lor \neg \left(a \leq 1.35 \cdot 10^{-171}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if a < -6.0000000000000002e-84 or 1.35000000000000007e-171 < a Initial program 46.4%
associate-*l*46.4%
unpow246.4%
unpow246.4%
difference-of-squares52.9%
Simplified52.9%
Taylor expanded in angle around 0 53.0%
Taylor expanded in angle around 0 53.0%
associate-*r*66.3%
*-commutative66.3%
associate-*r*66.4%
+-commutative66.4%
Simplified66.4%
if -6.0000000000000002e-84 < a < 1.35000000000000007e-171Initial program 68.7%
associate-*l*68.7%
unpow268.7%
unpow268.7%
difference-of-squares68.7%
Simplified68.7%
Taylor expanded in angle around 0 63.6%
Taylor expanded in b around inf 65.0%
associate-*r*65.0%
*-commutative65.0%
unpow265.0%
Simplified65.0%
Final simplification66.0%
(FPCore (a b angle) :precision binary64 (if (or (<= a -4.6e-84) (not (<= a 5.5e-173))) (* 0.011111111111111112 (* (+ b a) (* PI (* (- b a) angle)))) (* (* 0.005555555555555556 (* PI angle)) (* 2.0 (* b b)))))
double code(double a, double b, double angle) {
double tmp;
if ((a <= -4.6e-84) || !(a <= 5.5e-173)) {
tmp = 0.011111111111111112 * ((b + a) * (((double) M_PI) * ((b - a) * angle)));
} else {
tmp = (0.005555555555555556 * (((double) M_PI) * angle)) * (2.0 * (b * b));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((a <= -4.6e-84) || !(a <= 5.5e-173)) {
tmp = 0.011111111111111112 * ((b + a) * (Math.PI * ((b - a) * angle)));
} else {
tmp = (0.005555555555555556 * (Math.PI * angle)) * (2.0 * (b * b));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (a <= -4.6e-84) or not (a <= 5.5e-173): tmp = 0.011111111111111112 * ((b + a) * (math.pi * ((b - a) * angle))) else: tmp = (0.005555555555555556 * (math.pi * angle)) * (2.0 * (b * b)) return tmp
function code(a, b, angle) tmp = 0.0 if ((a <= -4.6e-84) || !(a <= 5.5e-173)) tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(pi * Float64(Float64(b - a) * angle)))); else tmp = Float64(Float64(0.005555555555555556 * Float64(pi * angle)) * Float64(2.0 * Float64(b * b))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((a <= -4.6e-84) || ~((a <= 5.5e-173))) tmp = 0.011111111111111112 * ((b + a) * (pi * ((b - a) * angle))); else tmp = (0.005555555555555556 * (pi * angle)) * (2.0 * (b * b)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[Or[LessEqual[a, -4.6e-84], N[Not[LessEqual[a, 5.5e-173]], $MachinePrecision]], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(Pi * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{-84} \lor \neg \left(a \leq 5.5 \cdot 10^{-173}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\\
\end{array}
\end{array}
if a < -4.59999999999999961e-84 or 5.50000000000000022e-173 < a Initial program 46.4%
associate-*l*46.4%
unpow246.4%
unpow246.4%
difference-of-squares52.9%
Simplified52.9%
Taylor expanded in angle around 0 53.0%
Taylor expanded in angle around 0 53.0%
associate-*r*66.3%
*-commutative66.3%
associate-*r*66.4%
+-commutative66.4%
Simplified66.4%
if -4.59999999999999961e-84 < a < 5.50000000000000022e-173Initial program 68.7%
*-commutative68.7%
associate-*l*68.7%
unpow268.7%
fma-neg68.7%
unpow268.7%
distribute-rgt-neg-in68.7%
Simplified68.7%
Taylor expanded in b around inf 68.5%
unpow268.5%
associate-*r*68.5%
*-commutative68.5%
associate-*r*68.9%
*-commutative68.9%
*-commutative68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in angle around 0 64.0%
Taylor expanded in angle around 0 65.1%
Final simplification66.0%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- b a) angle)))
(if (<= a -4.6e-84)
(* 0.011111111111111112 (* (+ b a) (* PI t_0)))
(if (<= a 5.8e-175)
(* (* 0.005555555555555556 (* PI angle)) (* 2.0 (* b b)))
(* 0.011111111111111112 (* t_0 (* PI (+ b a))))))))
double code(double a, double b, double angle) {
double t_0 = (b - a) * angle;
double tmp;
if (a <= -4.6e-84) {
tmp = 0.011111111111111112 * ((b + a) * (((double) M_PI) * t_0));
} else if (a <= 5.8e-175) {
tmp = (0.005555555555555556 * (((double) M_PI) * angle)) * (2.0 * (b * b));
} else {
tmp = 0.011111111111111112 * (t_0 * (((double) M_PI) * (b + a)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b - a) * angle;
double tmp;
if (a <= -4.6e-84) {
tmp = 0.011111111111111112 * ((b + a) * (Math.PI * t_0));
} else if (a <= 5.8e-175) {
tmp = (0.005555555555555556 * (Math.PI * angle)) * (2.0 * (b * b));
} else {
tmp = 0.011111111111111112 * (t_0 * (Math.PI * (b + a)));
}
return tmp;
}
def code(a, b, angle): t_0 = (b - a) * angle tmp = 0 if a <= -4.6e-84: tmp = 0.011111111111111112 * ((b + a) * (math.pi * t_0)) elif a <= 5.8e-175: tmp = (0.005555555555555556 * (math.pi * angle)) * (2.0 * (b * b)) else: tmp = 0.011111111111111112 * (t_0 * (math.pi * (b + a))) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b - a) * angle) tmp = 0.0 if (a <= -4.6e-84) tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(pi * t_0))); elseif (a <= 5.8e-175) tmp = Float64(Float64(0.005555555555555556 * Float64(pi * angle)) * Float64(2.0 * Float64(b * b))); else tmp = Float64(0.011111111111111112 * Float64(t_0 * Float64(pi * Float64(b + a)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b - a) * angle; tmp = 0.0; if (a <= -4.6e-84) tmp = 0.011111111111111112 * ((b + a) * (pi * t_0)); elseif (a <= 5.8e-175) tmp = (0.005555555555555556 * (pi * angle)) * (2.0 * (b * b)); else tmp = 0.011111111111111112 * (t_0 * (pi * (b + a))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[a, -4.6e-84], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e-175], N[(N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(t$95$0 * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot angle\\
\mathbf{if}\;a \leq -4.6 \cdot 10^{-84}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot t_0\right)\right)\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-175}:\\
\;\;\;\;\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(t_0 \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\
\end{array}
\end{array}
if a < -4.59999999999999961e-84Initial program 47.7%
associate-*l*47.7%
unpow247.7%
unpow247.7%
difference-of-squares52.9%
Simplified52.9%
Taylor expanded in angle around 0 47.3%
Taylor expanded in angle around 0 47.3%
associate-*r*59.4%
*-commutative59.4%
associate-*r*59.5%
+-commutative59.5%
Simplified59.5%
if -4.59999999999999961e-84 < a < 5.79999999999999998e-175Initial program 68.7%
*-commutative68.7%
associate-*l*68.7%
unpow268.7%
fma-neg68.7%
unpow268.7%
distribute-rgt-neg-in68.7%
Simplified68.7%
Taylor expanded in b around inf 68.5%
unpow268.5%
associate-*r*68.5%
*-commutative68.5%
associate-*r*68.9%
*-commutative68.9%
*-commutative68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in angle around 0 64.0%
Taylor expanded in angle around 0 65.1%
if 5.79999999999999998e-175 < a Initial program 45.5%
associate-*l*45.5%
unpow245.5%
unpow245.5%
difference-of-squares52.9%
Simplified52.9%
Taylor expanded in angle around 0 56.9%
*-commutative56.9%
associate-*r*71.1%
Simplified71.1%
Final simplification66.0%
(FPCore (a b angle) :precision binary64 (if (or (<= a -1.25e+110) (not (<= a 8.2e+122))) (* 0.011111111111111112 (* angle (* (- b a) (* a PI)))) (* angle (* 0.011111111111111112 (* PI (* b b))))))
double code(double a, double b, double angle) {
double tmp;
if ((a <= -1.25e+110) || !(a <= 8.2e+122)) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * ((double) M_PI))));
} else {
tmp = angle * (0.011111111111111112 * (((double) M_PI) * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((a <= -1.25e+110) || !(a <= 8.2e+122)) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * Math.PI)));
} else {
tmp = angle * (0.011111111111111112 * (Math.PI * (b * b)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (a <= -1.25e+110) or not (a <= 8.2e+122): tmp = 0.011111111111111112 * (angle * ((b - a) * (a * math.pi))) else: tmp = angle * (0.011111111111111112 * (math.pi * (b * b))) return tmp
function code(a, b, angle) tmp = 0.0 if ((a <= -1.25e+110) || !(a <= 8.2e+122)) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(a * pi)))); else tmp = Float64(angle * Float64(0.011111111111111112 * Float64(pi * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((a <= -1.25e+110) || ~((a <= 8.2e+122))) tmp = 0.011111111111111112 * (angle * ((b - a) * (a * pi))); else tmp = angle * (0.011111111111111112 * (pi * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[Or[LessEqual[a, -1.25e+110], N[Not[LessEqual[a, 8.2e+122]], $MachinePrecision]], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(0.011111111111111112 * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+110} \lor \neg \left(a \leq 8.2 \cdot 10^{+122}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if a < -1.24999999999999995e110 or 8.2000000000000004e122 < a Initial program 42.9%
associate-*l*42.9%
unpow242.9%
unpow242.9%
difference-of-squares57.0%
Simplified57.0%
Taylor expanded in angle around 0 56.8%
Taylor expanded in a around inf 53.4%
*-commutative53.4%
Simplified53.4%
if -1.24999999999999995e110 < a < 8.2000000000000004e122Initial program 57.3%
associate-*l*57.3%
unpow257.3%
unpow257.3%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around 0 55.4%
Taylor expanded in b around inf 48.0%
associate-*r*48.0%
*-commutative48.0%
unpow248.0%
Simplified48.0%
Taylor expanded in angle around 0 48.0%
associate-*r*48.0%
*-commutative48.0%
associate-*l*48.0%
*-commutative48.0%
unpow248.0%
Simplified48.0%
Final simplification49.8%
(FPCore (a b angle) :precision binary64 (if (or (<= b -1.02e-22) (not (<= b 1.4e-11))) (* 0.011111111111111112 (* angle (* (- b a) (* b PI)))) (* 0.011111111111111112 (* (- angle) (* PI (* a a))))))
double code(double a, double b, double angle) {
double tmp;
if ((b <= -1.02e-22) || !(b <= 1.4e-11)) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * ((double) M_PI))));
} else {
tmp = 0.011111111111111112 * (-angle * (((double) M_PI) * (a * a)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((b <= -1.02e-22) || !(b <= 1.4e-11)) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * Math.PI)));
} else {
tmp = 0.011111111111111112 * (-angle * (Math.PI * (a * a)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (b <= -1.02e-22) or not (b <= 1.4e-11): tmp = 0.011111111111111112 * (angle * ((b - a) * (b * math.pi))) else: tmp = 0.011111111111111112 * (-angle * (math.pi * (a * a))) return tmp
function code(a, b, angle) tmp = 0.0 if ((b <= -1.02e-22) || !(b <= 1.4e-11)) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(b * pi)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(-angle) * Float64(pi * Float64(a * a)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((b <= -1.02e-22) || ~((b <= 1.4e-11))) tmp = 0.011111111111111112 * (angle * ((b - a) * (b * pi))); else tmp = 0.011111111111111112 * (-angle * (pi * (a * a))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[Or[LessEqual[b, -1.02e-22], N[Not[LessEqual[b, 1.4e-11]], $MachinePrecision]], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[((-angle) * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.02 \cdot 10^{-22} \lor \neg \left(b \leq 1.4 \cdot 10^{-11}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(-angle\right) \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\
\end{array}
\end{array}
if b < -1.02000000000000002e-22 or 1.4e-11 < b Initial program 42.3%
associate-*l*42.3%
unpow242.3%
unpow242.3%
difference-of-squares52.1%
Simplified52.1%
Taylor expanded in angle around 0 55.1%
Taylor expanded in a around 0 49.7%
*-commutative49.7%
Simplified49.7%
if -1.02000000000000002e-22 < b < 1.4e-11Initial program 62.0%
associate-*l*62.0%
unpow262.0%
unpow262.0%
difference-of-squares62.0%
Simplified62.0%
Taylor expanded in angle around 0 56.6%
Taylor expanded in b around 0 54.9%
associate-*r*54.9%
neg-mul-154.9%
*-commutative54.9%
unpow254.9%
Simplified54.9%
Final simplification52.4%
(FPCore (a b angle)
:precision binary64
(if (<= b -1.02e-22)
(* 0.011111111111111112 (* PI (* angle (* b b))))
(if (<= b 1.8e-14)
(* 0.011111111111111112 (* (- angle) (* PI (* a a))))
(* angle (* 0.011111111111111112 (* PI (* b b)))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= -1.02e-22) {
tmp = 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
} else if (b <= 1.8e-14) {
tmp = 0.011111111111111112 * (-angle * (((double) M_PI) * (a * a)));
} else {
tmp = angle * (0.011111111111111112 * (((double) M_PI) * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= -1.02e-22) {
tmp = 0.011111111111111112 * (Math.PI * (angle * (b * b)));
} else if (b <= 1.8e-14) {
tmp = 0.011111111111111112 * (-angle * (Math.PI * (a * a)));
} else {
tmp = angle * (0.011111111111111112 * (Math.PI * (b * b)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= -1.02e-22: tmp = 0.011111111111111112 * (math.pi * (angle * (b * b))) elif b <= 1.8e-14: tmp = 0.011111111111111112 * (-angle * (math.pi * (a * a))) else: tmp = angle * (0.011111111111111112 * (math.pi * (b * b))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= -1.02e-22) tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b)))); elseif (b <= 1.8e-14) tmp = Float64(0.011111111111111112 * Float64(Float64(-angle) * Float64(pi * Float64(a * a)))); else tmp = Float64(angle * Float64(0.011111111111111112 * Float64(pi * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= -1.02e-22) tmp = 0.011111111111111112 * (pi * (angle * (b * b))); elseif (b <= 1.8e-14) tmp = 0.011111111111111112 * (-angle * (pi * (a * a))); else tmp = angle * (0.011111111111111112 * (pi * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, -1.02e-22], N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.8e-14], N[(0.011111111111111112 * N[((-angle) * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(0.011111111111111112 * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.02 \cdot 10^{-22}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{-14}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(-angle\right) \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if b < -1.02000000000000002e-22Initial program 41.9%
associate-*l*41.9%
unpow241.9%
unpow241.9%
difference-of-squares52.2%
Simplified52.2%
Taylor expanded in angle around 0 52.0%
Taylor expanded in b around inf 36.9%
associate-*r*36.9%
*-commutative36.9%
unpow236.9%
Simplified36.9%
if -1.02000000000000002e-22 < b < 1.7999999999999999e-14Initial program 62.0%
associate-*l*62.0%
unpow262.0%
unpow262.0%
difference-of-squares62.0%
Simplified62.0%
Taylor expanded in angle around 0 56.6%
Taylor expanded in b around 0 54.9%
associate-*r*54.9%
neg-mul-154.9%
*-commutative54.9%
unpow254.9%
Simplified54.9%
if 1.7999999999999999e-14 < b Initial program 42.7%
associate-*l*42.7%
unpow242.7%
unpow242.7%
difference-of-squares52.1%
Simplified52.1%
Taylor expanded in angle around 0 57.8%
Taylor expanded in b around inf 50.8%
associate-*r*50.8%
*-commutative50.8%
unpow250.8%
Simplified50.8%
Taylor expanded in angle around 0 50.8%
associate-*r*50.8%
*-commutative50.8%
associate-*l*50.8%
*-commutative50.8%
unpow250.8%
Simplified50.8%
Final simplification49.7%
(FPCore (a b angle)
:precision binary64
(if (<= b -1.5e-23)
(* 0.011111111111111112 (* PI (* angle (* b b))))
(if (<= b 1.6e-10)
(* (* PI (* a a)) (* angle -0.011111111111111112))
(* angle (* 0.011111111111111112 (* PI (* b b)))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= -1.5e-23) {
tmp = 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
} else if (b <= 1.6e-10) {
tmp = (((double) M_PI) * (a * a)) * (angle * -0.011111111111111112);
} else {
tmp = angle * (0.011111111111111112 * (((double) M_PI) * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= -1.5e-23) {
tmp = 0.011111111111111112 * (Math.PI * (angle * (b * b)));
} else if (b <= 1.6e-10) {
tmp = (Math.PI * (a * a)) * (angle * -0.011111111111111112);
} else {
tmp = angle * (0.011111111111111112 * (Math.PI * (b * b)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= -1.5e-23: tmp = 0.011111111111111112 * (math.pi * (angle * (b * b))) elif b <= 1.6e-10: tmp = (math.pi * (a * a)) * (angle * -0.011111111111111112) else: tmp = angle * (0.011111111111111112 * (math.pi * (b * b))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= -1.5e-23) tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b)))); elseif (b <= 1.6e-10) tmp = Float64(Float64(pi * Float64(a * a)) * Float64(angle * -0.011111111111111112)); else tmp = Float64(angle * Float64(0.011111111111111112 * Float64(pi * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= -1.5e-23) tmp = 0.011111111111111112 * (pi * (angle * (b * b))); elseif (b <= 1.6e-10) tmp = (pi * (a * a)) * (angle * -0.011111111111111112); else tmp = angle * (0.011111111111111112 * (pi * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, -1.5e-23], N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e-10], N[(N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(angle * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(angle * N[(0.011111111111111112 * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5 \cdot 10^{-23}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{-10}:\\
\;\;\;\;\left(\pi \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot -0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if b < -1.50000000000000001e-23Initial program 41.9%
associate-*l*41.9%
unpow241.9%
unpow241.9%
difference-of-squares52.2%
Simplified52.2%
Taylor expanded in angle around 0 52.0%
Taylor expanded in b around inf 36.9%
associate-*r*36.9%
*-commutative36.9%
unpow236.9%
Simplified36.9%
if -1.50000000000000001e-23 < b < 1.5999999999999999e-10Initial program 62.0%
associate-*l*62.0%
unpow262.0%
unpow262.0%
difference-of-squares62.0%
Simplified62.0%
Taylor expanded in angle around 0 56.6%
Taylor expanded in b around 0 54.9%
*-commutative54.9%
*-commutative54.9%
associate-*l*54.9%
*-commutative54.9%
unpow254.9%
Simplified54.9%
if 1.5999999999999999e-10 < b Initial program 42.7%
associate-*l*42.7%
unpow242.7%
unpow242.7%
difference-of-squares52.1%
Simplified52.1%
Taylor expanded in angle around 0 57.8%
Taylor expanded in b around inf 50.8%
associate-*r*50.8%
*-commutative50.8%
unpow250.8%
Simplified50.8%
Taylor expanded in angle around 0 50.8%
associate-*r*50.8%
*-commutative50.8%
associate-*l*50.8%
*-commutative50.8%
unpow250.8%
Simplified50.8%
Final simplification49.7%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* angle (* (- b a) (* PI (+ b a))))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * ((b - a) * (((double) M_PI) * (b + a))));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * ((b - a) * (Math.PI * (b + a))));
}
def code(a, b, angle): return 0.011111111111111112 * (angle * ((b - a) * (math.pi * (b + a))))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(pi * Float64(b + a))))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (angle * ((b - a) * (pi * (b + a)))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)
\end{array}
Initial program 52.4%
associate-*l*52.4%
unpow252.4%
unpow252.4%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around 0 55.9%
Final simplification55.9%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* angle (* PI (* b b)))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
def code(a, b, angle): return 0.011111111111111112 * (angle * (math.pi * (b * b)))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Initial program 52.4%
associate-*l*52.4%
unpow252.4%
unpow252.4%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around 0 55.9%
Taylor expanded in b around inf 36.2%
associate-*r*36.2%
*-commutative36.2%
unpow236.2%
Simplified36.2%
Taylor expanded in angle around 0 36.2%
associate-*r*36.1%
*-commutative36.1%
associate-*l*36.2%
*-commutative36.2%
unpow236.2%
Simplified36.2%
Taylor expanded in angle around 0 36.2%
unpow236.2%
*-commutative36.2%
Simplified36.2%
Final simplification36.2%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* PI (* angle (* b b)))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (Math.PI * (angle * (b * b)));
}
def code(a, b, angle): return 0.011111111111111112 * (math.pi * (angle * (b * b)))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b)))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (pi * (angle * (b * b))); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Initial program 52.4%
associate-*l*52.4%
unpow252.4%
unpow252.4%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around 0 55.9%
Taylor expanded in b around inf 36.2%
associate-*r*36.2%
*-commutative36.2%
unpow236.2%
Simplified36.2%
Final simplification36.2%
(FPCore (a b angle) :precision binary64 (* angle (* 0.011111111111111112 (* PI (* b b)))))
double code(double a, double b, double angle) {
return angle * (0.011111111111111112 * (((double) M_PI) * (b * b)));
}
public static double code(double a, double b, double angle) {
return angle * (0.011111111111111112 * (Math.PI * (b * b)));
}
def code(a, b, angle): return angle * (0.011111111111111112 * (math.pi * (b * b)))
function code(a, b, angle) return Float64(angle * Float64(0.011111111111111112 * Float64(pi * Float64(b * b)))) end
function tmp = code(a, b, angle) tmp = angle * (0.011111111111111112 * (pi * (b * b))); end
code[a_, b_, angle_] := N[(angle * N[(0.011111111111111112 * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Initial program 52.4%
associate-*l*52.4%
unpow252.4%
unpow252.4%
difference-of-squares57.2%
Simplified57.2%
Taylor expanded in angle around 0 55.9%
Taylor expanded in b around inf 36.2%
associate-*r*36.2%
*-commutative36.2%
unpow236.2%
Simplified36.2%
Taylor expanded in angle around 0 36.2%
associate-*r*36.1%
*-commutative36.1%
associate-*l*36.2%
*-commutative36.2%
unpow236.2%
Simplified36.2%
Final simplification36.2%
herbie shell --seed 2023182
(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)))))