
(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}
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 (* (* PI angle) 0.005555555555555556))
(t_1 (* (* 0.005555555555555556 angle) PI))
(t_2 (cos t_1))
(t_3 (sin t_1))
(t_4 (* t_3 t_2))
(t_5 (- t_1)))
(if (<= b_m 4.8e-60)
(* (* (* (+ b_m a) (- b_m a)) 2.0) (* (sin (* PI (/ angle 180.0))) 1.0))
(if (<= b_m 9.5e+137)
(fma
(fma (* 2.0 t_2) (* t_3 0.0) (* (* -2.0 a) t_4))
a
(* (* (* b_m b_m) 2.0) t_4))
(fma
(*
2.0
(fma
b_m
(/
(+
(sin (- t_1 t_5))
(sin (fma (* 0.005555555555555556 angle) PI t_5)))
2.0)
0.0))
b_m
(* (* -2.0 (* a a)) (* (sin t_0) (cos t_0))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_1 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_2 = cos(t_1);
double t_3 = sin(t_1);
double t_4 = t_3 * t_2;
double t_5 = -t_1;
double tmp;
if (b_m <= 4.8e-60) {
tmp = (((b_m + a) * (b_m - a)) * 2.0) * (sin((((double) M_PI) * (angle / 180.0))) * 1.0);
} else if (b_m <= 9.5e+137) {
tmp = fma(fma((2.0 * t_2), (t_3 * 0.0), ((-2.0 * a) * t_4)), a, (((b_m * b_m) * 2.0) * t_4));
} else {
tmp = fma((2.0 * fma(b_m, ((sin((t_1 - t_5)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_5))) / 2.0), 0.0)), b_m, ((-2.0 * (a * a)) * (sin(t_0) * cos(t_0))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = Float64(Float64(0.005555555555555556 * angle) * pi) t_2 = cos(t_1) t_3 = sin(t_1) t_4 = Float64(t_3 * t_2) t_5 = Float64(-t_1) tmp = 0.0 if (b_m <= 4.8e-60) tmp = Float64(Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * 2.0) * Float64(sin(Float64(pi * Float64(angle / 180.0))) * 1.0)); elseif (b_m <= 9.5e+137) tmp = fma(fma(Float64(2.0 * t_2), Float64(t_3 * 0.0), Float64(Float64(-2.0 * a) * t_4)), a, Float64(Float64(Float64(b_m * b_m) * 2.0) * t_4)); else tmp = fma(Float64(2.0 * fma(b_m, Float64(Float64(sin(Float64(t_1 - t_5)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_5))) / 2.0), 0.0)), b_m, Float64(Float64(-2.0 * Float64(a * a)) * Float64(sin(t_0) * cos(t_0)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * t$95$2), $MachinePrecision]}, Block[{t$95$5 = (-t$95$1)}, If[LessEqual[b$95$m, 4.8e-60], N[(N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 9.5e+137], N[(N[(N[(2.0 * t$95$2), $MachinePrecision] * N[(t$95$3 * 0.0), $MachinePrecision] + N[(N[(-2.0 * a), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision] * a + N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(b$95$m * N[(N[(N[Sin[N[(t$95$1 - t$95$5), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] + 0.0), $MachinePrecision]), $MachinePrecision] * b$95$m + N[(N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_2 := \cos t\_1\\
t_3 := \sin t\_1\\
t_4 := t\_3 \cdot t\_2\\
t_5 := -t\_1\\
\mathbf{if}\;b\_m \leq 4.8 \cdot 10^{-60}:\\
\;\;\;\;\left(\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot 1\right)\\
\mathbf{elif}\;b\_m \leq 9.5 \cdot 10^{+137}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(2 \cdot t\_2, t\_3 \cdot 0, \left(-2 \cdot a\right) \cdot t\_4\right), a, \left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot t\_4\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(b\_m, \frac{\sin \left(t\_1 - t\_5\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_5\right)\right)}{2}, 0\right), b\_m, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\right)\right)\\
\end{array}
\end{array}
if b < 4.80000000000000019e-60Initial program 62.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites62.1%
Taylor expanded in angle around 0
Applied rewrites60.0%
if 4.80000000000000019e-60 < b < 9.50000000000000031e137Initial program 53.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites53.8%
Taylor expanded in b around 0
+-commutativeN/A
Applied rewrites53.4%
Taylor expanded in a around 0
Applied rewrites60.3%
if 9.50000000000000031e137 < b Initial program 41.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites54.9%
Taylor expanded in b around 0
+-commutativeN/A
Applied rewrites64.9%
lift-*.f64N/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites65.0%
Taylor expanded in a around 0
Applied rewrites65.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* 2.0 (- (pow b_m 2.0) (pow a 2.0))))
(t_1 (* PI (/ angle 180.0)))
(t_2 (* (* PI angle) 0.005555555555555556)))
(if (<= t_0 -5e+302)
(fma
(* (* -0.011111111111111112 a) (* angle PI))
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(if (<= t_0 2e+290)
(*
(* (* (+ b_m a) (- b_m a)) 2.0)
(* (sin (/ (* PI angle) 180.0)) (cos t_1)))
(if (<= t_0 INFINITY)
(fma
(*
(fma
(*
(* (* angle angle) b_m)
(* (* (* PI PI) PI) -1.1431184270690443e-7))
2.0
(* (* PI b_m) 0.011111111111111112))
angle)
b_m
(* (* -2.0 (* a a)) (* (sin t_2) (cos t_2))))
(*
(* (* a (- b_m a)) 2.0)
(* (sin t_1) (sin (+ (- (* (/ angle 180.0) PI)) (/ PI 2.0))))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = 2.0 * (pow(b_m, 2.0) - pow(a, 2.0));
double t_1 = ((double) M_PI) * (angle / 180.0);
double t_2 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if (t_0 <= -5e+302) {
tmp = fma(((-0.011111111111111112 * a) * (angle * ((double) M_PI))), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else if (t_0 <= 2e+290) {
tmp = (((b_m + a) * (b_m - a)) * 2.0) * (sin(((((double) M_PI) * angle) / 180.0)) * cos(t_1));
} else if (t_0 <= ((double) INFINITY)) {
tmp = fma((fma((((angle * angle) * b_m) * (((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * -1.1431184270690443e-7)), 2.0, ((((double) M_PI) * b_m) * 0.011111111111111112)) * angle), b_m, ((-2.0 * (a * a)) * (sin(t_2) * cos(t_2))));
} else {
tmp = ((a * (b_m - a)) * 2.0) * (sin(t_1) * sin((-((angle / 180.0) * ((double) M_PI)) + (((double) M_PI) / 2.0))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) t_1 = Float64(pi * Float64(angle / 180.0)) t_2 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (t_0 <= -5e+302) tmp = fma(Float64(Float64(-0.011111111111111112 * a) * Float64(angle * pi)), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); elseif (t_0 <= 2e+290) tmp = Float64(Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * 2.0) * Float64(sin(Float64(Float64(pi * angle) / 180.0)) * cos(t_1))); elseif (t_0 <= Inf) tmp = fma(Float64(fma(Float64(Float64(Float64(angle * angle) * b_m) * Float64(Float64(Float64(pi * pi) * pi) * -1.1431184270690443e-7)), 2.0, Float64(Float64(pi * b_m) * 0.011111111111111112)) * angle), b_m, Float64(Float64(-2.0 * Float64(a * a)) * Float64(sin(t_2) * cos(t_2)))); else tmp = Float64(Float64(Float64(a * Float64(b_m - a)) * 2.0) * Float64(sin(t_1) * sin(Float64(Float64(-Float64(Float64(angle / 180.0) * pi)) + Float64(pi / 2.0))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[t$95$0, -5e+302], N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+290], N[(N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[(N[(N[(N[(angle * angle), $MachinePrecision] * b$95$m), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * -1.1431184270690443e-7), $MachinePrecision]), $MachinePrecision] * 2.0 + N[(N[(Pi * b$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * b$95$m + N[(N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$2], $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] * N[Sin[N[((-N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\\
t_1 := \pi \cdot \frac{angle}{180}\\
t_2 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{+302}:\\
\;\;\;\;\mathsf{fma}\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \pi\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;\left(\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\frac{\pi \cdot angle}{180}\right) \cdot \cos t\_1\right)\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\left(angle \cdot angle\right) \cdot b\_m\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right), 2, \left(\pi \cdot b\_m\right) \cdot 0.011111111111111112\right) \cdot angle, b\_m, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin t\_2 \cdot \cos t\_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \left(\sin t\_1 \cdot \sin \left(\left(-\frac{angle}{180} \cdot \pi\right) + \frac{\pi}{2}\right)\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -5e302Initial program 53.4%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.8
Applied rewrites49.8%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites69.6%
Taylor expanded in a around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6469.6
Applied rewrites69.6%
if -5e302 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 2.00000000000000012e290Initial program 59.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites59.9%
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6459.8
Applied rewrites59.8%
if 2.00000000000000012e290 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0Initial program 54.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites54.0%
Taylor expanded in b around 0
+-commutativeN/A
Applied rewrites73.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.5%
if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 0.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites59.6%
Taylor expanded in a around inf
Applied rewrites49.7%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6448.5
Applied rewrites48.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI))
(t_1 (- t_0))
(t_2 (* (* PI angle) 0.005555555555555556)))
(if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -4e+114)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(fma
(*
2.0
(fma
b_m
(/
(+
(sin (- t_0 t_1))
(sin (fma (* 0.005555555555555556 angle) PI t_1)))
2.0)
0.0))
b_m
(* (* -2.0 (* a a)) (* (sin t_2) (cos t_2)))))))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 = -t_0;
double t_2 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -4e+114) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = fma((2.0 * fma(b_m, ((sin((t_0 - t_1)) + sin(fma((0.005555555555555556 * angle), ((double) M_PI), t_1))) / 2.0), 0.0)), b_m, ((-2.0 * (a * a)) * (sin(t_2) * cos(t_2))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = Float64(-t_0) t_2 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -4e+114) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = fma(Float64(2.0 * fma(b_m, Float64(Float64(sin(Float64(t_0 - t_1)) + sin(fma(Float64(0.005555555555555556 * angle), pi, t_1))) / 2.0), 0.0)), b_m, Float64(Float64(-2.0 * Float64(a * a)) * Float64(sin(t_2) * cos(t_2)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = (-t$95$0)}, Block[{t$95$2 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e+114], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(b$95$m * N[(N[(N[Sin[N[(t$95$0 - t$95$1), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] + 0.0), $MachinePrecision]), $MachinePrecision] * b$95$m + N[(N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$2], $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := -t\_0\\
t_2 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{+114}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(b\_m, \frac{\sin \left(t\_0 - t\_1\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, t\_1\right)\right)}{2}, 0\right), b\_m, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin t\_2 \cdot \cos t\_2\right)\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4e114Initial program 53.4%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.2
Applied rewrites49.2%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites62.0%
Taylor expanded in b around 0
Applied rewrites62.0%
if -4e114 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites59.3%
Taylor expanded in b around 0
+-commutativeN/A
Applied rewrites63.1%
lift-*.f64N/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites63.0%
Taylor expanded in a around 0
Applied rewrites63.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (sin (* 0.005555555555555556 (* angle PI))))
(t_1 (* (* PI angle) 0.005555555555555556))
(t_2 (* PI (/ angle 180.0))))
(if (<=
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_2)) (cos t_2))
1e-172)
(*
(* 2.0 (cos (* (* 0.005555555555555556 angle) PI)))
(fma
a
(fma -1.0 (* a t_0) (* t_0 (- b_m (* 1.0 b_m))))
(* (* b_m b_m) t_0)))
(fma
(* b_m (sin (* 0.011111111111111112 (* angle PI))))
b_m
(* (* -2.0 (* a a)) (* (sin t_1) (cos t_1)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = sin((0.005555555555555556 * (angle * ((double) M_PI))));
double t_1 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_2 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_2)) * cos(t_2)) <= 1e-172) {
tmp = (2.0 * cos(((0.005555555555555556 * angle) * ((double) M_PI)))) * fma(a, fma(-1.0, (a * t_0), (t_0 * (b_m - (1.0 * b_m)))), ((b_m * b_m) * t_0));
} else {
tmp = fma((b_m * sin((0.011111111111111112 * (angle * ((double) M_PI))))), b_m, ((-2.0 * (a * a)) * (sin(t_1) * cos(t_1))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = sin(Float64(0.005555555555555556 * Float64(angle * pi))) t_1 = Float64(Float64(pi * angle) * 0.005555555555555556) t_2 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_2)) * cos(t_2)) <= 1e-172) tmp = Float64(Float64(2.0 * cos(Float64(Float64(0.005555555555555556 * angle) * pi))) * fma(a, fma(-1.0, Float64(a * t_0), Float64(t_0 * Float64(b_m - Float64(1.0 * b_m)))), Float64(Float64(b_m * b_m) * t_0))); else tmp = fma(Float64(b_m * sin(Float64(0.011111111111111112 * Float64(angle * pi)))), b_m, Float64(Float64(-2.0 * Float64(a * a)) * Float64(sin(t_1) * cos(t_1)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision], 1e-172], N[(N[(2.0 * N[Cos[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(a * N[(-1.0 * N[(a * t$95$0), $MachinePrecision] + N[(t$95$0 * N[(b$95$m - N[(1.0 * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b$95$m * b$95$m), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m * N[Sin[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * b$95$m + N[(N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\\
t_1 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_2 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_2\right) \cdot \cos t\_2 \leq 10^{-172}:\\
\;\;\;\;\left(2 \cdot \cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right) \cdot \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot t\_0, t\_0 \cdot \left(b\_m - 1 \cdot b\_m\right)\right), \left(b\_m \cdot b\_m\right) \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b\_m \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right), b\_m, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin t\_1 \cdot \cos t\_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1e-172Initial program 61.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites61.4%
Taylor expanded in b around 0
+-commutativeN/A
Applied rewrites64.8%
Taylor expanded in angle around inf
Applied rewrites61.1%
Taylor expanded in a around 0
lower-fma.f64N/A
Applied rewrites65.4%
if 1e-172 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 44.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites52.6%
Taylor expanded in b around 0
+-commutativeN/A
Applied rewrites54.1%
lift-*.f64N/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites54.0%
Taylor expanded in a around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6454.1
Applied rewrites54.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556)))
(if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -4e+114)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(fma
(* b_m (sin (* 0.011111111111111112 (* angle PI))))
b_m
(* (* -2.0 (* a a)) (* (sin t_0) (cos t_0)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -4e+114) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = fma((b_m * sin((0.011111111111111112 * (angle * ((double) M_PI))))), b_m, ((-2.0 * (a * a)) * (sin(t_0) * cos(t_0))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -4e+114) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = fma(Float64(b_m * sin(Float64(0.011111111111111112 * Float64(angle * pi)))), b_m, Float64(Float64(-2.0 * Float64(a * a)) * Float64(sin(t_0) * cos(t_0)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e+114], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m * N[Sin[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * b$95$m + N[(N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{+114}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b\_m \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right), b\_m, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\right)\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4e114Initial program 53.4%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.2
Applied rewrites49.2%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites62.0%
Taylor expanded in b around 0
Applied rewrites62.0%
if -4e114 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites59.3%
Taylor expanded in b around 0
+-commutativeN/A
Applied rewrites63.1%
lift-*.f64N/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites63.0%
Taylor expanded in a around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6463.1
Applied rewrites63.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))))
(if (<= angle 3e-191)
(fma
(* -0.011111111111111112 (* a a))
(* PI angle)
(*
(*
0.011111111111111112
(fma (* PI b_m) angle (* (* (* 0.0 a) PI) angle)))
b_m))
(if (<= angle 4.3e+51)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(*
(* (* (+ b_m a) (- b_m a)) 2.0)
(* (sin t_0) (sin (+ (- t_0) (/ PI 2.0)))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double tmp;
if (angle <= 3e-191) {
tmp = fma((-0.011111111111111112 * (a * a)), (((double) M_PI) * angle), ((0.011111111111111112 * fma((((double) M_PI) * b_m), angle, (((0.0 * a) * ((double) M_PI)) * angle))) * b_m));
} else if (angle <= 4.3e+51) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = (((b_m + a) * (b_m - a)) * 2.0) * (sin(t_0) * sin((-t_0 + (((double) M_PI) / 2.0))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (angle <= 3e-191) tmp = fma(Float64(-0.011111111111111112 * Float64(a * a)), Float64(pi * angle), Float64(Float64(0.011111111111111112 * fma(Float64(pi * b_m), angle, Float64(Float64(Float64(0.0 * a) * pi) * angle))) * b_m)); elseif (angle <= 4.3e+51) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * 2.0) * Float64(sin(t_0) * sin(Float64(Float64(-t_0) + Float64(pi / 2.0))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, 3e-191], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle), $MachinePrecision] + N[(N[(0.011111111111111112 * N[(N[(Pi * b$95$m), $MachinePrecision] * angle + N[(N[(N[(0.0 * a), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 4.3e+51], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[Sin[N[((-t$95$0) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;angle \leq 3 \cdot 10^{-191}:\\
\;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b\_m, angle, \left(\left(0 \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot b\_m\right)\\
\mathbf{elif}\;angle \leq 4.3 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \left(\sin t\_0 \cdot \sin \left(\left(-t\_0\right) + \frac{\pi}{2}\right)\right)\\
\end{array}
\end{array}
if angle < 3.0000000000000001e-191Initial program 55.8%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in b around 0
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites57.2%
if 3.0000000000000001e-191 < angle < 4.2999999999999997e51Initial program 74.7%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6476.3
Applied rewrites76.3%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites78.8%
Taylor expanded in b around 0
Applied rewrites78.8%
if 4.2999999999999997e51 < angle Initial program 29.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites32.1%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lift-PI.f6431.4
Applied rewrites31.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 3e-191)
(fma
(* -0.011111111111111112 (* a a))
(* PI angle)
(*
(* 0.011111111111111112 (fma (* PI b_m) angle (* (* (* 0.0 a) PI) angle)))
b_m))
(if (<= angle 1.7e-42)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(*
(* (* (+ b_m a) (- b_m a)) 2.0)
(* (sin (* PI (/ angle 180.0))) 1.0)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 3e-191) {
tmp = fma((-0.011111111111111112 * (a * a)), (((double) M_PI) * angle), ((0.011111111111111112 * fma((((double) M_PI) * b_m), angle, (((0.0 * a) * ((double) M_PI)) * angle))) * b_m));
} else if (angle <= 1.7e-42) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = (((b_m + a) * (b_m - a)) * 2.0) * (sin((((double) M_PI) * (angle / 180.0))) * 1.0);
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 3e-191) tmp = fma(Float64(-0.011111111111111112 * Float64(a * a)), Float64(pi * angle), Float64(Float64(0.011111111111111112 * fma(Float64(pi * b_m), angle, Float64(Float64(Float64(0.0 * a) * pi) * angle))) * b_m)); elseif (angle <= 1.7e-42) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * 2.0) * Float64(sin(Float64(pi * Float64(angle / 180.0))) * 1.0)); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 3e-191], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle), $MachinePrecision] + N[(N[(0.011111111111111112 * N[(N[(Pi * b$95$m), $MachinePrecision] * angle + N[(N[(N[(0.0 * a), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 1.7e-42], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3 \cdot 10^{-191}:\\
\;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b\_m, angle, \left(\left(0 \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot b\_m\right)\\
\mathbf{elif}\;angle \leq 1.7 \cdot 10^{-42}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot 1\right)\\
\end{array}
\end{array}
if angle < 3.0000000000000001e-191Initial program 55.8%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in b around 0
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites57.2%
if 3.0000000000000001e-191 < angle < 1.70000000000000011e-42Initial program 80.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6486.0
Applied rewrites86.0%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites90.5%
Taylor expanded in b around 0
Applied rewrites90.5%
if 1.70000000000000011e-42 < angle Initial program 38.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites42.0%
Taylor expanded in angle around 0
Applied rewrites38.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 3e-191)
(fma
(* -0.011111111111111112 (* a a))
(* PI angle)
(*
(* 0.011111111111111112 (fma (* PI b_m) angle (* (* (* 0.0 a) PI) angle)))
b_m))
(if (<= angle 2.15e+51)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(* (* (- b_m a) (+ a b_m)) (sin (* 2.0 (* PI (/ angle 180.0))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 3e-191) {
tmp = fma((-0.011111111111111112 * (a * a)), (((double) M_PI) * angle), ((0.011111111111111112 * fma((((double) M_PI) * b_m), angle, (((0.0 * a) * ((double) M_PI)) * angle))) * b_m));
} else if (angle <= 2.15e+51) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * (((double) M_PI) * (angle / 180.0))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 3e-191) tmp = fma(Float64(-0.011111111111111112 * Float64(a * a)), Float64(pi * angle), Float64(Float64(0.011111111111111112 * fma(Float64(pi * b_m), angle, Float64(Float64(Float64(0.0 * a) * pi) * angle))) * b_m)); elseif (angle <= 2.15e+51) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(2.0 * Float64(pi * Float64(angle / 180.0))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 3e-191], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle), $MachinePrecision] + N[(N[(0.011111111111111112 * N[(N[(Pi * b$95$m), $MachinePrecision] * angle + N[(N[(N[(0.0 * a), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 2.15e+51], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3 \cdot 10^{-191}:\\
\;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b\_m, angle, \left(\left(0 \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot b\_m\right)\\
\mathbf{elif}\;angle \leq 2.15 \cdot 10^{+51}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)\\
\end{array}
\end{array}
if angle < 3.0000000000000001e-191Initial program 55.8%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in b around 0
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites57.2%
if 3.0000000000000001e-191 < angle < 2.1499999999999999e51Initial program 74.7%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6476.3
Applied rewrites76.3%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites78.8%
Taylor expanded in b around 0
Applied rewrites78.8%
if 2.1499999999999999e51 < angle Initial program 29.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites32.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites32.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 3e-191)
(fma
(* -0.011111111111111112 (* a a))
(* PI angle)
(*
(* 0.011111111111111112 (fma (* PI b_m) angle (* (* (* 0.0 a) PI) angle)))
b_m))
(if (<= angle 1.7e-42)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(*
2.0
(*
(sin (* (* 0.005555555555555556 angle) PI))
(* (- b_m a) (+ a b_m)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 3e-191) {
tmp = fma((-0.011111111111111112 * (a * a)), (((double) M_PI) * angle), ((0.011111111111111112 * fma((((double) M_PI) * b_m), angle, (((0.0 * a) * ((double) M_PI)) * angle))) * b_m));
} else if (angle <= 1.7e-42) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = 2.0 * (sin(((0.005555555555555556 * angle) * ((double) M_PI))) * ((b_m - a) * (a + b_m)));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 3e-191) tmp = fma(Float64(-0.011111111111111112 * Float64(a * a)), Float64(pi * angle), Float64(Float64(0.011111111111111112 * fma(Float64(pi * b_m), angle, Float64(Float64(Float64(0.0 * a) * pi) * angle))) * b_m)); elseif (angle <= 1.7e-42) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(2.0 * Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(Float64(b_m - a) * Float64(a + b_m)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 3e-191], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle), $MachinePrecision] + N[(N[(0.011111111111111112 * N[(N[(Pi * b$95$m), $MachinePrecision] * angle + N[(N[(N[(0.0 * a), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 1.7e-42], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3 \cdot 10^{-191}:\\
\;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b\_m, angle, \left(\left(0 \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot b\_m\right)\\
\mathbf{elif}\;angle \leq 1.7 \cdot 10^{-42}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right)\right)\\
\end{array}
\end{array}
if angle < 3.0000000000000001e-191Initial program 55.8%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in b around 0
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites57.2%
if 3.0000000000000001e-191 < angle < 1.70000000000000011e-42Initial program 80.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6486.0
Applied rewrites86.0%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites90.5%
Taylor expanded in b around 0
Applied rewrites90.5%
if 1.70000000000000011e-42 < angle Initial program 38.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites42.0%
Taylor expanded in b around 0
+-commutativeN/A
Applied rewrites41.0%
Taylor expanded in angle around inf
Applied rewrites41.2%
Taylor expanded in angle around 0
Applied rewrites38.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 3e-191)
(fma
(* -0.011111111111111112 (* a a))
(* PI angle)
(*
(* 0.011111111111111112 (fma (* PI b_m) angle (* (* (* 0.0 a) PI) angle)))
b_m))
(if (<= angle 8e+109)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(*
-2.2862368541380886e-7
(*
(* (* angle angle) angle)
(* (* (* PI PI) PI) (* (+ a b_m) (- b_m a))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 3e-191) {
tmp = fma((-0.011111111111111112 * (a * a)), (((double) M_PI) * angle), ((0.011111111111111112 * fma((((double) M_PI) * b_m), angle, (((0.0 * a) * ((double) M_PI)) * angle))) * b_m));
} else if (angle <= 8e+109) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = -2.2862368541380886e-7 * (((angle * angle) * angle) * (((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * ((a + b_m) * (b_m - a))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 3e-191) tmp = fma(Float64(-0.011111111111111112 * Float64(a * a)), Float64(pi * angle), Float64(Float64(0.011111111111111112 * fma(Float64(pi * b_m), angle, Float64(Float64(Float64(0.0 * a) * pi) * angle))) * b_m)); elseif (angle <= 8e+109) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(-2.2862368541380886e-7 * Float64(Float64(Float64(angle * angle) * angle) * Float64(Float64(Float64(pi * pi) * pi) * Float64(Float64(a + b_m) * Float64(b_m - a))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 3e-191], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle), $MachinePrecision] + N[(N[(0.011111111111111112 * N[(N[(Pi * b$95$m), $MachinePrecision] * angle + N[(N[(N[(0.0 * a), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 8e+109], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(-2.2862368541380886e-7 * N[(N[(N[(angle * angle), $MachinePrecision] * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(a + b$95$m), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3 \cdot 10^{-191}:\\
\;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b\_m, angle, \left(\left(0 \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot b\_m\right)\\
\mathbf{elif}\;angle \leq 8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;-2.2862368541380886 \cdot 10^{-7} \cdot \left(\left(\left(angle \cdot angle\right) \cdot angle\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(\left(a + b\_m\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\
\end{array}
\end{array}
if angle < 3.0000000000000001e-191Initial program 55.8%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in b around 0
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites57.2%
if 3.0000000000000001e-191 < angle < 7.99999999999999985e109Initial program 65.6%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6466.6
Applied rewrites66.6%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites67.8%
Taylor expanded in b around 0
Applied rewrites67.8%
if 7.99999999999999985e109 < angle Initial program 29.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites32.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites2.6%
Taylor expanded in angle around inf
lower-*.f64N/A
lower-*.f64N/A
unpow3N/A
pow2N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
pow3N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites22.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 3e-191)
(fma
(* (* (* a a) PI) -0.011111111111111112)
angle
(* (* 0.011111111111111112 (fma (* PI b_m) angle (* 0.0 angle))) b_m))
(if (<= angle 8e+109)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(*
-2.2862368541380886e-7
(*
(* (* angle angle) angle)
(* (* (* PI PI) PI) (* (+ a b_m) (- b_m a))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 3e-191) {
tmp = fma((((a * a) * ((double) M_PI)) * -0.011111111111111112), angle, ((0.011111111111111112 * fma((((double) M_PI) * b_m), angle, (0.0 * angle))) * b_m));
} else if (angle <= 8e+109) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = -2.2862368541380886e-7 * (((angle * angle) * angle) * (((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * ((a + b_m) * (b_m - a))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 3e-191) tmp = fma(Float64(Float64(Float64(a * a) * pi) * -0.011111111111111112), angle, Float64(Float64(0.011111111111111112 * fma(Float64(pi * b_m), angle, Float64(0.0 * angle))) * b_m)); elseif (angle <= 8e+109) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(-2.2862368541380886e-7 * Float64(Float64(Float64(angle * angle) * angle) * Float64(Float64(Float64(pi * pi) * pi) * Float64(Float64(a + b_m) * Float64(b_m - a))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 3e-191], N[(N[(N[(N[(a * a), $MachinePrecision] * Pi), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * angle + N[(N[(0.011111111111111112 * N[(N[(Pi * b$95$m), $MachinePrecision] * angle + N[(0.0 * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 8e+109], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(-2.2862368541380886e-7 * N[(N[(N[(angle * angle), $MachinePrecision] * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(a + b$95$m), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3 \cdot 10^{-191}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(a \cdot a\right) \cdot \pi\right) \cdot -0.011111111111111112, angle, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b\_m, angle, 0 \cdot angle\right)\right) \cdot b\_m\right)\\
\mathbf{elif}\;angle \leq 8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;-2.2862368541380886 \cdot 10^{-7} \cdot \left(\left(\left(angle \cdot angle\right) \cdot angle\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(\left(a + b\_m\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\
\end{array}
\end{array}
if angle < 3.0000000000000001e-191Initial program 55.8%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6437.2
Applied rewrites37.2%
Taylor expanded in b around 0
Applied rewrites57.2%
if 3.0000000000000001e-191 < angle < 7.99999999999999985e109Initial program 65.6%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6466.6
Applied rewrites66.6%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites67.8%
Taylor expanded in b around 0
Applied rewrites67.8%
if 7.99999999999999985e109 < angle Initial program 29.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites32.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites2.6%
Taylor expanded in angle around inf
lower-*.f64N/A
lower-*.f64N/A
unpow3N/A
pow2N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
pow3N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites22.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 8e+109)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(*
-2.2862368541380886e-7
(*
(* (* angle angle) angle)
(* (* (* PI PI) PI) (* (+ a b_m) (- b_m a)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 8e+109) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = -2.2862368541380886e-7 * (((angle * angle) * angle) * (((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * ((a + b_m) * (b_m - a))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 8e+109) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(-2.2862368541380886e-7 * Float64(Float64(Float64(angle * angle) * angle) * Float64(Float64(Float64(pi * pi) * pi) * Float64(Float64(a + b_m) * Float64(b_m - a))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 8e+109], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(-2.2862368541380886e-7 * N[(N[(N[(angle * angle), $MachinePrecision] * angle), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(a + b$95$m), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;-2.2862368541380886 \cdot 10^{-7} \cdot \left(\left(\left(angle \cdot angle\right) \cdot angle\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(\left(a + b\_m\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\
\end{array}
\end{array}
if angle < 7.99999999999999985e109Initial program 58.7%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.2
Applied rewrites59.2%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in b around 0
Applied rewrites61.5%
if 7.99999999999999985e109 < angle Initial program 29.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites32.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites2.6%
Taylor expanded in angle around inf
lower-*.f64N/A
lower-*.f64N/A
unpow3N/A
pow2N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
pow3N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites22.7%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 8e+109)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(if (<= angle 9.2e+195)
(*
(*
(* a a)
(fma
-0.011111111111111112
PI
(* 2.2862368541380886e-7 (* (* angle angle) (* (* PI PI) PI)))))
angle)
(* (* 0.011111111111111112 angle) (* PI (* b_m (- b_m a)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 8e+109) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else if (angle <= 9.2e+195) {
tmp = ((a * a) * fma(-0.011111111111111112, ((double) M_PI), (2.2862368541380886e-7 * ((angle * angle) * ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)))))) * angle;
} else {
tmp = (0.011111111111111112 * angle) * (((double) M_PI) * (b_m * (b_m - a)));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 8e+109) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); elseif (angle <= 9.2e+195) tmp = Float64(Float64(Float64(a * a) * fma(-0.011111111111111112, pi, Float64(2.2862368541380886e-7 * Float64(Float64(angle * angle) * Float64(Float64(pi * pi) * pi))))) * angle); else tmp = Float64(Float64(0.011111111111111112 * angle) * Float64(pi * Float64(b_m * Float64(b_m - a)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 8e+109], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 9.2e+195], N[(N[(N[(a * a), $MachinePrecision] * N[(-0.011111111111111112 * Pi + N[(2.2862368541380886e-7 * N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision], N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(Pi * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;angle \leq 9.2 \cdot 10^{+195}:\\
\;\;\;\;\left(\left(a \cdot a\right) \cdot \mathsf{fma}\left(-0.011111111111111112, \pi, 2.2862368541380886 \cdot 10^{-7} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right)\right)\right) \cdot angle\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\right)\\
\end{array}
\end{array}
if angle < 7.99999999999999985e109Initial program 58.7%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.2
Applied rewrites59.2%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in b around 0
Applied rewrites61.5%
if 7.99999999999999985e109 < angle < 9.2000000000000005e195Initial program 29.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites32.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites4.2%
Taylor expanded in a around inf
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
pow3N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-PI.f6423.0
Applied rewrites23.0%
if 9.2000000000000005e195 < angle Initial program 29.9%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6426.1
Applied rewrites26.1%
Taylor expanded in a around 0
Applied rewrites27.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= b_m 1.12e+165)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(*
(*
(* b_m b_m)
(fma
-2.2862368541380886e-7
(* (* angle angle) (* (* PI PI) PI))
(* 0.011111111111111112 PI)))
angle)))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 1.12e+165) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = ((b_m * b_m) * fma(-2.2862368541380886e-7, ((angle * angle) * ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI))), (0.011111111111111112 * ((double) M_PI)))) * angle;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 1.12e+165) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(Float64(Float64(b_m * b_m) * fma(-2.2862368541380886e-7, Float64(Float64(angle * angle) * Float64(Float64(pi * pi) * pi)), Float64(0.011111111111111112 * pi))) * angle); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 1.12e+165], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * N[(-2.2862368541380886e-7 * N[(N[(angle * angle), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.12 \cdot 10^{+165}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m \cdot b\_m\right) \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right) \cdot angle\\
\end{array}
\end{array}
if b < 1.1200000000000001e165Initial program 57.4%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.9
Applied rewrites52.9%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites56.1%
Taylor expanded in b around 0
Applied rewrites56.1%
if 1.1200000000000001e165 < b Initial program 41.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites56.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites0.0%
Taylor expanded in b around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
pow3N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-PI.f6451.3
Applied rewrites51.3%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 8e+109)
(fma
(fma (* (* PI angle) a) -0.011111111111111112 0.0)
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(* (* 0.011111111111111112 angle) (* PI (* (+ b_m a) b_m)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 8e+109) {
tmp = fma(fma(((((double) M_PI) * angle) * a), -0.011111111111111112, 0.0), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = (0.011111111111111112 * angle) * (((double) M_PI) * ((b_m + a) * b_m));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 8e+109) tmp = fma(fma(Float64(Float64(pi * angle) * a), -0.011111111111111112, 0.0), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(Float64(0.011111111111111112 * angle) * Float64(pi * Float64(Float64(b_m + a) * b_m))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 8e+109], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112 + 0.0), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(\pi \cdot angle\right) \cdot a, -0.011111111111111112, 0\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot b\_m\right)\right)\\
\end{array}
\end{array}
if angle < 7.99999999999999985e109Initial program 58.7%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.2
Applied rewrites59.2%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in b around 0
Applied rewrites61.5%
if 7.99999999999999985e109 < angle Initial program 29.7%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6427.0
Applied rewrites27.0%
Taylor expanded in a around 0
Applied rewrites24.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 8e+109)
(fma
(* (* -0.011111111111111112 a) (* angle PI))
a
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112))
(* (* 0.011111111111111112 angle) (* PI (* (+ b_m a) b_m)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 8e+109) {
tmp = fma(((-0.011111111111111112 * a) * (angle * ((double) M_PI))), a, (((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112));
} else {
tmp = (0.011111111111111112 * angle) * (((double) M_PI) * ((b_m + a) * b_m));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 8e+109) tmp = fma(Float64(Float64(-0.011111111111111112 * a) * Float64(angle * pi)), a, Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112)); else tmp = Float64(Float64(0.011111111111111112 * angle) * Float64(pi * Float64(Float64(b_m + a) * b_m))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 8e+109], N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * a + N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \pi\right), a, \left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot b\_m\right)\right)\\
\end{array}
\end{array}
if angle < 7.99999999999999985e109Initial program 58.7%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.2
Applied rewrites59.2%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in a around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6461.5
Applied rewrites61.5%
if 7.99999999999999985e109 < angle Initial program 29.7%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6427.0
Applied rewrites27.0%
Taylor expanded in a around 0
Applied rewrites24.5%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* (* 0.011111111111111112 angle) PI) (* (- b_m a) (+ a b_m))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return ((0.011111111111111112 * angle) * ((double) M_PI)) * ((b_m - a) * (a + b_m));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return ((0.011111111111111112 * angle) * Math.PI) * ((b_m - a) * (a + b_m));
}
b_m = math.fabs(b) def code(a, b_m, angle): return ((0.011111111111111112 * angle) * math.pi) * ((b_m - a) * (a + b_m))
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(Float64(0.011111111111111112 * angle) * pi) * Float64(Float64(b_m - a) * Float64(a + b_m))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = ((0.011111111111111112 * angle) * pi) * ((b_m - a) * (a + b_m)); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right)
\end{array}
Initial program 53.9%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.8
Applied rewrites53.8%
associate-*l*53.8
pow253.8
pow253.8
difference-of-squares-rev53.8
*-commutative53.8
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
Applied rewrites53.8%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) 5e-200) (* (* -0.011111111111111112 (* a a)) (* PI angle)) (* (* 0.011111111111111112 angle) (* PI (* b_m b_m)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= 5e-200) {
tmp = (-0.011111111111111112 * (a * a)) * (((double) M_PI) * angle);
} else {
tmp = (0.011111111111111112 * angle) * (((double) M_PI) * (b_m * b_m));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= 5e-200) {
tmp = (-0.011111111111111112 * (a * a)) * (Math.PI * angle);
} else {
tmp = (0.011111111111111112 * angle) * (Math.PI * (b_m * b_m));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= 5e-200: tmp = (-0.011111111111111112 * (a * a)) * (math.pi * angle) else: tmp = (0.011111111111111112 * angle) * (math.pi * (b_m * b_m)) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= 5e-200) tmp = Float64(Float64(-0.011111111111111112 * Float64(a * a)) * Float64(pi * angle)); else tmp = Float64(Float64(0.011111111111111112 * angle) * Float64(pi * Float64(b_m * b_m))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= 5e-200) tmp = (-0.011111111111111112 * (a * a)) * (pi * angle); else tmp = (0.011111111111111112 * angle) * (pi * (b_m * b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e-200], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq 5 \cdot 10^{-200}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 4.99999999999999991e-200Initial program 59.3%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.7
Applied rewrites54.7%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6454.5
Applied rewrites54.5%
if 4.99999999999999991e-200 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 47.6%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.7
Applied rewrites52.7%
Taylor expanded in a around 0
pow2N/A
lower-*.f6450.6
Applied rewrites50.6%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) 5e-200) (* (* -0.011111111111111112 (* a a)) (* PI angle)) (* (* (* PI (* b_m b_m)) angle) 0.011111111111111112)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= 5e-200) {
tmp = (-0.011111111111111112 * (a * a)) * (((double) M_PI) * angle);
} else {
tmp = ((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= 5e-200) {
tmp = (-0.011111111111111112 * (a * a)) * (Math.PI * angle);
} else {
tmp = ((Math.PI * (b_m * b_m)) * angle) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= 5e-200: tmp = (-0.011111111111111112 * (a * a)) * (math.pi * angle) else: tmp = ((math.pi * (b_m * b_m)) * angle) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= 5e-200) tmp = Float64(Float64(-0.011111111111111112 * Float64(a * a)) * Float64(pi * angle)); else tmp = Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= 5e-200) tmp = (-0.011111111111111112 * (a * a)) * (pi * angle); else tmp = ((pi * (b_m * b_m)) * angle) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e-200], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq 5 \cdot 10^{-200}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 4.99999999999999991e-200Initial program 59.3%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.7
Applied rewrites54.7%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6454.5
Applied rewrites54.5%
if 4.99999999999999991e-200 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 47.6%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.7
Applied rewrites52.7%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
pow2N/A
lower-*.f6450.5
Applied rewrites50.5%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* (* angle PI) 0.011111111111111112) (* (- b_m a) (+ a b_m))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return ((angle * ((double) M_PI)) * 0.011111111111111112) * ((b_m - a) * (a + b_m));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return ((angle * Math.PI) * 0.011111111111111112) * ((b_m - a) * (a + b_m));
}
b_m = math.fabs(b) def code(a, b_m, angle): return ((angle * math.pi) * 0.011111111111111112) * ((b_m - a) * (a + b_m))
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(Float64(angle * pi) * 0.011111111111111112) * Float64(Float64(b_m - a) * Float64(a + b_m))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = ((angle * pi) * 0.011111111111111112) * ((b_m - a) * (a + b_m)); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right)
\end{array}
Initial program 53.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites57.5%
Taylor expanded in b around 0
+-commutativeN/A
Applied rewrites60.0%
Taylor expanded in angle around 0
*-commutativeN/A
difference-of-squares-revN/A
pow2N/A
pow2N/A
associate-*l*N/A
+-commutativeN/A
associate-*l*N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites53.8%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* 0.011111111111111112 angle) (* PI (* (+ b_m a) (- b_m a)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return (0.011111111111111112 * angle) * (((double) M_PI) * ((b_m + a) * (b_m - a)));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return (0.011111111111111112 * angle) * (Math.PI * ((b_m + a) * (b_m - a)));
}
b_m = math.fabs(b) def code(a, b_m, angle): return (0.011111111111111112 * angle) * (math.pi * ((b_m + a) * (b_m - a)))
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(0.011111111111111112 * angle) * Float64(pi * Float64(Float64(b_m + a) * Float64(b_m - a)))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = (0.011111111111111112 * angle) * (pi * ((b_m + a) * (b_m - a))); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)
\end{array}
Initial program 53.9%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.8
Applied rewrites53.8%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* -0.011111111111111112 (* a a)) (* PI angle)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return (-0.011111111111111112 * (a * a)) * (((double) M_PI) * angle);
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return (-0.011111111111111112 * (a * a)) * (Math.PI * angle);
}
b_m = math.fabs(b) def code(a, b_m, angle): return (-0.011111111111111112 * (a * a)) * (math.pi * angle)
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(-0.011111111111111112 * Float64(a * a)) * Float64(pi * angle)) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = (-0.011111111111111112 * (a * a)) * (pi * angle); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right)
\end{array}
Initial program 53.9%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.8
Applied rewrites53.8%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6434.7
Applied rewrites34.7%
herbie shell --seed 2025112
(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)))))