
(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 11 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}
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (sin (* 0.005555555555555556 (* angle PI)))))
(if (<= a_m 3.3e-91)
(* t_0 (* 2.0 (* b b)))
(if (<= a_m 5.2e+153)
(*
(* (* t_0 (* a_m a_m)) (* 2.0 (fma b (/ b (* a_m a_m)) -1.0)))
(cos (* angle (* PI 0.005555555555555556))))
(if (<= a_m 3e+236)
(* a_m (* -0.011111111111111112 (* angle (* a_m PI))))
(*
angle
(*
(* (+ b a_m) (- b a_m))
(fma
-1.7146776406035666e-7
(* angle (* angle (* PI (* PI PI))))
(* PI 0.011111111111111112)))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (a_m <= 3.3e-91) {
tmp = t_0 * (2.0 * (b * b));
} else if (a_m <= 5.2e+153) {
tmp = ((t_0 * (a_m * a_m)) * (2.0 * fma(b, (b / (a_m * a_m)), -1.0))) * cos((angle * (((double) M_PI) * 0.005555555555555556)));
} else if (a_m <= 3e+236) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * ((double) M_PI))));
} else {
tmp = angle * (((b + a_m) * (b - a_m)) * fma(-1.7146776406035666e-7, (angle * (angle * (((double) M_PI) * (((double) M_PI) * ((double) M_PI))))), (((double) M_PI) * 0.011111111111111112)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (a_m <= 3.3e-91) tmp = Float64(t_0 * Float64(2.0 * Float64(b * b))); elseif (a_m <= 5.2e+153) tmp = Float64(Float64(Float64(t_0 * Float64(a_m * a_m)) * Float64(2.0 * fma(b, Float64(b / Float64(a_m * a_m)), -1.0))) * cos(Float64(angle * Float64(pi * 0.005555555555555556)))); elseif (a_m <= 3e+236) tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(angle * Float64(a_m * pi)))); else tmp = Float64(angle * Float64(Float64(Float64(b + a_m) * Float64(b - a_m)) * fma(-1.7146776406035666e-7, Float64(angle * Float64(angle * Float64(pi * Float64(pi * pi)))), Float64(pi * 0.011111111111111112)))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a$95$m, 3.3e-91], N[(t$95$0 * N[(2.0 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 5.2e+153], N[(N[(N[(t$95$0 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(b * N[(b / N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 3e+236], N[(a$95$m * N[(-0.011111111111111112 * N[(angle * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(-1.7146776406035666e-7 * N[(angle * N[(angle * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;a\_m \leq 3.3 \cdot 10^{-91}:\\
\;\;\;\;t\_0 \cdot \left(2 \cdot \left(b \cdot b\right)\right)\\
\mathbf{elif}\;a\_m \leq 5.2 \cdot 10^{+153}:\\
\;\;\;\;\left(\left(t\_0 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \frac{b}{a\_m \cdot a\_m}, -1\right)\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\\
\mathbf{elif}\;a\_m \leq 3 \cdot 10^{+236}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right) \cdot \mathsf{fma}\left(-1.7146776406035666 \cdot 10^{-7}, angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right)\right), \pi \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if a < 3.30000000000000011e-91Initial program 55.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-sin.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6442.0
Simplified42.0%
Taylor expanded in angle around 0
Simplified43.6%
if 3.30000000000000011e-91 < a < 5.1999999999999998e153Initial program 54.3%
Taylor expanded in a around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
unpow2N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.3
Simplified54.3%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Simplified56.6%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6458.7
Simplified58.7%
if 5.1999999999999998e153 < a < 2.9999999999999998e236Initial program 24.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6438.3
Simplified38.3%
Taylor expanded in angle around 0
Simplified57.2%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6473.3
Simplified73.3%
if 2.9999999999999998e236 < a Initial program 70.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6470.6
Simplified70.6%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6488.2
Simplified88.2%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f64N/A
lower-fma.f64N/A
Simplified88.2%
Final simplification52.3%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (- (pow b 2.0) (pow a_m 2.0)))
(t_1 (* PI (/ angle 180.0)))
(t_2 (cos t_1)))
(if (<= t_0 -4e+297)
(* a_m (* -0.011111111111111112 (* angle (* a_m PI))))
(if (<= t_0 5e+282)
(* (* (* 2.0 t_0) (sin t_1)) t_2)
(*
t_2
(* angle (* 0.011111111111111112 (* (+ b a_m) (* PI (- b a_m))))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = pow(b, 2.0) - pow(a_m, 2.0);
double t_1 = ((double) M_PI) * (angle / 180.0);
double t_2 = cos(t_1);
double tmp;
if (t_0 <= -4e+297) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * ((double) M_PI))));
} else if (t_0 <= 5e+282) {
tmp = ((2.0 * t_0) * sin(t_1)) * t_2;
} else {
tmp = t_2 * (angle * (0.011111111111111112 * ((b + a_m) * (((double) M_PI) * (b - a_m)))));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double t_0 = Math.pow(b, 2.0) - Math.pow(a_m, 2.0);
double t_1 = Math.PI * (angle / 180.0);
double t_2 = Math.cos(t_1);
double tmp;
if (t_0 <= -4e+297) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * Math.PI)));
} else if (t_0 <= 5e+282) {
tmp = ((2.0 * t_0) * Math.sin(t_1)) * t_2;
} else {
tmp = t_2 * (angle * (0.011111111111111112 * ((b + a_m) * (Math.PI * (b - a_m)))));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = math.pow(b, 2.0) - math.pow(a_m, 2.0) t_1 = math.pi * (angle / 180.0) t_2 = math.cos(t_1) tmp = 0 if t_0 <= -4e+297: tmp = a_m * (-0.011111111111111112 * (angle * (a_m * math.pi))) elif t_0 <= 5e+282: tmp = ((2.0 * t_0) * math.sin(t_1)) * t_2 else: tmp = t_2 * (angle * (0.011111111111111112 * ((b + a_m) * (math.pi * (b - a_m))))) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64((b ^ 2.0) - (a_m ^ 2.0)) t_1 = Float64(pi * Float64(angle / 180.0)) t_2 = cos(t_1) tmp = 0.0 if (t_0 <= -4e+297) tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(angle * Float64(a_m * pi)))); elseif (t_0 <= 5e+282) tmp = Float64(Float64(Float64(2.0 * t_0) * sin(t_1)) * t_2); else tmp = Float64(t_2 * Float64(angle * Float64(0.011111111111111112 * Float64(Float64(b + a_m) * Float64(pi * Float64(b - a_m)))))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = (b ^ 2.0) - (a_m ^ 2.0); t_1 = pi * (angle / 180.0); t_2 = cos(t_1); tmp = 0.0; if (t_0 <= -4e+297) tmp = a_m * (-0.011111111111111112 * (angle * (a_m * pi))); elseif (t_0 <= 5e+282) tmp = ((2.0 * t_0) * sin(t_1)) * t_2; else tmp = t_2 * (angle * (0.011111111111111112 * ((b + a_m) * (pi * (b - a_m))))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, If[LessEqual[t$95$0, -4e+297], N[(a$95$m * N[(-0.011111111111111112 * N[(angle * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+282], N[(N[(N[(2.0 * t$95$0), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(t$95$2 * N[(angle * N[(0.011111111111111112 * N[(N[(b + a$95$m), $MachinePrecision] * N[(Pi * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := {b}^{2} - {a\_m}^{2}\\
t_1 := \pi \cdot \frac{angle}{180}\\
t_2 := \cos t\_1\\
\mathbf{if}\;t\_0 \leq -4 \cdot 10^{+297}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+282}:\\
\;\;\;\;\left(\left(2 \cdot t\_0\right) \cdot \sin t\_1\right) \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(angle \cdot \left(0.011111111111111112 \cdot \left(\left(b + a\_m\right) \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.0000000000000001e297Initial program 54.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6449.5
Simplified49.5%
Taylor expanded in angle around 0
Simplified54.9%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6476.0
Simplified76.0%
if -4.0000000000000001e297 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.99999999999999978e282Initial program 58.7%
if 4.99999999999999978e282 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 39.9%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
Simplified48.5%
Taylor expanded in angle around 0
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f6463.5
Simplified63.5%
Final simplification63.7%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (- (pow b 2.0) (pow a_m 2.0))) (t_1 (* PI (/ angle 180.0))))
(if (<= t_0 -4e+297)
(* a_m (* -0.011111111111111112 (* angle (* a_m PI))))
(if (<= t_0 5e+282)
(*
(* (* 2.0 t_0) (sin t_1))
(cos (* 0.005555555555555556 (* angle PI))))
(*
(cos t_1)
(* angle (* 0.011111111111111112 (* (+ b a_m) (* PI (- b a_m))))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = pow(b, 2.0) - pow(a_m, 2.0);
double t_1 = ((double) M_PI) * (angle / 180.0);
double tmp;
if (t_0 <= -4e+297) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * ((double) M_PI))));
} else if (t_0 <= 5e+282) {
tmp = ((2.0 * t_0) * sin(t_1)) * cos((0.005555555555555556 * (angle * ((double) M_PI))));
} else {
tmp = cos(t_1) * (angle * (0.011111111111111112 * ((b + a_m) * (((double) M_PI) * (b - a_m)))));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double t_0 = Math.pow(b, 2.0) - Math.pow(a_m, 2.0);
double t_1 = Math.PI * (angle / 180.0);
double tmp;
if (t_0 <= -4e+297) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * Math.PI)));
} else if (t_0 <= 5e+282) {
tmp = ((2.0 * t_0) * Math.sin(t_1)) * Math.cos((0.005555555555555556 * (angle * Math.PI)));
} else {
tmp = Math.cos(t_1) * (angle * (0.011111111111111112 * ((b + a_m) * (Math.PI * (b - a_m)))));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = math.pow(b, 2.0) - math.pow(a_m, 2.0) t_1 = math.pi * (angle / 180.0) tmp = 0 if t_0 <= -4e+297: tmp = a_m * (-0.011111111111111112 * (angle * (a_m * math.pi))) elif t_0 <= 5e+282: tmp = ((2.0 * t_0) * math.sin(t_1)) * math.cos((0.005555555555555556 * (angle * math.pi))) else: tmp = math.cos(t_1) * (angle * (0.011111111111111112 * ((b + a_m) * (math.pi * (b - a_m))))) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64((b ^ 2.0) - (a_m ^ 2.0)) t_1 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (t_0 <= -4e+297) tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(angle * Float64(a_m * pi)))); elseif (t_0 <= 5e+282) tmp = Float64(Float64(Float64(2.0 * t_0) * sin(t_1)) * cos(Float64(0.005555555555555556 * Float64(angle * pi)))); else tmp = Float64(cos(t_1) * Float64(angle * Float64(0.011111111111111112 * Float64(Float64(b + a_m) * Float64(pi * Float64(b - a_m)))))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = (b ^ 2.0) - (a_m ^ 2.0); t_1 = pi * (angle / 180.0); tmp = 0.0; if (t_0 <= -4e+297) tmp = a_m * (-0.011111111111111112 * (angle * (a_m * pi))); elseif (t_0 <= 5e+282) tmp = ((2.0 * t_0) * sin(t_1)) * cos((0.005555555555555556 * (angle * pi))); else tmp = cos(t_1) * (angle * (0.011111111111111112 * ((b + a_m) * (pi * (b - a_m))))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -4e+297], N[(a$95$m * N[(-0.011111111111111112 * N[(angle * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+282], N[(N[(N[(2.0 * t$95$0), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[t$95$1], $MachinePrecision] * N[(angle * N[(0.011111111111111112 * N[(N[(b + a$95$m), $MachinePrecision] * N[(Pi * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := {b}^{2} - {a\_m}^{2}\\
t_1 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;t\_0 \leq -4 \cdot 10^{+297}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+282}:\\
\;\;\;\;\left(\left(2 \cdot t\_0\right) \cdot \sin t\_1\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos t\_1 \cdot \left(angle \cdot \left(0.011111111111111112 \cdot \left(\left(b + a\_m\right) \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.0000000000000001e297Initial program 54.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6449.5
Simplified49.5%
Taylor expanded in angle around 0
Simplified54.9%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6476.0
Simplified76.0%
if -4.0000000000000001e297 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.99999999999999978e282Initial program 58.7%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-cos.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6458.6
Simplified58.6%
if 4.99999999999999978e282 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 39.9%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
Simplified48.5%
Taylor expanded in angle around 0
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f6463.5
Simplified63.5%
Final simplification63.7%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= (- (pow b 2.0) (pow a_m 2.0)) -2.3e+238)
(* a_m (* -0.011111111111111112 (* angle (* a_m PI))))
(*
(cos (* PI (/ angle 180.0)))
(* angle (* 0.011111111111111112 (* (+ b a_m) (* PI (- b a_m))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -2.3e+238) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * ((double) M_PI))));
} else {
tmp = cos((((double) M_PI) * (angle / 180.0))) * (angle * (0.011111111111111112 * ((b + a_m) * (((double) M_PI) * (b - a_m)))));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -2.3e+238) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * Math.PI)));
} else {
tmp = Math.cos((Math.PI * (angle / 180.0))) * (angle * (0.011111111111111112 * ((b + a_m) * (Math.PI * (b - a_m)))));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -2.3e+238: tmp = a_m * (-0.011111111111111112 * (angle * (a_m * math.pi))) else: tmp = math.cos((math.pi * (angle / 180.0))) * (angle * (0.011111111111111112 * ((b + a_m) * (math.pi * (b - a_m))))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -2.3e+238) tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(angle * Float64(a_m * pi)))); else tmp = Float64(cos(Float64(pi * Float64(angle / 180.0))) * Float64(angle * Float64(0.011111111111111112 * Float64(Float64(b + a_m) * Float64(pi * Float64(b - a_m)))))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (((b ^ 2.0) - (a_m ^ 2.0)) <= -2.3e+238) tmp = a_m * (-0.011111111111111112 * (angle * (a_m * pi))); else tmp = cos((pi * (angle / 180.0))) * (angle * (0.011111111111111112 * ((b + a_m) * (pi * (b - a_m))))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -2.3e+238], N[(a$95$m * N[(-0.011111111111111112 * N[(angle * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(angle * N[(0.011111111111111112 * N[(N[(b + a$95$m), $MachinePrecision] * N[(Pi * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -2.3 \cdot 10^{+238}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(angle \cdot \left(0.011111111111111112 \cdot \left(\left(b + a\_m\right) \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -2.30000000000000003e238Initial program 54.5%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6449.0
Simplified49.0%
Taylor expanded in angle around 0
Simplified53.8%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6472.0
Simplified72.0%
if -2.30000000000000003e238 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 53.0%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
Simplified50.5%
Taylor expanded in angle around 0
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f6456.9
Simplified56.9%
Final simplification60.8%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (- (pow b 2.0) (pow a_m 2.0)) -2e-78) (* a_m (* -0.011111111111111112 (* angle (* a_m PI)))) (* angle (* 0.011111111111111112 (* (+ b a_m) (* PI (- b a_m)))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -2e-78) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * ((double) M_PI))));
} else {
tmp = angle * (0.011111111111111112 * ((b + a_m) * (((double) M_PI) * (b - a_m))));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -2e-78) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * Math.PI)));
} else {
tmp = angle * (0.011111111111111112 * ((b + a_m) * (Math.PI * (b - a_m))));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -2e-78: tmp = a_m * (-0.011111111111111112 * (angle * (a_m * math.pi))) else: tmp = angle * (0.011111111111111112 * ((b + a_m) * (math.pi * (b - a_m)))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -2e-78) tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(angle * Float64(a_m * pi)))); else tmp = Float64(angle * Float64(0.011111111111111112 * Float64(Float64(b + a_m) * Float64(pi * Float64(b - a_m))))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (((b ^ 2.0) - (a_m ^ 2.0)) <= -2e-78) tmp = a_m * (-0.011111111111111112 * (angle * (a_m * pi))); else tmp = angle * (0.011111111111111112 * ((b + a_m) * (pi * (b - a_m)))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -2e-78], N[(a$95$m * N[(-0.011111111111111112 * N[(angle * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(0.011111111111111112 * N[(N[(b + a$95$m), $MachinePrecision] * N[(Pi * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -2 \cdot 10^{-78}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\left(b + a\_m\right) \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -2e-78Initial program 51.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6445.7
Simplified45.7%
Taylor expanded in angle around 0
Simplified48.6%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6460.4
Simplified60.4%
if -2e-78 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 54.8%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
Simplified53.2%
Taylor expanded in angle around 0
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f6461.0
Simplified61.0%
Taylor expanded in angle around 0
Simplified59.3%
Final simplification59.7%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (- (pow b 2.0) (pow a_m 2.0)) -2e-78) (* a_m (* -0.011111111111111112 (* angle (* a_m PI)))) (* (* (+ b a_m) (* PI (- b a_m))) (* angle 0.011111111111111112))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -2e-78) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * ((double) M_PI))));
} else {
tmp = ((b + a_m) * (((double) M_PI) * (b - a_m))) * (angle * 0.011111111111111112);
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -2e-78) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * Math.PI)));
} else {
tmp = ((b + a_m) * (Math.PI * (b - a_m))) * (angle * 0.011111111111111112);
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -2e-78: tmp = a_m * (-0.011111111111111112 * (angle * (a_m * math.pi))) else: tmp = ((b + a_m) * (math.pi * (b - a_m))) * (angle * 0.011111111111111112) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -2e-78) tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(angle * Float64(a_m * pi)))); else tmp = Float64(Float64(Float64(b + a_m) * Float64(pi * Float64(b - a_m))) * Float64(angle * 0.011111111111111112)); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (((b ^ 2.0) - (a_m ^ 2.0)) <= -2e-78) tmp = a_m * (-0.011111111111111112 * (angle * (a_m * pi))); else tmp = ((b + a_m) * (pi * (b - a_m))) * (angle * 0.011111111111111112); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -2e-78], N[(a$95$m * N[(-0.011111111111111112 * N[(angle * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + a$95$m), $MachinePrecision] * N[(Pi * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -2 \cdot 10^{-78}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + a\_m\right) \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -2e-78Initial program 51.3%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6445.7
Simplified45.7%
Taylor expanded in angle around 0
Simplified48.6%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6460.4
Simplified60.4%
if -2e-78 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 54.8%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6461.0
Simplified61.0%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6454.9
Simplified54.9%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f64N/A
lower-*.f6459.2
Simplified59.2%
Final simplification59.7%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (- (pow b 2.0) (pow a_m 2.0)) -5e-273) (* a_m (* -0.011111111111111112 (* angle (* a_m PI)))) (* angle (* 0.011111111111111112 (* b (* b PI))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -5e-273) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * ((double) M_PI))));
} else {
tmp = angle * (0.011111111111111112 * (b * (b * ((double) M_PI))));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -5e-273) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * Math.PI)));
} else {
tmp = angle * (0.011111111111111112 * (b * (b * Math.PI)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -5e-273: tmp = a_m * (-0.011111111111111112 * (angle * (a_m * math.pi))) else: tmp = angle * (0.011111111111111112 * (b * (b * math.pi))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -5e-273) tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(angle * Float64(a_m * pi)))); else tmp = Float64(angle * Float64(0.011111111111111112 * Float64(b * Float64(b * pi)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (((b ^ 2.0) - (a_m ^ 2.0)) <= -5e-273) tmp = a_m * (-0.011111111111111112 * (angle * (a_m * pi))); else tmp = angle * (0.011111111111111112 * (b * (b * pi))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -5e-273], N[(a$95$m * N[(-0.011111111111111112 * N[(angle * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(0.011111111111111112 * N[(b * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -5 \cdot 10^{-273}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.99999999999999965e-273Initial program 53.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6447.6
Simplified47.6%
Taylor expanded in angle around 0
Simplified50.2%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6460.6
Simplified60.6%
if -4.99999999999999965e-273 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 53.5%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6460.7
Simplified60.7%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6454.1
Simplified54.1%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f64N/A
lower-*.f6458.8
Simplified58.8%
Taylor expanded in a around 0
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6455.2
Simplified55.2%
Final simplification57.6%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (- (pow b 2.0) (pow a_m 2.0)) 5e-235) (* -0.011111111111111112 (* PI (* angle (* a_m a_m)))) (* angle (* 0.011111111111111112 (* b (* b PI))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a_m, 2.0)) <= 5e-235) {
tmp = -0.011111111111111112 * (((double) M_PI) * (angle * (a_m * a_m)));
} else {
tmp = angle * (0.011111111111111112 * (b * (b * ((double) M_PI))));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= 5e-235) {
tmp = -0.011111111111111112 * (Math.PI * (angle * (a_m * a_m)));
} else {
tmp = angle * (0.011111111111111112 * (b * (b * Math.PI)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= 5e-235: tmp = -0.011111111111111112 * (math.pi * (angle * (a_m * a_m))) else: tmp = angle * (0.011111111111111112 * (b * (b * math.pi))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= 5e-235) tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a_m * a_m)))); else tmp = Float64(angle * Float64(0.011111111111111112 * Float64(b * Float64(b * pi)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (((b ^ 2.0) - (a_m ^ 2.0)) <= 5e-235) tmp = -0.011111111111111112 * (pi * (angle * (a_m * a_m))); else tmp = angle * (0.011111111111111112 * (b * (b * pi))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 5e-235], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(0.011111111111111112 * N[(b * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq 5 \cdot 10^{-235}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a\_m \cdot a\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.9999999999999998e-235Initial program 58.9%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6453.6
Simplified53.6%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6452.0
Simplified52.0%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f64N/A
lower-*.f6455.7
Simplified55.7%
Taylor expanded in a around inf
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.2
Simplified56.2%
if 4.9999999999999998e-235 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 46.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6456.3
Simplified56.3%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6450.1
Simplified50.1%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f64N/A
lower-*.f6454.0
Simplified54.0%
Taylor expanded in a around 0
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6449.6
Simplified49.6%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (sin (* 0.005555555555555556 (* angle PI)))))
(if (<= a_m 3.3e-91)
(* t_0 (* 2.0 (* b b)))
(if (<= a_m 1.32e+154)
(* (* t_0 (* a_m a_m)) (* 2.0 (fma b (/ b (* a_m a_m)) -1.0)))
(if (<= a_m 3e+236)
(* a_m (* -0.011111111111111112 (* angle (* a_m PI))))
(*
angle
(*
(* (+ b a_m) (- b a_m))
(fma
-1.7146776406035666e-7
(* angle (* angle (* PI (* PI PI))))
(* PI 0.011111111111111112)))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double tmp;
if (a_m <= 3.3e-91) {
tmp = t_0 * (2.0 * (b * b));
} else if (a_m <= 1.32e+154) {
tmp = (t_0 * (a_m * a_m)) * (2.0 * fma(b, (b / (a_m * a_m)), -1.0));
} else if (a_m <= 3e+236) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * ((double) M_PI))));
} else {
tmp = angle * (((b + a_m) * (b - a_m)) * fma(-1.7146776406035666e-7, (angle * (angle * (((double) M_PI) * (((double) M_PI) * ((double) M_PI))))), (((double) M_PI) * 0.011111111111111112)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) tmp = 0.0 if (a_m <= 3.3e-91) tmp = Float64(t_0 * Float64(2.0 * Float64(b * b))); elseif (a_m <= 1.32e+154) tmp = Float64(Float64(t_0 * Float64(a_m * a_m)) * Float64(2.0 * fma(b, Float64(b / Float64(a_m * a_m)), -1.0))); elseif (a_m <= 3e+236) tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(angle * Float64(a_m * pi)))); else tmp = Float64(angle * Float64(Float64(Float64(b + a_m) * Float64(b - a_m)) * fma(-1.7146776406035666e-7, Float64(angle * Float64(angle * Float64(pi * Float64(pi * pi)))), Float64(pi * 0.011111111111111112)))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a$95$m, 3.3e-91], N[(t$95$0 * N[(2.0 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 1.32e+154], N[(N[(t$95$0 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(b * N[(b / N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 3e+236], N[(a$95$m * N[(-0.011111111111111112 * N[(angle * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(-1.7146776406035666e-7 * N[(angle * N[(angle * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;a\_m \leq 3.3 \cdot 10^{-91}:\\
\;\;\;\;t\_0 \cdot \left(2 \cdot \left(b \cdot b\right)\right)\\
\mathbf{elif}\;a\_m \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\left(t\_0 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \frac{b}{a\_m \cdot a\_m}, -1\right)\right)\\
\mathbf{elif}\;a\_m \leq 3 \cdot 10^{+236}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right) \cdot \mathsf{fma}\left(-1.7146776406035666 \cdot 10^{-7}, angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right)\right), \pi \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if a < 3.30000000000000011e-91Initial program 55.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-sin.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6442.0
Simplified42.0%
Taylor expanded in angle around 0
Simplified43.6%
if 3.30000000000000011e-91 < a < 1.31999999999999998e154Initial program 53.3%
Taylor expanded in a around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
unpow2N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6453.3
Simplified53.3%
Taylor expanded in angle around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Simplified55.6%
Taylor expanded in angle around 0
Simplified54.0%
if 1.31999999999999998e154 < a < 2.9999999999999998e236Initial program 25.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6440.1
Simplified40.1%
Taylor expanded in angle around 0
Simplified59.1%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6476.0
Simplified76.0%
if 2.9999999999999998e236 < a Initial program 70.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6470.6
Simplified70.6%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6488.2
Simplified88.2%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f64N/A
lower-fma.f64N/A
Simplified88.2%
Final simplification51.5%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= a_m 3.3e-91)
(* (sin (* 0.005555555555555556 (* angle PI))) (* 2.0 (* b b)))
(if (<= a_m 5.2e+153)
(*
(* (* angle PI) (fma b (/ b (* a_m a_m)) -1.0))
(* 0.011111111111111112 (* a_m a_m)))
(if (<= a_m 3e+236)
(* a_m (* -0.011111111111111112 (* angle (* a_m PI))))
(*
angle
(*
(* (+ b a_m) (- b a_m))
(fma
-1.7146776406035666e-7
(* angle (* angle (* PI (* PI PI))))
(* PI 0.011111111111111112))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 3.3e-91) {
tmp = sin((0.005555555555555556 * (angle * ((double) M_PI)))) * (2.0 * (b * b));
} else if (a_m <= 5.2e+153) {
tmp = ((angle * ((double) M_PI)) * fma(b, (b / (a_m * a_m)), -1.0)) * (0.011111111111111112 * (a_m * a_m));
} else if (a_m <= 3e+236) {
tmp = a_m * (-0.011111111111111112 * (angle * (a_m * ((double) M_PI))));
} else {
tmp = angle * (((b + a_m) * (b - a_m)) * fma(-1.7146776406035666e-7, (angle * (angle * (((double) M_PI) * (((double) M_PI) * ((double) M_PI))))), (((double) M_PI) * 0.011111111111111112)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (a_m <= 3.3e-91) tmp = Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(2.0 * Float64(b * b))); elseif (a_m <= 5.2e+153) tmp = Float64(Float64(Float64(angle * pi) * fma(b, Float64(b / Float64(a_m * a_m)), -1.0)) * Float64(0.011111111111111112 * Float64(a_m * a_m))); elseif (a_m <= 3e+236) tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(angle * Float64(a_m * pi)))); else tmp = Float64(angle * Float64(Float64(Float64(b + a_m) * Float64(b - a_m)) * fma(-1.7146776406035666e-7, Float64(angle * Float64(angle * Float64(pi * Float64(pi * pi)))), Float64(pi * 0.011111111111111112)))); end return tmp end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 3.3e-91], N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 5.2e+153], N[(N[(N[(angle * Pi), $MachinePrecision] * N[(b * N[(b / N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] * N[(0.011111111111111112 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 3e+236], N[(a$95$m * N[(-0.011111111111111112 * N[(angle * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(-1.7146776406035666e-7 * N[(angle * N[(angle * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 3.3 \cdot 10^{-91}:\\
\;\;\;\;\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\\
\mathbf{elif}\;a\_m \leq 5.2 \cdot 10^{+153}:\\
\;\;\;\;\left(\left(angle \cdot \pi\right) \cdot \mathsf{fma}\left(b, \frac{b}{a\_m \cdot a\_m}, -1\right)\right) \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\
\mathbf{elif}\;a\_m \leq 3 \cdot 10^{+236}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(angle \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;angle \cdot \left(\left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right) \cdot \mathsf{fma}\left(-1.7146776406035666 \cdot 10^{-7}, angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right)\right), \pi \cdot 0.011111111111111112\right)\right)\\
\end{array}
\end{array}
if a < 3.30000000000000011e-91Initial program 55.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-sin.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6442.0
Simplified42.0%
Taylor expanded in angle around 0
Simplified43.6%
if 3.30000000000000011e-91 < a < 5.1999999999999998e153Initial program 54.3%
Taylor expanded in a around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
unpow2N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.3
Simplified54.3%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
sub-negN/A
unpow2N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.9
Simplified53.9%
Taylor expanded in angle around 0
Simplified55.3%
if 5.1999999999999998e153 < a < 2.9999999999999998e236Initial program 24.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6438.3
Simplified38.3%
Taylor expanded in angle around 0
Simplified57.2%
Taylor expanded in a around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f6473.3
Simplified73.3%
if 2.9999999999999998e236 < a Initial program 70.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6470.6
Simplified70.6%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6488.2
Simplified88.2%
Taylor expanded in angle around 0
lower-*.f64N/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f64N/A
lower-fma.f64N/A
Simplified88.2%
Final simplification51.6%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (* -0.011111111111111112 (* PI (* angle (* a_m a_m)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
return -0.011111111111111112 * (((double) M_PI) * (angle * (a_m * a_m)));
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
return -0.011111111111111112 * (Math.PI * (angle * (a_m * a_m)));
}
a_m = math.fabs(a) def code(a_m, b, angle): return -0.011111111111111112 * (math.pi * (angle * (a_m * a_m)))
a_m = abs(a) function code(a_m, b, angle) return Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a_m * a_m)))) end
a_m = abs(a); function tmp = code(a_m, b, angle) tmp = -0.011111111111111112 * (pi * (angle * (a_m * a_m))); end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a\_m \cdot a\_m\right)\right)\right)
\end{array}
Initial program 53.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower--.f6454.8
Simplified54.8%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6451.2
Simplified51.2%
Taylor expanded in angle around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-PI.f64N/A
lower-*.f6454.9
Simplified54.9%
Taylor expanded in a around inf
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6435.7
Simplified35.7%
herbie shell --seed 2024215
(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)))))