
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI))
(t_1 (sin t_0))
(t_2 (* (* angle PI) 0.005555555555555556)))
(if (<= b_m 5.5e+201)
(* (* (* (cos t_0) 2.0) (* (+ a b_m) t_1)) (- b_m a))
(*
(*
2.0
(*
(cos (/ (fma -0.005555555555555556 (* angle PI) t_2) 2.0))
(cos (/ (- (* -0.005555555555555556 (* angle PI)) t_2) 2.0))))
(* (* t_1 (+ a b_m)) (- b_m a))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = sin(t_0);
double t_2 = (angle * ((double) M_PI)) * 0.005555555555555556;
double tmp;
if (b_m <= 5.5e+201) {
tmp = ((cos(t_0) * 2.0) * ((a + b_m) * t_1)) * (b_m - a);
} else {
tmp = (2.0 * (cos((fma(-0.005555555555555556, (angle * ((double) M_PI)), t_2) / 2.0)) * cos((((-0.005555555555555556 * (angle * ((double) M_PI))) - t_2) / 2.0)))) * ((t_1 * (a + b_m)) * (b_m - a));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) t_1 = sin(t_0) t_2 = Float64(Float64(angle * pi) * 0.005555555555555556) tmp = 0.0 if (b_m <= 5.5e+201) tmp = Float64(Float64(Float64(cos(t_0) * 2.0) * Float64(Float64(a + b_m) * t_1)) * Float64(b_m - a)); else tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(-0.005555555555555556, Float64(angle * pi), t_2) / 2.0)) * cos(Float64(Float64(Float64(-0.005555555555555556 * Float64(angle * pi)) - t_2) / 2.0)))) * Float64(Float64(t_1 * Float64(a + b_m)) * Float64(b_m - a))); 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 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[b$95$m, 5.5e+201], N[(N[(N[(N[Cos[t$95$0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(a + b$95$m), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[N[(N[(-0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + t$95$2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(N[(-0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $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 := \sin t\_0\\
t_2 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
\mathbf{if}\;b\_m \leq 5.5 \cdot 10^{+201}:\\
\;\;\;\;\left(\left(\cos t\_0 \cdot 2\right) \cdot \left(\left(a + b\_m\right) \cdot t\_1\right)\right) \cdot \left(b\_m - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(-0.005555555555555556, angle \cdot \pi, t\_2\right)}{2}\right) \cdot \cos \left(\frac{-0.005555555555555556 \cdot \left(angle \cdot \pi\right) - t\_2}{2}\right)\right)\right) \cdot \left(\left(t\_1 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\end{array}
\end{array}
if b < 5.49999999999999946e201Initial program 56.9%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites58.2%
lift-*.f64N/A
lift-sin.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
lower-*.f64N/A
Applied rewrites66.4%
Applied rewrites65.8%
if 5.49999999999999946e201 < b Initial program 42.5%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites58.3%
lift-*.f64N/A
lift-sin.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
lower-*.f64N/A
Applied rewrites75.6%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
cos-neg-revN/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-neg.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites76.6%
Applied rewrites75.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= b_m 6.3e+230)
(*
(* 2.0 (sin (fma (- (* 0.005555555555555556 angle)) PI (/ PI 2.0))))
(* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b_m)) (- b_m a)))
(* (* (* (* angle PI) (+ a b_m)) (- b_m a)) 0.011111111111111112)))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 6.3e+230) {
tmp = (2.0 * sin(fma(-(0.005555555555555556 * angle), ((double) M_PI), (((double) M_PI) / 2.0)))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b_m)) * (b_m - a));
} else {
tmp = (((angle * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 6.3e+230) tmp = Float64(Float64(2.0 * sin(fma(Float64(-Float64(0.005555555555555556 * angle)), pi, Float64(pi / 2.0)))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(Float64(Float64(angle * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 6.3e+230], N[(N[(2.0 * N[Sin[N[((-N[(0.005555555555555556 * angle), $MachinePrecision]) * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 6.3 \cdot 10^{+230}:\\
\;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(-0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if b < 6.3000000000000002e230Initial program 55.9%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites57.4%
lift-*.f64N/A
lift-sin.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
lower-*.f64N/A
Applied rewrites66.7%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
cos-neg-revN/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-neg.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites65.8%
if 6.3000000000000002e230 < b Initial program 45.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.8
Applied rewrites62.8%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6474.2
Applied rewrites74.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556))
(t_1
(*
(* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b_m))
(- b_m a))))
(if (<= angle 1.85e+92)
(* 2.0 t_1)
(if (<= angle 5e+184)
(* (* 2.0 (sin (* -0.005555555555555556 (* angle PI)))) t_1)
(* (* 2.0 (cos t_0)) (* (sin t_0) (* (+ b_m a) (- b_m a))))))))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 = (sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b_m)) * (b_m - a);
double tmp;
if (angle <= 1.85e+92) {
tmp = 2.0 * t_1;
} else if (angle <= 5e+184) {
tmp = (2.0 * sin((-0.005555555555555556 * (angle * ((double) M_PI))))) * t_1;
} else {
tmp = (2.0 * cos(t_0)) * (sin(t_0) * ((b_m + a) * (b_m - a)));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = (Math.PI * angle) * 0.005555555555555556;
double t_1 = (Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b_m)) * (b_m - a);
double tmp;
if (angle <= 1.85e+92) {
tmp = 2.0 * t_1;
} else if (angle <= 5e+184) {
tmp = (2.0 * Math.sin((-0.005555555555555556 * (angle * Math.PI)))) * t_1;
} else {
tmp = (2.0 * Math.cos(t_0)) * (Math.sin(t_0) * ((b_m + a) * (b_m - a)));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = (math.pi * angle) * 0.005555555555555556 t_1 = (math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b_m)) * (b_m - a) tmp = 0 if angle <= 1.85e+92: tmp = 2.0 * t_1 elif angle <= 5e+184: tmp = (2.0 * math.sin((-0.005555555555555556 * (angle * math.pi)))) * t_1 else: tmp = (2.0 * math.cos(t_0)) * (math.sin(t_0) * ((b_m + a) * (b_m - a))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b_m)) * Float64(b_m - a)) tmp = 0.0 if (angle <= 1.85e+92) tmp = Float64(2.0 * t_1); elseif (angle <= 5e+184) tmp = Float64(Float64(2.0 * sin(Float64(-0.005555555555555556 * Float64(angle * pi)))) * t_1); else tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(sin(t_0) * Float64(Float64(b_m + a) * Float64(b_m - a)))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (pi * angle) * 0.005555555555555556; t_1 = (sin(((0.005555555555555556 * angle) * pi)) * (a + b_m)) * (b_m - a); tmp = 0.0; if (angle <= 1.85e+92) tmp = 2.0 * t_1; elseif (angle <= 5e+184) tmp = (2.0 * sin((-0.005555555555555556 * (angle * pi)))) * t_1; else tmp = (2.0 * cos(t_0)) * (sin(t_0) * ((b_m + a) * (b_m - a))); end tmp_2 = 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[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, 1.85e+92], N[(2.0 * t$95$1), $MachinePrecision], If[LessEqual[angle, 5e+184], N[(N[(2.0 * N[Sin[N[(-0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $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(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\
\mathbf{if}\;angle \leq 1.85 \cdot 10^{+92}:\\
\;\;\;\;2 \cdot t\_1\\
\mathbf{elif}\;angle \leq 5 \cdot 10^{+184}:\\
\;\;\;\;\left(2 \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\sin t\_0 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\\
\end{array}
\end{array}
if angle < 1.84999999999999999e92Initial program 59.6%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.7%
lift-*.f64N/A
lift-sin.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
lower-*.f64N/A
Applied rewrites75.4%
Taylor expanded in angle around 0
Applied rewrites72.8%
if 1.84999999999999999e92 < angle < 4.9999999999999999e184Initial program 29.9%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites30.8%
lift-*.f64N/A
lift-sin.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
lower-*.f64N/A
Applied rewrites32.0%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
cos-neg-revN/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-neg.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites30.3%
Taylor expanded in angle around inf
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6430.9
Applied rewrites30.9%
if 4.9999999999999999e184 < angle Initial program 29.8%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites31.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle) PI)))
(if (<= angle 2.4e+111)
(* 2.0 (* (* (sin t_0) (+ a b_m)) (- b_m a)))
(* (sin (* 2.0 t_0)) (* (- b_m a) (+ a b_m))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
double tmp;
if (angle <= 2.4e+111) {
tmp = 2.0 * ((sin(t_0) * (a + b_m)) * (b_m - a));
} else {
tmp = sin((2.0 * t_0)) * ((b_m - a) * (a + b_m));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = (0.005555555555555556 * angle) * Math.PI;
double tmp;
if (angle <= 2.4e+111) {
tmp = 2.0 * ((Math.sin(t_0) * (a + b_m)) * (b_m - a));
} else {
tmp = Math.sin((2.0 * t_0)) * ((b_m - a) * (a + b_m));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = (0.005555555555555556 * angle) * math.pi tmp = 0 if angle <= 2.4e+111: tmp = 2.0 * ((math.sin(t_0) * (a + b_m)) * (b_m - a)) else: tmp = math.sin((2.0 * t_0)) * ((b_m - a) * (a + b_m)) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(0.005555555555555556 * angle) * pi) tmp = 0.0 if (angle <= 2.4e+111) tmp = Float64(2.0 * Float64(Float64(sin(t_0) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(sin(Float64(2.0 * t_0)) * Float64(Float64(b_m - a) * Float64(a + b_m))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (0.005555555555555556 * angle) * pi; tmp = 0.0; if (angle <= 2.4e+111) tmp = 2.0 * ((sin(t_0) * (a + b_m)) * (b_m - a)); else tmp = sin((2.0 * t_0)) * ((b_m - a) * (a + b_m)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, If[LessEqual[angle, 2.4e+111], N[(2.0 * N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
\mathbf{if}\;angle \leq 2.4 \cdot 10^{+111}:\\
\;\;\;\;2 \cdot \left(\left(\sin t\_0 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(2 \cdot t\_0\right) \cdot \left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right)\\
\end{array}
\end{array}
if angle < 2.40000000000000006e111Initial program 59.0%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.1%
lift-*.f64N/A
lift-sin.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
lower-*.f64N/A
Applied rewrites74.6%
Taylor expanded in angle around 0
Applied rewrites72.1%
if 2.40000000000000006e111 < angle Initial program 30.0%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites31.2%
Applied rewrites31.4%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* 2.0 (cos (* (* PI angle) 0.005555555555555556))) (* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b_m)) (- b_m a))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return (2.0 * cos(((((double) M_PI) * angle) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b_m)) * (b_m - a));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return (2.0 * Math.cos(((Math.PI * angle) * 0.005555555555555556))) * ((Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b_m)) * (b_m - a));
}
b_m = math.fabs(b) def code(a, b_m, angle): return (2.0 * math.cos(((math.pi * angle) * 0.005555555555555556))) * ((math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b_m)) * (b_m - a))
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(2.0 * cos(Float64(Float64(pi * angle) * 0.005555555555555556))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b_m)) * Float64(b_m - a))) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = (2.0 * cos(((pi * angle) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle) * pi)) * (a + b_m)) * (b_m - a)); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(2.0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)
\end{array}
Initial program 54.5%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites58.2%
lift-*.f64N/A
lift-sin.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
lower-*.f64N/A
Applied rewrites67.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= b_m 6.3e+230)
(*
2.0
(* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b_m)) (- b_m a)))
(* (* (* (* angle PI) (+ a b_m)) (- b_m a)) 0.011111111111111112)))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 6.3e+230) {
tmp = 2.0 * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b_m)) * (b_m - a));
} else {
tmp = (((angle * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 6.3e+230) {
tmp = 2.0 * ((Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b_m)) * (b_m - a));
} else {
tmp = (((angle * Math.PI) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if b_m <= 6.3e+230: tmp = 2.0 * ((math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b_m)) * (b_m - a)) else: tmp = (((angle * math.pi) * (a + b_m)) * (b_m - a)) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 6.3e+230) tmp = Float64(2.0 * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(Float64(Float64(angle * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (b_m <= 6.3e+230) tmp = 2.0 * ((sin(((0.005555555555555556 * angle) * pi)) * (a + b_m)) * (b_m - a)); else tmp = (((angle * pi) * (a + b_m)) * (b_m - a)) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 6.3e+230], N[(2.0 * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 6.3 \cdot 10^{+230}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if b < 6.3000000000000002e230Initial program 55.9%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites57.4%
lift-*.f64N/A
lift-sin.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
lower-*.f64N/A
Applied rewrites66.7%
Taylor expanded in angle around 0
Applied rewrites64.6%
if 6.3000000000000002e230 < b Initial program 45.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.8
Applied rewrites62.8%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6474.2
Applied rewrites74.2%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* PI (+ a b_m)))
(t_1 (fma (* -1.54320987654321e-5 (* angle angle)) (* PI PI) 1.0)))
(if (<= angle 110000000.0)
(* (* (* (* angle PI) (+ a b_m)) (- b_m a)) 0.011111111111111112)
(if (<= angle 2.5e+158)
(* (* (* 0.011111111111111112 angle) (* t_0 (- a))) t_1)
(if (<= angle 9e+225)
(* (* 0.011111111111111112 angle) (* t_0 (- b_m a)))
(if (<= angle 4.5e+275)
(* (* (* 0.011111111111111112 angle) (* (* PI b_m) (- b_m a))) t_1)
(* (* (* PI angle) (* b_m (- b_m a))) 0.011111111111111112)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((double) M_PI) * (a + b_m);
double t_1 = fma((-1.54320987654321e-5 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 1.0);
double tmp;
if (angle <= 110000000.0) {
tmp = (((angle * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else if (angle <= 2.5e+158) {
tmp = ((0.011111111111111112 * angle) * (t_0 * -a)) * t_1;
} else if (angle <= 9e+225) {
tmp = (0.011111111111111112 * angle) * (t_0 * (b_m - a));
} else if (angle <= 4.5e+275) {
tmp = ((0.011111111111111112 * angle) * ((((double) M_PI) * b_m) * (b_m - a))) * t_1;
} else {
tmp = ((((double) M_PI) * angle) * (b_m * (b_m - a))) * 0.011111111111111112;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(pi * Float64(a + b_m)) t_1 = fma(Float64(-1.54320987654321e-5 * Float64(angle * angle)), Float64(pi * pi), 1.0) tmp = 0.0 if (angle <= 110000000.0) tmp = Float64(Float64(Float64(Float64(angle * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); elseif (angle <= 2.5e+158) tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * Float64(t_0 * Float64(-a))) * t_1); elseif (angle <= 9e+225) tmp = Float64(Float64(0.011111111111111112 * angle) * Float64(t_0 * Float64(b_m - a))); elseif (angle <= 4.5e+275) tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * Float64(Float64(pi * b_m) * Float64(b_m - a))) * t_1); else tmp = Float64(Float64(Float64(pi * angle) * Float64(b_m * Float64(b_m - a))) * 0.011111111111111112); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.54320987654321e-5 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[angle, 110000000.0], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle, 2.5e+158], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(t$95$0 * (-a)), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[angle, 9e+225], N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(t$95$0 * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 4.5e+275], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(N[(Pi * b$95$m), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(a + b\_m\right)\\
t_1 := \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)\\
\mathbf{if}\;angle \leq 110000000:\\
\;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{elif}\;angle \leq 2.5 \cdot 10^{+158}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(t\_0 \cdot \left(-a\right)\right)\right) \cdot t\_1\\
\mathbf{elif}\;angle \leq 9 \cdot 10^{+225}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(t\_0 \cdot \left(b\_m - a\right)\right)\\
\mathbf{elif}\;angle \leq 4.5 \cdot 10^{+275}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\pi \cdot b\_m\right) \cdot \left(b\_m - a\right)\right)\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 1.1e8Initial program 62.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6463.0
Applied rewrites63.0%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6474.4
Applied rewrites74.4%
if 1.1e8 < angle < 2.4999999999999998e158Initial program 32.3%
Taylor expanded in angle around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f6425.1
Applied rewrites25.1%
Taylor expanded in angle around 0
pow2N/A
unpow2N/A
difference-of-squares-revN/A
difference-of-squares-revN/A
pow2N/A
pow-to-expN/A
unpow2N/A
associate-*r*N/A
pow2N/A
unpow2N/A
difference-of-squares-revN/A
Applied rewrites28.6%
Taylor expanded in a around inf
mul-1-negN/A
lower-neg.f6425.7
Applied rewrites25.7%
if 2.4999999999999998e158 < angle < 8.99999999999999952e225Initial program 29.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6429.8
Applied rewrites29.8%
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
+-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6429.8
Applied rewrites29.8%
if 8.99999999999999952e225 < angle < 4.49999999999999974e275Initial program 30.6%
Taylor expanded in angle around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f6418.5
Applied rewrites18.5%
Taylor expanded in angle around 0
pow2N/A
unpow2N/A
difference-of-squares-revN/A
difference-of-squares-revN/A
pow2N/A
pow-to-expN/A
unpow2N/A
associate-*r*N/A
pow2N/A
unpow2N/A
difference-of-squares-revN/A
Applied rewrites22.5%
Taylor expanded in a around 0
Applied rewrites23.3%
if 4.49999999999999974e275 < angle Initial program 28.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in a around 0
Applied rewrites26.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 46000000000.0)
(* (* (* (* angle PI) (+ a b_m)) (- b_m a)) 0.011111111111111112)
(if (<= angle 4.5e+275)
(*
(* (* 0.011111111111111112 angle) (* (* PI (+ a b_m)) (- b_m a)))
(fma (* -1.54320987654321e-5 (* angle angle)) (* PI PI) 1.0))
(* (* (* PI angle) (* b_m (- b_m a))) 0.011111111111111112))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 46000000000.0) {
tmp = (((angle * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else if (angle <= 4.5e+275) {
tmp = ((0.011111111111111112 * angle) * ((((double) M_PI) * (a + b_m)) * (b_m - a))) * fma((-1.54320987654321e-5 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 1.0);
} else {
tmp = ((((double) M_PI) * angle) * (b_m * (b_m - a))) * 0.011111111111111112;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 46000000000.0) tmp = Float64(Float64(Float64(Float64(angle * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); elseif (angle <= 4.5e+275) tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * Float64(Float64(pi * Float64(a + b_m)) * Float64(b_m - a))) * fma(Float64(-1.54320987654321e-5 * Float64(angle * angle)), Float64(pi * pi), 1.0)); else tmp = Float64(Float64(Float64(pi * angle) * Float64(b_m * Float64(b_m - a))) * 0.011111111111111112); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 46000000000.0], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle, 4.5e+275], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(N[(Pi * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-1.54320987654321e-5 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 46000000000:\\
\;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{elif}\;angle \leq 4.5 \cdot 10^{+275}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\pi \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 4.6e10Initial program 62.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.9
Applied rewrites62.9%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6474.2
Applied rewrites74.2%
if 4.6e10 < angle < 4.49999999999999974e275Initial program 30.9%
Taylor expanded in angle around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f6422.5
Applied rewrites22.5%
Taylor expanded in angle around 0
pow2N/A
unpow2N/A
difference-of-squares-revN/A
difference-of-squares-revN/A
pow2N/A
pow-to-expN/A
unpow2N/A
associate-*r*N/A
pow2N/A
unpow2N/A
difference-of-squares-revN/A
Applied rewrites25.0%
if 4.49999999999999974e275 < angle Initial program 28.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in a around 0
Applied rewrites26.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 46000000000.0)
(* (* (* (* angle PI) (+ a b_m)) (- b_m a)) 0.011111111111111112)
(if (<= angle 4.5e+275)
(*
(* (* 0.011111111111111112 angle) (* (* PI (+ a b_m)) (- b_m a)))
(*
(fma (* PI PI) -1.54320987654321e-5 (/ 1.0 (* angle angle)))
(* angle angle)))
(* (* (* PI angle) (* b_m (- b_m a))) 0.011111111111111112))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 46000000000.0) {
tmp = (((angle * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else if (angle <= 4.5e+275) {
tmp = ((0.011111111111111112 * angle) * ((((double) M_PI) * (a + b_m)) * (b_m - a))) * (fma((((double) M_PI) * ((double) M_PI)), -1.54320987654321e-5, (1.0 / (angle * angle))) * (angle * angle));
} else {
tmp = ((((double) M_PI) * angle) * (b_m * (b_m - a))) * 0.011111111111111112;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 46000000000.0) tmp = Float64(Float64(Float64(Float64(angle * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); elseif (angle <= 4.5e+275) tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * Float64(Float64(pi * Float64(a + b_m)) * Float64(b_m - a))) * Float64(fma(Float64(pi * pi), -1.54320987654321e-5, Float64(1.0 / Float64(angle * angle))) * Float64(angle * angle))); else tmp = Float64(Float64(Float64(pi * angle) * Float64(b_m * Float64(b_m - a))) * 0.011111111111111112); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 46000000000.0], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle, 4.5e+275], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(N[(Pi * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * -1.54320987654321e-5 + N[(1.0 / N[(angle * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 46000000000:\\
\;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{elif}\;angle \leq 4.5 \cdot 10^{+275}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\pi \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \left(\mathsf{fma}\left(\pi \cdot \pi, -1.54320987654321 \cdot 10^{-5}, \frac{1}{angle \cdot angle}\right) \cdot \left(angle \cdot angle\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 4.6e10Initial program 62.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.9
Applied rewrites62.9%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6474.2
Applied rewrites74.2%
if 4.6e10 < angle < 4.49999999999999974e275Initial program 30.9%
Taylor expanded in angle around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f6422.5
Applied rewrites22.5%
Taylor expanded in angle around 0
pow2N/A
unpow2N/A
difference-of-squares-revN/A
difference-of-squares-revN/A
pow2N/A
pow-to-expN/A
unpow2N/A
associate-*r*N/A
pow2N/A
unpow2N/A
difference-of-squares-revN/A
Applied rewrites25.0%
Taylor expanded in angle around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
pow2N/A
lift-*.f64N/A
pow2N/A
lift-*.f6425.0
Applied rewrites25.0%
if 4.49999999999999974e275 < angle Initial program 28.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in a around 0
Applied rewrites26.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 10000000000.0)
(* (* (* (* angle PI) (+ a b_m)) (- b_m a)) 0.011111111111111112)
(*
2.0
(* (sin (* (* PI angle) 0.005555555555555556)) (* (+ b_m a) (- b_m a))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 10000000000.0) {
tmp = (((angle * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * (sin(((((double) M_PI) * angle) * 0.005555555555555556)) * ((b_m + a) * (b_m - a)));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 10000000000.0) {
tmp = (((angle * Math.PI) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * (Math.sin(((Math.PI * angle) * 0.005555555555555556)) * ((b_m + a) * (b_m - a)));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if angle <= 10000000000.0: tmp = (((angle * math.pi) * (a + b_m)) * (b_m - a)) * 0.011111111111111112 else: tmp = 2.0 * (math.sin(((math.pi * angle) * 0.005555555555555556)) * ((b_m + a) * (b_m - a))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 10000000000.0) tmp = Float64(Float64(Float64(Float64(angle * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); else tmp = Float64(2.0 * Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(Float64(b_m + a) * Float64(b_m - a)))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (angle <= 10000000000.0) tmp = (((angle * pi) * (a + b_m)) * (b_m - a)) * 0.011111111111111112; else tmp = 2.0 * (sin(((pi * angle) * 0.005555555555555556)) * ((b_m + a) * (b_m - a))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 10000000000.0], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 10000000000:\\
\;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\\
\end{array}
\end{array}
if angle < 1e10Initial program 62.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6463.0
Applied rewrites63.0%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6474.3
Applied rewrites74.3%
if 1e10 < angle Initial program 30.8%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites32.3%
Taylor expanded in angle around 0
Applied rewrites32.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 9e+225)
(* (* (* (* angle PI) (+ a b_m)) (- b_m a)) 0.011111111111111112)
(if (<= angle 4.5e+275)
(*
(* (* 0.011111111111111112 angle) (* (* PI b_m) (- b_m a)))
(fma (* -1.54320987654321e-5 (* angle angle)) (* PI PI) 1.0))
(* (* (* PI angle) (* b_m (- b_m a))) 0.011111111111111112))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 9e+225) {
tmp = (((angle * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else if (angle <= 4.5e+275) {
tmp = ((0.011111111111111112 * angle) * ((((double) M_PI) * b_m) * (b_m - a))) * fma((-1.54320987654321e-5 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 1.0);
} else {
tmp = ((((double) M_PI) * angle) * (b_m * (b_m - a))) * 0.011111111111111112;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 9e+225) tmp = Float64(Float64(Float64(Float64(angle * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); elseif (angle <= 4.5e+275) tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * Float64(Float64(pi * b_m) * Float64(b_m - a))) * fma(Float64(-1.54320987654321e-5 * Float64(angle * angle)), Float64(pi * pi), 1.0)); else tmp = Float64(Float64(Float64(pi * angle) * Float64(b_m * Float64(b_m - a))) * 0.011111111111111112); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 9e+225], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle, 4.5e+275], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(N[(Pi * b$95$m), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-1.54320987654321e-5 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 9 \cdot 10^{+225}:\\
\;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{elif}\;angle \leq 4.5 \cdot 10^{+275}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\pi \cdot b\_m\right) \cdot \left(b\_m - a\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 8.99999999999999952e225Initial program 56.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.5
Applied rewrites56.5%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6465.2
Applied rewrites65.2%
if 8.99999999999999952e225 < angle < 4.49999999999999974e275Initial program 30.6%
Taylor expanded in angle around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f6418.5
Applied rewrites18.5%
Taylor expanded in angle around 0
pow2N/A
unpow2N/A
difference-of-squares-revN/A
difference-of-squares-revN/A
pow2N/A
pow-to-expN/A
unpow2N/A
associate-*r*N/A
pow2N/A
unpow2N/A
difference-of-squares-revN/A
Applied rewrites22.5%
Taylor expanded in a around 0
Applied rewrites23.3%
if 4.49999999999999974e275 < angle Initial program 28.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6428.5
Applied rewrites28.5%
Taylor expanded in a around 0
Applied rewrites26.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 46000000000.0)
(* (* (* (* angle PI) (+ a b_m)) (- b_m a)) 0.011111111111111112)
(if (<= angle 5.5e+158)
(*
(* (* 0.011111111111111112 angle) (- (* PI (* a a))))
(fma (* -1.54320987654321e-5 (* angle angle)) (* PI PI) 1.0))
(* (* (* PI angle) (* (+ b_m a) (- a))) 0.011111111111111112))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 46000000000.0) {
tmp = (((angle * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else if (angle <= 5.5e+158) {
tmp = ((0.011111111111111112 * angle) * -(((double) M_PI) * (a * a))) * fma((-1.54320987654321e-5 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 1.0);
} else {
tmp = ((((double) M_PI) * angle) * ((b_m + a) * -a)) * 0.011111111111111112;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 46000000000.0) tmp = Float64(Float64(Float64(Float64(angle * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); elseif (angle <= 5.5e+158) tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * Float64(-Float64(pi * Float64(a * a)))) * fma(Float64(-1.54320987654321e-5 * Float64(angle * angle)), Float64(pi * pi), 1.0)); else tmp = Float64(Float64(Float64(pi * angle) * Float64(Float64(b_m + a) * Float64(-a))) * 0.011111111111111112); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 46000000000.0], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle, 5.5e+158], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * (-N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] * N[(N[(-1.54320987654321e-5 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 46000000000:\\
\;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{elif}\;angle \leq 5.5 \cdot 10^{+158}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(-\pi \cdot \left(a \cdot a\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 4.6e10Initial program 62.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.9
Applied rewrites62.9%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6474.2
Applied rewrites74.2%
if 4.6e10 < angle < 5.4999999999999998e158Initial program 31.7%
Taylor expanded in angle around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f6425.3
Applied rewrites25.3%
Taylor expanded in angle around 0
pow2N/A
unpow2N/A
difference-of-squares-revN/A
difference-of-squares-revN/A
pow2N/A
pow-to-expN/A
unpow2N/A
associate-*r*N/A
pow2N/A
unpow2N/A
difference-of-squares-revN/A
Applied rewrites28.6%
Taylor expanded in a around inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
lower-*.f6422.6
Applied rewrites22.6%
if 5.4999999999999998e158 < angle Initial program 29.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6429.8
Applied rewrites29.8%
Taylor expanded in a around inf
mul-1-negN/A
lower-neg.f6429.0
Applied rewrites29.0%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= angle 1.05e+158) (* (* (* (* angle PI) (+ a b_m)) (- b_m a)) 0.011111111111111112) (* (* (* PI angle) (* (+ b_m a) (- a))) 0.011111111111111112)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 1.05e+158) {
tmp = (((angle * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = ((((double) M_PI) * angle) * ((b_m + a) * -a)) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 1.05e+158) {
tmp = (((angle * Math.PI) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = ((Math.PI * angle) * ((b_m + a) * -a)) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if angle <= 1.05e+158: tmp = (((angle * math.pi) * (a + b_m)) * (b_m - a)) * 0.011111111111111112 else: tmp = ((math.pi * angle) * ((b_m + a) * -a)) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 1.05e+158) tmp = Float64(Float64(Float64(Float64(angle * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); else tmp = Float64(Float64(Float64(pi * angle) * Float64(Float64(b_m + a) * Float64(-a))) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (angle <= 1.05e+158) tmp = (((angle * pi) * (a + b_m)) * (b_m - a)) * 0.011111111111111112; else tmp = ((pi * angle) * ((b_m + a) * -a)) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 1.05e+158], N[(N[(N[(N[(angle * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 1.05 \cdot 10^{+158}:\\
\;\;\;\;\left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 1.0499999999999999e158Initial program 57.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6458.1
Applied rewrites58.1%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6467.5
Applied rewrites67.5%
if 1.0499999999999999e158 < angle Initial program 29.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6429.8
Applied rewrites29.8%
Taylor expanded in a around inf
mul-1-negN/A
lower-neg.f6428.9
Applied rewrites28.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= angle 1.05e+158) (* (* (* 0.011111111111111112 angle) (* (+ a b_m) PI)) (- b_m a)) (* (* (* PI angle) (* (+ b_m a) (- a))) 0.011111111111111112)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 1.05e+158) {
tmp = ((0.011111111111111112 * angle) * ((a + b_m) * ((double) M_PI))) * (b_m - a);
} else {
tmp = ((((double) M_PI) * angle) * ((b_m + a) * -a)) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 1.05e+158) {
tmp = ((0.011111111111111112 * angle) * ((a + b_m) * Math.PI)) * (b_m - a);
} else {
tmp = ((Math.PI * angle) * ((b_m + a) * -a)) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if angle <= 1.05e+158: tmp = ((0.011111111111111112 * angle) * ((a + b_m) * math.pi)) * (b_m - a) else: tmp = ((math.pi * angle) * ((b_m + a) * -a)) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 1.05e+158) tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * Float64(Float64(a + b_m) * pi)) * Float64(b_m - a)); else tmp = Float64(Float64(Float64(pi * angle) * Float64(Float64(b_m + a) * Float64(-a))) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (angle <= 1.05e+158) tmp = ((0.011111111111111112 * angle) * ((a + b_m) * pi)) * (b_m - a); else tmp = ((pi * angle) * ((b_m + a) * -a)) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 1.05e+158], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(N[(a + b$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 1.05 \cdot 10^{+158}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(a + b\_m\right) \cdot \pi\right)\right) \cdot \left(b\_m - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 1.0499999999999999e158Initial program 57.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6458.1
Applied rewrites58.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6437.4
Applied rewrites37.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6437.5
Applied rewrites37.5%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f64N/A
lift--.f6467.8
Applied rewrites67.8%
if 1.0499999999999999e158 < angle Initial program 29.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6429.8
Applied rewrites29.8%
Taylor expanded in a around inf
mul-1-negN/A
lower-neg.f6428.9
Applied rewrites28.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -1e-295) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* (* PI angle) (* b_m (- b_m a))) 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))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * angle) * (b_m * (b_m - a))) * 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))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = ((Math.PI * angle) * (b_m * (b_m - a))) * 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))) <= -1e-295: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = ((math.pi * angle) * (b_m * (b_m - a))) * 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))) <= -1e-295) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(Float64(pi * angle) * Float64(b_m * Float64(b_m - a))) * 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))) <= -1e-295) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = ((pi * angle) * (b_m * (b_m - a))) * 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], -1e-295], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $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 -1 \cdot 10^{-295}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\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)))) < -1.00000000000000006e-295Initial program 55.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.3
Applied rewrites52.3%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6452.1
Applied rewrites52.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.2
Applied rewrites52.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6461.2
Applied rewrites61.2%
if -1.00000000000000006e-295 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.7
Applied rewrites56.7%
Taylor expanded in a around 0
Applied rewrites55.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))) -1e-295) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* (* PI angle) (* b_m b_m)) 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))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * angle) * (b_m * b_m)) * 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))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = ((Math.PI * angle) * (b_m * b_m)) * 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))) <= -1e-295: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = ((math.pi * angle) * (b_m * b_m)) * 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))) <= -1e-295) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(Float64(pi * angle) * Float64(b_m * b_m)) * 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))) <= -1e-295) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = ((pi * angle) * (b_m * b_m)) * 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], -1e-295], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(b$95$m * b$95$m), $MachinePrecision]), $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 -1 \cdot 10^{-295}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b\_m \cdot b\_m\right)\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)))) < -1.00000000000000006e-295Initial program 55.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.3
Applied rewrites52.3%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6452.1
Applied rewrites52.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.2
Applied rewrites52.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6461.2
Applied rewrites61.2%
if -1.00000000000000006e-295 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.7
Applied rewrites56.7%
Taylor expanded in a around 0
difference-of-squares-revN/A
pow2N/A
pow-to-expN/A
unpow2N/A
pow2N/A
lift-*.f6455.1
Applied rewrites55.1%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -1e-295) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* (* 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))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} 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))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} 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))) <= -1e-295: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) 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))) <= -1e-295) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); 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))) <= -1e-295) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); 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], -1e-295], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $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 -1 \cdot 10^{-295}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\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)))) < -1.00000000000000006e-295Initial program 55.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.3
Applied rewrites52.3%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6452.1
Applied rewrites52.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.2
Applied rewrites52.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6461.2
Applied rewrites61.2%
if -1.00000000000000006e-295 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.7
Applied rewrites56.7%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
pow2N/A
lift-*.f6455.1
Applied rewrites55.1%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* -0.011111111111111112 a) (* (* angle PI) a)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
}
b_m = math.fabs(b) def code(a, b_m, angle): return (-0.011111111111111112 * a) * ((angle * math.pi) * a)
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)
\end{array}
Initial program 54.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.8
Applied rewrites54.8%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6435.9
Applied rewrites35.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6436.0
Applied rewrites36.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6439.2
Applied rewrites39.2%
herbie shell --seed 2025095
(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)))))