
(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 21 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 (* (- a b) (+ b a)))
(t_1 (* PI (/ angle 180.0)))
(t_2 (sin t_1))
(t_3 (* 2.0 (sin (* angle (/ (pow (sqrt PI) 2.0) -180.0))))))
(if (<= (/ angle 180.0) -5e+69)
(* t_3 t_0)
(if (<= (/ angle 180.0) 2e-54)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(if (<= (/ angle 180.0) 7e+49)
(*
(* (* 2.0 (* (- b a) (+ b a))) t_2)
(cos (* (* PI angle) 0.005555555555555556)))
(if (<= (/ angle 180.0) 5e+64)
(* (- (pow a 2.0) (pow b 2.0)) (* (cos t_1) (* 2.0 t_2)))
(if (<= (/ angle 180.0) 4e+222)
(* t_0 (* 2.0 (sin (* angle (/ (cbrt (pow PI 3.0)) -180.0)))))
(* t_3 (* t_0 (cos (* angle (/ PI -180.0))))))))))))
double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double t_1 = ((double) M_PI) * (angle / 180.0);
double t_2 = sin(t_1);
double t_3 = 2.0 * sin((angle * (pow(sqrt(((double) M_PI)), 2.0) / -180.0)));
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = t_3 * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = ((2.0 * ((b - a) * (b + a))) * t_2) * cos(((((double) M_PI) * angle) * 0.005555555555555556));
} else if ((angle / 180.0) <= 5e+64) {
tmp = (pow(a, 2.0) - pow(b, 2.0)) * (cos(t_1) * (2.0 * t_2));
} else if ((angle / 180.0) <= 4e+222) {
tmp = t_0 * (2.0 * sin((angle * (cbrt(pow(((double) M_PI), 3.0)) / -180.0))));
} else {
tmp = t_3 * (t_0 * cos((angle * (((double) M_PI) / -180.0))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double t_1 = Math.PI * (angle / 180.0);
double t_2 = Math.sin(t_1);
double t_3 = 2.0 * Math.sin((angle * (Math.pow(Math.sqrt(Math.PI), 2.0) / -180.0)));
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = t_3 * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = ((2.0 * ((b - a) * (b + a))) * t_2) * Math.cos(((Math.PI * angle) * 0.005555555555555556));
} else if ((angle / 180.0) <= 5e+64) {
tmp = (Math.pow(a, 2.0) - Math.pow(b, 2.0)) * (Math.cos(t_1) * (2.0 * t_2));
} else if ((angle / 180.0) <= 4e+222) {
tmp = t_0 * (2.0 * Math.sin((angle * (Math.cbrt(Math.pow(Math.PI, 3.0)) / -180.0))));
} else {
tmp = t_3 * (t_0 * Math.cos((angle * (Math.PI / -180.0))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(a - b) * Float64(b + a)) t_1 = Float64(pi * Float64(angle / 180.0)) t_2 = sin(t_1) t_3 = Float64(2.0 * sin(Float64(angle * Float64((sqrt(pi) ^ 2.0) / -180.0)))) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+69) tmp = Float64(t_3 * t_0); elseif (Float64(angle / 180.0) <= 2e-54) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); elseif (Float64(angle / 180.0) <= 7e+49) tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))) * t_2) * cos(Float64(Float64(pi * angle) * 0.005555555555555556))); elseif (Float64(angle / 180.0) <= 5e+64) tmp = Float64(Float64((a ^ 2.0) - (b ^ 2.0)) * Float64(cos(t_1) * Float64(2.0 * t_2))); elseif (Float64(angle / 180.0) <= 4e+222) tmp = Float64(t_0 * Float64(2.0 * sin(Float64(angle * Float64(cbrt((pi ^ 3.0)) / -180.0))))); else tmp = Float64(t_3 * Float64(t_0 * cos(Float64(angle * Float64(pi / -180.0))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+69], N[(t$95$3 * t$95$0), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-54], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 7e+49], N[(N[(N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+64], N[(N[(N[Power[a, 2.0], $MachinePrecision] - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t$95$1], $MachinePrecision] * N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 4e+222], N[(t$95$0 * N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[(t$95$0 * N[Cos[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(a - b\right) \cdot \left(b + a\right)\\
t_1 := \pi \cdot \frac{angle}{180}\\
t_2 := \sin t_1\\
t_3 := 2 \cdot \sin \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+69}:\\
\;\;\;\;t_3 \cdot t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-54}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 7 \cdot 10^{+49}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot t_2\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+64}:\\
\;\;\;\;\left({a}^{2} - {b}^{2}\right) \cdot \left(\cos t_1 \cdot \left(2 \cdot t_2\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 4 \cdot 10^{+222}:\\
\;\;\;\;t_0 \cdot \left(2 \cdot \sin \left(angle \cdot \frac{\sqrt[3]{{\pi}^{3}}}{-180}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.00000000000000036e69Initial program 29.3%
Simplified26.4%
unpow226.4%
unpow226.4%
difference-of-squares26.4%
Applied egg-rr26.4%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Taylor expanded in angle around 0 31.9%
rem-cbrt-cube37.6%
add-sqr-sqrt44.1%
pow244.1%
Applied egg-rr44.1%
if -5.00000000000000036e69 < (/.f64 angle 180) < 2.0000000000000001e-54Initial program 73.0%
Simplified73.0%
unpow273.0%
unpow273.0%
difference-of-squares76.3%
Applied egg-rr76.3%
add-cbrt-cube75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in angle around 0 74.6%
associate-*r*74.5%
associate-*r*91.1%
*-commutative91.1%
*-commutative91.1%
Simplified91.1%
if 2.0000000000000001e-54 < (/.f64 angle 180) < 6.9999999999999995e49Initial program 67.0%
unpow267.0%
unpow267.0%
difference-of-squares75.4%
Applied egg-rr75.4%
Taylor expanded in angle around inf 87.5%
if 6.9999999999999995e49 < (/.f64 angle 180) < 5e64Initial program 5.2%
*-commutative5.2%
associate-*l*5.2%
associate-*l*5.2%
Simplified5.2%
Taylor expanded in b around 0 5.2%
neg-mul-15.2%
+-commutative5.2%
sub-neg5.2%
rem-square-sqrt1.5%
fabs-sqr1.5%
rem-square-sqrt11.0%
fabs-sub11.0%
rem-square-sqrt9.6%
fabs-sqr9.6%
rem-square-sqrt39.2%
Simplified39.2%
if 5e64 < (/.f64 angle 180) < 4.0000000000000002e222Initial program 21.4%
Simplified31.0%
unpow231.0%
unpow231.0%
difference-of-squares34.2%
Applied egg-rr34.2%
add-cbrt-cube38.6%
pow338.6%
Applied egg-rr38.6%
Taylor expanded in angle around 0 42.8%
if 4.0000000000000002e222 < (/.f64 angle 180) Initial program 23.5%
Simplified33.0%
unpow233.0%
unpow233.0%
difference-of-squares33.0%
Applied egg-rr33.0%
add-sqr-sqrt43.3%
pow243.3%
Applied egg-rr43.3%
Final simplification71.7%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- b a) (+ b a)))
(t_1 (* PI (/ angle 180.0)))
(t_2 (sin t_1))
(t_3 (* (* PI angle) 0.005555555555555556))
(t_4 (* 2.0 t_0))
(t_5 (cos t_1)))
(if (<= (/ angle 180.0) -5e+69)
(*
(* 2.0 (sin (* angle (/ (pow (sqrt PI) 2.0) -180.0))))
(* (- a b) (+ b a)))
(if (<= (/ angle 180.0) 2e-54)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(if (<= (/ angle 180.0) 7e+49)
(* (* t_4 t_2) (cos t_3))
(if (<= (/ angle 180.0) 5e+64)
(* (- (pow a 2.0) (pow b 2.0)) (* t_5 (* 2.0 t_2)))
(if (<= (/ angle 180.0) 6e+162)
(* t_5 (* 0.011111111111111112 (* angle (* PI t_0))))
(* t_5 (* t_4 (sin t_3))))))))))
double code(double a, double b, double angle) {
double t_0 = (b - a) * (b + a);
double t_1 = ((double) M_PI) * (angle / 180.0);
double t_2 = sin(t_1);
double t_3 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_4 = 2.0 * t_0;
double t_5 = cos(t_1);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * sin((angle * (pow(sqrt(((double) M_PI)), 2.0) / -180.0)))) * ((a - b) * (b + a));
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = (t_4 * t_2) * cos(t_3);
} else if ((angle / 180.0) <= 5e+64) {
tmp = (pow(a, 2.0) - pow(b, 2.0)) * (t_5 * (2.0 * t_2));
} else if ((angle / 180.0) <= 6e+162) {
tmp = t_5 * (0.011111111111111112 * (angle * (((double) M_PI) * t_0)));
} else {
tmp = t_5 * (t_4 * sin(t_3));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b - a) * (b + a);
double t_1 = Math.PI * (angle / 180.0);
double t_2 = Math.sin(t_1);
double t_3 = (Math.PI * angle) * 0.005555555555555556;
double t_4 = 2.0 * t_0;
double t_5 = Math.cos(t_1);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * Math.sin((angle * (Math.pow(Math.sqrt(Math.PI), 2.0) / -180.0)))) * ((a - b) * (b + a));
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = (t_4 * t_2) * Math.cos(t_3);
} else if ((angle / 180.0) <= 5e+64) {
tmp = (Math.pow(a, 2.0) - Math.pow(b, 2.0)) * (t_5 * (2.0 * t_2));
} else if ((angle / 180.0) <= 6e+162) {
tmp = t_5 * (0.011111111111111112 * (angle * (Math.PI * t_0)));
} else {
tmp = t_5 * (t_4 * Math.sin(t_3));
}
return tmp;
}
def code(a, b, angle): t_0 = (b - a) * (b + a) t_1 = math.pi * (angle / 180.0) t_2 = math.sin(t_1) t_3 = (math.pi * angle) * 0.005555555555555556 t_4 = 2.0 * t_0 t_5 = math.cos(t_1) tmp = 0 if (angle / 180.0) <= -5e+69: tmp = (2.0 * math.sin((angle * (math.pow(math.sqrt(math.pi), 2.0) / -180.0)))) * ((a - b) * (b + a)) elif (angle / 180.0) <= 2e-54: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) elif (angle / 180.0) <= 7e+49: tmp = (t_4 * t_2) * math.cos(t_3) elif (angle / 180.0) <= 5e+64: tmp = (math.pow(a, 2.0) - math.pow(b, 2.0)) * (t_5 * (2.0 * t_2)) elif (angle / 180.0) <= 6e+162: tmp = t_5 * (0.011111111111111112 * (angle * (math.pi * t_0))) else: tmp = t_5 * (t_4 * math.sin(t_3)) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b - a) * Float64(b + a)) t_1 = Float64(pi * Float64(angle / 180.0)) t_2 = sin(t_1) t_3 = Float64(Float64(pi * angle) * 0.005555555555555556) t_4 = Float64(2.0 * t_0) t_5 = cos(t_1) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+69) tmp = Float64(Float64(2.0 * sin(Float64(angle * Float64((sqrt(pi) ^ 2.0) / -180.0)))) * Float64(Float64(a - b) * Float64(b + a))); elseif (Float64(angle / 180.0) <= 2e-54) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); elseif (Float64(angle / 180.0) <= 7e+49) tmp = Float64(Float64(t_4 * t_2) * cos(t_3)); elseif (Float64(angle / 180.0) <= 5e+64) tmp = Float64(Float64((a ^ 2.0) - (b ^ 2.0)) * Float64(t_5 * Float64(2.0 * t_2))); elseif (Float64(angle / 180.0) <= 6e+162) tmp = Float64(t_5 * Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_0)))); else tmp = Float64(t_5 * Float64(t_4 * sin(t_3))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b - a) * (b + a); t_1 = pi * (angle / 180.0); t_2 = sin(t_1); t_3 = (pi * angle) * 0.005555555555555556; t_4 = 2.0 * t_0; t_5 = cos(t_1); tmp = 0.0; if ((angle / 180.0) <= -5e+69) tmp = (2.0 * sin((angle * ((sqrt(pi) ^ 2.0) / -180.0)))) * ((a - b) * (b + a)); elseif ((angle / 180.0) <= 2e-54) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); elseif ((angle / 180.0) <= 7e+49) tmp = (t_4 * t_2) * cos(t_3); elseif ((angle / 180.0) <= 5e+64) tmp = ((a ^ 2.0) - (b ^ 2.0)) * (t_5 * (2.0 * t_2)); elseif ((angle / 180.0) <= 6e+162) tmp = t_5 * (0.011111111111111112 * (angle * (pi * t_0))); else tmp = t_5 * (t_4 * sin(t_3)); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$4 = N[(2.0 * t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[Cos[t$95$1], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+69], N[(N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-54], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 7e+49], N[(N[(t$95$4 * t$95$2), $MachinePrecision] * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+64], N[(N[(N[Power[a, 2.0], $MachinePrecision] - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$5 * N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 6e+162], N[(t$95$5 * N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$5 * N[(t$95$4 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := \pi \cdot \frac{angle}{180}\\
t_2 := \sin t_1\\
t_3 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_4 := 2 \cdot t_0\\
t_5 := \cos t_1\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\left(2 \cdot \sin \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-54}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 7 \cdot 10^{+49}:\\
\;\;\;\;\left(t_4 \cdot t_2\right) \cdot \cos t_3\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+64}:\\
\;\;\;\;\left({a}^{2} - {b}^{2}\right) \cdot \left(t_5 \cdot \left(2 \cdot t_2\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 6 \cdot 10^{+162}:\\
\;\;\;\;t_5 \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_5 \cdot \left(t_4 \cdot \sin t_3\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.00000000000000036e69Initial program 29.3%
Simplified26.4%
unpow226.4%
unpow226.4%
difference-of-squares26.4%
Applied egg-rr26.4%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Taylor expanded in angle around 0 31.9%
rem-cbrt-cube37.6%
add-sqr-sqrt44.1%
pow244.1%
Applied egg-rr44.1%
if -5.00000000000000036e69 < (/.f64 angle 180) < 2.0000000000000001e-54Initial program 73.0%
Simplified73.0%
unpow273.0%
unpow273.0%
difference-of-squares76.3%
Applied egg-rr76.3%
add-cbrt-cube75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in angle around 0 74.6%
associate-*r*74.5%
associate-*r*91.1%
*-commutative91.1%
*-commutative91.1%
Simplified91.1%
if 2.0000000000000001e-54 < (/.f64 angle 180) < 6.9999999999999995e49Initial program 67.0%
unpow267.0%
unpow267.0%
difference-of-squares75.4%
Applied egg-rr75.4%
Taylor expanded in angle around inf 87.5%
if 6.9999999999999995e49 < (/.f64 angle 180) < 5e64Initial program 5.2%
*-commutative5.2%
associate-*l*5.2%
associate-*l*5.2%
Simplified5.2%
Taylor expanded in b around 0 5.2%
neg-mul-15.2%
+-commutative5.2%
sub-neg5.2%
rem-square-sqrt1.5%
fabs-sqr1.5%
rem-square-sqrt11.0%
fabs-sub11.0%
rem-square-sqrt9.6%
fabs-sqr9.6%
rem-square-sqrt39.2%
Simplified39.2%
if 5e64 < (/.f64 angle 180) < 5.9999999999999996e162Initial program 19.6%
unpow219.6%
unpow219.6%
difference-of-squares19.6%
Applied egg-rr19.6%
Taylor expanded in angle around 0 48.7%
if 5.9999999999999996e162 < (/.f64 angle 180) Initial program 23.8%
unpow223.8%
unpow223.8%
difference-of-squares27.5%
Applied egg-rr27.5%
Taylor expanded in angle around inf 38.5%
Final simplification71.7%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- a b) (+ b a)))
(t_1 (* (- b a) (+ b a)))
(t_2 (* PI (/ angle 180.0))))
(if (<= (/ angle 180.0) -5e+69)
(* (* 2.0 (sin (* angle (/ (pow (sqrt PI) 2.0) -180.0)))) t_0)
(if (<= (/ angle 180.0) 2e-54)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(if (<= (/ angle 180.0) 7e+49)
(*
(* (* 2.0 t_1) (sin t_2))
(cos (* (* PI angle) 0.005555555555555556)))
(if (<= (/ angle 180.0) 5e+99)
(* (cos t_2) (* 0.011111111111111112 (* angle (* PI t_1))))
(*
t_0
(*
2.0
(sin
(* angle (/ (* (cbrt PI) (pow (cbrt PI) 2.0)) -180.0)))))))))))
double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double t_1 = (b - a) * (b + a);
double t_2 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * sin((angle * (pow(sqrt(((double) M_PI)), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = ((2.0 * t_1) * sin(t_2)) * cos(((((double) M_PI) * angle) * 0.005555555555555556));
} else if ((angle / 180.0) <= 5e+99) {
tmp = cos(t_2) * (0.011111111111111112 * (angle * (((double) M_PI) * t_1)));
} else {
tmp = t_0 * (2.0 * sin((angle * ((cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0)) / -180.0))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double t_1 = (b - a) * (b + a);
double t_2 = Math.PI * (angle / 180.0);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * Math.sin((angle * (Math.pow(Math.sqrt(Math.PI), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = ((2.0 * t_1) * Math.sin(t_2)) * Math.cos(((Math.PI * angle) * 0.005555555555555556));
} else if ((angle / 180.0) <= 5e+99) {
tmp = Math.cos(t_2) * (0.011111111111111112 * (angle * (Math.PI * t_1)));
} else {
tmp = t_0 * (2.0 * Math.sin((angle * ((Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0)) / -180.0))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(a - b) * Float64(b + a)) t_1 = Float64(Float64(b - a) * Float64(b + a)) t_2 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+69) tmp = Float64(Float64(2.0 * sin(Float64(angle * Float64((sqrt(pi) ^ 2.0) / -180.0)))) * t_0); elseif (Float64(angle / 180.0) <= 2e-54) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); elseif (Float64(angle / 180.0) <= 7e+49) tmp = Float64(Float64(Float64(2.0 * t_1) * sin(t_2)) * cos(Float64(Float64(pi * angle) * 0.005555555555555556))); elseif (Float64(angle / 180.0) <= 5e+99) tmp = Float64(cos(t_2) * Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_1)))); else tmp = Float64(t_0 * Float64(2.0 * sin(Float64(angle * Float64(Float64(cbrt(pi) * (cbrt(pi) ^ 2.0)) / -180.0))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+69], N[(N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-54], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 7e+49], N[(N[(N[(2.0 * t$95$1), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+99], N[(N[Cos[t$95$2], $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(2.0 * N[Sin[N[(angle * N[(N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(a - b\right) \cdot \left(b + a\right)\\
t_1 := \left(b - a\right) \cdot \left(b + a\right)\\
t_2 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\left(2 \cdot \sin \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\right) \cdot t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-54}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 7 \cdot 10^{+49}:\\
\;\;\;\;\left(\left(2 \cdot t_1\right) \cdot \sin t_2\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+99}:\\
\;\;\;\;\cos t_2 \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(2 \cdot \sin \left(angle \cdot \frac{\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}}{-180}\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.00000000000000036e69Initial program 29.3%
Simplified26.4%
unpow226.4%
unpow226.4%
difference-of-squares26.4%
Applied egg-rr26.4%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Taylor expanded in angle around 0 31.9%
rem-cbrt-cube37.6%
add-sqr-sqrt44.1%
pow244.1%
Applied egg-rr44.1%
if -5.00000000000000036e69 < (/.f64 angle 180) < 2.0000000000000001e-54Initial program 73.0%
Simplified73.0%
unpow273.0%
unpow273.0%
difference-of-squares76.3%
Applied egg-rr76.3%
add-cbrt-cube75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in angle around 0 74.6%
associate-*r*74.5%
associate-*r*91.1%
*-commutative91.1%
*-commutative91.1%
Simplified91.1%
if 2.0000000000000001e-54 < (/.f64 angle 180) < 6.9999999999999995e49Initial program 67.0%
unpow267.0%
unpow267.0%
difference-of-squares75.4%
Applied egg-rr75.4%
Taylor expanded in angle around inf 87.5%
if 6.9999999999999995e49 < (/.f64 angle 180) < 5.00000000000000008e99Initial program 13.7%
unpow213.7%
unpow213.7%
difference-of-squares13.9%
Applied egg-rr13.9%
Taylor expanded in angle around 0 44.7%
if 5.00000000000000008e99 < (/.f64 angle 180) Initial program 22.9%
Simplified32.3%
unpow232.3%
unpow232.3%
difference-of-squares34.9%
Applied egg-rr34.9%
add-cbrt-cube36.1%
pow336.1%
Applied egg-rr36.1%
Taylor expanded in angle around 0 34.4%
rem-cbrt-cube28.8%
add-cube-cbrt38.4%
pow238.4%
Applied egg-rr38.4%
Final simplification71.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))))
(if (<= b 2.8e-45)
(*
(* (* 2.0 (* (- b a) (+ b a))) (sin t_0))
(cos (* (/ angle 180.0) (pow (sqrt PI) 2.0))))
(if (<= b 6.8e+289)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(*
(*
2.0
(* (pow b 2.0) (fabs (sin (* PI (* angle 0.005555555555555556))))))
(cos t_0))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double tmp;
if (b <= 2.8e-45) {
tmp = ((2.0 * ((b - a) * (b + a))) * sin(t_0)) * cos(((angle / 180.0) * pow(sqrt(((double) M_PI)), 2.0)));
} else if (b <= 6.8e+289) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else {
tmp = (2.0 * (pow(b, 2.0) * fabs(sin((((double) M_PI) * (angle * 0.005555555555555556)))))) * cos(t_0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double tmp;
if (b <= 2.8e-45) {
tmp = ((2.0 * ((b - a) * (b + a))) * Math.sin(t_0)) * Math.cos(((angle / 180.0) * Math.pow(Math.sqrt(Math.PI), 2.0)));
} else if (b <= 6.8e+289) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else {
tmp = (2.0 * (Math.pow(b, 2.0) * Math.abs(Math.sin((Math.PI * (angle * 0.005555555555555556)))))) * Math.cos(t_0);
}
return tmp;
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) tmp = 0 if b <= 2.8e-45: tmp = ((2.0 * ((b - a) * (b + a))) * math.sin(t_0)) * math.cos(((angle / 180.0) * math.pow(math.sqrt(math.pi), 2.0))) elif b <= 6.8e+289: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) else: tmp = (2.0 * (math.pow(b, 2.0) * math.fabs(math.sin((math.pi * (angle * 0.005555555555555556)))))) * math.cos(t_0) return tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (b <= 2.8e-45) tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))) * sin(t_0)) * cos(Float64(Float64(angle / 180.0) * (sqrt(pi) ^ 2.0)))); elseif (b <= 6.8e+289) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); else tmp = Float64(Float64(2.0 * Float64((b ^ 2.0) * abs(sin(Float64(pi * Float64(angle * 0.005555555555555556)))))) * cos(t_0)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = 0.0; if (b <= 2.8e-45) tmp = ((2.0 * ((b - a) * (b + a))) * sin(t_0)) * cos(((angle / 180.0) * (sqrt(pi) ^ 2.0))); elseif (b <= 6.8e+289) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); else tmp = (2.0 * ((b ^ 2.0) * abs(sin((pi * (angle * 0.005555555555555556)))))) * cos(t_0); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 2.8e-45], N[(N[(N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.8e+289], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] * N[Abs[N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;b \leq 2.8 \cdot 10^{-45}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \sin t_0\right) \cdot \cos \left(\frac{angle}{180} \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{+289}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left({b}^{2} \cdot \left|\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right|\right)\right) \cdot \cos t_0\\
\end{array}
\end{array}
if b < 2.8000000000000001e-45Initial program 57.0%
unpow257.0%
unpow257.0%
difference-of-squares58.2%
Applied egg-rr58.2%
add-sqr-sqrt59.4%
pow259.4%
Applied egg-rr58.8%
if 2.8000000000000001e-45 < b < 6.7999999999999997e289Initial program 45.4%
Simplified47.1%
unpow247.1%
unpow247.1%
difference-of-squares52.1%
Applied egg-rr52.1%
add-cbrt-cube61.1%
pow361.1%
Applied egg-rr61.1%
Taylor expanded in angle around 0 56.5%
associate-*r*56.4%
associate-*r*68.2%
*-commutative68.2%
*-commutative68.2%
Simplified68.2%
if 6.7999999999999997e289 < b Initial program 33.3%
Taylor expanded in b around inf 77.8%
add-sqr-sqrt77.8%
sqrt-unprod88.9%
pow288.9%
associate-*r*88.9%
*-commutative88.9%
*-commutative88.9%
Applied egg-rr88.9%
unpow288.9%
rem-sqrt-square100.0%
Simplified100.0%
Final simplification62.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- a b) (+ b a)))
(t_1 (* (- b a) (+ b a)))
(t_2 (* PI (/ angle 180.0)))
(t_3 (* PI (* angle -0.005555555555555556))))
(if (<= (/ angle 180.0) -5e+69)
(* (* 2.0 (sin (* angle (/ (pow (sqrt PI) 2.0) -180.0)))) t_0)
(if (<= (/ angle 180.0) 2e-54)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(if (<= (/ angle 180.0) 7e+49)
(*
(* (* 2.0 t_1) (sin t_2))
(cos (* (* PI angle) 0.005555555555555556)))
(if (<= (/ angle 180.0) 5e+99)
(* (cos t_2) (* 0.011111111111111112 (* angle (* PI t_1))))
(if (<= (/ angle 180.0) 5e+185)
(fabs (* (* t_0 (cos t_3)) (* 2.0 (sin t_3))))
(*
(sin (* (* PI angle) 0.011111111111111112))
(- (pow b 2.0) (pow a 2.0))))))))))
double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double t_1 = (b - a) * (b + a);
double t_2 = ((double) M_PI) * (angle / 180.0);
double t_3 = ((double) M_PI) * (angle * -0.005555555555555556);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * sin((angle * (pow(sqrt(((double) M_PI)), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = ((2.0 * t_1) * sin(t_2)) * cos(((((double) M_PI) * angle) * 0.005555555555555556));
} else if ((angle / 180.0) <= 5e+99) {
tmp = cos(t_2) * (0.011111111111111112 * (angle * (((double) M_PI) * t_1)));
} else if ((angle / 180.0) <= 5e+185) {
tmp = fabs(((t_0 * cos(t_3)) * (2.0 * sin(t_3))));
} else {
tmp = sin(((((double) M_PI) * angle) * 0.011111111111111112)) * (pow(b, 2.0) - pow(a, 2.0));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double t_1 = (b - a) * (b + a);
double t_2 = Math.PI * (angle / 180.0);
double t_3 = Math.PI * (angle * -0.005555555555555556);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * Math.sin((angle * (Math.pow(Math.sqrt(Math.PI), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = ((2.0 * t_1) * Math.sin(t_2)) * Math.cos(((Math.PI * angle) * 0.005555555555555556));
} else if ((angle / 180.0) <= 5e+99) {
tmp = Math.cos(t_2) * (0.011111111111111112 * (angle * (Math.PI * t_1)));
} else if ((angle / 180.0) <= 5e+185) {
tmp = Math.abs(((t_0 * Math.cos(t_3)) * (2.0 * Math.sin(t_3))));
} else {
tmp = Math.sin(((Math.PI * angle) * 0.011111111111111112)) * (Math.pow(b, 2.0) - Math.pow(a, 2.0));
}
return tmp;
}
def code(a, b, angle): t_0 = (a - b) * (b + a) t_1 = (b - a) * (b + a) t_2 = math.pi * (angle / 180.0) t_3 = math.pi * (angle * -0.005555555555555556) tmp = 0 if (angle / 180.0) <= -5e+69: tmp = (2.0 * math.sin((angle * (math.pow(math.sqrt(math.pi), 2.0) / -180.0)))) * t_0 elif (angle / 180.0) <= 2e-54: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) elif (angle / 180.0) <= 7e+49: tmp = ((2.0 * t_1) * math.sin(t_2)) * math.cos(((math.pi * angle) * 0.005555555555555556)) elif (angle / 180.0) <= 5e+99: tmp = math.cos(t_2) * (0.011111111111111112 * (angle * (math.pi * t_1))) elif (angle / 180.0) <= 5e+185: tmp = math.fabs(((t_0 * math.cos(t_3)) * (2.0 * math.sin(t_3)))) else: tmp = math.sin(((math.pi * angle) * 0.011111111111111112)) * (math.pow(b, 2.0) - math.pow(a, 2.0)) return tmp
function code(a, b, angle) t_0 = Float64(Float64(a - b) * Float64(b + a)) t_1 = Float64(Float64(b - a) * Float64(b + a)) t_2 = Float64(pi * Float64(angle / 180.0)) t_3 = Float64(pi * Float64(angle * -0.005555555555555556)) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+69) tmp = Float64(Float64(2.0 * sin(Float64(angle * Float64((sqrt(pi) ^ 2.0) / -180.0)))) * t_0); elseif (Float64(angle / 180.0) <= 2e-54) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); elseif (Float64(angle / 180.0) <= 7e+49) tmp = Float64(Float64(Float64(2.0 * t_1) * sin(t_2)) * cos(Float64(Float64(pi * angle) * 0.005555555555555556))); elseif (Float64(angle / 180.0) <= 5e+99) tmp = Float64(cos(t_2) * Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_1)))); elseif (Float64(angle / 180.0) <= 5e+185) tmp = abs(Float64(Float64(t_0 * cos(t_3)) * Float64(2.0 * sin(t_3)))); else tmp = Float64(sin(Float64(Float64(pi * angle) * 0.011111111111111112)) * Float64((b ^ 2.0) - (a ^ 2.0))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (a - b) * (b + a); t_1 = (b - a) * (b + a); t_2 = pi * (angle / 180.0); t_3 = pi * (angle * -0.005555555555555556); tmp = 0.0; if ((angle / 180.0) <= -5e+69) tmp = (2.0 * sin((angle * ((sqrt(pi) ^ 2.0) / -180.0)))) * t_0; elseif ((angle / 180.0) <= 2e-54) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); elseif ((angle / 180.0) <= 7e+49) tmp = ((2.0 * t_1) * sin(t_2)) * cos(((pi * angle) * 0.005555555555555556)); elseif ((angle / 180.0) <= 5e+99) tmp = cos(t_2) * (0.011111111111111112 * (angle * (pi * t_1))); elseif ((angle / 180.0) <= 5e+185) tmp = abs(((t_0 * cos(t_3)) * (2.0 * sin(t_3)))); else tmp = sin(((pi * angle) * 0.011111111111111112)) * ((b ^ 2.0) - (a ^ 2.0)); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(Pi * N[(angle * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+69], N[(N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-54], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 7e+49], N[(N[(N[(2.0 * t$95$1), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+99], N[(N[Cos[t$95$2], $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+185], N[Abs[N[(N[(t$95$0 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(a - b\right) \cdot \left(b + a\right)\\
t_1 := \left(b - a\right) \cdot \left(b + a\right)\\
t_2 := \pi \cdot \frac{angle}{180}\\
t_3 := \pi \cdot \left(angle \cdot -0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\left(2 \cdot \sin \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\right) \cdot t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-54}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 7 \cdot 10^{+49}:\\
\;\;\;\;\left(\left(2 \cdot t_1\right) \cdot \sin t_2\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+99}:\\
\;\;\;\;\cos t_2 \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t_1\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+185}:\\
\;\;\;\;\left|\left(t_0 \cdot \cos t_3\right) \cdot \left(2 \cdot \sin t_3\right)\right|\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left({b}^{2} - {a}^{2}\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.00000000000000036e69Initial program 29.3%
Simplified26.4%
unpow226.4%
unpow226.4%
difference-of-squares26.4%
Applied egg-rr26.4%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Taylor expanded in angle around 0 31.9%
rem-cbrt-cube37.6%
add-sqr-sqrt44.1%
pow244.1%
Applied egg-rr44.1%
if -5.00000000000000036e69 < (/.f64 angle 180) < 2.0000000000000001e-54Initial program 73.0%
Simplified73.0%
unpow273.0%
unpow273.0%
difference-of-squares76.3%
Applied egg-rr76.3%
add-cbrt-cube75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in angle around 0 74.6%
associate-*r*74.5%
associate-*r*91.1%
*-commutative91.1%
*-commutative91.1%
Simplified91.1%
if 2.0000000000000001e-54 < (/.f64 angle 180) < 6.9999999999999995e49Initial program 67.0%
unpow267.0%
unpow267.0%
difference-of-squares75.4%
Applied egg-rr75.4%
Taylor expanded in angle around inf 87.5%
if 6.9999999999999995e49 < (/.f64 angle 180) < 5.00000000000000008e99Initial program 13.7%
unpow213.7%
unpow213.7%
difference-of-squares13.9%
Applied egg-rr13.9%
Taylor expanded in angle around 0 44.7%
if 5.00000000000000008e99 < (/.f64 angle 180) < 4.9999999999999999e185Initial program 23.0%
Simplified34.8%
unpow234.8%
unpow234.8%
difference-of-squares40.1%
Applied egg-rr40.1%
add-cbrt-cube46.6%
pow346.6%
Applied egg-rr46.6%
add-sqr-sqrt39.3%
sqrt-unprod45.7%
pow245.7%
Applied egg-rr45.9%
unpow245.9%
rem-sqrt-square46.5%
associate-*r*46.5%
*-commutative46.5%
Simplified46.1%
if 4.9999999999999999e185 < (/.f64 angle 180) Initial program 22.7%
*-commutative22.7%
associate-*l*22.7%
associate-*l*22.7%
Simplified22.7%
add-cbrt-cube22.0%
pow1/317.5%
Applied egg-rr17.5%
Taylor expanded in angle around inf 36.6%
*-commutative36.6%
Simplified36.6%
Final simplification71.7%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- b a) (+ b a)))
(t_1 (* 2.0 t_0))
(t_2 (* PI (/ angle 180.0)))
(t_3 (cos t_2))
(t_4 (* (* PI angle) 0.005555555555555556)))
(if (<= (/ angle 180.0) -5e+69)
(*
(* 2.0 (sin (* angle (/ (pow (sqrt PI) 2.0) -180.0))))
(* (- a b) (+ b a)))
(if (<= (/ angle 180.0) 2e-54)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(if (<= (/ angle 180.0) 7e+49)
(* (* t_1 (sin t_2)) (cos t_4))
(if (<= (/ angle 180.0) 5e+99)
(* t_3 (* 0.011111111111111112 (* angle (* PI t_0))))
(if (<= (/ angle 180.0) 5e+163)
(pow
(pow
(* (sin (* (* PI angle) 0.011111111111111112)) (- (pow a 2.0)))
3.0)
0.3333333333333333)
(* t_3 (* t_1 (sin t_4))))))))))
double code(double a, double b, double angle) {
double t_0 = (b - a) * (b + a);
double t_1 = 2.0 * t_0;
double t_2 = ((double) M_PI) * (angle / 180.0);
double t_3 = cos(t_2);
double t_4 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * sin((angle * (pow(sqrt(((double) M_PI)), 2.0) / -180.0)))) * ((a - b) * (b + a));
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = (t_1 * sin(t_2)) * cos(t_4);
} else if ((angle / 180.0) <= 5e+99) {
tmp = t_3 * (0.011111111111111112 * (angle * (((double) M_PI) * t_0)));
} else if ((angle / 180.0) <= 5e+163) {
tmp = pow(pow((sin(((((double) M_PI) * angle) * 0.011111111111111112)) * -pow(a, 2.0)), 3.0), 0.3333333333333333);
} else {
tmp = t_3 * (t_1 * sin(t_4));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (b - a) * (b + a);
double t_1 = 2.0 * t_0;
double t_2 = Math.PI * (angle / 180.0);
double t_3 = Math.cos(t_2);
double t_4 = (Math.PI * angle) * 0.005555555555555556;
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * Math.sin((angle * (Math.pow(Math.sqrt(Math.PI), 2.0) / -180.0)))) * ((a - b) * (b + a));
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = (t_1 * Math.sin(t_2)) * Math.cos(t_4);
} else if ((angle / 180.0) <= 5e+99) {
tmp = t_3 * (0.011111111111111112 * (angle * (Math.PI * t_0)));
} else if ((angle / 180.0) <= 5e+163) {
tmp = Math.pow(Math.pow((Math.sin(((Math.PI * angle) * 0.011111111111111112)) * -Math.pow(a, 2.0)), 3.0), 0.3333333333333333);
} else {
tmp = t_3 * (t_1 * Math.sin(t_4));
}
return tmp;
}
def code(a, b, angle): t_0 = (b - a) * (b + a) t_1 = 2.0 * t_0 t_2 = math.pi * (angle / 180.0) t_3 = math.cos(t_2) t_4 = (math.pi * angle) * 0.005555555555555556 tmp = 0 if (angle / 180.0) <= -5e+69: tmp = (2.0 * math.sin((angle * (math.pow(math.sqrt(math.pi), 2.0) / -180.0)))) * ((a - b) * (b + a)) elif (angle / 180.0) <= 2e-54: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) elif (angle / 180.0) <= 7e+49: tmp = (t_1 * math.sin(t_2)) * math.cos(t_4) elif (angle / 180.0) <= 5e+99: tmp = t_3 * (0.011111111111111112 * (angle * (math.pi * t_0))) elif (angle / 180.0) <= 5e+163: tmp = math.pow(math.pow((math.sin(((math.pi * angle) * 0.011111111111111112)) * -math.pow(a, 2.0)), 3.0), 0.3333333333333333) else: tmp = t_3 * (t_1 * math.sin(t_4)) return tmp
function code(a, b, angle) t_0 = Float64(Float64(b - a) * Float64(b + a)) t_1 = Float64(2.0 * t_0) t_2 = Float64(pi * Float64(angle / 180.0)) t_3 = cos(t_2) t_4 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+69) tmp = Float64(Float64(2.0 * sin(Float64(angle * Float64((sqrt(pi) ^ 2.0) / -180.0)))) * Float64(Float64(a - b) * Float64(b + a))); elseif (Float64(angle / 180.0) <= 2e-54) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); elseif (Float64(angle / 180.0) <= 7e+49) tmp = Float64(Float64(t_1 * sin(t_2)) * cos(t_4)); elseif (Float64(angle / 180.0) <= 5e+99) tmp = Float64(t_3 * Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_0)))); elseif (Float64(angle / 180.0) <= 5e+163) tmp = (Float64(sin(Float64(Float64(pi * angle) * 0.011111111111111112)) * Float64(-(a ^ 2.0))) ^ 3.0) ^ 0.3333333333333333; else tmp = Float64(t_3 * Float64(t_1 * sin(t_4))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (b - a) * (b + a); t_1 = 2.0 * t_0; t_2 = pi * (angle / 180.0); t_3 = cos(t_2); t_4 = (pi * angle) * 0.005555555555555556; tmp = 0.0; if ((angle / 180.0) <= -5e+69) tmp = (2.0 * sin((angle * ((sqrt(pi) ^ 2.0) / -180.0)))) * ((a - b) * (b + a)); elseif ((angle / 180.0) <= 2e-54) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); elseif ((angle / 180.0) <= 7e+49) tmp = (t_1 * sin(t_2)) * cos(t_4); elseif ((angle / 180.0) <= 5e+99) tmp = t_3 * (0.011111111111111112 * (angle * (pi * t_0))); elseif ((angle / 180.0) <= 5e+163) tmp = ((sin(((pi * angle) * 0.011111111111111112)) * -(a ^ 2.0)) ^ 3.0) ^ 0.3333333333333333; else tmp = t_3 * (t_1 * sin(t_4)); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+69], N[(N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-54], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 7e+49], N[(N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$4], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+99], N[(t$95$3 * N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+163], N[Power[N[Power[N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * (-N[Power[a, 2.0], $MachinePrecision])), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], N[(t$95$3 * N[(t$95$1 * N[Sin[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := 2 \cdot t_0\\
t_2 := \pi \cdot \frac{angle}{180}\\
t_3 := \cos t_2\\
t_4 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\left(2 \cdot \sin \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-54}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 7 \cdot 10^{+49}:\\
\;\;\;\;\left(t_1 \cdot \sin t_2\right) \cdot \cos t_4\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+99}:\\
\;\;\;\;t_3 \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t_0\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+163}:\\
\;\;\;\;{\left({\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(-{a}^{2}\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \left(t_1 \cdot \sin t_4\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.00000000000000036e69Initial program 29.3%
Simplified26.4%
unpow226.4%
unpow226.4%
difference-of-squares26.4%
Applied egg-rr26.4%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Taylor expanded in angle around 0 31.9%
rem-cbrt-cube37.6%
add-sqr-sqrt44.1%
pow244.1%
Applied egg-rr44.1%
if -5.00000000000000036e69 < (/.f64 angle 180) < 2.0000000000000001e-54Initial program 73.0%
Simplified73.0%
unpow273.0%
unpow273.0%
difference-of-squares76.3%
Applied egg-rr76.3%
add-cbrt-cube75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in angle around 0 74.6%
associate-*r*74.5%
associate-*r*91.1%
*-commutative91.1%
*-commutative91.1%
Simplified91.1%
if 2.0000000000000001e-54 < (/.f64 angle 180) < 6.9999999999999995e49Initial program 67.0%
unpow267.0%
unpow267.0%
difference-of-squares75.4%
Applied egg-rr75.4%
Taylor expanded in angle around inf 87.5%
if 6.9999999999999995e49 < (/.f64 angle 180) < 5.00000000000000008e99Initial program 13.7%
unpow213.7%
unpow213.7%
difference-of-squares13.9%
Applied egg-rr13.9%
Taylor expanded in angle around 0 44.7%
if 5.00000000000000008e99 < (/.f64 angle 180) < 5e163Initial program 25.3%
*-commutative25.3%
associate-*l*25.3%
associate-*l*25.3%
Simplified25.3%
add-cbrt-cube25.4%
pow1/333.7%
Applied egg-rr33.8%
Taylor expanded in b around 0 47.4%
mul-1-neg47.4%
distribute-rgt-neg-in47.4%
*-commutative47.4%
Simplified47.4%
if 5e163 < (/.f64 angle 180) Initial program 21.6%
unpow221.6%
unpow221.6%
difference-of-squares25.6%
Applied egg-rr25.6%
Taylor expanded in angle around inf 37.5%
Final simplification71.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- a b) (+ b a))))
(if (<= (/ angle 180.0) -5e+69)
(* (* 2.0 (sin (* angle (/ (pow (sqrt PI) 2.0) -180.0)))) t_0)
(if (<= (/ angle 180.0) 2e-54)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(if (<= (/ angle 180.0) 7e+49)
(*
(* (* 2.0 (* (- b a) (+ b a))) (sin (* PI (/ angle 180.0))))
(cos (* (* PI angle) 0.005555555555555556)))
(if (<= (/ angle 180.0) 5e+64)
(*
(- (pow a 2.0) (pow b 2.0))
(sin (* (* PI angle) 0.011111111111111112)))
(if (<= (/ angle 180.0) 1e+288)
(* t_0 (* 2.0 (sin (* angle (/ (cbrt (pow PI 3.0)) -180.0)))))
(*
(* t_0 (cos (* angle (/ PI -180.0))))
(* 2.0 (sin (* (* PI angle) -0.005555555555555556)))))))))))
double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * sin((angle * (pow(sqrt(((double) M_PI)), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = ((2.0 * ((b - a) * (b + a))) * sin((((double) M_PI) * (angle / 180.0)))) * cos(((((double) M_PI) * angle) * 0.005555555555555556));
} else if ((angle / 180.0) <= 5e+64) {
tmp = (pow(a, 2.0) - pow(b, 2.0)) * sin(((((double) M_PI) * angle) * 0.011111111111111112));
} else if ((angle / 180.0) <= 1e+288) {
tmp = t_0 * (2.0 * sin((angle * (cbrt(pow(((double) M_PI), 3.0)) / -180.0))));
} else {
tmp = (t_0 * cos((angle * (((double) M_PI) / -180.0)))) * (2.0 * sin(((((double) M_PI) * angle) * -0.005555555555555556)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * Math.sin((angle * (Math.pow(Math.sqrt(Math.PI), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else if ((angle / 180.0) <= 7e+49) {
tmp = ((2.0 * ((b - a) * (b + a))) * Math.sin((Math.PI * (angle / 180.0)))) * Math.cos(((Math.PI * angle) * 0.005555555555555556));
} else if ((angle / 180.0) <= 5e+64) {
tmp = (Math.pow(a, 2.0) - Math.pow(b, 2.0)) * Math.sin(((Math.PI * angle) * 0.011111111111111112));
} else if ((angle / 180.0) <= 1e+288) {
tmp = t_0 * (2.0 * Math.sin((angle * (Math.cbrt(Math.pow(Math.PI, 3.0)) / -180.0))));
} else {
tmp = (t_0 * Math.cos((angle * (Math.PI / -180.0)))) * (2.0 * Math.sin(((Math.PI * angle) * -0.005555555555555556)));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(a - b) * Float64(b + a)) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+69) tmp = Float64(Float64(2.0 * sin(Float64(angle * Float64((sqrt(pi) ^ 2.0) / -180.0)))) * t_0); elseif (Float64(angle / 180.0) <= 2e-54) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); elseif (Float64(angle / 180.0) <= 7e+49) tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(Float64(pi * angle) * 0.005555555555555556))); elseif (Float64(angle / 180.0) <= 5e+64) tmp = Float64(Float64((a ^ 2.0) - (b ^ 2.0)) * sin(Float64(Float64(pi * angle) * 0.011111111111111112))); elseif (Float64(angle / 180.0) <= 1e+288) tmp = Float64(t_0 * Float64(2.0 * sin(Float64(angle * Float64(cbrt((pi ^ 3.0)) / -180.0))))); else tmp = Float64(Float64(t_0 * cos(Float64(angle * Float64(pi / -180.0)))) * Float64(2.0 * sin(Float64(Float64(pi * angle) * -0.005555555555555556)))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+69], N[(N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-54], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 7e+49], N[(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[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+64], N[(N[(N[Power[a, 2.0], $MachinePrecision] - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+288], N[(t$95$0 * N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[Cos[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(a - b\right) \cdot \left(b + a\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\left(2 \cdot \sin \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\right) \cdot t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-54}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 7 \cdot 10^{+49}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+64}:\\
\;\;\;\;\left({a}^{2} - {b}^{2}\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 10^{+288}:\\
\;\;\;\;t_0 \cdot \left(2 \cdot \sin \left(angle \cdot \frac{\sqrt[3]{{\pi}^{3}}}{-180}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right) \cdot \left(2 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.00000000000000036e69Initial program 29.3%
Simplified26.4%
unpow226.4%
unpow226.4%
difference-of-squares26.4%
Applied egg-rr26.4%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Taylor expanded in angle around 0 31.9%
rem-cbrt-cube37.6%
add-sqr-sqrt44.1%
pow244.1%
Applied egg-rr44.1%
if -5.00000000000000036e69 < (/.f64 angle 180) < 2.0000000000000001e-54Initial program 73.0%
Simplified73.0%
unpow273.0%
unpow273.0%
difference-of-squares76.3%
Applied egg-rr76.3%
add-cbrt-cube75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in angle around 0 74.6%
associate-*r*74.5%
associate-*r*91.1%
*-commutative91.1%
*-commutative91.1%
Simplified91.1%
if 2.0000000000000001e-54 < (/.f64 angle 180) < 6.9999999999999995e49Initial program 67.0%
unpow267.0%
unpow267.0%
difference-of-squares75.4%
Applied egg-rr75.4%
Taylor expanded in angle around inf 87.5%
if 6.9999999999999995e49 < (/.f64 angle 180) < 5e64Initial program 5.2%
Simplified8.4%
Applied egg-rr36.0%
distribute-lft-out36.0%
sub-neg36.0%
*-commutative36.0%
count-236.0%
*-commutative36.0%
*-commutative36.0%
associate-*r*36.0%
*-commutative36.0%
*-commutative36.0%
associate-*r*36.1%
distribute-rgt-out36.1%
metadata-eval36.1%
Simplified36.1%
if 5e64 < (/.f64 angle 180) < 1e288Initial program 21.7%
Simplified29.8%
unpow229.8%
unpow229.8%
difference-of-squares32.2%
Applied egg-rr32.2%
add-cbrt-cube32.8%
pow332.8%
Applied egg-rr32.8%
Taylor expanded in angle around 0 41.1%
if 1e288 < (/.f64 angle 180) Initial program 25.8%
Simplified50.8%
unpow250.8%
unpow250.8%
difference-of-squares50.8%
Applied egg-rr50.8%
Taylor expanded in angle around inf 55.1%
*-commutative55.1%
Simplified55.1%
Final simplification71.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- a b) (+ b a)))
(t_1 (sin (* (* PI angle) 0.011111111111111112))))
(if (<= (/ angle 180.0) -2e+183)
(* t_0 (* 2.0 (sin (* (* PI angle) -0.005555555555555556))))
(if (<= (/ angle 180.0) -2e+76)
(* (- (pow a 2.0) (pow b 2.0)) t_1)
(if (<= (/ angle 180.0) -1e-58)
(* t_1 (- (pow b 2.0) (pow a 2.0)))
(if (<= (/ angle 180.0) 2e+24)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(* t_0 (* 2.0 (sin (* angle (/ (cbrt (pow PI 3.0)) -180.0)))))))))))
double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double t_1 = sin(((((double) M_PI) * angle) * 0.011111111111111112));
double tmp;
if ((angle / 180.0) <= -2e+183) {
tmp = t_0 * (2.0 * sin(((((double) M_PI) * angle) * -0.005555555555555556)));
} else if ((angle / 180.0) <= -2e+76) {
tmp = (pow(a, 2.0) - pow(b, 2.0)) * t_1;
} else if ((angle / 180.0) <= -1e-58) {
tmp = t_1 * (pow(b, 2.0) - pow(a, 2.0));
} else if ((angle / 180.0) <= 2e+24) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else {
tmp = t_0 * (2.0 * sin((angle * (cbrt(pow(((double) M_PI), 3.0)) / -180.0))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double t_1 = Math.sin(((Math.PI * angle) * 0.011111111111111112));
double tmp;
if ((angle / 180.0) <= -2e+183) {
tmp = t_0 * (2.0 * Math.sin(((Math.PI * angle) * -0.005555555555555556)));
} else if ((angle / 180.0) <= -2e+76) {
tmp = (Math.pow(a, 2.0) - Math.pow(b, 2.0)) * t_1;
} else if ((angle / 180.0) <= -1e-58) {
tmp = t_1 * (Math.pow(b, 2.0) - Math.pow(a, 2.0));
} else if ((angle / 180.0) <= 2e+24) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else {
tmp = t_0 * (2.0 * Math.sin((angle * (Math.cbrt(Math.pow(Math.PI, 3.0)) / -180.0))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(a - b) * Float64(b + a)) t_1 = sin(Float64(Float64(pi * angle) * 0.011111111111111112)) tmp = 0.0 if (Float64(angle / 180.0) <= -2e+183) tmp = Float64(t_0 * Float64(2.0 * sin(Float64(Float64(pi * angle) * -0.005555555555555556)))); elseif (Float64(angle / 180.0) <= -2e+76) tmp = Float64(Float64((a ^ 2.0) - (b ^ 2.0)) * t_1); elseif (Float64(angle / 180.0) <= -1e-58) tmp = Float64(t_1 * Float64((b ^ 2.0) - (a ^ 2.0))); elseif (Float64(angle / 180.0) <= 2e+24) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); else tmp = Float64(t_0 * Float64(2.0 * sin(Float64(angle * Float64(cbrt((pi ^ 3.0)) / -180.0))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+183], N[(t$95$0 * N[(2.0 * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+76], N[(N[(N[Power[a, 2.0], $MachinePrecision] - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1e-58], N[(t$95$1 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+24], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(a - b\right) \cdot \left(b + a\right)\\
t_1 := \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+183}:\\
\;\;\;\;t_0 \cdot \left(2 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+76}:\\
\;\;\;\;\left({a}^{2} - {b}^{2}\right) \cdot t_1\\
\mathbf{elif}\;\frac{angle}{180} \leq -1 \cdot 10^{-58}:\\
\;\;\;\;t_1 \cdot \left({b}^{2} - {a}^{2}\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+24}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(2 \cdot \sin \left(angle \cdot \frac{\sqrt[3]{{\pi}^{3}}}{-180}\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -1.99999999999999989e183Initial program 28.7%
Simplified28.2%
unpow228.2%
unpow228.2%
difference-of-squares28.2%
Applied egg-rr28.2%
add-cbrt-cube35.4%
pow335.4%
Applied egg-rr35.4%
Taylor expanded in angle around 0 31.7%
Taylor expanded in angle around inf 42.1%
associate-*r*42.1%
*-commutative42.1%
+-commutative42.1%
Simplified42.1%
if -1.99999999999999989e183 < (/.f64 angle 180) < -2.0000000000000001e76Initial program 28.0%
Simplified20.9%
Applied egg-rr31.7%
distribute-lft-out31.7%
sub-neg31.7%
*-commutative31.7%
count-231.7%
*-commutative31.7%
*-commutative31.7%
associate-*r*43.9%
*-commutative43.9%
*-commutative43.9%
associate-*r*49.1%
distribute-rgt-out49.1%
metadata-eval49.1%
Simplified49.1%
if -2.0000000000000001e76 < (/.f64 angle 180) < -1e-58Initial program 56.8%
*-commutative56.8%
associate-*l*56.8%
associate-*l*56.9%
Simplified56.9%
add-cbrt-cube40.8%
pow1/324.5%
Applied egg-rr24.1%
Taylor expanded in angle around inf 57.5%
*-commutative57.5%
Simplified57.5%
if -1e-58 < (/.f64 angle 180) < 2e24Initial program 75.1%
Simplified74.9%
unpow274.9%
unpow274.9%
difference-of-squares79.7%
Applied egg-rr79.7%
add-cbrt-cube80.1%
pow380.1%
Applied egg-rr80.1%
Taylor expanded in angle around 0 78.7%
associate-*r*78.6%
associate-*r*94.8%
*-commutative94.8%
*-commutative94.8%
Simplified94.8%
if 2e24 < (/.f64 angle 180) Initial program 21.7%
Simplified30.1%
unpow230.1%
unpow230.1%
difference-of-squares32.0%
Applied egg-rr32.0%
add-cbrt-cube33.9%
pow333.9%
Applied egg-rr33.9%
Taylor expanded in angle around 0 36.7%
Final simplification70.0%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- a b) (+ b a))))
(if (<= (/ angle 180.0) -5e+69)
(* (* 2.0 (sin (* angle (/ (pow (sqrt PI) 2.0) -180.0)))) t_0)
(if (<= (/ angle 180.0) 2e-54)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(*
(* t_0 (cos (* angle (/ PI -180.0))))
(* 2.0 (sin (* (* PI angle) -0.005555555555555556))))))))
double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * sin((angle * (pow(sqrt(((double) M_PI)), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else {
tmp = (t_0 * cos((angle * (((double) M_PI) / -180.0)))) * (2.0 * sin(((((double) M_PI) * angle) * -0.005555555555555556)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * Math.sin((angle * (Math.pow(Math.sqrt(Math.PI), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else {
tmp = (t_0 * Math.cos((angle * (Math.PI / -180.0)))) * (2.0 * Math.sin(((Math.PI * angle) * -0.005555555555555556)));
}
return tmp;
}
def code(a, b, angle): t_0 = (a - b) * (b + a) tmp = 0 if (angle / 180.0) <= -5e+69: tmp = (2.0 * math.sin((angle * (math.pow(math.sqrt(math.pi), 2.0) / -180.0)))) * t_0 elif (angle / 180.0) <= 2e-54: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) else: tmp = (t_0 * math.cos((angle * (math.pi / -180.0)))) * (2.0 * math.sin(((math.pi * angle) * -0.005555555555555556))) return tmp
function code(a, b, angle) t_0 = Float64(Float64(a - b) * Float64(b + a)) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+69) tmp = Float64(Float64(2.0 * sin(Float64(angle * Float64((sqrt(pi) ^ 2.0) / -180.0)))) * t_0); elseif (Float64(angle / 180.0) <= 2e-54) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); else tmp = Float64(Float64(t_0 * cos(Float64(angle * Float64(pi / -180.0)))) * Float64(2.0 * sin(Float64(Float64(pi * angle) * -0.005555555555555556)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (a - b) * (b + a); tmp = 0.0; if ((angle / 180.0) <= -5e+69) tmp = (2.0 * sin((angle * ((sqrt(pi) ^ 2.0) / -180.0)))) * t_0; elseif ((angle / 180.0) <= 2e-54) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); else tmp = (t_0 * cos((angle * (pi / -180.0)))) * (2.0 * sin(((pi * angle) * -0.005555555555555556))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+69], N[(N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-54], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[Cos[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(a - b\right) \cdot \left(b + a\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\left(2 \cdot \sin \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\right) \cdot t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-54}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right) \cdot \left(2 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.00000000000000036e69Initial program 29.3%
Simplified26.4%
unpow226.4%
unpow226.4%
difference-of-squares26.4%
Applied egg-rr26.4%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Taylor expanded in angle around 0 31.9%
rem-cbrt-cube37.6%
add-sqr-sqrt44.1%
pow244.1%
Applied egg-rr44.1%
if -5.00000000000000036e69 < (/.f64 angle 180) < 2.0000000000000001e-54Initial program 73.0%
Simplified73.0%
unpow273.0%
unpow273.0%
difference-of-squares76.3%
Applied egg-rr76.3%
add-cbrt-cube75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in angle around 0 74.6%
associate-*r*74.5%
associate-*r*91.1%
*-commutative91.1%
*-commutative91.1%
Simplified91.1%
if 2.0000000000000001e-54 < (/.f64 angle 180) Initial program 35.7%
Simplified41.6%
unpow241.6%
unpow241.6%
difference-of-squares45.6%
Applied egg-rr45.6%
Taylor expanded in angle around inf 47.3%
*-commutative47.3%
Simplified47.3%
Final simplification68.9%
(FPCore (a b angle)
:precision binary64
(if (<= (/ angle 180.0) -5e+69)
(*
(* 2.0 (sin (* angle (/ (pow (sqrt PI) 2.0) -180.0))))
(* (- a b) (+ b a)))
(if (<= (/ angle 180.0) 2e-54)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(*
(cos (* PI (/ angle 180.0)))
(*
(* 2.0 (* (- b a) (+ b a)))
(sin (* (* PI angle) 0.005555555555555556)))))))
double code(double a, double b, double angle) {
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * sin((angle * (pow(sqrt(((double) M_PI)), 2.0) / -180.0)))) * ((a - b) * (b + a));
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else {
tmp = cos((((double) M_PI) * (angle / 180.0))) * ((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 ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * Math.sin((angle * (Math.pow(Math.sqrt(Math.PI), 2.0) / -180.0)))) * ((a - b) * (b + a));
} else if ((angle / 180.0) <= 2e-54) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else {
tmp = Math.cos((Math.PI * (angle / 180.0))) * ((2.0 * ((b - a) * (b + a))) * Math.sin(((Math.PI * angle) * 0.005555555555555556)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (angle / 180.0) <= -5e+69: tmp = (2.0 * math.sin((angle * (math.pow(math.sqrt(math.pi), 2.0) / -180.0)))) * ((a - b) * (b + a)) elif (angle / 180.0) <= 2e-54: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) else: tmp = math.cos((math.pi * (angle / 180.0))) * ((2.0 * ((b - a) * (b + a))) * math.sin(((math.pi * angle) * 0.005555555555555556))) return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+69) tmp = Float64(Float64(2.0 * sin(Float64(angle * Float64((sqrt(pi) ^ 2.0) / -180.0)))) * Float64(Float64(a - b) * Float64(b + a))); elseif (Float64(angle / 180.0) <= 2e-54) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); else tmp = Float64(cos(Float64(pi * Float64(angle / 180.0))) * Float64(Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))) * sin(Float64(Float64(pi * angle) * 0.005555555555555556)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((angle / 180.0) <= -5e+69) tmp = (2.0 * sin((angle * ((sqrt(pi) ^ 2.0) / -180.0)))) * ((a - b) * (b + a)); elseif ((angle / 180.0) <= 2e-54) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); else tmp = cos((pi * (angle / 180.0))) * ((2.0 * ((b - a) * (b + a))) * sin(((pi * angle) * 0.005555555555555556))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+69], N[(N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e-54], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\left(2 \cdot \sin \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{-54}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.00000000000000036e69Initial program 29.3%
Simplified26.4%
unpow226.4%
unpow226.4%
difference-of-squares26.4%
Applied egg-rr26.4%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Taylor expanded in angle around 0 31.9%
rem-cbrt-cube37.6%
add-sqr-sqrt44.1%
pow244.1%
Applied egg-rr44.1%
if -5.00000000000000036e69 < (/.f64 angle 180) < 2.0000000000000001e-54Initial program 73.0%
Simplified73.0%
unpow273.0%
unpow273.0%
difference-of-squares76.3%
Applied egg-rr76.3%
add-cbrt-cube75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in angle around 0 74.6%
associate-*r*74.5%
associate-*r*91.1%
*-commutative91.1%
*-commutative91.1%
Simplified91.1%
if 2.0000000000000001e-54 < (/.f64 angle 180) Initial program 35.7%
unpow235.7%
unpow235.7%
difference-of-squares39.8%
Applied egg-rr39.8%
Taylor expanded in angle around inf 48.8%
Final simplification69.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- a b) (+ b a))))
(if (<= (/ angle 180.0) -5e+69)
(* (* 2.0 (sin (* angle (/ (pow (sqrt PI) 2.0) -180.0)))) t_0)
(if (<= (/ angle 180.0) 2e+24)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(* t_0 (* 2.0 (sin (* angle (/ (cbrt (pow PI 3.0)) -180.0)))))))))
double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * sin((angle * (pow(sqrt(((double) M_PI)), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e+24) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else {
tmp = t_0 * (2.0 * sin((angle * (cbrt(pow(((double) M_PI), 3.0)) / -180.0))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double tmp;
if ((angle / 180.0) <= -5e+69) {
tmp = (2.0 * Math.sin((angle * (Math.pow(Math.sqrt(Math.PI), 2.0) / -180.0)))) * t_0;
} else if ((angle / 180.0) <= 2e+24) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else {
tmp = t_0 * (2.0 * Math.sin((angle * (Math.cbrt(Math.pow(Math.PI, 3.0)) / -180.0))));
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(a - b) * Float64(b + a)) tmp = 0.0 if (Float64(angle / 180.0) <= -5e+69) tmp = Float64(Float64(2.0 * sin(Float64(angle * Float64((sqrt(pi) ^ 2.0) / -180.0)))) * t_0); elseif (Float64(angle / 180.0) <= 2e+24) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); else tmp = Float64(t_0 * Float64(2.0 * sin(Float64(angle * Float64(cbrt((pi ^ 3.0)) / -180.0))))); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+69], N[(N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+24], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(2.0 * N[Sin[N[(angle * N[(N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(a - b\right) \cdot \left(b + a\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\left(2 \cdot \sin \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\right) \cdot t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+24}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(2 \cdot \sin \left(angle \cdot \frac{\sqrt[3]{{\pi}^{3}}}{-180}\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -5.00000000000000036e69Initial program 29.3%
Simplified26.4%
unpow226.4%
unpow226.4%
difference-of-squares26.4%
Applied egg-rr26.4%
add-cbrt-cube34.9%
pow334.9%
Applied egg-rr34.9%
Taylor expanded in angle around 0 31.9%
rem-cbrt-cube37.6%
add-sqr-sqrt44.1%
pow244.1%
Applied egg-rr44.1%
if -5.00000000000000036e69 < (/.f64 angle 180) < 2e24Initial program 73.1%
Simplified73.0%
unpow273.0%
unpow273.0%
difference-of-squares77.1%
Applied egg-rr77.1%
add-cbrt-cube77.0%
pow377.0%
Applied egg-rr77.0%
Taylor expanded in angle around 0 74.8%
associate-*r*74.7%
associate-*r*89.0%
*-commutative89.0%
*-commutative89.0%
Simplified89.0%
if 2e24 < (/.f64 angle 180) Initial program 21.7%
Simplified30.1%
unpow230.1%
unpow230.1%
difference-of-squares32.0%
Applied egg-rr32.0%
add-cbrt-cube33.9%
pow333.9%
Applied egg-rr33.9%
Taylor expanded in angle around 0 36.7%
Final simplification68.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (sin (* (* PI angle) 0.011111111111111112))))
(if (<= (/ angle 180.0) -2e+183)
(*
(* (- a b) (+ b a))
(* 2.0 (sin (* (* PI angle) -0.005555555555555556))))
(if (<= (/ angle 180.0) -2e+76)
(* (- (pow a 2.0) (pow b 2.0)) t_0)
(if (<= (/ angle 180.0) -1e-58)
(* t_0 (- (pow b 2.0) (pow a 2.0)))
(if (<= (/ angle 180.0) 2e+16)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(*
(cos (* PI (/ angle 180.0)))
(*
0.011111111111111112
(* angle (* PI (* (- b a) (+ b a))))))))))))
double code(double a, double b, double angle) {
double t_0 = sin(((((double) M_PI) * angle) * 0.011111111111111112));
double tmp;
if ((angle / 180.0) <= -2e+183) {
tmp = ((a - b) * (b + a)) * (2.0 * sin(((((double) M_PI) * angle) * -0.005555555555555556)));
} else if ((angle / 180.0) <= -2e+76) {
tmp = (pow(a, 2.0) - pow(b, 2.0)) * t_0;
} else if ((angle / 180.0) <= -1e-58) {
tmp = t_0 * (pow(b, 2.0) - pow(a, 2.0));
} else if ((angle / 180.0) <= 2e+16) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else {
tmp = cos((((double) M_PI) * (angle / 180.0))) * (0.011111111111111112 * (angle * (((double) M_PI) * ((b - a) * (b + a)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.sin(((Math.PI * angle) * 0.011111111111111112));
double tmp;
if ((angle / 180.0) <= -2e+183) {
tmp = ((a - b) * (b + a)) * (2.0 * Math.sin(((Math.PI * angle) * -0.005555555555555556)));
} else if ((angle / 180.0) <= -2e+76) {
tmp = (Math.pow(a, 2.0) - Math.pow(b, 2.0)) * t_0;
} else if ((angle / 180.0) <= -1e-58) {
tmp = t_0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0));
} else if ((angle / 180.0) <= 2e+16) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else {
tmp = Math.cos((Math.PI * (angle / 180.0))) * (0.011111111111111112 * (angle * (Math.PI * ((b - a) * (b + a)))));
}
return tmp;
}
def code(a, b, angle): t_0 = math.sin(((math.pi * angle) * 0.011111111111111112)) tmp = 0 if (angle / 180.0) <= -2e+183: tmp = ((a - b) * (b + a)) * (2.0 * math.sin(((math.pi * angle) * -0.005555555555555556))) elif (angle / 180.0) <= -2e+76: tmp = (math.pow(a, 2.0) - math.pow(b, 2.0)) * t_0 elif (angle / 180.0) <= -1e-58: tmp = t_0 * (math.pow(b, 2.0) - math.pow(a, 2.0)) elif (angle / 180.0) <= 2e+16: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) else: tmp = math.cos((math.pi * (angle / 180.0))) * (0.011111111111111112 * (angle * (math.pi * ((b - a) * (b + a))))) return tmp
function code(a, b, angle) t_0 = sin(Float64(Float64(pi * angle) * 0.011111111111111112)) tmp = 0.0 if (Float64(angle / 180.0) <= -2e+183) tmp = Float64(Float64(Float64(a - b) * Float64(b + a)) * Float64(2.0 * sin(Float64(Float64(pi * angle) * -0.005555555555555556)))); elseif (Float64(angle / 180.0) <= -2e+76) tmp = Float64(Float64((a ^ 2.0) - (b ^ 2.0)) * t_0); elseif (Float64(angle / 180.0) <= -1e-58) tmp = Float64(t_0 * Float64((b ^ 2.0) - (a ^ 2.0))); elseif (Float64(angle / 180.0) <= 2e+16) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); else tmp = Float64(cos(Float64(pi * Float64(angle / 180.0))) * Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b - a) * Float64(b + a)))))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = sin(((pi * angle) * 0.011111111111111112)); tmp = 0.0; if ((angle / 180.0) <= -2e+183) tmp = ((a - b) * (b + a)) * (2.0 * sin(((pi * angle) * -0.005555555555555556))); elseif ((angle / 180.0) <= -2e+76) tmp = ((a ^ 2.0) - (b ^ 2.0)) * t_0; elseif ((angle / 180.0) <= -1e-58) tmp = t_0 * ((b ^ 2.0) - (a ^ 2.0)); elseif ((angle / 180.0) <= 2e+16) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); else tmp = cos((pi * (angle / 180.0))) * (0.011111111111111112 * (angle * (pi * ((b - a) * (b + a))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+183], N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+76], N[(N[(N[Power[a, 2.0], $MachinePrecision] - N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1e-58], N[(t$95$0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+16], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+183}:\\
\;\;\;\;\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+76}:\\
\;\;\;\;\left({a}^{2} - {b}^{2}\right) \cdot t_0\\
\mathbf{elif}\;\frac{angle}{180} \leq -1 \cdot 10^{-58}:\\
\;\;\;\;t_0 \cdot \left({b}^{2} - {a}^{2}\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+16}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle 180) < -1.99999999999999989e183Initial program 28.7%
Simplified28.2%
unpow228.2%
unpow228.2%
difference-of-squares28.2%
Applied egg-rr28.2%
add-cbrt-cube35.4%
pow335.4%
Applied egg-rr35.4%
Taylor expanded in angle around 0 31.7%
Taylor expanded in angle around inf 42.1%
associate-*r*42.1%
*-commutative42.1%
+-commutative42.1%
Simplified42.1%
if -1.99999999999999989e183 < (/.f64 angle 180) < -2.0000000000000001e76Initial program 28.0%
Simplified20.9%
Applied egg-rr31.7%
distribute-lft-out31.7%
sub-neg31.7%
*-commutative31.7%
count-231.7%
*-commutative31.7%
*-commutative31.7%
associate-*r*43.9%
*-commutative43.9%
*-commutative43.9%
associate-*r*49.1%
distribute-rgt-out49.1%
metadata-eval49.1%
Simplified49.1%
if -2.0000000000000001e76 < (/.f64 angle 180) < -1e-58Initial program 56.8%
*-commutative56.8%
associate-*l*56.8%
associate-*l*56.9%
Simplified56.9%
add-cbrt-cube40.8%
pow1/324.5%
Applied egg-rr24.1%
Taylor expanded in angle around inf 57.5%
*-commutative57.5%
Simplified57.5%
if -1e-58 < (/.f64 angle 180) < 2e16Initial program 75.4%
Simplified75.3%
unpow275.3%
unpow275.3%
difference-of-squares80.1%
Applied egg-rr80.1%
add-cbrt-cube80.6%
pow380.6%
Applied egg-rr80.6%
Taylor expanded in angle around 0 79.1%
associate-*r*79.0%
associate-*r*95.4%
*-commutative95.4%
*-commutative95.4%
Simplified95.4%
if 2e16 < (/.f64 angle 180) Initial program 22.7%
unpow222.7%
unpow222.7%
difference-of-squares24.5%
Applied egg-rr24.5%
Taylor expanded in angle around 0 36.2%
Final simplification69.8%
(FPCore (a b angle)
:precision binary64
(if (<= angle -3.3e-56)
(* (* (- a b) (+ b a)) (* 2.0 (sin (* angle (/ PI -180.0)))))
(if (<= angle 1.02e+20)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(*
(cos (* PI (/ angle 180.0)))
(* 0.011111111111111112 (* angle (* PI (* (- b a) (+ b a)))))))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= -3.3e-56) {
tmp = ((a - b) * (b + a)) * (2.0 * sin((angle * (((double) M_PI) / -180.0))));
} else if (angle <= 1.02e+20) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else {
tmp = cos((((double) M_PI) * (angle / 180.0))) * (0.011111111111111112 * (angle * (((double) M_PI) * ((b - a) * (b + a)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= -3.3e-56) {
tmp = ((a - b) * (b + a)) * (2.0 * Math.sin((angle * (Math.PI / -180.0))));
} else if (angle <= 1.02e+20) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else {
tmp = Math.cos((Math.PI * (angle / 180.0))) * (0.011111111111111112 * (angle * (Math.PI * ((b - a) * (b + a)))));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= -3.3e-56: tmp = ((a - b) * (b + a)) * (2.0 * math.sin((angle * (math.pi / -180.0)))) elif angle <= 1.02e+20: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) else: tmp = math.cos((math.pi * (angle / 180.0))) * (0.011111111111111112 * (angle * (math.pi * ((b - a) * (b + a))))) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= -3.3e-56) tmp = Float64(Float64(Float64(a - b) * Float64(b + a)) * Float64(2.0 * sin(Float64(angle * Float64(pi / -180.0))))); elseif (angle <= 1.02e+20) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); else tmp = Float64(cos(Float64(pi * Float64(angle / 180.0))) * Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b - a) * Float64(b + a)))))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= -3.3e-56) tmp = ((a - b) * (b + a)) * (2.0 * sin((angle * (pi / -180.0)))); elseif (angle <= 1.02e+20) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); else tmp = cos((pi * (angle / 180.0))) * (0.011111111111111112 * (angle * (pi * ((b - a) * (b + a))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, -3.3e-56], N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 1.02e+20], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq -3.3 \cdot 10^{-56}:\\
\;\;\;\;\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(angle \cdot \frac{\pi}{-180}\right)\right)\\
\mathbf{elif}\;angle \leq 1.02 \cdot 10^{+20}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if angle < -3.29999999999999984e-56Initial program 36.2%
Simplified34.1%
unpow234.1%
unpow234.1%
difference-of-squares34.1%
Applied egg-rr34.1%
Taylor expanded in angle around 0 41.5%
if -3.29999999999999984e-56 < angle < 1.02e20Initial program 75.4%
Simplified75.3%
unpow275.3%
unpow275.3%
difference-of-squares80.1%
Applied egg-rr80.1%
add-cbrt-cube80.6%
pow380.6%
Applied egg-rr80.6%
Taylor expanded in angle around 0 79.1%
associate-*r*79.0%
associate-*r*95.4%
*-commutative95.4%
*-commutative95.4%
Simplified95.4%
if 1.02e20 < angle Initial program 22.7%
unpow222.7%
unpow222.7%
difference-of-squares24.5%
Applied egg-rr24.5%
Taylor expanded in angle around 0 36.2%
Final simplification67.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (- a b) (+ b a))))
(if (<= angle -2.7e-56)
(* t_0 (* 2.0 (sin (* angle (/ PI -180.0)))))
(if (<= angle 1.3e+23)
(* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))
(if (<= angle 3.5e+169)
(* t_0 (* 2.0 (fabs (sin (* PI (* angle -0.005555555555555556))))))
(* -0.011111111111111112 (* (- a b) (* a (* PI angle)))))))))
double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double tmp;
if (angle <= -2.7e-56) {
tmp = t_0 * (2.0 * sin((angle * (((double) M_PI) / -180.0))));
} else if (angle <= 1.3e+23) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
} else if (angle <= 3.5e+169) {
tmp = t_0 * (2.0 * fabs(sin((((double) M_PI) * (angle * -0.005555555555555556)))));
} else {
tmp = -0.011111111111111112 * ((a - b) * (a * (((double) M_PI) * angle)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (a - b) * (b + a);
double tmp;
if (angle <= -2.7e-56) {
tmp = t_0 * (2.0 * Math.sin((angle * (Math.PI / -180.0))));
} else if (angle <= 1.3e+23) {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
} else if (angle <= 3.5e+169) {
tmp = t_0 * (2.0 * Math.abs(Math.sin((Math.PI * (angle * -0.005555555555555556)))));
} else {
tmp = -0.011111111111111112 * ((a - b) * (a * (Math.PI * angle)));
}
return tmp;
}
def code(a, b, angle): t_0 = (a - b) * (b + a) tmp = 0 if angle <= -2.7e-56: tmp = t_0 * (2.0 * math.sin((angle * (math.pi / -180.0)))) elif angle <= 1.3e+23: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) elif angle <= 3.5e+169: tmp = t_0 * (2.0 * math.fabs(math.sin((math.pi * (angle * -0.005555555555555556))))) else: tmp = -0.011111111111111112 * ((a - b) * (a * (math.pi * angle))) return tmp
function code(a, b, angle) t_0 = Float64(Float64(a - b) * Float64(b + a)) tmp = 0.0 if (angle <= -2.7e-56) tmp = Float64(t_0 * Float64(2.0 * sin(Float64(angle * Float64(pi / -180.0))))); elseif (angle <= 1.3e+23) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); elseif (angle <= 3.5e+169) tmp = Float64(t_0 * Float64(2.0 * abs(sin(Float64(pi * Float64(angle * -0.005555555555555556)))))); else tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(a * Float64(pi * angle)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (a - b) * (b + a); tmp = 0.0; if (angle <= -2.7e-56) tmp = t_0 * (2.0 * sin((angle * (pi / -180.0)))); elseif (angle <= 1.3e+23) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); elseif (angle <= 3.5e+169) tmp = t_0 * (2.0 * abs(sin((pi * (angle * -0.005555555555555556))))); else tmp = -0.011111111111111112 * ((a - b) * (a * (pi * angle))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, -2.7e-56], N[(t$95$0 * N[(2.0 * N[Sin[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 1.3e+23], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 3.5e+169], N[(t$95$0 * N[(2.0 * N[Abs[N[Sin[N[(Pi * N[(angle * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(a - b\right) \cdot \left(b + a\right)\\
\mathbf{if}\;angle \leq -2.7 \cdot 10^{-56}:\\
\;\;\;\;t_0 \cdot \left(2 \cdot \sin \left(angle \cdot \frac{\pi}{-180}\right)\right)\\
\mathbf{elif}\;angle \leq 1.3 \cdot 10^{+23}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{elif}\;angle \leq 3.5 \cdot 10^{+169}:\\
\;\;\;\;t_0 \cdot \left(2 \cdot \left|\sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right)\right|\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if angle < -2.69999999999999995e-56Initial program 36.2%
Simplified34.1%
unpow234.1%
unpow234.1%
difference-of-squares34.1%
Applied egg-rr34.1%
Taylor expanded in angle around 0 41.5%
if -2.69999999999999995e-56 < angle < 1.29999999999999996e23Initial program 75.4%
Simplified75.3%
unpow275.3%
unpow275.3%
difference-of-squares80.1%
Applied egg-rr80.1%
add-cbrt-cube80.6%
pow380.6%
Applied egg-rr80.6%
Taylor expanded in angle around 0 79.1%
associate-*r*79.0%
associate-*r*95.4%
*-commutative95.4%
*-commutative95.4%
Simplified95.4%
if 1.29999999999999996e23 < angle < 3.50000000000000019e169Initial program 25.9%
Simplified32.2%
unpow232.2%
unpow232.2%
difference-of-squares32.3%
Applied egg-rr32.3%
add-cbrt-cube37.3%
pow337.3%
Applied egg-rr37.3%
Taylor expanded in angle around 0 38.3%
rem-cbrt-cube32.0%
add-sqr-sqrt16.8%
sqrt-unprod37.9%
pow237.9%
rem-cbrt-cube37.8%
rem-cbrt-cube37.9%
div-inv37.9%
metadata-eval37.9%
Applied egg-rr37.9%
unpow237.9%
rem-sqrt-square37.9%
associate-*r*37.9%
*-commutative37.9%
associate-*r*37.9%
*-commutative37.9%
*-commutative37.9%
Simplified37.9%
if 3.50000000000000019e169 < angle Initial program 18.3%
Simplified28.9%
unpow228.9%
unpow228.9%
difference-of-squares33.1%
Applied egg-rr33.1%
add-cbrt-cube30.9%
pow330.9%
Applied egg-rr30.9%
Taylor expanded in angle around 0 31.3%
associate-*r*31.3%
associate-*r*31.3%
*-commutative31.3%
*-commutative31.3%
Simplified31.3%
Taylor expanded in a around inf 27.1%
Final simplification67.3%
(FPCore (a b angle) :precision binary64 (if (<= (pow b 2.0) 5e-67) (* (* (- a b) (+ b a)) (* 2.0 (sin (* (* PI angle) -0.005555555555555556)))) (* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle))))))
double code(double a, double b, double angle) {
double tmp;
if (pow(b, 2.0) <= 5e-67) {
tmp = ((a - b) * (b + a)) * (2.0 * sin(((((double) M_PI) * angle) * -0.005555555555555556)));
} else {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.pow(b, 2.0) <= 5e-67) {
tmp = ((a - b) * (b + a)) * (2.0 * Math.sin(((Math.PI * angle) * -0.005555555555555556)));
} else {
tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if math.pow(b, 2.0) <= 5e-67: tmp = ((a - b) * (b + a)) * (2.0 * math.sin(((math.pi * angle) * -0.005555555555555556))) else: tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) return tmp
function code(a, b, angle) tmp = 0.0 if ((b ^ 2.0) <= 5e-67) tmp = Float64(Float64(Float64(a - b) * Float64(b + a)) * Float64(2.0 * sin(Float64(Float64(pi * angle) * -0.005555555555555556)))); else tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((b ^ 2.0) <= 5e-67) tmp = ((a - b) * (b + a)) * (2.0 * sin(((pi * angle) * -0.005555555555555556))); else tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e-67], N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{-67}:\\
\;\;\;\;\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b 2) < 4.9999999999999999e-67Initial program 62.6%
Simplified62.9%
unpow262.9%
unpow262.9%
difference-of-squares62.9%
Applied egg-rr62.9%
add-cbrt-cube64.5%
pow364.5%
Applied egg-rr64.5%
Taylor expanded in angle around 0 62.4%
Taylor expanded in angle around inf 64.7%
associate-*r*64.7%
*-commutative64.7%
+-commutative64.7%
Simplified64.7%
if 4.9999999999999999e-67 < (pow.f64 b 2) Initial program 45.7%
Simplified47.6%
unpow247.6%
unpow247.6%
difference-of-squares52.8%
Applied egg-rr52.8%
add-cbrt-cube55.2%
pow355.2%
Applied egg-rr55.2%
Taylor expanded in angle around 0 50.2%
associate-*r*50.1%
associate-*r*64.0%
*-commutative64.0%
*-commutative64.0%
Simplified64.0%
Final simplification64.3%
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle)))))) (if (<= angle -6e+31) (fabs t_0) t_0)))
double code(double a, double b, double angle) {
double t_0 = -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
double tmp;
if (angle <= -6e+31) {
tmp = fabs(t_0);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
double tmp;
if (angle <= -6e+31) {
tmp = Math.abs(t_0);
} else {
tmp = t_0;
}
return tmp;
}
def code(a, b, angle): t_0 = -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle))) tmp = 0 if angle <= -6e+31: tmp = math.fabs(t_0) else: tmp = t_0 return tmp
function code(a, b, angle) t_0 = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))) tmp = 0.0 if (angle <= -6e+31) tmp = abs(t_0); else tmp = t_0; end return tmp end
function tmp_2 = code(a, b, angle) t_0 = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); tmp = 0.0; if (angle <= -6e+31) tmp = abs(t_0); else tmp = t_0; end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, -6e+31], N[Abs[t$95$0], $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{if}\;angle \leq -6 \cdot 10^{+31}:\\
\;\;\;\;\left|t_0\right|\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if angle < -5.99999999999999978e31Initial program 29.1%
Simplified26.6%
unpow226.6%
unpow226.6%
difference-of-squares26.6%
Applied egg-rr26.6%
Taylor expanded in angle around 0 22.6%
add-sqr-sqrt14.0%
sqrt-unprod29.3%
pow229.3%
*-commutative29.3%
associate-*r*29.3%
Applied egg-rr29.3%
unpow229.3%
rem-sqrt-square29.5%
*-commutative29.5%
associate-*r*26.4%
*-commutative26.4%
*-commutative26.4%
Simplified26.4%
if -5.99999999999999978e31 < angle Initial program 61.1%
Simplified63.4%
unpow263.4%
unpow263.4%
difference-of-squares67.1%
Applied egg-rr67.1%
add-cbrt-cube68.0%
pow368.0%
Applied egg-rr68.0%
Taylor expanded in angle around 0 65.1%
associate-*r*65.0%
associate-*r*75.1%
*-commutative75.1%
*-commutative75.1%
Simplified75.1%
Final simplification63.3%
(FPCore (a b angle) :precision binary64 (if (<= b 1.05e+129) (* -0.011111111111111112 (* angle (* PI (* (- a b) (+ b a))))) (* -0.011111111111111112 (* (- a b) (* angle (* b PI))))))
double code(double a, double b, double angle) {
double tmp;
if (b <= 1.05e+129) {
tmp = -0.011111111111111112 * (angle * (((double) M_PI) * ((a - b) * (b + a))));
} else {
tmp = -0.011111111111111112 * ((a - b) * (angle * (b * ((double) M_PI))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (b <= 1.05e+129) {
tmp = -0.011111111111111112 * (angle * (Math.PI * ((a - b) * (b + a))));
} else {
tmp = -0.011111111111111112 * ((a - b) * (angle * (b * Math.PI)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if b <= 1.05e+129: tmp = -0.011111111111111112 * (angle * (math.pi * ((a - b) * (b + a)))) else: tmp = -0.011111111111111112 * ((a - b) * (angle * (b * math.pi))) return tmp
function code(a, b, angle) tmp = 0.0 if (b <= 1.05e+129) tmp = Float64(-0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(a - b) * Float64(b + a))))); else tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(angle * Float64(b * pi)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (b <= 1.05e+129) tmp = -0.011111111111111112 * (angle * (pi * ((a - b) * (b + a)))); else tmp = -0.011111111111111112 * ((a - b) * (angle * (b * pi))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[b, 1.05e+129], N[(-0.011111111111111112 * N[(angle * N[(Pi * N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(angle * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.05 \cdot 10^{+129}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.04999999999999998e129Initial program 57.9%
Simplified58.3%
unpow258.3%
unpow258.3%
difference-of-squares59.3%
Applied egg-rr59.3%
Taylor expanded in angle around 0 55.2%
if 1.04999999999999998e129 < b Initial program 28.7%
Simplified33.7%
unpow233.7%
unpow233.7%
difference-of-squares46.6%
Applied egg-rr46.6%
add-cbrt-cube59.5%
pow359.5%
Applied egg-rr59.5%
Taylor expanded in angle around 0 52.5%
associate-*r*52.5%
associate-*r*64.2%
*-commutative64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in a around 0 59.2%
Final simplification55.8%
(FPCore (a b angle) :precision binary64 (if (<= a 6.5e+37) (* -0.011111111111111112 (* (- a b) (* angle (* b PI)))) (* -0.011111111111111112 (* (- a b) (* a (* PI angle))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 6.5e+37) {
tmp = -0.011111111111111112 * ((a - b) * (angle * (b * ((double) M_PI))));
} else {
tmp = -0.011111111111111112 * ((a - b) * (a * (((double) M_PI) * angle)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 6.5e+37) {
tmp = -0.011111111111111112 * ((a - b) * (angle * (b * Math.PI)));
} else {
tmp = -0.011111111111111112 * ((a - b) * (a * (Math.PI * angle)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 6.5e+37: tmp = -0.011111111111111112 * ((a - b) * (angle * (b * math.pi))) else: tmp = -0.011111111111111112 * ((a - b) * (a * (math.pi * angle))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 6.5e+37) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(angle * Float64(b * pi)))); else tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(a * Float64(pi * angle)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 6.5e+37) tmp = -0.011111111111111112 * ((a - b) * (angle * (b * pi))); else tmp = -0.011111111111111112 * ((a - b) * (a * (pi * angle))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 6.5e+37], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(angle * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.5 \cdot 10^{+37}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 6.4999999999999998e37Initial program 53.8%
Simplified55.4%
unpow255.4%
unpow255.4%
difference-of-squares56.1%
Applied egg-rr56.1%
add-cbrt-cube57.4%
pow357.4%
Applied egg-rr57.4%
Taylor expanded in angle around 0 53.9%
associate-*r*53.9%
associate-*r*60.9%
*-commutative60.9%
*-commutative60.9%
Simplified60.9%
Taylor expanded in a around 0 43.9%
if 6.4999999999999998e37 < a Initial program 51.5%
Simplified51.1%
unpow251.1%
unpow251.1%
difference-of-squares61.8%
Applied egg-rr61.8%
add-cbrt-cube66.1%
pow366.1%
Applied egg-rr66.1%
Taylor expanded in angle around 0 57.7%
associate-*r*57.6%
associate-*r*64.3%
*-commutative64.3%
*-commutative64.3%
Simplified64.3%
Taylor expanded in a around inf 58.0%
Final simplification47.0%
(FPCore (a b angle) :precision binary64 (if (<= a 2e+47) (* -0.011111111111111112 (* (- a b) (* angle (* b PI)))) (* -0.011111111111111112 (* (- a b) (* angle (* a PI))))))
double code(double a, double b, double angle) {
double tmp;
if (a <= 2e+47) {
tmp = -0.011111111111111112 * ((a - b) * (angle * (b * ((double) M_PI))));
} else {
tmp = -0.011111111111111112 * ((a - b) * (angle * (a * ((double) M_PI))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 2e+47) {
tmp = -0.011111111111111112 * ((a - b) * (angle * (b * Math.PI)));
} else {
tmp = -0.011111111111111112 * ((a - b) * (angle * (a * Math.PI)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 2e+47: tmp = -0.011111111111111112 * ((a - b) * (angle * (b * math.pi))) else: tmp = -0.011111111111111112 * ((a - b) * (angle * (a * math.pi))) return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 2e+47) tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(angle * Float64(b * pi)))); else tmp = Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(angle * Float64(a * pi)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 2e+47) tmp = -0.011111111111111112 * ((a - b) * (angle * (b * pi))); else tmp = -0.011111111111111112 * ((a - b) * (angle * (a * pi))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 2e+47], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(angle * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(angle * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2 \cdot 10^{+47}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(angle \cdot \left(a \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.0000000000000001e47Initial program 53.6%
Simplified55.1%
unpow255.1%
unpow255.1%
difference-of-squares55.8%
Applied egg-rr55.8%
add-cbrt-cube57.2%
pow357.2%
Applied egg-rr57.2%
Taylor expanded in angle around 0 53.7%
associate-*r*53.6%
associate-*r*60.6%
*-commutative60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in a around 0 43.8%
if 2.0000000000000001e47 < a Initial program 52.4%
Simplified52.0%
unpow252.0%
unpow252.0%
difference-of-squares62.9%
Applied egg-rr62.9%
add-cbrt-cube67.0%
pow367.0%
Applied egg-rr67.0%
Taylor expanded in angle around 0 58.7%
associate-*r*58.7%
associate-*r*65.5%
*-commutative65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in a around inf 59.0%
*-commutative59.0%
associate-*l*59.1%
Simplified59.1%
Final simplification47.0%
(FPCore (a b angle) :precision binary64 (* -0.011111111111111112 (* (- a b) (* (+ b a) (* PI angle)))))
double code(double a, double b, double angle) {
return -0.011111111111111112 * ((a - b) * ((b + a) * (((double) M_PI) * angle)));
}
public static double code(double a, double b, double angle) {
return -0.011111111111111112 * ((a - b) * ((b + a) * (Math.PI * angle)));
}
def code(a, b, angle): return -0.011111111111111112 * ((a - b) * ((b + a) * (math.pi * angle)))
function code(a, b, angle) return Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(Float64(b + a) * Float64(pi * angle)))) end
function tmp = code(a, b, angle) tmp = -0.011111111111111112 * ((a - b) * ((b + a) * (pi * angle))); end
code[a_, b_, angle_] := N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot angle\right)\right)\right)
\end{array}
Initial program 53.3%
Simplified54.5%
unpow254.5%
unpow254.5%
difference-of-squares57.3%
Applied egg-rr57.3%
add-cbrt-cube59.3%
pow359.3%
Applied egg-rr59.3%
Taylor expanded in angle around 0 54.8%
associate-*r*54.7%
associate-*r*61.6%
*-commutative61.6%
*-commutative61.6%
Simplified61.6%
Final simplification61.6%
(FPCore (a b angle) :precision binary64 (* -0.011111111111111112 (* (- a b) (* a (* PI angle)))))
double code(double a, double b, double angle) {
return -0.011111111111111112 * ((a - b) * (a * (((double) M_PI) * angle)));
}
public static double code(double a, double b, double angle) {
return -0.011111111111111112 * ((a - b) * (a * (Math.PI * angle)));
}
def code(a, b, angle): return -0.011111111111111112 * ((a - b) * (a * (math.pi * angle)))
function code(a, b, angle) return Float64(-0.011111111111111112 * Float64(Float64(a - b) * Float64(a * Float64(pi * angle)))) end
function tmp = code(a, b, angle) tmp = -0.011111111111111112 * ((a - b) * (a * (pi * angle))); end
code[a_, b_, angle_] := N[(-0.011111111111111112 * N[(N[(a - b), $MachinePrecision] * N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.011111111111111112 \cdot \left(\left(a - b\right) \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)
\end{array}
Initial program 53.3%
Simplified54.5%
unpow254.5%
unpow254.5%
difference-of-squares57.3%
Applied egg-rr57.3%
add-cbrt-cube59.3%
pow359.3%
Applied egg-rr59.3%
Taylor expanded in angle around 0 54.8%
associate-*r*54.7%
associate-*r*61.6%
*-commutative61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in a around inf 40.5%
Final simplification40.5%
herbie shell --seed 2023299
(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)))))