
(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 (* PI (/ angle 180.0)))
(t_1 (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
(if (<= t_1 2e+141)
(*
2.0
(*
(* (sin (* angle (/ PI 180.0))) (+ b a))
(* (- b a) (cos (/ PI (/ 180.0 angle))))))
(if (<= t_1 INFINITY)
(*
2.0
(*
(*
(+ b a)
(sin
(*
(* (cbrt PI) (* (cbrt PI) (cbrt PI)))
(* angle 0.005555555555555556))))
(* (- b a) (cos (* PI (* angle 0.005555555555555556))))))
(*
2.0
(*
(- b a)
(*
(+ b a)
(sin
(* (* angle 0.005555555555555556) (* (sqrt PI) (sqrt PI)))))))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double t_1 = ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
double tmp;
if (t_1 <= 2e+141) {
tmp = 2.0 * ((sin((angle * (((double) M_PI) / 180.0))) * (b + a)) * ((b - a) * cos((((double) M_PI) / (180.0 / angle)))));
} else if (t_1 <= ((double) INFINITY)) {
tmp = 2.0 * (((b + a) * sin(((cbrt(((double) M_PI)) * (cbrt(((double) M_PI)) * cbrt(((double) M_PI)))) * (angle * 0.005555555555555556)))) * ((b - a) * cos((((double) M_PI) * (angle * 0.005555555555555556)))));
} else {
tmp = 2.0 * ((b - a) * ((b + a) * sin(((angle * 0.005555555555555556) * (sqrt(((double) M_PI)) * sqrt(((double) M_PI)))))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double t_1 = ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
double tmp;
if (t_1 <= 2e+141) {
tmp = 2.0 * ((Math.sin((angle * (Math.PI / 180.0))) * (b + a)) * ((b - a) * Math.cos((Math.PI / (180.0 / angle)))));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (((b + a) * Math.sin(((Math.cbrt(Math.PI) * (Math.cbrt(Math.PI) * Math.cbrt(Math.PI))) * (angle * 0.005555555555555556)))) * ((b - a) * Math.cos((Math.PI * (angle * 0.005555555555555556)))));
} else {
tmp = 2.0 * ((b - a) * ((b + a) * Math.sin(((angle * 0.005555555555555556) * (Math.sqrt(Math.PI) * Math.sqrt(Math.PI))))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) t_1 = Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) tmp = 0.0 if (t_1 <= 2e+141) tmp = Float64(2.0 * Float64(Float64(sin(Float64(angle * Float64(pi / 180.0))) * Float64(b + a)) * Float64(Float64(b - a) * cos(Float64(pi / Float64(180.0 / angle)))))); elseif (t_1 <= Inf) tmp = Float64(2.0 * Float64(Float64(Float64(b + a) * sin(Float64(Float64(cbrt(pi) * Float64(cbrt(pi) * cbrt(pi))) * Float64(angle * 0.005555555555555556)))) * Float64(Float64(b - a) * cos(Float64(pi * Float64(angle * 0.005555555555555556)))))); else tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(Float64(angle * 0.005555555555555556) * Float64(sqrt(pi) * sqrt(pi))))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 2e+141], N[(2.0 * N[(N[(N[Sin[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(2.0 * N[(N[(N[(b + a), $MachinePrecision] * N[Sin[N[(N[(N[Power[Pi, 1/3], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t_0\right) \cdot \cos t_0\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+141}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(angle \cdot \frac{\pi}{180}\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;2 \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\left(\sqrt[3]{\pi} \cdot \left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\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.00000000000000003e141Initial program 59.3%
associate-*l*59.3%
unpow259.3%
unpow259.3%
difference-of-squares59.3%
Simplified59.3%
Taylor expanded in angle around inf 65.1%
associate-*r*65.1%
*-commutative65.1%
*-commutative65.1%
*-commutative65.1%
associate-*r*67.0%
+-commutative67.0%
*-commutative67.0%
*-commutative67.0%
associate-*r*67.6%
Simplified67.6%
metadata-eval67.6%
div-inv67.0%
associate-*r/65.8%
Applied egg-rr65.8%
associate-/l*68.0%
Simplified68.0%
metadata-eval67.6%
div-inv67.0%
associate-*r/65.8%
Applied egg-rr66.2%
associate-/l*67.2%
associate-/r/69.5%
Simplified69.5%
if 2.00000000000000003e141 < (*.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 53.8%
associate-*l*53.8%
unpow253.8%
unpow253.8%
difference-of-squares53.8%
Simplified53.8%
Taylor expanded in angle around inf 72.2%
associate-*r*72.2%
*-commutative72.2%
*-commutative72.2%
*-commutative72.2%
associate-*r*71.8%
+-commutative71.8%
*-commutative71.8%
*-commutative71.8%
associate-*r*71.8%
Simplified71.8%
add-cube-cbrt79.3%
Applied egg-rr79.3%
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-squares48.1%
Simplified48.1%
Taylor expanded in angle around inf 66.6%
associate-*r*66.6%
*-commutative66.6%
*-commutative66.6%
*-commutative66.6%
associate-*r*73.1%
+-commutative73.1%
*-commutative73.1%
*-commutative73.1%
associate-*r*66.5%
Simplified66.5%
add-sqr-sqrt79.7%
Applied egg-rr79.7%
Taylor expanded in angle around 0 99.7%
Final simplification73.1%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (sin (* angle (/ PI 180.0))) (+ b a)))
(t_1 (* PI (/ angle 180.0))))
(if (<=
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_1)) (cos t_1))
5e+282)
(* 2.0 (* t_0 (* (- b a) (cos (/ PI (/ 180.0 angle))))))
(* 2.0 (* t_0 (- b a))))))
double code(double a, double b, double angle) {
double t_0 = sin((angle * (((double) M_PI) / 180.0))) * (b + a);
double t_1 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_1)) * cos(t_1)) <= 5e+282) {
tmp = 2.0 * (t_0 * ((b - a) * cos((((double) M_PI) / (180.0 / angle)))));
} else {
tmp = 2.0 * (t_0 * (b - a));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.sin((angle * (Math.PI / 180.0))) * (b + a);
double t_1 = Math.PI * (angle / 180.0);
double tmp;
if ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_1)) * Math.cos(t_1)) <= 5e+282) {
tmp = 2.0 * (t_0 * ((b - a) * Math.cos((Math.PI / (180.0 / angle)))));
} else {
tmp = 2.0 * (t_0 * (b - a));
}
return tmp;
}
def code(a, b, angle): t_0 = math.sin((angle * (math.pi / 180.0))) * (b + a) t_1 = math.pi * (angle / 180.0) tmp = 0 if (((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_1)) * math.cos(t_1)) <= 5e+282: tmp = 2.0 * (t_0 * ((b - a) * math.cos((math.pi / (180.0 / angle))))) else: tmp = 2.0 * (t_0 * (b - a)) return tmp
function code(a, b, angle) t_0 = Float64(sin(Float64(angle * Float64(pi / 180.0))) * Float64(b + a)) t_1 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 5e+282) tmp = Float64(2.0 * Float64(t_0 * Float64(Float64(b - a) * cos(Float64(pi / Float64(180.0 / angle)))))); else tmp = Float64(2.0 * Float64(t_0 * Float64(b - a))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = sin((angle * (pi / 180.0))) * (b + a); t_1 = pi * (angle / 180.0); tmp = 0.0; if ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 5e+282) tmp = 2.0 * (t_0 * ((b - a) * cos((pi / (180.0 / angle))))); else tmp = 2.0 * (t_0 * (b - a)); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Sin[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 5e+282], N[(2.0 * N[(t$95$0 * N[(N[(b - a), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$0 * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(angle \cdot \frac{\pi}{180}\right) \cdot \left(b + a\right)\\
t_1 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t_1\right) \cdot \cos t_1 \leq 5 \cdot 10^{+282}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) < 4.99999999999999978e282Initial program 57.7%
associate-*l*57.7%
unpow257.7%
unpow257.7%
difference-of-squares57.7%
Simplified57.7%
Taylor expanded in angle around inf 63.3%
associate-*r*63.3%
*-commutative63.3%
*-commutative63.3%
*-commutative63.3%
associate-*r*65.0%
+-commutative65.0%
*-commutative65.0%
*-commutative65.0%
associate-*r*65.5%
Simplified65.5%
metadata-eval65.5%
div-inv65.0%
associate-*r/63.9%
Applied egg-rr63.9%
associate-/l*65.9%
Simplified65.9%
metadata-eval65.5%
div-inv65.0%
associate-*r/63.9%
Applied egg-rr64.3%
associate-/l*65.4%
associate-/r/67.4%
Simplified67.4%
if 4.99999999999999978e282 < (*.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 44.4%
associate-*l*44.4%
unpow244.4%
unpow244.4%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around inf 78.4%
associate-*r*78.4%
*-commutative78.4%
*-commutative78.4%
*-commutative78.4%
associate-*r*80.1%
+-commutative80.1%
*-commutative80.1%
*-commutative80.1%
associate-*r*78.3%
Simplified78.3%
metadata-eval78.3%
div-inv78.3%
associate-*r/76.5%
Applied egg-rr76.5%
associate-/l*78.3%
Simplified78.3%
metadata-eval78.3%
div-inv78.3%
associate-*r/76.5%
Applied egg-rr71.3%
associate-/l*80.0%
associate-/r/74.8%
Simplified74.8%
Taylor expanded in angle around 0 83.7%
Final simplification71.0%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (* angle 0.005555555555555556)))
(t_1 (* (+ b a) (sin t_0)))
(t_2 (pow (cbrt t_0) 3.0)))
(if (<= a -5.7e+202)
(* 2.0 (* (* (+ b a) (sin t_2)) (* (- b a) (cos (/ (* PI angle) 180.0)))))
(if (<= a 2.3e-225)
(* 2.0 (* (* (- b a) (cos (/ PI (/ 180.0 angle)))) t_1))
(* 2.0 (* t_1 (* (- b a) (cos t_2))))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
double t_1 = (b + a) * sin(t_0);
double t_2 = pow(cbrt(t_0), 3.0);
double tmp;
if (a <= -5.7e+202) {
tmp = 2.0 * (((b + a) * sin(t_2)) * ((b - a) * cos(((((double) M_PI) * angle) / 180.0))));
} else if (a <= 2.3e-225) {
tmp = 2.0 * (((b - a) * cos((((double) M_PI) / (180.0 / angle)))) * t_1);
} else {
tmp = 2.0 * (t_1 * ((b - a) * cos(t_2)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle * 0.005555555555555556);
double t_1 = (b + a) * Math.sin(t_0);
double t_2 = Math.pow(Math.cbrt(t_0), 3.0);
double tmp;
if (a <= -5.7e+202) {
tmp = 2.0 * (((b + a) * Math.sin(t_2)) * ((b - a) * Math.cos(((Math.PI * angle) / 180.0))));
} else if (a <= 2.3e-225) {
tmp = 2.0 * (((b - a) * Math.cos((Math.PI / (180.0 / angle)))) * t_1);
} else {
tmp = 2.0 * (t_1 * ((b - a) * Math.cos(t_2)));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) t_1 = Float64(Float64(b + a) * sin(t_0)) t_2 = cbrt(t_0) ^ 3.0 tmp = 0.0 if (a <= -5.7e+202) tmp = Float64(2.0 * Float64(Float64(Float64(b + a) * sin(t_2)) * Float64(Float64(b - a) * cos(Float64(Float64(pi * angle) / 180.0))))); elseif (a <= 2.3e-225) tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * cos(Float64(pi / Float64(180.0 / angle)))) * t_1)); else tmp = Float64(2.0 * Float64(t_1 * Float64(Float64(b - a) * cos(t_2)))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]}, If[LessEqual[a, -5.7e+202], N[(2.0 * N[(N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e-225], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_1 := \left(b + a\right) \cdot \sin t_0\\
t_2 := {\left(\sqrt[3]{t_0}\right)}^{3}\\
\mathbf{if}\;a \leq -5.7 \cdot 10^{+202}:\\
\;\;\;\;2 \cdot \left(\left(\left(b + a\right) \cdot \sin t_2\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi \cdot angle}{180}\right)\right)\right)\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{-225}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \left(\left(b - a\right) \cdot \cos t_2\right)\right)\\
\end{array}
\end{array}
if a < -5.6999999999999997e202Initial program 54.2%
associate-*l*54.2%
unpow254.2%
unpow254.2%
difference-of-squares62.2%
Simplified62.2%
Taylor expanded in angle around inf 73.0%
associate-*r*73.0%
*-commutative73.0%
*-commutative73.0%
*-commutative73.0%
associate-*r*76.9%
+-commutative76.9%
*-commutative76.9%
*-commutative76.9%
associate-*r*69.2%
Simplified69.2%
metadata-eval69.2%
div-inv69.2%
associate-*r/69.2%
Applied egg-rr69.2%
expm1-log1p-u53.8%
Applied egg-rr53.8%
add-cube-cbrt49.8%
pow353.7%
expm1-log1p-u88.3%
Applied egg-rr88.3%
if -5.6999999999999997e202 < a < 2.2999999999999999e-225Initial program 59.0%
associate-*l*59.0%
unpow259.0%
unpow259.0%
difference-of-squares59.8%
Simplified59.8%
Taylor expanded in angle around inf 65.9%
associate-*r*65.9%
*-commutative65.9%
*-commutative65.9%
*-commutative65.9%
associate-*r*67.5%
+-commutative67.5%
*-commutative67.5%
*-commutative67.5%
associate-*r*69.3%
Simplified69.3%
metadata-eval69.3%
div-inv69.8%
associate-*r/67.2%
Applied egg-rr67.2%
associate-/l*70.6%
Simplified70.6%
if 2.2999999999999999e-225 < a Initial program 50.1%
associate-*l*50.1%
unpow250.1%
unpow250.1%
difference-of-squares54.0%
Simplified54.0%
Taylor expanded in angle around inf 65.8%
associate-*r*65.8%
*-commutative65.8%
*-commutative65.8%
*-commutative65.8%
associate-*r*67.1%
+-commutative67.1%
*-commutative67.1%
*-commutative67.1%
associate-*r*66.9%
Simplified66.9%
metadata-eval66.9%
div-inv65.5%
associate-*r/65.5%
Applied egg-rr65.5%
associate-/l*67.1%
Simplified67.1%
associate-/l*65.5%
div-inv67.1%
metadata-eval67.1%
associate-*r*66.9%
add-cube-cbrt68.5%
pow371.4%
Applied egg-rr71.4%
Final simplification72.7%
(FPCore (a b angle)
:precision binary64
(if (<= (pow b 2.0) 5e-245)
(*
2.0
(*
(* (- b a) (cos (* PI (* angle 0.005555555555555556))))
(* (+ b a) (sin (* 0.005555555555555556 (* PI angle))))))
(* 2.0 (* (* (sin (* angle (/ PI 180.0))) (+ b a)) (- b a)))))
double code(double a, double b, double angle) {
double tmp;
if (pow(b, 2.0) <= 5e-245) {
tmp = 2.0 * (((b - a) * cos((((double) M_PI) * (angle * 0.005555555555555556)))) * ((b + a) * sin((0.005555555555555556 * (((double) M_PI) * angle)))));
} else {
tmp = 2.0 * ((sin((angle * (((double) M_PI) / 180.0))) * (b + a)) * (b - a));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.pow(b, 2.0) <= 5e-245) {
tmp = 2.0 * (((b - a) * Math.cos((Math.PI * (angle * 0.005555555555555556)))) * ((b + a) * Math.sin((0.005555555555555556 * (Math.PI * angle)))));
} else {
tmp = 2.0 * ((Math.sin((angle * (Math.PI / 180.0))) * (b + a)) * (b - a));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if math.pow(b, 2.0) <= 5e-245: tmp = 2.0 * (((b - a) * math.cos((math.pi * (angle * 0.005555555555555556)))) * ((b + a) * math.sin((0.005555555555555556 * (math.pi * angle))))) else: tmp = 2.0 * ((math.sin((angle * (math.pi / 180.0))) * (b + a)) * (b - a)) return tmp
function code(a, b, angle) tmp = 0.0 if ((b ^ 2.0) <= 5e-245) tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * cos(Float64(pi * Float64(angle * 0.005555555555555556)))) * Float64(Float64(b + a) * sin(Float64(0.005555555555555556 * Float64(pi * angle)))))); else tmp = Float64(2.0 * Float64(Float64(sin(Float64(angle * Float64(pi / 180.0))) * Float64(b + a)) * Float64(b - a))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((b ^ 2.0) <= 5e-245) tmp = 2.0 * (((b - a) * cos((pi * (angle * 0.005555555555555556)))) * ((b + a) * sin((0.005555555555555556 * (pi * angle))))); else tmp = 2.0 * ((sin((angle * (pi / 180.0))) * (b + a)) * (b - a)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e-245], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Sin[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{-245}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(angle \cdot \frac{\pi}{180}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b 2) < 4.9999999999999997e-245Initial program 66.9%
associate-*l*66.9%
unpow266.9%
unpow266.9%
difference-of-squares66.9%
Simplified66.9%
Taylor expanded in angle around inf 69.7%
associate-*r*69.7%
*-commutative69.7%
*-commutative69.7%
*-commutative69.7%
associate-*r*70.7%
+-commutative70.7%
*-commutative70.7%
*-commutative70.7%
associate-*r*71.9%
Simplified71.9%
Taylor expanded in angle around inf 73.0%
if 4.9999999999999997e-245 < (pow.f64 b 2) Initial program 48.1%
associate-*l*48.1%
unpow248.1%
unpow248.1%
difference-of-squares52.5%
Simplified52.5%
Taylor expanded in angle around inf 64.9%
associate-*r*64.9%
*-commutative64.9%
*-commutative64.9%
*-commutative64.9%
associate-*r*67.0%
+-commutative67.0%
*-commutative67.0%
*-commutative67.0%
associate-*r*66.3%
Simplified66.3%
metadata-eval66.3%
div-inv65.2%
associate-*r/64.6%
Applied egg-rr64.6%
associate-/l*67.4%
Simplified67.4%
metadata-eval66.3%
div-inv65.2%
associate-*r/64.6%
Applied egg-rr63.4%
associate-/l*67.3%
associate-/r/68.2%
Simplified68.2%
Taylor expanded in angle around 0 67.7%
Final simplification69.6%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (* angle 0.005555555555555556)))) (* 2.0 (* (* (- b a) (cos t_0)) (* (+ b a) (sin t_0))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
return 2.0 * (((b - a) * cos(t_0)) * ((b + a) * sin(t_0)));
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle * 0.005555555555555556);
return 2.0 * (((b - a) * Math.cos(t_0)) * ((b + a) * Math.sin(t_0)));
}
def code(a, b, angle): t_0 = math.pi * (angle * 0.005555555555555556) return 2.0 * (((b - a) * math.cos(t_0)) * ((b + a) * math.sin(t_0)))
function code(a, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) return Float64(2.0 * Float64(Float64(Float64(b - a) * cos(t_0)) * Float64(Float64(b + a) * sin(t_0)))) end
function tmp = code(a, b, angle) t_0 = pi * (angle * 0.005555555555555556); tmp = 2.0 * (((b - a) * cos(t_0)) * ((b + a) * sin(t_0))); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
2 \cdot \left(\left(\left(b - a\right) \cdot \cos t_0\right) \cdot \left(\left(b + a\right) \cdot \sin t_0\right)\right)
\end{array}
\end{array}
Initial program 54.8%
associate-*l*54.8%
unpow254.8%
unpow254.8%
difference-of-squares57.6%
Simplified57.6%
Taylor expanded in angle around inf 66.6%
associate-*r*66.6%
*-commutative66.6%
*-commutative66.6%
*-commutative66.6%
associate-*r*68.3%
+-commutative68.3%
*-commutative68.3%
*-commutative68.3%
associate-*r*68.3%
Simplified68.3%
Final simplification68.3%
(FPCore (a b angle) :precision binary64 (* 2.0 (* (* (- b a) (cos (/ PI (/ 180.0 angle)))) (* (+ b a) (sin (* PI (* angle 0.005555555555555556)))))))
double code(double a, double b, double angle) {
return 2.0 * (((b - a) * cos((((double) M_PI) / (180.0 / angle)))) * ((b + a) * sin((((double) M_PI) * (angle * 0.005555555555555556)))));
}
public static double code(double a, double b, double angle) {
return 2.0 * (((b - a) * Math.cos((Math.PI / (180.0 / angle)))) * ((b + a) * Math.sin((Math.PI * (angle * 0.005555555555555556)))));
}
def code(a, b, angle): return 2.0 * (((b - a) * math.cos((math.pi / (180.0 / angle)))) * ((b + a) * math.sin((math.pi * (angle * 0.005555555555555556)))))
function code(a, b, angle) return Float64(2.0 * Float64(Float64(Float64(b - a) * cos(Float64(pi / Float64(180.0 / angle)))) * Float64(Float64(b + a) * sin(Float64(pi * Float64(angle * 0.005555555555555556)))))) end
function tmp = code(a, b, angle) tmp = 2.0 * (((b - a) * cos((pi / (180.0 / angle)))) * ((b + a) * sin((pi * (angle * 0.005555555555555556))))); end
code[a_, b_, angle_] := N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / 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}
\\
2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)
\end{array}
Initial program 54.8%
associate-*l*54.8%
unpow254.8%
unpow254.8%
difference-of-squares57.6%
Simplified57.6%
Taylor expanded in angle around inf 66.6%
associate-*r*66.6%
*-commutative66.6%
*-commutative66.6%
*-commutative66.6%
associate-*r*68.3%
+-commutative68.3%
*-commutative68.3%
*-commutative68.3%
associate-*r*68.3%
Simplified68.3%
metadata-eval68.3%
div-inv67.9%
associate-*r/66.7%
Applied egg-rr66.7%
associate-/l*68.6%
Simplified68.6%
Final simplification68.6%
(FPCore (a b angle)
:precision binary64
(if (<= (/ angle 180.0) -1.0)
(*
(* (sin (* 2.0 (* PI (* angle 0.005555555555555556)))) 0.5)
(* 2.0 (pow (+ b a) 2.0)))
(* 2.0 (* (* (sin (* angle (/ PI 180.0))) (+ b a)) (- b a)))))
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -1.0) {
tmp = (sin((2.0 * (((double) M_PI) * (angle * 0.005555555555555556)))) * 0.5) * (2.0 * pow((b + a), 2.0));
} else {
tmp = 2.0 * ((sin((angle * (((double) M_PI) / 180.0))) * (b + a)) * (b - a));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -1.0) {
tmp = (Math.sin((2.0 * (Math.PI * (angle * 0.005555555555555556)))) * 0.5) * (2.0 * Math.pow((b + a), 2.0));
} else {
tmp = 2.0 * ((Math.sin((angle * (Math.PI / 180.0))) * (b + a)) * (b - a));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (angle / 180.0) <= -1.0: tmp = (math.sin((2.0 * (math.pi * (angle * 0.005555555555555556)))) * 0.5) * (2.0 * math.pow((b + a), 2.0)) else: tmp = 2.0 * ((math.sin((angle * (math.pi / 180.0))) * (b + a)) * (b - a)) return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= -1.0) tmp = Float64(Float64(sin(Float64(2.0 * Float64(pi * Float64(angle * 0.005555555555555556)))) * 0.5) * Float64(2.0 * (Float64(b + a) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64(sin(Float64(angle * Float64(pi / 180.0))) * Float64(b + a)) * Float64(b - a))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((angle / 180.0) <= -1.0) tmp = (sin((2.0 * (pi * (angle * 0.005555555555555556)))) * 0.5) * (2.0 * ((b + a) ^ 2.0)); else tmp = 2.0 * ((sin((angle * (pi / 180.0))) * (b + a)) * (b - a)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1.0], N[(N[(N[Sin[N[(2.0 * N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision] * N[(2.0 * N[Power[N[(b + a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Sin[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -1:\\
\;\;\;\;\left(\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot 0.5\right) \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(angle \cdot \frac{\pi}{180}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -1Initial program 36.5%
*-commutative36.5%
associate-*l*36.5%
unpow236.5%
fma-neg38.1%
unpow238.1%
Simplified38.1%
*-commutative38.1%
associate-*r*38.1%
fma-neg36.5%
difference-of-squares36.5%
*-commutative36.5%
expm1-log1p-u18.8%
expm1-udef13.1%
Applied egg-rr15.1%
expm1-def17.6%
expm1-log1p36.6%
associate-*r*36.6%
*-commutative36.6%
sin-036.6%
+-lft-identity36.6%
*-commutative36.6%
Simplified36.6%
if -1 < (/.f64 angle 180) Initial program 60.6%
associate-*l*60.6%
unpow260.6%
unpow260.6%
difference-of-squares64.4%
Simplified64.4%
Taylor expanded in angle around inf 77.3%
associate-*r*77.3%
*-commutative77.3%
*-commutative77.3%
*-commutative77.3%
associate-*r*77.4%
+-commutative77.4%
*-commutative77.4%
*-commutative77.4%
associate-*r*78.4%
Simplified78.4%
metadata-eval78.4%
div-inv77.9%
associate-*r/76.3%
Applied egg-rr76.3%
associate-/l*77.7%
Simplified77.7%
metadata-eval78.4%
div-inv77.9%
associate-*r/76.3%
Applied egg-rr75.5%
associate-/l*77.6%
associate-/r/78.3%
Simplified78.3%
Taylor expanded in angle around 0 78.9%
Final simplification68.7%
(FPCore (a b angle)
:precision binary64
(if (<= a -6.2e-115)
(* 0.011111111111111112 (* (* PI (+ b a)) (* angle (- b a))))
(*
2.0
(* (- b a) (* (+ b a) (sin (* PI (* angle 0.005555555555555556))))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= -6.2e-115) {
tmp = 0.011111111111111112 * ((((double) M_PI) * (b + a)) * (angle * (b - a)));
} else {
tmp = 2.0 * ((b - a) * ((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 <= -6.2e-115) {
tmp = 0.011111111111111112 * ((Math.PI * (b + a)) * (angle * (b - a)));
} else {
tmp = 2.0 * ((b - a) * ((b + a) * Math.sin((Math.PI * (angle * 0.005555555555555556)))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= -6.2e-115: tmp = 0.011111111111111112 * ((math.pi * (b + a)) * (angle * (b - a))) else: tmp = 2.0 * ((b - a) * ((b + a) * math.sin((math.pi * (angle * 0.005555555555555556))))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= -6.2e-115) tmp = Float64(0.011111111111111112 * Float64(Float64(pi * Float64(b + a)) * Float64(angle * Float64(b - a)))); else tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(pi * Float64(angle * 0.005555555555555556)))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= -6.2e-115) tmp = 0.011111111111111112 * ((pi * (b + a)) * (angle * (b - a))); else tmp = 2.0 * ((b - a) * ((b + a) * sin((pi * (angle * 0.005555555555555556))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, -6.2e-115], N[(0.011111111111111112 * N[(N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $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 -6.2 \cdot 10^{-115}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \left(b - a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\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 < -6.20000000000000013e-115Initial program 58.1%
associate-*l*58.1%
unpow258.1%
unpow258.1%
difference-of-squares61.6%
Simplified61.6%
Taylor expanded in angle around 0 61.0%
associate-*r*72.3%
*-commutative72.3%
+-commutative72.3%
Simplified72.3%
if -6.20000000000000013e-115 < a Initial program 53.0%
associate-*l*53.0%
unpow253.0%
unpow253.0%
difference-of-squares55.5%
Simplified55.5%
Taylor expanded in angle around inf 64.4%
associate-*r*64.4%
*-commutative64.4%
*-commutative64.4%
*-commutative64.4%
associate-*r*65.2%
+-commutative65.2%
*-commutative65.2%
*-commutative65.2%
associate-*r*65.8%
Simplified65.8%
Taylor expanded in angle around 0 64.2%
Final simplification67.0%
(FPCore (a b angle) :precision binary64 (* 2.0 (* (* (sin (* angle (/ PI 180.0))) (+ b a)) (- b a))))
double code(double a, double b, double angle) {
return 2.0 * ((sin((angle * (((double) M_PI) / 180.0))) * (b + a)) * (b - a));
}
public static double code(double a, double b, double angle) {
return 2.0 * ((Math.sin((angle * (Math.PI / 180.0))) * (b + a)) * (b - a));
}
def code(a, b, angle): return 2.0 * ((math.sin((angle * (math.pi / 180.0))) * (b + a)) * (b - a))
function code(a, b, angle) return Float64(2.0 * Float64(Float64(sin(Float64(angle * Float64(pi / 180.0))) * Float64(b + a)) * Float64(b - a))) end
function tmp = code(a, b, angle) tmp = 2.0 * ((sin((angle * (pi / 180.0))) * (b + a)) * (b - a)); end
code[a_, b_, angle_] := N[(2.0 * N[(N[(N[Sin[N[(angle * N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(\sin \left(angle \cdot \frac{\pi}{180}\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right)
\end{array}
Initial program 54.8%
associate-*l*54.8%
unpow254.8%
unpow254.8%
difference-of-squares57.6%
Simplified57.6%
Taylor expanded in angle around inf 66.6%
associate-*r*66.6%
*-commutative66.6%
*-commutative66.6%
*-commutative66.6%
associate-*r*68.3%
+-commutative68.3%
*-commutative68.3%
*-commutative68.3%
associate-*r*68.3%
Simplified68.3%
metadata-eval68.3%
div-inv67.9%
associate-*r/66.7%
Applied egg-rr66.7%
associate-/l*68.6%
Simplified68.6%
metadata-eval68.3%
div-inv67.9%
associate-*r/66.7%
Applied egg-rr65.8%
associate-/l*68.6%
associate-/r/69.0%
Simplified69.0%
Taylor expanded in angle around 0 66.9%
Final simplification66.9%
(FPCore (a b angle) :precision binary64 (if (<= angle 3.9e+124) (* 0.011111111111111112 (* (* PI (+ b a)) (* angle (- b a)))) (* 0.011111111111111112 (* (* PI angle) (pow (+ b a) 2.0)))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 3.9e+124) {
tmp = 0.011111111111111112 * ((((double) M_PI) * (b + a)) * (angle * (b - a)));
} else {
tmp = 0.011111111111111112 * ((((double) M_PI) * angle) * pow((b + a), 2.0));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 3.9e+124) {
tmp = 0.011111111111111112 * ((Math.PI * (b + a)) * (angle * (b - a)));
} else {
tmp = 0.011111111111111112 * ((Math.PI * angle) * Math.pow((b + a), 2.0));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= 3.9e+124: tmp = 0.011111111111111112 * ((math.pi * (b + a)) * (angle * (b - a))) else: tmp = 0.011111111111111112 * ((math.pi * angle) * math.pow((b + a), 2.0)) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= 3.9e+124) tmp = Float64(0.011111111111111112 * Float64(Float64(pi * Float64(b + a)) * Float64(angle * Float64(b - a)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(pi * angle) * (Float64(b + a) ^ 2.0))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 3.9e+124) tmp = 0.011111111111111112 * ((pi * (b + a)) * (angle * (b - a))); else tmp = 0.011111111111111112 * ((pi * angle) * ((b + a) ^ 2.0)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, 3.9e+124], N[(0.011111111111111112 * N[(N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(Pi * angle), $MachinePrecision] * N[Power[N[(b + a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3.9 \cdot 10^{+124}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \left(b - a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot {\left(b + a\right)}^{2}\right)\\
\end{array}
\end{array}
if angle < 3.9e124Initial program 58.1%
associate-*l*58.1%
unpow258.1%
unpow258.1%
difference-of-squares61.5%
Simplified61.5%
Taylor expanded in angle around 0 59.2%
associate-*r*71.2%
*-commutative71.2%
+-commutative71.2%
Simplified71.2%
if 3.9e124 < angle Initial program 37.3%
*-commutative37.3%
associate-*l*37.3%
unpow237.3%
fma-neg39.7%
unpow239.7%
Simplified39.7%
*-commutative39.7%
associate-*r*39.7%
fma-neg37.3%
difference-of-squares37.3%
*-commutative37.3%
add-log-exp32.9%
*-commutative32.9%
difference-of-squares32.9%
fma-neg35.3%
Applied egg-rr25.4%
log-pow29.5%
sin-029.5%
+-lft-identity29.5%
*-commutative29.5%
Simplified29.5%
Taylor expanded in angle around 0 32.9%
associate-*r*32.9%
+-commutative32.9%
Simplified32.9%
Final simplification65.1%
(FPCore (a b angle) :precision binary64 (if (<= angle 3.9e+124) (* 0.011111111111111112 (* (* PI (+ b a)) (* angle (- b a)))) (* angle (* 0.011111111111111112 (* PI (pow (+ b a) 2.0))))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 3.9e+124) {
tmp = 0.011111111111111112 * ((((double) M_PI) * (b + a)) * (angle * (b - a)));
} else {
tmp = angle * (0.011111111111111112 * (((double) M_PI) * pow((b + a), 2.0)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 3.9e+124) {
tmp = 0.011111111111111112 * ((Math.PI * (b + a)) * (angle * (b - a)));
} else {
tmp = angle * (0.011111111111111112 * (Math.PI * Math.pow((b + a), 2.0)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= 3.9e+124: tmp = 0.011111111111111112 * ((math.pi * (b + a)) * (angle * (b - a))) else: tmp = angle * (0.011111111111111112 * (math.pi * math.pow((b + a), 2.0))) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= 3.9e+124) tmp = Float64(0.011111111111111112 * Float64(Float64(pi * Float64(b + a)) * Float64(angle * Float64(b - a)))); else tmp = Float64(angle * Float64(0.011111111111111112 * Float64(pi * (Float64(b + a) ^ 2.0)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 3.9e+124) tmp = 0.011111111111111112 * ((pi * (b + a)) * (angle * (b - a))); else tmp = angle * (0.011111111111111112 * (pi * ((b + a) ^ 2.0))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, 3.9e+124], N[(0.011111111111111112 * N[(N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(0.011111111111111112 * N[(Pi * N[Power[N[(b + a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3.9 \cdot 10^{+124}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \left(b - a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot {\left(b + a\right)}^{2}\right)\right)\\
\end{array}
\end{array}
if angle < 3.9e124Initial program 58.1%
associate-*l*58.1%
unpow258.1%
unpow258.1%
difference-of-squares61.5%
Simplified61.5%
Taylor expanded in angle around 0 59.2%
associate-*r*71.2%
*-commutative71.2%
+-commutative71.2%
Simplified71.2%
if 3.9e124 < angle Initial program 37.3%
*-commutative37.3%
associate-*l*37.3%
unpow237.3%
fma-neg39.7%
unpow239.7%
Simplified39.7%
*-commutative39.7%
associate-*r*39.7%
fma-neg37.3%
difference-of-squares37.3%
*-commutative37.3%
add-log-exp32.9%
*-commutative32.9%
difference-of-squares32.9%
fma-neg35.3%
Applied egg-rr25.4%
log-pow29.5%
sin-029.5%
+-lft-identity29.5%
*-commutative29.5%
Simplified29.5%
Taylor expanded in angle around 0 32.9%
*-commutative32.9%
associate-*l*32.9%
+-commutative32.9%
Simplified32.9%
Final simplification65.1%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (* angle (* PI (* a a))) -0.011111111111111112)))
(if (<= a -2.8e+203)
t_0
(if (<= a -3e+130)
(* 0.011111111111111112 (* angle (* PI (* b b))))
(if (or (<= a -5e-23) (not (<= a 1.7e+154)))
t_0
(* 0.011111111111111112 (* PI (* angle (* b b)))))))))
double code(double a, double b, double angle) {
double t_0 = (angle * (((double) M_PI) * (a * a))) * -0.011111111111111112;
double tmp;
if (a <= -2.8e+203) {
tmp = t_0;
} else if (a <= -3e+130) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
} else if ((a <= -5e-23) || !(a <= 1.7e+154)) {
tmp = t_0;
} else {
tmp = 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (angle * (Math.PI * (a * a))) * -0.011111111111111112;
double tmp;
if (a <= -2.8e+203) {
tmp = t_0;
} else if (a <= -3e+130) {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
} else if ((a <= -5e-23) || !(a <= 1.7e+154)) {
tmp = t_0;
} else {
tmp = 0.011111111111111112 * (Math.PI * (angle * (b * b)));
}
return tmp;
}
def code(a, b, angle): t_0 = (angle * (math.pi * (a * a))) * -0.011111111111111112 tmp = 0 if a <= -2.8e+203: tmp = t_0 elif a <= -3e+130: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) elif (a <= -5e-23) or not (a <= 1.7e+154): tmp = t_0 else: tmp = 0.011111111111111112 * (math.pi * (angle * (b * b))) return tmp
function code(a, b, angle) t_0 = Float64(Float64(angle * Float64(pi * Float64(a * a))) * -0.011111111111111112) tmp = 0.0 if (a <= -2.8e+203) tmp = t_0; elseif (a <= -3e+130) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); elseif ((a <= -5e-23) || !(a <= 1.7e+154)) tmp = t_0; else tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (angle * (pi * (a * a))) * -0.011111111111111112; tmp = 0.0; if (a <= -2.8e+203) tmp = t_0; elseif (a <= -3e+130) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); elseif ((a <= -5e-23) || ~((a <= 1.7e+154))) tmp = t_0; else tmp = 0.011111111111111112 * (pi * (angle * (b * b))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]}, If[LessEqual[a, -2.8e+203], t$95$0, If[LessEqual[a, -3e+130], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -5e-23], N[Not[LessEqual[a, 1.7e+154]], $MachinePrecision]], t$95$0, N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right) \cdot -0.011111111111111112\\
\mathbf{if}\;a \leq -2.8 \cdot 10^{+203}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq -3 \cdot 10^{+130}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{elif}\;a \leq -5 \cdot 10^{-23} \lor \neg \left(a \leq 1.7 \cdot 10^{+154}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\
\end{array}
\end{array}
if a < -2.7999999999999999e203 or -2.9999999999999999e130 < a < -5.0000000000000002e-23 or 1.69999999999999987e154 < a Initial program 51.8%
associate-*l*51.8%
unpow251.8%
unpow251.8%
difference-of-squares58.1%
Simplified58.1%
Taylor expanded in angle around 0 54.4%
Taylor expanded in b around 0 53.2%
*-commutative53.2%
*-commutative53.2%
unpow253.2%
Simplified53.2%
if -2.7999999999999999e203 < a < -2.9999999999999999e130Initial program 34.1%
associate-*l*34.1%
unpow234.1%
unpow234.1%
difference-of-squares41.8%
Simplified41.8%
Taylor expanded in angle around 0 57.7%
Taylor expanded in b around inf 46.8%
*-commutative46.8%
unpow246.8%
Simplified46.8%
if -5.0000000000000002e-23 < a < 1.69999999999999987e154Initial program 58.0%
associate-*l*58.0%
unpow258.0%
unpow258.0%
difference-of-squares58.7%
Simplified58.7%
Taylor expanded in angle around 0 52.7%
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%
*-commutative48.0%
unpow248.0%
Simplified48.0%
Final simplification49.6%
(FPCore (a b angle) :precision binary64 (if (<= angle 4.8e+129) (* 0.011111111111111112 (* (* PI (+ b a)) (* angle (- b a)))) (* 0.011111111111111112 (* angle (* (- b a) (* b PI))))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 4.8e+129) {
tmp = 0.011111111111111112 * ((((double) M_PI) * (b + a)) * (angle * (b - a)));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * ((double) M_PI))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 4.8e+129) {
tmp = 0.011111111111111112 * ((Math.PI * (b + a)) * (angle * (b - a)));
} else {
tmp = 0.011111111111111112 * (angle * ((b - a) * (b * Math.PI)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= 4.8e+129: tmp = 0.011111111111111112 * ((math.pi * (b + a)) * (angle * (b - a))) else: tmp = 0.011111111111111112 * (angle * ((b - a) * (b * math.pi))) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= 4.8e+129) tmp = Float64(0.011111111111111112 * Float64(Float64(pi * Float64(b + a)) * Float64(angle * Float64(b - a)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(b * pi)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 4.8e+129) tmp = 0.011111111111111112 * ((pi * (b + a)) * (angle * (b - a))); else tmp = 0.011111111111111112 * (angle * ((b - a) * (b * pi))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, 4.8e+129], N[(0.011111111111111112 * N[(N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(b - a), $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}
\mathbf{if}\;angle \leq 4.8 \cdot 10^{+129}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \left(b - a\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 angle < 4.7999999999999997e129Initial program 58.2%
associate-*l*58.2%
unpow258.2%
unpow258.2%
difference-of-squares61.5%
Simplified61.5%
Taylor expanded in angle around 0 58.7%
associate-*r*70.6%
*-commutative70.6%
+-commutative70.6%
Simplified70.6%
if 4.7999999999999997e129 < angle Initial program 36.0%
associate-*l*36.0%
unpow236.0%
unpow236.0%
difference-of-squares36.0%
Simplified36.0%
Taylor expanded in angle around 0 24.6%
Taylor expanded in a around 0 29.6%
*-commutative29.6%
Simplified29.6%
Final simplification64.3%
(FPCore (a b angle)
:precision binary64
(if (<= a -2.7e-23)
(* 0.011111111111111112 (* angle (* (- b a) (* a PI))))
(if (<= a 1.8e+154)
(* 0.011111111111111112 (* PI (* angle (* b b))))
(* (* angle (* PI (* a a))) -0.011111111111111112))))
double code(double a, double b, double angle) {
double tmp;
if (a <= -2.7e-23) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * ((double) M_PI))));
} else if (a <= 1.8e+154) {
tmp = 0.011111111111111112 * (((double) M_PI) * (angle * (b * b)));
} 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 (a <= -2.7e-23) {
tmp = 0.011111111111111112 * (angle * ((b - a) * (a * Math.PI)));
} else if (a <= 1.8e+154) {
tmp = 0.011111111111111112 * (Math.PI * (angle * (b * b)));
} else {
tmp = (angle * (Math.PI * (a * a))) * -0.011111111111111112;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= -2.7e-23: tmp = 0.011111111111111112 * (angle * ((b - a) * (a * math.pi))) elif a <= 1.8e+154: tmp = 0.011111111111111112 * (math.pi * (angle * (b * b))) else: tmp = (angle * (math.pi * (a * a))) * -0.011111111111111112 return tmp
function code(a, b, angle) tmp = 0.0 if (a <= -2.7e-23) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(a * pi)))); elseif (a <= 1.8e+154) tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(b * b)))); 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 (a <= -2.7e-23) tmp = 0.011111111111111112 * (angle * ((b - a) * (a * pi))); elseif (a <= 1.8e+154) tmp = 0.011111111111111112 * (pi * (angle * (b * b))); else tmp = (angle * (pi * (a * a))) * -0.011111111111111112; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, -2.7e-23], N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e+154], N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b * b), $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}\;a \leq -2.7 \cdot 10^{-23}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{+154}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\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 a < -2.69999999999999985e-23Initial program 52.8%
associate-*l*52.8%
unpow252.8%
unpow252.8%
difference-of-squares57.3%
Simplified57.3%
Taylor expanded in angle around 0 58.8%
Taylor expanded in a around inf 50.3%
*-commutative50.3%
Simplified50.3%
if -2.69999999999999985e-23 < a < 1.8e154Initial program 58.0%
associate-*l*58.0%
unpow258.0%
unpow258.0%
difference-of-squares58.7%
Simplified58.7%
Taylor expanded in angle around 0 52.7%
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%
*-commutative48.0%
unpow248.0%
Simplified48.0%
if 1.8e154 < a Initial program 41.2%
associate-*l*41.2%
unpow241.2%
unpow241.2%
difference-of-squares52.3%
Simplified52.3%
Taylor expanded in angle around 0 45.2%
Taylor expanded in b around 0 52.1%
*-commutative52.1%
*-commutative52.1%
unpow252.1%
Simplified52.1%
Final simplification49.1%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* angle (* (- b a) (* PI (+ b a))))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * ((b - a) * (((double) M_PI) * (b + a))));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * ((b - a) * (Math.PI * (b + a))));
}
def code(a, b, angle): return 0.011111111111111112 * (angle * ((b - a) * (math.pi * (b + a))))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(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 54.8%
associate-*l*54.8%
unpow254.8%
unpow254.8%
difference-of-squares57.6%
Simplified57.6%
Taylor expanded in angle around 0 53.5%
Final simplification53.5%
(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 54.8%
associate-*l*54.8%
unpow254.8%
unpow254.8%
difference-of-squares57.6%
Simplified57.6%
Taylor expanded in angle around 0 53.5%
Taylor expanded in b around inf 35.0%
*-commutative35.0%
unpow235.0%
Simplified35.0%
Final simplification35.0%
(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 54.8%
associate-*l*54.8%
unpow254.8%
unpow254.8%
difference-of-squares57.6%
Simplified57.6%
Taylor expanded in angle around 0 53.5%
Taylor expanded in b around inf 35.0%
*-commutative35.0%
unpow235.0%
Simplified35.0%
Taylor expanded in angle around 0 35.0%
associate-*r*35.0%
*-commutative35.0%
unpow235.0%
Simplified35.0%
Final simplification35.0%
herbie shell --seed 2023181
(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)))))