
(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 16 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)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(let* ((t_0 (* (+ a b_m) (sin (* (* angle_m PI) 0.005555555555555556))))
(t_1
(*
(*
(* (sin (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0))) 2.0)
t_0)
(- b_m a))))
(*
angle_s
(if (<= b_m 1.35e-214)
t_1
(if (<= b_m 5.5e+196)
(*
(*
(*
(sin (+ (- (* (* 0.005555555555555556 angle_m) PI)) (/ PI 2.0)))
2.0)
t_0)
(- b_m a))
t_1)))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double t_0 = (a + b_m) * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556));
double t_1 = ((sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0))) * 2.0) * t_0) * (b_m - a);
double tmp;
if (b_m <= 1.35e-214) {
tmp = t_1;
} else if (b_m <= 5.5e+196) {
tmp = ((sin((-((0.005555555555555556 * angle_m) * ((double) M_PI)) + (((double) M_PI) / 2.0))) * 2.0) * t_0) * (b_m - a);
} else {
tmp = t_1;
}
return angle_s * tmp;
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) t_0 = Float64(Float64(a + b_m) * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556))) t_1 = Float64(Float64(Float64(sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0))) * 2.0) * t_0) * Float64(b_m - a)) tmp = 0.0 if (b_m <= 1.35e-214) tmp = t_1; elseif (b_m <= 5.5e+196) tmp = Float64(Float64(Float64(sin(Float64(Float64(-Float64(Float64(0.005555555555555556 * angle_m) * pi)) + Float64(pi / 2.0))) * 2.0) * t_0) * Float64(b_m - a)); else tmp = t_1; end return Float64(angle_s * tmp) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(a + b$95$m), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 1.35e-214], t$95$1, If[LessEqual[b$95$m, 5.5e+196], N[(N[(N[(N[Sin[N[((-N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(a + b\_m\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\\
t_1 := \left(\left(\sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right) \cdot 2\right) \cdot t\_0\right) \cdot \left(b\_m - a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+196}:\\
\;\;\;\;\left(\left(\sin \left(\left(-\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) + \frac{\pi}{2}\right) \cdot 2\right) \cdot t\_0\right) \cdot \left(b\_m - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if b < 1.35e-214 or 5.49999999999999973e196 < b Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6467.0
Applied rewrites67.0%
if 1.35e-214 < b < 5.49999999999999973e196Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
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-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6466.8
Applied rewrites66.8%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(let* ((t_0 (* (* angle_m PI) 0.005555555555555556))
(t_1
(*
(*
(* (sin (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0))) 2.0)
(* (+ a b_m) (sin t_0)))
(- b_m a))))
(*
angle_s
(if (<= b_m 1.35e-214)
t_1
(if (<= b_m 5.5e+196)
(*
(* 2.0 (sin (+ (- t_0) (/ PI 2.0))))
(*
(* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b_m))
(- b_m a)))
t_1)))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double t_0 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
double t_1 = ((sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0))) * 2.0) * ((a + b_m) * sin(t_0))) * (b_m - a);
double tmp;
if (b_m <= 1.35e-214) {
tmp = t_1;
} else if (b_m <= 5.5e+196) {
tmp = (2.0 * sin((-t_0 + (((double) M_PI) / 2.0)))) * ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b_m)) * (b_m - a));
} else {
tmp = t_1;
}
return angle_s * tmp;
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) t_0 = Float64(Float64(angle_m * pi) * 0.005555555555555556) t_1 = Float64(Float64(Float64(sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0))) * 2.0) * Float64(Float64(a + b_m) * sin(t_0))) * Float64(b_m - a)) tmp = 0.0 if (b_m <= 1.35e-214) tmp = t_1; elseif (b_m <= 5.5e+196) tmp = Float64(Float64(2.0 * sin(Float64(Float64(-t_0) + Float64(pi / 2.0)))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = t_1; end return Float64(angle_s * tmp) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(a + b$95$m), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 1.35e-214], t$95$1, If[LessEqual[b$95$m, 5.5e+196], N[(N[(2.0 * N[Sin[N[((-t$95$0) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\
t_1 := \left(\left(\sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right) \cdot 2\right) \cdot \left(\left(a + b\_m\right) \cdot \sin t\_0\right)\right) \cdot \left(b\_m - a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 1.35 \cdot 10^{-214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+196}:\\
\;\;\;\;\left(2 \cdot \sin \left(\left(-t\_0\right) + \frac{\pi}{2}\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
\end{array}
if b < 1.35e-214 or 5.49999999999999973e196 < b Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6467.0
Applied rewrites67.0%
if 1.35e-214 < b < 5.49999999999999973e196Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
*-commutativeN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6466.8
Applied rewrites66.8%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(let* ((t_0 (* PI (/ angle_m 180.0)))
(t_1 (* (* 0.005555555555555556 angle_m) PI))
(t_2 (- t_1)))
(*
angle_s
(if (<=
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
(- INFINITY))
(*
(fma (* -3.08641975308642e-5 (* angle_m angle_m)) (* PI PI) 2.0)
(* (* (sin t_1) (+ a b_m)) (- b_m a)))
(*
(*
(*
2.0
(*
(cos (/ (fma (* 0.005555555555555556 angle_m) PI t_2) 2.0))
(cos (/ (- t_1 t_2) 2.0))))
(* (+ a b_m) (sin (* (* angle_m PI) 0.005555555555555556))))
(- b_m a))))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double t_0 = ((double) M_PI) * (angle_m / 180.0);
double t_1 = (0.005555555555555556 * angle_m) * ((double) M_PI);
double t_2 = -t_1;
double tmp;
if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -((double) INFINITY)) {
tmp = fma((-3.08641975308642e-5 * (angle_m * angle_m)), (((double) M_PI) * ((double) M_PI)), 2.0) * ((sin(t_1) * (a + b_m)) * (b_m - a));
} else {
tmp = ((2.0 * (cos((fma((0.005555555555555556 * angle_m), ((double) M_PI), t_2) / 2.0)) * cos(((t_1 - t_2) / 2.0)))) * ((a + b_m) * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)))) * (b_m - a);
}
return angle_s * tmp;
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) t_0 = Float64(pi * Float64(angle_m / 180.0)) t_1 = Float64(Float64(0.005555555555555556 * angle_m) * pi) t_2 = Float64(-t_1) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= Float64(-Inf)) tmp = Float64(fma(Float64(-3.08641975308642e-5 * Float64(angle_m * angle_m)), Float64(pi * pi), 2.0) * Float64(Float64(sin(t_1) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(0.005555555555555556 * angle_m), pi, t_2) / 2.0)) * cos(Float64(Float64(t_1 - t_2) / 2.0)))) * Float64(Float64(a + b_m) * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)))) * Float64(b_m - a)); end return Float64(angle_s * tmp) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$2 = (-t$95$1)}, N[(angle$95$s * 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$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(N[(-3.08641975308642e-5 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 2.0), $MachinePrecision] * N[(N[(N[Sin[t$95$1], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[Cos[N[(N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + t$95$2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$1 - t$95$2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(a + b$95$m), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\\
t_2 := -t\_1\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \pi \cdot \pi, 2\right) \cdot \left(\left(\sin t\_1 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, t\_2\right)}{2}\right) \cdot \cos \left(\frac{t\_1 - t\_2}{2}\right)\right)\right) \cdot \left(\left(a + b\_m\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b\_m - a\right)\\
\end{array}
\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))))) < -inf.0Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
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.f6462.3
Applied rewrites62.3%
if -inf.0 < (*.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 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
count-2-revN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
cos-neg-revN/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites66.8%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle_m) PI)) (t_1 (- t_0)))
(*
angle_s
(if (<= angle_m 1.4e+249)
(*
(*
(* (sin (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0))) 2.0)
(* (+ a b_m) (sin (* (* angle_m PI) 0.005555555555555556))))
(- b_m a))
(*
(*
2.0
(*
(cos (/ (fma (* 0.005555555555555556 angle_m) PI t_1) 2.0))
(cos (/ (- t_0 t_1) 2.0))))
(*
(sin (* (* PI angle_m) 0.005555555555555556))
(* (+ b_m a) (- b_m a))))))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double t_0 = (0.005555555555555556 * angle_m) * ((double) M_PI);
double t_1 = -t_0;
double tmp;
if (angle_m <= 1.4e+249) {
tmp = ((sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0))) * 2.0) * ((a + b_m) * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)))) * (b_m - a);
} else {
tmp = (2.0 * (cos((fma((0.005555555555555556 * angle_m), ((double) M_PI), t_1) / 2.0)) * cos(((t_0 - t_1) / 2.0)))) * (sin(((((double) M_PI) * angle_m) * 0.005555555555555556)) * ((b_m + a) * (b_m - a)));
}
return angle_s * tmp;
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) t_0 = Float64(Float64(0.005555555555555556 * angle_m) * pi) t_1 = Float64(-t_0) tmp = 0.0 if (angle_m <= 1.4e+249) tmp = Float64(Float64(Float64(sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0))) * 2.0) * Float64(Float64(a + b_m) * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)))) * Float64(b_m - a)); else tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(0.005555555555555556 * angle_m), pi, t_1) / 2.0)) * cos(Float64(Float64(t_0 - t_1) / 2.0)))) * Float64(sin(Float64(Float64(pi * angle_m) * 0.005555555555555556)) * Float64(Float64(b_m + a) * Float64(b_m - a)))); end return Float64(angle_s * tmp) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = (-t$95$0)}, N[(angle$95$s * If[LessEqual[angle$95$m, 1.4e+249], N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(a + b$95$m), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + t$95$1), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 - t$95$1), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\\
t_1 := -t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 1.4 \cdot 10^{+249}:\\
\;\;\;\;\left(\left(\sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right) \cdot 2\right) \cdot \left(\left(a + b\_m\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b\_m - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, t\_1\right)}{2}\right) \cdot \cos \left(\frac{t\_0 - t\_1}{2}\right)\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\\
\end{array}
\end{array}
\end{array}
if angle < 1.40000000000000009e249Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6467.0
Applied rewrites67.0%
if 1.40000000000000009e249 < angle Initial program 53.3%
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.1%
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
count-2-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
cos-neg-revN/A
sum-cosN/A
Applied rewrites57.0%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(let* ((t_0 (* (* PI angle_m) 0.005555555555555556)))
(*
angle_s
(if (<= angle_m 1e+61)
(*
(* 2.0 (cos t_0))
(*
(* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b_m))
(- b_m a)))
(*
(* 2.0 (sin (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0))))
(* (sin t_0) (* (+ b_m a) (- b_m a))))))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
double tmp;
if (angle_m <= 1e+61) {
tmp = (2.0 * cos(t_0)) * ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b_m)) * (b_m - a));
} else {
tmp = (2.0 * sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0)))) * (sin(t_0) * ((b_m + a) * (b_m - a)));
}
return angle_s * tmp;
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556) tmp = 0.0 if (angle_m <= 1e+61) tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(2.0 * sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0)))) * Float64(sin(t_0) * Float64(Float64(b_m + a) * Float64(b_m - a)))); end return Float64(angle_s * tmp) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 1e+61], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $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]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 10^{+61}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right)\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}
\end{array}
if angle < 9.99999999999999949e60Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
if 9.99999999999999949e60 < angle Initial program 53.3%
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.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6457.2
Applied rewrites57.2%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(let* ((t_0 (* (* angle_m PI) 0.005555555555555556))
(t_1 (* (+ a b_m) (sin t_0))))
(*
angle_s
(if (<= a 8.5e+213)
(* (* (* (cos t_0) 2.0) t_1) (- b_m a))
(*
(* (fma (* -3.08641975308642e-5 (* angle_m angle_m)) (* PI PI) 2.0) t_1)
(- b_m a))))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double t_0 = (angle_m * ((double) M_PI)) * 0.005555555555555556;
double t_1 = (a + b_m) * sin(t_0);
double tmp;
if (a <= 8.5e+213) {
tmp = ((cos(t_0) * 2.0) * t_1) * (b_m - a);
} else {
tmp = (fma((-3.08641975308642e-5 * (angle_m * angle_m)), (((double) M_PI) * ((double) M_PI)), 2.0) * t_1) * (b_m - a);
}
return angle_s * tmp;
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) t_0 = Float64(Float64(angle_m * pi) * 0.005555555555555556) t_1 = Float64(Float64(a + b_m) * sin(t_0)) tmp = 0.0 if (a <= 8.5e+213) tmp = Float64(Float64(Float64(cos(t_0) * 2.0) * t_1) * Float64(b_m - a)); else tmp = Float64(Float64(fma(Float64(-3.08641975308642e-5 * Float64(angle_m * angle_m)), Float64(pi * pi), 2.0) * t_1) * Float64(b_m - a)); end return Float64(angle_s * tmp) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[(N[(a + b$95$m), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[a, 8.5e+213], N[(N[(N[(N[Cos[t$95$0], $MachinePrecision] * 2.0), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(-3.08641975308642e-5 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 2.0), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\\
t_1 := \left(a + b\_m\right) \cdot \sin t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 8.5 \cdot 10^{+213}:\\
\;\;\;\;\left(\left(\cos t\_0 \cdot 2\right) \cdot t\_1\right) \cdot \left(b\_m - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \pi \cdot \pi, 2\right) \cdot t\_1\right) \cdot \left(b\_m - a\right)\\
\end{array}
\end{array}
\end{array}
if a < 8.4999999999999995e213Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
if 8.4999999999999995e213 < a Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.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.f6461.7
Applied rewrites61.7%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(let* ((t_0 (* PI (/ angle_m 180.0)))
(t_1
(*
(* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b_m))
(- b_m a))))
(*
angle_s
(if (<=
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
-5e+254)
(* (fma (* -3.08641975308642e-5 (* angle_m angle_m)) (* PI PI) 2.0) t_1)
(* 2.0 t_1)))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double t_0 = ((double) M_PI) * (angle_m / 180.0);
double t_1 = (sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b_m)) * (b_m - a);
double tmp;
if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -5e+254) {
tmp = fma((-3.08641975308642e-5 * (angle_m * angle_m)), (((double) M_PI) * ((double) M_PI)), 2.0) * t_1;
} else {
tmp = 2.0 * t_1;
}
return angle_s * tmp;
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) t_0 = Float64(pi * Float64(angle_m / 180.0)) t_1 = Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b_m)) * Float64(b_m - a)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -5e+254) tmp = Float64(fma(Float64(-3.08641975308642e-5 * Float64(angle_m * angle_m)), Float64(pi * pi), 2.0) * t_1); else tmp = Float64(2.0 * t_1); end return Float64(angle_s * tmp) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * 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$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], -5e+254], N[(N[(N[(-3.08641975308642e-5 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 2.0), $MachinePrecision] * t$95$1), $MachinePrecision], N[(2.0 * t$95$1), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := \left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -5 \cdot 10^{+254}:\\
\;\;\;\;\mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \pi \cdot \pi, 2\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot t\_1\\
\end{array}
\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))))) < -4.99999999999999994e254Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
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.f6462.3
Applied rewrites62.3%
if -4.99999999999999994e254 < (*.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 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Taylor expanded in angle around 0
Applied rewrites65.7%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(*
angle_s
(*
(*
(* (sin (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0))) 2.0)
(* (+ a b_m) (sin (* (* angle_m PI) 0.005555555555555556))))
(- b_m a))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
return angle_s * (((sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0))) * 2.0) * ((a + b_m) * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)))) * (b_m - a));
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) return Float64(angle_s * Float64(Float64(Float64(sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0))) * 2.0) * Float64(Float64(a + b_m) * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)))) * Float64(b_m - a))) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(a + b$95$m), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(\left(\sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right) \cdot 2\right) \cdot \left(\left(a + b\_m\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b\_m - a\right)\right)
\end{array}
Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6467.0
Applied rewrites67.0%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(let* ((t_0 (* PI (/ angle_m 180.0))))
(*
angle_s
(if (<=
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
-2e+295)
(*
(*
(fma
(* 2.0 (* angle_m angle_m))
(* (* (* (* PI PI) PI) (+ a b_m)) -1.1431184270690443e-7)
(* (* (+ a b_m) PI) 0.011111111111111112))
angle_m)
(- b_m a))
(*
2.0
(*
(* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b_m))
(- b_m a)))))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double t_0 = ((double) M_PI) * (angle_m / 180.0);
double tmp;
if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -2e+295) {
tmp = (fma((2.0 * (angle_m * angle_m)), ((((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * (a + b_m)) * -1.1431184270690443e-7), (((a + b_m) * ((double) M_PI)) * 0.011111111111111112)) * angle_m) * (b_m - a);
} else {
tmp = 2.0 * ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b_m)) * (b_m - a));
}
return angle_s * tmp;
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) t_0 = Float64(pi * Float64(angle_m / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -2e+295) tmp = Float64(Float64(fma(Float64(2.0 * Float64(angle_m * angle_m)), Float64(Float64(Float64(Float64(pi * pi) * pi) * Float64(a + b_m)) * -1.1431184270690443e-7), Float64(Float64(Float64(a + b_m) * pi) * 0.011111111111111112)) * angle_m) * Float64(b_m - a)); else tmp = Float64(2.0 * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b_m)) * Float64(b_m - a))); end return Float64(angle_s * tmp) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * 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$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], -2e+295], N[(N[(N[(N[(2.0 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * -1.1431184270690443e-7), $MachinePrecision] + N[(N[(N[(a + b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -2 \cdot 10^{+295}:\\
\;\;\;\;\left(\mathsf{fma}\left(2 \cdot \left(angle\_m \cdot angle\_m\right), \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot -1.1431184270690443 \cdot 10^{-7}, \left(\left(a + b\_m\right) \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right) \cdot \left(b\_m - a\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\end{array}
\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))))) < -2e295Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites61.0%
if -2e295 < (*.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 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Taylor expanded in angle around 0
Applied rewrites65.7%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(let* ((t_0 (* PI (/ angle_m 180.0)))
(t_1
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
(*
angle_s
(if (<= t_1 -2e+295)
(*
(*
(fma
(* 2.0 (* angle_m angle_m))
(* (* (* (* PI PI) PI) (+ a b_m)) -1.1431184270690443e-7)
(* (* (+ a b_m) PI) 0.011111111111111112))
angle_m)
(- b_m a))
(if (<= t_1 1e+293)
(*
2.0
(*
(sin (* (* PI angle_m) 0.005555555555555556))
(* (+ b_m a) (- b_m a))))
(*
(* (* (* angle_m PI) (+ a b_m)) (- b_m a))
0.011111111111111112))))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double t_0 = ((double) M_PI) * (angle_m / 180.0);
double t_1 = ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
double tmp;
if (t_1 <= -2e+295) {
tmp = (fma((2.0 * (angle_m * angle_m)), ((((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * (a + b_m)) * -1.1431184270690443e-7), (((a + b_m) * ((double) M_PI)) * 0.011111111111111112)) * angle_m) * (b_m - a);
} else if (t_1 <= 1e+293) {
tmp = 2.0 * (sin(((((double) M_PI) * angle_m) * 0.005555555555555556)) * ((b_m + a) * (b_m - a)));
} else {
tmp = (((angle_m * ((double) M_PI)) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
}
return angle_s * tmp;
}
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) t_0 = Float64(pi * Float64(angle_m / 180.0)) t_1 = Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) tmp = 0.0 if (t_1 <= -2e+295) tmp = Float64(Float64(fma(Float64(2.0 * Float64(angle_m * angle_m)), Float64(Float64(Float64(Float64(pi * pi) * pi) * Float64(a + b_m)) * -1.1431184270690443e-7), Float64(Float64(Float64(a + b_m) * pi) * 0.011111111111111112)) * angle_m) * Float64(b_m - a)); elseif (t_1 <= 1e+293) tmp = Float64(2.0 * Float64(sin(Float64(Float64(pi * angle_m) * 0.005555555555555556)) * Float64(Float64(b_m + a) * Float64(b_m - a)))); else tmp = Float64(Float64(Float64(Float64(angle_m * pi) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); end return Float64(angle_s * tmp) end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$1, -2e+295], N[(N[(N[(N[(2.0 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * -1.1431184270690443e-7), $MachinePrecision] + N[(N[(N[(a + b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+293], N[(2.0 * N[(N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := \left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+295}:\\
\;\;\;\;\left(\mathsf{fma}\left(2 \cdot \left(angle\_m \cdot angle\_m\right), \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot -1.1431184270690443 \cdot 10^{-7}, \left(\left(a + b\_m\right) \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right) \cdot \left(b\_m - a\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+293}:\\
\;\;\;\;2 \cdot \left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\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))))) < -2e295Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites61.0%
if -2e295 < (*.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))))) < 9.9999999999999992e292Initial program 53.3%
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.1%
Taylor expanded in angle around 0
Applied rewrites55.6%
if 9.9999999999999992e292 < (*.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 53.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--.f6454.0
Applied rewrites54.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--.f6462.1
Applied rewrites62.1%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(*
angle_s
(if (<= a 5.6e-111)
(* (* b_m b_m) (sin (* 2.0 (* (* 0.005555555555555556 angle_m) PI))))
(* (* (* (* (+ a b_m) PI) angle_m) 0.011111111111111112) (- b_m a)))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if (a <= 5.6e-111) {
tmp = (b_m * b_m) * sin((2.0 * ((0.005555555555555556 * angle_m) * ((double) M_PI))));
} else {
tmp = ((((a + b_m) * ((double) M_PI)) * angle_m) * 0.011111111111111112) * (b_m - a);
}
return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if (a <= 5.6e-111) {
tmp = (b_m * b_m) * Math.sin((2.0 * ((0.005555555555555556 * angle_m) * Math.PI)));
} else {
tmp = ((((a + b_m) * Math.PI) * angle_m) * 0.011111111111111112) * (b_m - a);
}
return angle_s * tmp;
}
b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b_m, angle_m): tmp = 0 if a <= 5.6e-111: tmp = (b_m * b_m) * math.sin((2.0 * ((0.005555555555555556 * angle_m) * math.pi))) else: tmp = ((((a + b_m) * math.pi) * angle_m) * 0.011111111111111112) * (b_m - a) return angle_s * tmp
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) tmp = 0.0 if (a <= 5.6e-111) tmp = Float64(Float64(b_m * b_m) * sin(Float64(2.0 * Float64(Float64(0.005555555555555556 * angle_m) * pi)))); else tmp = Float64(Float64(Float64(Float64(Float64(a + b_m) * pi) * angle_m) * 0.011111111111111112) * Float64(b_m - a)); end return Float64(angle_s * tmp) end
b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b_m, angle_m) tmp = 0.0; if (a <= 5.6e-111) tmp = (b_m * b_m) * sin((2.0 * ((0.005555555555555556 * angle_m) * pi))); else tmp = ((((a + b_m) * pi) * angle_m) * 0.011111111111111112) * (b_m - a); end tmp_2 = angle_s * tmp; end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a, 5.6e-111], N[(N[(b$95$m * b$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(a + b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 5.6 \cdot 10^{-111}:\\
\;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \sin \left(2 \cdot \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(a + b\_m\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\\
\end{array}
\end{array}
if a < 5.5999999999999999e-111Initial program 53.3%
Taylor expanded in a around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-cos.f64N/A
Applied rewrites35.8%
Applied rewrites35.6%
if 5.5999999999999999e-111 < a Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f6462.2
Applied rewrites62.2%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(*
angle_s
(if (<= angle_m 1.9e+269)
(* (* (* (* (+ a b_m) PI) angle_m) 0.011111111111111112) (- b_m a))
(* (* (* PI angle_m) (* (+ b_m a) (- a))) 0.011111111111111112))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if (angle_m <= 1.9e+269) {
tmp = ((((a + b_m) * ((double) M_PI)) * angle_m) * 0.011111111111111112) * (b_m - a);
} else {
tmp = ((((double) M_PI) * angle_m) * ((b_m + a) * -a)) * 0.011111111111111112;
}
return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if (angle_m <= 1.9e+269) {
tmp = ((((a + b_m) * Math.PI) * angle_m) * 0.011111111111111112) * (b_m - a);
} else {
tmp = ((Math.PI * angle_m) * ((b_m + a) * -a)) * 0.011111111111111112;
}
return angle_s * tmp;
}
b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b_m, angle_m): tmp = 0 if angle_m <= 1.9e+269: tmp = ((((a + b_m) * math.pi) * angle_m) * 0.011111111111111112) * (b_m - a) else: tmp = ((math.pi * angle_m) * ((b_m + a) * -a)) * 0.011111111111111112 return angle_s * tmp
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) tmp = 0.0 if (angle_m <= 1.9e+269) tmp = Float64(Float64(Float64(Float64(Float64(a + b_m) * pi) * angle_m) * 0.011111111111111112) * Float64(b_m - a)); else tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b_m + a) * Float64(-a))) * 0.011111111111111112); end return Float64(angle_s * tmp) end
b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b_m, angle_m) tmp = 0.0; if (angle_m <= 1.9e+269) tmp = ((((a + b_m) * pi) * angle_m) * 0.011111111111111112) * (b_m - a); else tmp = ((pi * angle_m) * ((b_m + a) * -a)) * 0.011111111111111112; end tmp_2 = angle_s * tmp; end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 1.9e+269], N[(N[(N[(N[(N[(a + b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 1.9 \cdot 10^{+269}:\\
\;\;\;\;\left(\left(\left(\left(a + b\_m\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 1.89999999999999991e269Initial program 53.3%
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.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
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lower-*.f64N/A
Applied rewrites67.0%
Applied rewrites66.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f6462.2
Applied rewrites62.2%
if 1.89999999999999991e269 < angle Initial program 53.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--.f6454.0
Applied rewrites54.0%
Taylor expanded in a around inf
mul-1-negN/A
lower-neg.f6437.9
Applied rewrites37.9%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -2e-205)
(* (* (* (* angle_m PI) -0.011111111111111112) a) a)
(* (* (* PI angle_m) (* b_m (- b_m a))) 0.011111111111111112))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -2e-205) {
tmp = (((angle_m * ((double) M_PI)) * -0.011111111111111112) * a) * a;
} else {
tmp = ((((double) M_PI) * angle_m) * (b_m * (b_m - a))) * 0.011111111111111112;
}
return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= -2e-205) {
tmp = (((angle_m * Math.PI) * -0.011111111111111112) * a) * a;
} else {
tmp = ((Math.PI * angle_m) * (b_m * (b_m - a))) * 0.011111111111111112;
}
return angle_s * tmp;
}
b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b_m, angle_m): tmp = 0 if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= -2e-205: tmp = (((angle_m * math.pi) * -0.011111111111111112) * a) * a else: tmp = ((math.pi * angle_m) * (b_m * (b_m - a))) * 0.011111111111111112 return angle_s * tmp
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -2e-205) tmp = Float64(Float64(Float64(Float64(angle_m * pi) * -0.011111111111111112) * a) * a); else tmp = Float64(Float64(Float64(pi * angle_m) * Float64(b_m * Float64(b_m - a))) * 0.011111111111111112); end return Float64(angle_s * tmp) end
b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b_m, angle_m) tmp = 0.0; if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= -2e-205) tmp = (((angle_m * pi) * -0.011111111111111112) * a) * a; else tmp = ((pi * angle_m) * (b_m * (b_m - a))) * 0.011111111111111112; end tmp_2 = angle_s * tmp; end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-205], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * a), $MachinePrecision] * a), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -2 \cdot 10^{-205}:\\
\;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot -0.011111111111111112\right) \cdot a\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\_m\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)))) < -2e-205Initial program 53.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--.f6454.0
Applied rewrites54.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites34.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -2e-205 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.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--.f6454.0
Applied rewrites54.0%
Taylor expanded in a around 0
Applied rewrites37.1%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -2e-205)
(* (* (* (* angle_m PI) -0.011111111111111112) a) a)
(* (* 0.011111111111111112 angle_m) (* PI (* b_m b_m))))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -2e-205) {
tmp = (((angle_m * ((double) M_PI)) * -0.011111111111111112) * a) * a;
} else {
tmp = (0.011111111111111112 * angle_m) * (((double) M_PI) * (b_m * b_m));
}
return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= -2e-205) {
tmp = (((angle_m * Math.PI) * -0.011111111111111112) * a) * a;
} else {
tmp = (0.011111111111111112 * angle_m) * (Math.PI * (b_m * b_m));
}
return angle_s * tmp;
}
b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b_m, angle_m): tmp = 0 if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= -2e-205: tmp = (((angle_m * math.pi) * -0.011111111111111112) * a) * a else: tmp = (0.011111111111111112 * angle_m) * (math.pi * (b_m * b_m)) return angle_s * tmp
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -2e-205) tmp = Float64(Float64(Float64(Float64(angle_m * pi) * -0.011111111111111112) * a) * a); else tmp = Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(b_m * b_m))); end return Float64(angle_s * tmp) end
b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b_m, angle_m) tmp = 0.0; if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= -2e-205) tmp = (((angle_m * pi) * -0.011111111111111112) * a) * a; else tmp = (0.011111111111111112 * angle_m) * (pi * (b_m * b_m)); end tmp_2 = angle_s * tmp; end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-205], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * a), $MachinePrecision] * a), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -2 \cdot 10^{-205}:\\
\;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot -0.011111111111111112\right) \cdot a\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\_m\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)))) < -2e-205Initial program 53.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--.f6454.0
Applied rewrites54.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites34.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -2e-205 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.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--.f6454.0
Applied rewrites54.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites34.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
Taylor expanded in a around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
pow2N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6434.8
Applied rewrites34.8%
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -2e-205)
(* (* (* -0.011111111111111112 angle_m) PI) (* a a))
(* (* 0.011111111111111112 angle_m) (* PI (* b_m b_m))))))b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -2e-205) {
tmp = ((-0.011111111111111112 * angle_m) * ((double) M_PI)) * (a * a);
} else {
tmp = (0.011111111111111112 * angle_m) * (((double) M_PI) * (b_m * b_m));
}
return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
double tmp;
if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= -2e-205) {
tmp = ((-0.011111111111111112 * angle_m) * Math.PI) * (a * a);
} else {
tmp = (0.011111111111111112 * angle_m) * (Math.PI * (b_m * b_m));
}
return angle_s * tmp;
}
b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b_m, angle_m): tmp = 0 if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= -2e-205: tmp = ((-0.011111111111111112 * angle_m) * math.pi) * (a * a) else: tmp = (0.011111111111111112 * angle_m) * (math.pi * (b_m * b_m)) return angle_s * tmp
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -2e-205) tmp = Float64(Float64(Float64(-0.011111111111111112 * angle_m) * pi) * Float64(a * a)); else tmp = Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(b_m * b_m))); end return Float64(angle_s * tmp) end
b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b_m, angle_m) tmp = 0.0; if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= -2e-205) tmp = ((-0.011111111111111112 * angle_m) * pi) * (a * a); else tmp = (0.011111111111111112 * angle_m) * (pi * (b_m * b_m)); end tmp_2 = angle_s * tmp; end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-205], N[(N[(N[(-0.011111111111111112 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -2 \cdot 10^{-205}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\_m\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)))) < -2e-205Initial program 53.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--.f6454.0
Applied rewrites54.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites34.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
if -2e-205 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.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--.f6454.0
Applied rewrites54.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites34.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
Taylor expanded in a around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
pow2N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f6434.8
Applied rewrites34.8%
b_m = (fabs.f64 b) angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b_m angle_m) :precision binary64 (* angle_s (* (* (* -0.011111111111111112 angle_m) PI) (* a a))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
return angle_s * (((-0.011111111111111112 * angle_m) * ((double) M_PI)) * (a * a));
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
return angle_s * (((-0.011111111111111112 * angle_m) * Math.PI) * (a * a));
}
b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b_m, angle_m): return angle_s * (((-0.011111111111111112 * angle_m) * math.pi) * (a * a))
b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b_m, angle_m) return Float64(angle_s * Float64(Float64(Float64(-0.011111111111111112 * angle_m) * pi) * Float64(a * a))) end
b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a, b_m, angle_m) tmp = angle_s * (((-0.011111111111111112 * angle_m) * pi) * (a * a)); end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(N[(-0.011111111111111112 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(\left(-0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a \cdot a\right)\right)
\end{array}
Initial program 53.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--.f6454.0
Applied rewrites54.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites34.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
herbie shell --seed 2025140
(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)))))