
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (sin t_0))
(t_2 (cos t_0))
(t_3 (* t_2 t_1)))
(if (<= b_m 2.05e+153)
(+
(* 2.0 (* (pow b_m 2.0) t_3))
(* a (+ (* -2.0 (* t_3 a)) (* 2.0 (* t_2 (* t_1 (- b_m b_m)))))))
(if (<= b_m 5.5e+256)
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))
(*
(* (+ b_m a) (- b_m a))
(*
2.0
(*
(sin (* (pow (sqrt PI) 2.0) (/ angle 180.0)))
(cos (* (/ angle 180.0) (* (cbrt PI) (pow (cbrt PI) 2.0)))))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = sin(t_0);
double t_2 = cos(t_0);
double t_3 = t_2 * t_1;
double tmp;
if (b_m <= 2.05e+153) {
tmp = (2.0 * (pow(b_m, 2.0) * t_3)) + (a * ((-2.0 * (t_3 * a)) + (2.0 * (t_2 * (t_1 * (b_m - b_m))))));
} else if (b_m <= 5.5e+256) {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
} else {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin((pow(sqrt(((double) M_PI)), 2.0) * (angle / 180.0))) * cos(((angle / 180.0) * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = 0.005555555555555556 * (angle * Math.PI);
double t_1 = Math.sin(t_0);
double t_2 = Math.cos(t_0);
double t_3 = t_2 * t_1;
double tmp;
if (b_m <= 2.05e+153) {
tmp = (2.0 * (Math.pow(b_m, 2.0) * t_3)) + (a * ((-2.0 * (t_3 * a)) + (2.0 * (t_2 * (t_1 * (b_m - b_m))))));
} else if (b_m <= 5.5e+256) {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
} else {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.sin((Math.pow(Math.sqrt(Math.PI), 2.0) * (angle / 180.0))) * Math.cos(((angle / 180.0) * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0))))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = sin(t_0) t_2 = cos(t_0) t_3 = Float64(t_2 * t_1) tmp = 0.0 if (b_m <= 2.05e+153) tmp = Float64(Float64(2.0 * Float64((b_m ^ 2.0) * t_3)) + Float64(a * Float64(Float64(-2.0 * Float64(t_3 * a)) + Float64(2.0 * Float64(t_2 * Float64(t_1 * Float64(b_m - b_m))))))); elseif (b_m <= 5.5e+256) tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); else tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(Float64((sqrt(pi) ^ 2.0) * Float64(angle / 180.0))) * cos(Float64(Float64(angle / 180.0) * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * t$95$1), $MachinePrecision]}, If[LessEqual[b$95$m, 2.05e+153], N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(-2.0 * N[(t$95$3 * a), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$2 * N[(t$95$1 * N[(b$95$m - b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.5e+256], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
t_3 := t\_2 \cdot t\_1\\
\mathbf{if}\;b\_m \leq 2.05 \cdot 10^{+153}:\\
\;\;\;\;2 \cdot \left({b\_m}^{2} \cdot t\_3\right) + a \cdot \left(-2 \cdot \left(t\_3 \cdot a\right) + 2 \cdot \left(t\_2 \cdot \left(t\_1 \cdot \left(b\_m - b\_m\right)\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+256}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin \left({\left(\sqrt{\pi}\right)}^{2} \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{angle}{180} \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.05000000000000008e153Initial program 54.2%
associate-*l*54.2%
*-commutative54.2%
associate-*l*54.2%
Simplified54.2%
unpow254.2%
unpow254.2%
difference-of-squares56.1%
Applied egg-rr56.1%
Taylor expanded in a around 0 61.8%
if 2.05000000000000008e153 < b < 5.4999999999999998e256Initial program 29.8%
associate-*l*29.8%
*-commutative29.8%
associate-*l*29.8%
Simplified29.8%
unpow229.8%
unpow229.8%
difference-of-squares50.6%
Applied egg-rr50.6%
add-cube-cbrt47.2%
pow247.2%
Applied egg-rr47.2%
Taylor expanded in b around inf 47.2%
mul-1-neg47.2%
unsub-neg47.2%
Simplified47.2%
Taylor expanded in angle around 0 54.1%
associate-*r*86.1%
associate-*r*86.1%
Simplified86.1%
if 5.4999999999999998e256 < b Initial program 50.0%
associate-*l*50.0%
*-commutative50.0%
associate-*l*50.0%
Simplified50.0%
unpow250.0%
unpow250.0%
difference-of-squares75.0%
Applied egg-rr75.0%
add-cube-cbrt87.5%
pow287.5%
Applied egg-rr87.5%
add-sqr-sqrt100.0%
pow2100.0%
Applied egg-rr100.0%
Final simplification65.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+296)
(*
(* (+ b_m a) (- b_m a))
(*
2.0
(*
(sin (* (/ angle 180.0) (cbrt (pow PI 3.0))))
(cos (* PI (/ angle 180.0))))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+296) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin(((angle / 180.0) * cbrt(pow(((double) M_PI), 3.0)))) * cos((((double) M_PI) * (angle / 180.0)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+296) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.sin(((angle / 180.0) * Math.cbrt(Math.pow(Math.PI, 3.0)))) * Math.cos((Math.PI * (angle / 180.0)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+296) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(Float64(Float64(angle / 180.0) * cbrt((pi ^ 3.0)))) * cos(Float64(pi * Float64(angle / 180.0)))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+296], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+296}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 1.99999999999999996e296Initial program 60.3%
associate-*l*60.3%
*-commutative60.3%
associate-*l*60.3%
Simplified60.3%
unpow260.3%
unpow260.3%
difference-of-squares60.4%
Applied egg-rr60.4%
add-cbrt-cube61.2%
pow361.2%
Applied egg-rr61.2%
if 1.99999999999999996e296 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.6%
associate-*l*33.6%
*-commutative33.6%
associate-*l*33.6%
Simplified33.6%
unpow233.6%
unpow233.6%
difference-of-squares51.3%
Applied egg-rr51.3%
add-cube-cbrt52.8%
pow252.8%
Applied egg-rr52.8%
Taylor expanded in b around inf 52.8%
mul-1-neg52.8%
unsub-neg52.8%
Simplified52.8%
Taylor expanded in angle around 0 57.1%
associate-*r*78.4%
associate-*r*78.4%
Simplified78.4%
Final simplification68.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* 0.005555555555555556 (* angle PI)))
(t_1 (cos t_0))
(t_2 (sin t_0)))
(if (<= b_m 1.9e+153)
(fma
a
(fma -2.0 (* t_2 (* t_1 a)) 0.0)
(* 2.0 (* (pow b_m 2.0) (* t_1 t_2))))
(if (<= b_m 2.55e+256)
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))
(*
(* (+ b_m a) (- b_m a))
(*
2.0
(*
(sin (* (pow (sqrt PI) 2.0) (/ angle 180.0)))
(cos (* (/ angle 180.0) (* (cbrt PI) (pow (cbrt PI) 2.0)))))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
double t_1 = cos(t_0);
double t_2 = sin(t_0);
double tmp;
if (b_m <= 1.9e+153) {
tmp = fma(a, fma(-2.0, (t_2 * (t_1 * a)), 0.0), (2.0 * (pow(b_m, 2.0) * (t_1 * t_2))));
} else if (b_m <= 2.55e+256) {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
} else {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin((pow(sqrt(((double) M_PI)), 2.0) * (angle / 180.0))) * cos(((angle / 180.0) * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(0.005555555555555556 * Float64(angle * pi)) t_1 = cos(t_0) t_2 = sin(t_0) tmp = 0.0 if (b_m <= 1.9e+153) tmp = fma(a, fma(-2.0, Float64(t_2 * Float64(t_1 * a)), 0.0), Float64(2.0 * Float64((b_m ^ 2.0) * Float64(t_1 * t_2)))); elseif (b_m <= 2.55e+256) tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); else tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(Float64((sqrt(pi) ^ 2.0) * Float64(angle / 180.0))) * cos(Float64(Float64(angle / 180.0) * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.9e+153], N[(a * N[(-2.0 * N[(t$95$2 * N[(t$95$1 * a), $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision] + N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.55e+256], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 1.9 \cdot 10^{+153}:\\
\;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(-2, t\_2 \cdot \left(t\_1 \cdot a\right), 0\right), 2 \cdot \left({b\_m}^{2} \cdot \left(t\_1 \cdot t\_2\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 2.55 \cdot 10^{+256}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin \left({\left(\sqrt{\pi}\right)}^{2} \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{angle}{180} \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.89999999999999983e153Initial program 54.2%
associate-*l*54.2%
*-commutative54.2%
associate-*l*54.2%
Simplified54.2%
unpow254.2%
unpow254.2%
difference-of-squares56.1%
Applied egg-rr56.1%
add-cbrt-cube61.2%
pow361.2%
Applied egg-rr61.2%
Taylor expanded in a around 0 61.8%
+-commutative61.8%
fma-define61.8%
Simplified61.8%
if 1.89999999999999983e153 < b < 2.55e256Initial program 29.8%
associate-*l*29.8%
*-commutative29.8%
associate-*l*29.8%
Simplified29.8%
unpow229.8%
unpow229.8%
difference-of-squares50.6%
Applied egg-rr50.6%
add-cube-cbrt47.2%
pow247.2%
Applied egg-rr47.2%
Taylor expanded in b around inf 47.2%
mul-1-neg47.2%
unsub-neg47.2%
Simplified47.2%
Taylor expanded in angle around 0 54.1%
associate-*r*86.1%
associate-*r*86.1%
Simplified86.1%
if 2.55e256 < b Initial program 50.0%
associate-*l*50.0%
*-commutative50.0%
associate-*l*50.0%
Simplified50.0%
unpow250.0%
unpow250.0%
difference-of-squares75.0%
Applied egg-rr75.0%
add-cube-cbrt87.5%
pow287.5%
Applied egg-rr87.5%
add-sqr-sqrt100.0%
pow2100.0%
Applied egg-rr100.0%
Final simplification65.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))) (t_1 (/ (* angle PI) 180.0)))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+303)
(* (* (+ b_m a) (- b_m a)) (* 2.0 (* (sin t_1) (cos t_1))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double t_1 = (angle * ((double) M_PI)) / 180.0;
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin(t_1) * cos(t_1)));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double t_1 = (angle * Math.PI) / 180.0;
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.sin(t_1) * Math.cos(t_1)));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) t_1 = (angle * math.pi) / 180.0 tmp = 0 if t_0 <= -math.inf: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) elif t_0 <= 2e+303: tmp = ((b_m + a) * (b_m - a)) * (2.0 * (math.sin(t_1) * math.cos(t_1))) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) t_1 = Float64(Float64(angle * pi) / 180.0) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+303) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(t_1) * cos(t_1)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); t_1 = (angle * pi) / 180.0; tmp = 0.0; if (t_0 <= -Inf) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); elseif (t_0 <= 2e+303) tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin(t_1) * cos(t_1))); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle * Pi), $MachinePrecision] / 180.0), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[t$95$1], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := \frac{angle \cdot \pi}{180}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin t\_1 \cdot \cos t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303Initial program 60.0%
associate-*l*60.0%
*-commutative60.0%
associate-*l*60.0%
Simplified60.0%
unpow260.0%
unpow260.0%
difference-of-squares60.0%
Applied egg-rr60.0%
add-cube-cbrt59.9%
pow259.9%
Applied egg-rr59.9%
unpow259.9%
add-cube-cbrt60.0%
associate-*r/60.2%
Applied egg-rr60.2%
associate-*r/60.6%
Applied egg-rr60.6%
if 2e303 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.9%
associate-*l*33.9%
*-commutative33.9%
associate-*l*33.9%
Simplified33.9%
unpow233.9%
unpow233.9%
difference-of-squares51.9%
Applied egg-rr51.9%
add-cube-cbrt53.3%
pow253.3%
Applied egg-rr53.3%
Taylor expanded in b around inf 53.3%
mul-1-neg53.3%
unsub-neg53.3%
Simplified53.3%
Taylor expanded in angle around 0 57.7%
associate-*r*79.3%
associate-*r*79.3%
Simplified79.3%
Final simplification68.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+296)
(*
(* (+ b_m a) (- b_m a))
(*
2.0
(*
(cos (/ (* angle PI) 180.0))
(sin (* PI (* 0.005555555555555556 angle))))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+296) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos(((angle * ((double) M_PI)) / 180.0)) * sin((((double) M_PI) * (0.005555555555555556 * angle)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+296) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.cos(((angle * Math.PI) / 180.0)) * Math.sin((Math.PI * (0.005555555555555556 * angle)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) tmp = 0 if t_0 <= -math.inf: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) elif t_0 <= 2e+296: tmp = ((b_m + a) * (b_m - a)) * (2.0 * (math.cos(((angle * math.pi) / 180.0)) * math.sin((math.pi * (0.005555555555555556 * angle))))) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+296) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(cos(Float64(Float64(angle * pi) / 180.0)) * sin(Float64(pi * Float64(0.005555555555555556 * angle)))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); tmp = 0.0; if (t_0 <= -Inf) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); elseif (t_0 <= 2e+296) tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos(((angle * pi) / 180.0)) * sin((pi * (0.005555555555555556 * angle))))); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+296], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+296}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\cos \left(\frac{angle \cdot \pi}{180}\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 1.99999999999999996e296Initial program 60.3%
associate-*l*60.3%
*-commutative60.3%
associate-*l*60.3%
Simplified60.3%
unpow260.3%
unpow260.3%
difference-of-squares60.4%
Applied egg-rr60.4%
add-cube-cbrt60.2%
pow260.2%
Applied egg-rr60.2%
unpow260.2%
add-cube-cbrt60.4%
associate-*r/60.6%
Applied egg-rr60.6%
Taylor expanded in angle around inf 60.3%
associate-*r*60.9%
*-commutative60.9%
Simplified60.9%
if 1.99999999999999996e296 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.6%
associate-*l*33.6%
*-commutative33.6%
associate-*l*33.6%
Simplified33.6%
unpow233.6%
unpow233.6%
difference-of-squares51.3%
Applied egg-rr51.3%
add-cube-cbrt52.8%
pow252.8%
Applied egg-rr52.8%
Taylor expanded in b around inf 52.8%
mul-1-neg52.8%
unsub-neg52.8%
Simplified52.8%
Taylor expanded in angle around 0 57.1%
associate-*r*78.4%
associate-*r*78.4%
Simplified78.4%
Final simplification68.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+303)
(*
(* (+ b_m a) (- b_m a))
(*
2.0
(*
(cos (* PI (/ angle 180.0)))
(sin (* PI (* 0.005555555555555556 angle))))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos((((double) M_PI) * (angle / 180.0))) * sin((((double) M_PI) * (0.005555555555555556 * angle)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.cos((Math.PI * (angle / 180.0))) * Math.sin((Math.PI * (0.005555555555555556 * angle)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) tmp = 0 if t_0 <= -math.inf: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) elif t_0 <= 2e+303: tmp = ((b_m + a) * (b_m - a)) * (2.0 * (math.cos((math.pi * (angle / 180.0))) * math.sin((math.pi * (0.005555555555555556 * angle))))) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+303) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(cos(Float64(pi * Float64(angle / 180.0))) * sin(Float64(pi * Float64(0.005555555555555556 * angle)))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); tmp = 0.0; if (t_0 <= -Inf) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); elseif (t_0 <= 2e+303) tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos((pi * (angle / 180.0))) * sin((pi * (0.005555555555555556 * angle))))); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303Initial program 60.0%
associate-*l*60.0%
*-commutative60.0%
associate-*l*60.0%
Simplified60.0%
unpow260.0%
unpow260.0%
difference-of-squares60.0%
Applied egg-rr60.0%
Taylor expanded in angle around inf 60.0%
associate-*r*60.5%
*-commutative60.5%
Simplified60.5%
if 2e303 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.9%
associate-*l*33.9%
*-commutative33.9%
associate-*l*33.9%
Simplified33.9%
unpow233.9%
unpow233.9%
difference-of-squares51.9%
Applied egg-rr51.9%
add-cube-cbrt53.3%
pow253.3%
Applied egg-rr53.3%
Taylor expanded in b around inf 53.3%
mul-1-neg53.3%
unsub-neg53.3%
Simplified53.3%
Taylor expanded in angle around 0 57.7%
associate-*r*79.3%
associate-*r*79.3%
Simplified79.3%
Final simplification68.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+296)
(*
(* (+ b_m a) (- b_m a))
(* 2.0 (* (cos (/ (* angle PI) 180.0)) (sin (* PI (/ angle 180.0))))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+296) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos(((angle * ((double) M_PI)) / 180.0)) * sin((((double) M_PI) * (angle / 180.0)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+296) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.cos(((angle * Math.PI) / 180.0)) * Math.sin((Math.PI * (angle / 180.0)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) tmp = 0 if t_0 <= -math.inf: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) elif t_0 <= 2e+296: tmp = ((b_m + a) * (b_m - a)) * (2.0 * (math.cos(((angle * math.pi) / 180.0)) * math.sin((math.pi * (angle / 180.0))))) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+296) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(cos(Float64(Float64(angle * pi) / 180.0)) * sin(Float64(pi * Float64(angle / 180.0)))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); tmp = 0.0; if (t_0 <= -Inf) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); elseif (t_0 <= 2e+296) tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos(((angle * pi) / 180.0)) * sin((pi * (angle / 180.0))))); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+296], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+296}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\cos \left(\frac{angle \cdot \pi}{180}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 1.99999999999999996e296Initial program 60.3%
associate-*l*60.3%
*-commutative60.3%
associate-*l*60.3%
Simplified60.3%
unpow260.3%
unpow260.3%
difference-of-squares60.4%
Applied egg-rr60.4%
add-cube-cbrt60.2%
pow260.2%
Applied egg-rr60.2%
unpow260.2%
add-cube-cbrt60.4%
associate-*r/60.6%
Applied egg-rr60.6%
if 1.99999999999999996e296 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.6%
associate-*l*33.6%
*-commutative33.6%
associate-*l*33.6%
Simplified33.6%
unpow233.6%
unpow233.6%
difference-of-squares51.3%
Applied egg-rr51.3%
add-cube-cbrt52.8%
pow252.8%
Applied egg-rr52.8%
Taylor expanded in b around inf 52.8%
mul-1-neg52.8%
unsub-neg52.8%
Simplified52.8%
Taylor expanded in angle around 0 57.1%
associate-*r*78.4%
associate-*r*78.4%
Simplified78.4%
Final simplification68.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+303)
(*
(* (+ b_m a) (- b_m a))
(*
2.0
(*
(sin (* PI (/ angle 180.0)))
(cos (* PI (* 0.005555555555555556 angle))))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin((((double) M_PI) * (angle / 180.0))) * cos((((double) M_PI) * (0.005555555555555556 * angle)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.sin((Math.PI * (angle / 180.0))) * Math.cos((Math.PI * (0.005555555555555556 * angle)))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) tmp = 0 if t_0 <= -math.inf: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) elif t_0 <= 2e+303: tmp = ((b_m + a) * (b_m - a)) * (2.0 * (math.sin((math.pi * (angle / 180.0))) * math.cos((math.pi * (0.005555555555555556 * angle))))) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+303) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(Float64(pi * Float64(angle / 180.0))) * cos(Float64(pi * Float64(0.005555555555555556 * angle)))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); tmp = 0.0; if (t_0 <= -Inf) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); elseif (t_0 <= 2e+303) tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin((pi * (angle / 180.0))) * cos((pi * (0.005555555555555556 * angle))))); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303Initial program 60.0%
associate-*l*60.0%
*-commutative60.0%
associate-*l*60.0%
Simplified60.0%
unpow260.0%
unpow260.0%
difference-of-squares60.0%
Applied egg-rr60.0%
Taylor expanded in angle around inf 60.2%
associate-*r*60.2%
*-commutative60.2%
Simplified60.2%
if 2e303 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.9%
associate-*l*33.9%
*-commutative33.9%
associate-*l*33.9%
Simplified33.9%
unpow233.9%
unpow233.9%
difference-of-squares51.9%
Applied egg-rr51.9%
add-cube-cbrt53.3%
pow253.3%
Applied egg-rr53.3%
Taylor expanded in b around inf 53.3%
mul-1-neg53.3%
unsub-neg53.3%
Simplified53.3%
Taylor expanded in angle around 0 57.7%
associate-*r*79.3%
associate-*r*79.3%
Simplified79.3%
Final simplification68.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+303)
(*
(cos (* PI (* 0.005555555555555556 angle)))
(* (sin (* PI (/ angle 180.0))) (* 2.0 (* (+ b_m a) (- b_m a)))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = cos((((double) M_PI) * (0.005555555555555556 * angle))) * (sin((((double) M_PI) * (angle / 180.0))) * (2.0 * ((b_m + a) * (b_m - a))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = Math.cos((Math.PI * (0.005555555555555556 * angle))) * (Math.sin((Math.PI * (angle / 180.0))) * (2.0 * ((b_m + a) * (b_m - a))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) tmp = 0 if t_0 <= -math.inf: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) elif t_0 <= 2e+303: tmp = math.cos((math.pi * (0.005555555555555556 * angle))) * (math.sin((math.pi * (angle / 180.0))) * (2.0 * ((b_m + a) * (b_m - a)))) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+303) tmp = Float64(cos(Float64(pi * Float64(0.005555555555555556 * angle))) * Float64(sin(Float64(pi * Float64(angle / 180.0))) * Float64(2.0 * Float64(Float64(b_m + a) * Float64(b_m - a))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); tmp = 0.0; if (t_0 <= -Inf) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); elseif (t_0 <= 2e+303) tmp = cos((pi * (0.005555555555555556 * angle))) * (sin((pi * (angle / 180.0))) * (2.0 * ((b_m + a) * (b_m - a)))); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303Initial program 60.0%
Taylor expanded in angle around inf 60.2%
associate-*r*60.2%
*-commutative60.2%
Simplified60.2%
unpow260.0%
unpow260.0%
difference-of-squares60.0%
Applied egg-rr60.2%
if 2e303 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.9%
associate-*l*33.9%
*-commutative33.9%
associate-*l*33.9%
Simplified33.9%
unpow233.9%
unpow233.9%
difference-of-squares51.9%
Applied egg-rr51.9%
add-cube-cbrt53.3%
pow253.3%
Applied egg-rr53.3%
Taylor expanded in b around inf 53.3%
mul-1-neg53.3%
unsub-neg53.3%
Simplified53.3%
Taylor expanded in angle around 0 57.7%
associate-*r*79.3%
associate-*r*79.3%
Simplified79.3%
Final simplification68.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))) (t_1 (* PI (/ angle 180.0))))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+303)
(* (cos t_1) (* (sin t_1) (* 2.0 (* (+ b_m a) (- b_m a)))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double t_1 = ((double) M_PI) * (angle / 180.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = cos(t_1) * (sin(t_1) * (2.0 * ((b_m + a) * (b_m - a))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double t_1 = Math.PI * (angle / 180.0);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = Math.cos(t_1) * (Math.sin(t_1) * (2.0 * ((b_m + a) * (b_m - a))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) t_1 = math.pi * (angle / 180.0) tmp = 0 if t_0 <= -math.inf: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) elif t_0 <= 2e+303: tmp = math.cos(t_1) * (math.sin(t_1) * (2.0 * ((b_m + a) * (b_m - a)))) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) t_1 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+303) tmp = Float64(cos(t_1) * Float64(sin(t_1) * Float64(2.0 * Float64(Float64(b_m + a) * Float64(b_m - a))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); t_1 = pi * (angle / 180.0); tmp = 0.0; if (t_0 <= -Inf) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); elseif (t_0 <= 2e+303) tmp = cos(t_1) * (sin(t_1) * (2.0 * ((b_m + a) * (b_m - a)))); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] * N[(2.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303Initial program 60.0%
unpow260.0%
unpow260.0%
difference-of-squares60.0%
Applied egg-rr60.0%
if 2e303 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.9%
associate-*l*33.9%
*-commutative33.9%
associate-*l*33.9%
Simplified33.9%
unpow233.9%
unpow233.9%
difference-of-squares51.9%
Applied egg-rr51.9%
add-cube-cbrt53.3%
pow253.3%
Applied egg-rr53.3%
Taylor expanded in b around inf 53.3%
mul-1-neg53.3%
unsub-neg53.3%
Simplified53.3%
Taylor expanded in angle around 0 57.7%
associate-*r*79.3%
associate-*r*79.3%
Simplified79.3%
Final simplification68.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0)))
(t_1 (* 0.005555555555555556 (* angle PI))))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+303)
(* 2.0 (* (cos t_1) (* (sin t_1) (* (+ b_m a) (- b_m a)))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = 2.0 * (cos(t_1) * (sin(t_1) * ((b_m + a) * (b_m - a))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double t_1 = 0.005555555555555556 * (angle * Math.PI);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = 2.0 * (Math.cos(t_1) * (Math.sin(t_1) * ((b_m + a) * (b_m - a))));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) t_1 = 0.005555555555555556 * (angle * math.pi) tmp = 0 if t_0 <= -math.inf: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) elif t_0 <= 2e+303: tmp = 2.0 * (math.cos(t_1) * (math.sin(t_1) * ((b_m + a) * (b_m - a)))) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) t_1 = Float64(0.005555555555555556 * Float64(angle * pi)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+303) tmp = Float64(2.0 * Float64(cos(t_1) * Float64(sin(t_1) * Float64(Float64(b_m + a) * Float64(b_m - a))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); t_1 = 0.005555555555555556 * (angle * pi); tmp = 0.0; if (t_0 <= -Inf) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); elseif (t_0 <= 2e+303) tmp = 2.0 * (cos(t_1) * (sin(t_1) * ((b_m + a) * (b_m - a)))); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(2.0 * N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \left(\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303Initial program 60.0%
associate-*l*60.0%
*-commutative60.0%
associate-*l*60.0%
Simplified60.0%
unpow260.0%
unpow260.0%
difference-of-squares60.0%
Applied egg-rr60.0%
Taylor expanded in angle around inf 59.9%
if 2e303 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.9%
associate-*l*33.9%
*-commutative33.9%
associate-*l*33.9%
Simplified33.9%
unpow233.9%
unpow233.9%
difference-of-squares51.9%
Applied egg-rr51.9%
add-cube-cbrt53.3%
pow253.3%
Applied egg-rr53.3%
Taylor expanded in b around inf 53.3%
mul-1-neg53.3%
unsub-neg53.3%
Simplified53.3%
Taylor expanded in angle around 0 57.7%
associate-*r*79.3%
associate-*r*79.3%
Simplified79.3%
Final simplification68.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
(if (<= t_0 (- INFINITY))
(* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
(if (<= t_0 2e+303)
(* (* (+ b_m a) (- b_m a)) (sin (* PI (* angle 0.011111111111111112))))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = ((b_m + a) * (b_m - a)) * sin((((double) M_PI) * (angle * 0.011111111111111112)));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
} else if (t_0 <= 2e+303) {
tmp = ((b_m + a) * (b_m - a)) * Math.sin((Math.PI * (angle * 0.011111111111111112)));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0) tmp = 0 if t_0 <= -math.inf: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) elif t_0 <= 2e+303: tmp = ((b_m + a) * (b_m - a)) * math.sin((math.pi * (angle * 0.011111111111111112))) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); elseif (t_0 <= 2e+303) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * sin(Float64(pi * Float64(angle * 0.011111111111111112)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (b_m ^ 2.0) - (a ^ 2.0); tmp = 0.0; if (t_0 <= -Inf) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); elseif (t_0 <= 2e+303) tmp = ((b_m + a) * (b_m - a)) * sin((pi * (angle * 0.011111111111111112))); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 50.0%
Taylor expanded in angle around 0 58.9%
unpow250.0%
unpow250.0%
difference-of-squares50.0%
Applied egg-rr58.9%
Taylor expanded in b around 0 58.9%
Taylor expanded in angle around 0 77.7%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303Initial program 60.0%
associate-*l*60.0%
*-commutative60.0%
associate-*l*60.0%
Simplified60.0%
unpow260.0%
unpow260.0%
difference-of-squares60.0%
Applied egg-rr60.0%
add-cube-cbrt59.9%
pow259.9%
Applied egg-rr59.9%
pow159.9%
unpow259.9%
add-cube-cbrt60.0%
2-sin60.1%
div-inv59.9%
metadata-eval59.9%
Applied egg-rr59.9%
unpow159.9%
count-259.9%
*-commutative59.9%
*-commutative59.9%
associate-*r*60.0%
*-commutative60.0%
*-commutative60.0%
associate-*r*59.9%
distribute-rgt-out59.9%
metadata-eval59.9%
*-commutative59.9%
associate-*r*59.9%
Simplified59.9%
if 2e303 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 33.9%
associate-*l*33.9%
*-commutative33.9%
associate-*l*33.9%
Simplified33.9%
unpow233.9%
unpow233.9%
difference-of-squares51.9%
Applied egg-rr51.9%
add-cube-cbrt53.3%
pow253.3%
Applied egg-rr53.3%
Taylor expanded in b around inf 53.3%
mul-1-neg53.3%
unsub-neg53.3%
Simplified53.3%
Taylor expanded in angle around 0 57.7%
associate-*r*79.3%
associate-*r*79.3%
Simplified79.3%
Final simplification68.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= b_m 2.25e+154)
(* (* (+ b_m a) (- b_m a)) (sin (* (* angle PI) 0.011111111111111112)))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 2.25e+154) {
tmp = ((b_m + a) * (b_m - a)) * sin(((angle * ((double) M_PI)) * 0.011111111111111112));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 2.25e+154) {
tmp = ((b_m + a) * (b_m - a)) * Math.sin(((angle * Math.PI) * 0.011111111111111112));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if b_m <= 2.25e+154: tmp = ((b_m + a) * (b_m - a)) * math.sin(((angle * math.pi) * 0.011111111111111112)) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 2.25e+154) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * sin(Float64(Float64(angle * pi) * 0.011111111111111112))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (b_m <= 2.25e+154) tmp = ((b_m + a) * (b_m - a)) * sin(((angle * pi) * 0.011111111111111112)); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 2.25e+154], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.25 \cdot 10^{+154}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.25000000000000005e154Initial program 54.2%
associate-*l*54.2%
*-commutative54.2%
associate-*l*54.2%
Simplified54.2%
unpow254.2%
unpow254.2%
difference-of-squares56.1%
Applied egg-rr56.1%
pow156.1%
2-sin56.1%
div-inv57.4%
metadata-eval57.4%
Applied egg-rr57.4%
unpow157.4%
count-257.4%
associate-*r*57.9%
*-commutative57.9%
associate-*r*58.8%
*-commutative58.8%
distribute-lft-out58.8%
metadata-eval58.8%
*-commutative58.8%
Simplified58.8%
if 2.25000000000000005e154 < b Initial program 34.2%
associate-*l*34.2%
*-commutative34.2%
associate-*l*34.2%
Simplified34.2%
unpow234.2%
unpow234.2%
difference-of-squares55.9%
Applied egg-rr55.9%
add-cube-cbrt55.9%
pow255.9%
Applied egg-rr55.9%
Taylor expanded in b around inf 55.9%
mul-1-neg55.9%
unsub-neg55.9%
Simplified55.9%
Taylor expanded in angle around 0 58.6%
associate-*r*83.7%
associate-*r*83.7%
Simplified83.7%
Final simplification62.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= b_m 5.2e+127)
(* (* (+ b_m a) (- b_m a)) (* PI (* angle 0.011111111111111112)))
(*
0.011111111111111112
(* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 5.2e+127) {
tmp = ((b_m + a) * (b_m - a)) * (((double) M_PI) * (angle * 0.011111111111111112));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 5.2e+127) {
tmp = ((b_m + a) * (b_m - a)) * (Math.PI * (angle * 0.011111111111111112));
} else {
tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if b_m <= 5.2e+127: tmp = ((b_m + a) * (b_m - a)) * (math.pi * (angle * 0.011111111111111112)) else: tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m)))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 5.2e+127) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(pi * Float64(angle * 0.011111111111111112))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (b_m <= 5.2e+127) tmp = ((b_m + a) * (b_m - a)) * (pi * (angle * 0.011111111111111112)); else tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 5.2e+127], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 5.2 \cdot 10^{+127}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\
\end{array}
\end{array}
if b < 5.2000000000000004e127Initial program 54.0%
associate-*l*54.0%
*-commutative54.0%
associate-*l*54.0%
Simplified54.0%
unpow254.0%
unpow254.0%
difference-of-squares55.9%
Applied egg-rr55.9%
add-cube-cbrt60.0%
pow260.0%
Applied egg-rr60.0%
Taylor expanded in angle around 0 55.3%
associate-*r*55.3%
Simplified55.3%
if 5.2000000000000004e127 < b Initial program 35.8%
associate-*l*35.8%
*-commutative35.8%
associate-*l*35.8%
Simplified35.8%
unpow235.8%
unpow235.8%
difference-of-squares57.0%
Applied egg-rr57.0%
add-cube-cbrt57.0%
pow257.0%
Applied egg-rr57.0%
Taylor expanded in b around inf 57.0%
mul-1-neg57.0%
unsub-neg57.0%
Simplified57.0%
Taylor expanded in angle around 0 59.7%
associate-*r*84.1%
associate-*r*84.1%
Simplified84.1%
Final simplification59.6%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= a 1.3e+154) (* (* (+ b_m a) (- b_m a)) (* PI (* angle 0.011111111111111112))) (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (a <= 1.3e+154) {
tmp = ((b_m + a) * (b_m - a)) * (((double) M_PI) * (angle * 0.011111111111111112));
} else {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (a <= 1.3e+154) {
tmp = ((b_m + a) * (b_m - a)) * (Math.PI * (angle * 0.011111111111111112));
} else {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if a <= 1.3e+154: tmp = ((b_m + a) * (b_m - a)) * (math.pi * (angle * 0.011111111111111112)) else: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (a <= 1.3e+154) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(pi * Float64(angle * 0.011111111111111112))); else tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (a <= 1.3e+154) tmp = ((b_m + a) * (b_m - a)) * (pi * (angle * 0.011111111111111112)); else tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[a, 1.3e+154], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.3 \cdot 10^{+154}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 1.29999999999999994e154Initial program 54.7%
associate-*l*54.7%
*-commutative54.7%
associate-*l*54.7%
Simplified54.7%
unpow254.7%
unpow254.7%
difference-of-squares57.0%
Applied egg-rr57.0%
add-cube-cbrt58.6%
pow258.6%
Applied egg-rr58.6%
Taylor expanded in angle around 0 54.6%
associate-*r*54.6%
Simplified54.6%
if 1.29999999999999994e154 < a Initial program 25.3%
Taylor expanded in angle around 0 46.0%
unpow225.3%
unpow225.3%
difference-of-squares49.4%
Applied egg-rr66.7%
Taylor expanded in b around 0 66.7%
Taylor expanded in angle around 0 86.1%
Final simplification58.2%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= a 1.46e+153) (* (* (+ b_m a) (- b_m a)) (* (* angle PI) 0.011111111111111112)) (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (a <= 1.46e+153) {
tmp = ((b_m + a) * (b_m - a)) * ((angle * ((double) M_PI)) * 0.011111111111111112);
} else {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (a <= 1.46e+153) {
tmp = ((b_m + a) * (b_m - a)) * ((angle * Math.PI) * 0.011111111111111112);
} else {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if a <= 1.46e+153: tmp = ((b_m + a) * (b_m - a)) * ((angle * math.pi) * 0.011111111111111112) else: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (a <= 1.46e+153) tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(Float64(angle * pi) * 0.011111111111111112)); else tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (a <= 1.46e+153) tmp = ((b_m + a) * (b_m - a)) * ((angle * pi) * 0.011111111111111112); else tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[a, 1.46e+153], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.46 \cdot 10^{+153}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 1.4600000000000001e153Initial program 54.7%
associate-*l*54.7%
*-commutative54.7%
associate-*l*54.7%
Simplified54.7%
unpow254.7%
unpow254.7%
difference-of-squares57.0%
Applied egg-rr57.0%
Taylor expanded in angle around 0 54.6%
if 1.4600000000000001e153 < a Initial program 25.3%
Taylor expanded in angle around 0 46.0%
unpow225.3%
unpow225.3%
difference-of-squares49.4%
Applied egg-rr66.7%
Taylor expanded in b around 0 66.7%
Taylor expanded in angle around 0 86.1%
Final simplification58.2%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= a 6e+153) (* 0.011111111111111112 (* angle (* PI (* (+ b_m a) (- b_m a))))) (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (a <= 6e+153) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b_m + a) * (b_m - a))));
} else {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (a <= 6e+153) {
tmp = 0.011111111111111112 * (angle * (Math.PI * ((b_m + a) * (b_m - a))));
} else {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if a <= 6e+153: tmp = 0.011111111111111112 * (angle * (math.pi * ((b_m + a) * (b_m - a)))) else: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (a <= 6e+153) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b_m + a) * Float64(b_m - a))))); else tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (a <= 6e+153) tmp = 0.011111111111111112 * (angle * (pi * ((b_m + a) * (b_m - a)))); else tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[a, 6e+153], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6 \cdot 10^{+153}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 6.00000000000000037e153Initial program 54.7%
Taylor expanded in angle around 0 51.8%
unpow254.7%
unpow254.7%
difference-of-squares57.0%
Applied egg-rr54.6%
if 6.00000000000000037e153 < a Initial program 25.3%
Taylor expanded in angle around 0 46.0%
unpow225.3%
unpow225.3%
difference-of-squares49.4%
Applied egg-rr66.7%
Taylor expanded in b around 0 66.7%
Taylor expanded in angle around 0 86.1%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= a 2.2e+23) (* 0.011111111111111112 (* angle (* PI (* b_m (- b_m a))))) (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (a <= 2.2e+23) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b_m * (b_m - a))));
} else {
tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (a <= 2.2e+23) {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b_m * (b_m - a))));
} else {
tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if a <= 2.2e+23: tmp = 0.011111111111111112 * (angle * (math.pi * (b_m * (b_m - a)))) else: tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a)))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (a <= 2.2e+23) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b_m * Float64(b_m - a))))); else tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (a <= 2.2e+23) tmp = 0.011111111111111112 * (angle * (pi * (b_m * (b_m - a)))); else tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[a, 2.2e+23], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.2 \cdot 10^{+23}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.20000000000000008e23Initial program 55.1%
Taylor expanded in angle around 0 53.4%
unpow255.1%
unpow255.1%
difference-of-squares57.7%
Applied egg-rr56.6%
Taylor expanded in b around inf 40.4%
if 2.20000000000000008e23 < a Initial program 38.5%
Taylor expanded in angle around 0 43.3%
unpow238.5%
unpow238.5%
difference-of-squares50.6%
Applied egg-rr53.7%
Taylor expanded in b around 0 50.8%
Taylor expanded in angle around 0 60.4%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= b_m 1.85e+151) (* 0.011111111111111112 (* (* PI (* a a)) (- angle))) (* 0.011111111111111112 (* a (* angle (* b_m PI))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 1.85e+151) {
tmp = 0.011111111111111112 * ((((double) M_PI) * (a * a)) * -angle);
} else {
tmp = 0.011111111111111112 * (a * (angle * (b_m * ((double) M_PI))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 1.85e+151) {
tmp = 0.011111111111111112 * ((Math.PI * (a * a)) * -angle);
} else {
tmp = 0.011111111111111112 * (a * (angle * (b_m * Math.PI)));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if b_m <= 1.85e+151: tmp = 0.011111111111111112 * ((math.pi * (a * a)) * -angle) else: tmp = 0.011111111111111112 * (a * (angle * (b_m * math.pi))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 1.85e+151) tmp = Float64(0.011111111111111112 * Float64(Float64(pi * Float64(a * a)) * Float64(-angle))); else tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(b_m * pi)))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (b_m <= 1.85e+151) tmp = 0.011111111111111112 * ((pi * (a * a)) * -angle); else tmp = 0.011111111111111112 * (a * (angle * (b_m * pi))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 1.85e+151], N[(0.011111111111111112 * N[(N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision] * (-angle)), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(angle * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.85 \cdot 10^{+151}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot \left(-angle\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(b\_m \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.8499999999999999e151Initial program 54.2%
Taylor expanded in angle around 0 54.0%
unpow254.2%
unpow254.2%
difference-of-squares56.1%
Applied egg-rr55.5%
Taylor expanded in b around 0 41.0%
Taylor expanded in b around 0 38.9%
neg-mul-138.9%
Simplified38.9%
if 1.8499999999999999e151 < b Initial program 34.2%
Taylor expanded in angle around 0 34.2%
unpow234.2%
unpow234.2%
difference-of-squares55.9%
Applied egg-rr58.6%
Taylor expanded in b around 0 23.5%
Taylor expanded in a around 0 20.8%
*-commutative20.8%
Simplified20.8%
Final simplification36.3%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= a 5e+184) (* 0.011111111111111112 (* a (* angle (* b_m PI)))) (* 0.011111111111111112 (* (* b_m PI) (* angle a)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (a <= 5e+184) {
tmp = 0.011111111111111112 * (a * (angle * (b_m * ((double) M_PI))));
} else {
tmp = 0.011111111111111112 * ((b_m * ((double) M_PI)) * (angle * a));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (a <= 5e+184) {
tmp = 0.011111111111111112 * (a * (angle * (b_m * Math.PI)));
} else {
tmp = 0.011111111111111112 * ((b_m * Math.PI) * (angle * a));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if a <= 5e+184: tmp = 0.011111111111111112 * (a * (angle * (b_m * math.pi))) else: tmp = 0.011111111111111112 * ((b_m * math.pi) * (angle * a)) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (a <= 5e+184) tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(b_m * pi)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * pi) * Float64(angle * a))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (a <= 5e+184) tmp = 0.011111111111111112 * (a * (angle * (b_m * pi))); else tmp = 0.011111111111111112 * ((b_m * pi) * (angle * a)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[a, 5e+184], N[(0.011111111111111112 * N[(a * N[(angle * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * Pi), $MachinePrecision] * N[(angle * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5 \cdot 10^{+184}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(b\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot \pi\right) \cdot \left(angle \cdot a\right)\right)\\
\end{array}
\end{array}
if a < 4.9999999999999999e184Initial program 53.3%
Taylor expanded in angle around 0 51.0%
unpow253.3%
unpow253.3%
difference-of-squares56.4%
Applied egg-rr53.7%
Taylor expanded in b around 0 34.9%
Taylor expanded in a around 0 18.5%
*-commutative18.5%
Simplified18.5%
if 4.9999999999999999e184 < a Initial program 31.2%
Taylor expanded in angle around 0 52.9%
unpow231.2%
unpow231.2%
difference-of-squares52.9%
Applied egg-rr79.0%
Taylor expanded in b around 0 74.6%
Taylor expanded in a around 0 32.3%
associate-*r*44.1%
*-commutative44.1%
Simplified44.1%
Final simplification20.8%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* 0.011111111111111112 (* a (* angle (* PI (- b_m a))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
}
b_m = math.fabs(b) def code(a, b_m, angle): return 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a))))
b_m = abs(b) function code(a, b_m, angle) return Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a))))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a)))); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)
\end{array}
Initial program 51.3%
Taylor expanded in angle around 0 51.1%
unpow251.3%
unpow251.3%
difference-of-squares56.1%
Applied egg-rr55.9%
Taylor expanded in b around 0 38.5%
Taylor expanded in angle around 0 41.8%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* 0.011111111111111112 (* a (* angle (* b_m PI)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return 0.011111111111111112 * (a * (angle * (b_m * ((double) M_PI))));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return 0.011111111111111112 * (a * (angle * (b_m * Math.PI)));
}
b_m = math.fabs(b) def code(a, b_m, angle): return 0.011111111111111112 * (a * (angle * (b_m * math.pi)))
b_m = abs(b) function code(a, b_m, angle) return Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(b_m * pi)))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = 0.011111111111111112 * (a * (angle * (b_m * pi))); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(0.011111111111111112 * N[(a * N[(angle * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(b\_m \cdot \pi\right)\right)\right)
\end{array}
Initial program 51.3%
Taylor expanded in angle around 0 51.1%
unpow251.3%
unpow251.3%
difference-of-squares56.1%
Applied egg-rr55.9%
Taylor expanded in b around 0 38.5%
Taylor expanded in a around 0 19.7%
*-commutative19.7%
Simplified19.7%
Final simplification19.7%
herbie shell --seed 2024191
(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)))))