
(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}
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle_m) PI))
(t_1 (* (* (sin t_0) (+ a b)) (- b a)))
(t_2 (* (* PI angle_m) 0.005555555555555556)))
(*
angle_s
(if (<= angle_m 1.7e+53)
(* (* 2.0 (cos t_2)) t_1)
(if (<= angle_m 2.4e+111)
(* 2.0 t_1)
(* (* (cos t_0) 2.0) (* (sin t_2) (* (+ b a) (- b a)))))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double t_0 = (0.005555555555555556 * angle_m) * ((double) M_PI);
double t_1 = (sin(t_0) * (a + b)) * (b - a);
double t_2 = (((double) M_PI) * angle_m) * 0.005555555555555556;
double tmp;
if (angle_m <= 1.7e+53) {
tmp = (2.0 * cos(t_2)) * t_1;
} else if (angle_m <= 2.4e+111) {
tmp = 2.0 * t_1;
} else {
tmp = (cos(t_0) * 2.0) * (sin(t_2) * ((b + a) * (b - a)));
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double t_0 = (0.005555555555555556 * angle_m) * Math.PI;
double t_1 = (Math.sin(t_0) * (a + b)) * (b - a);
double t_2 = (Math.PI * angle_m) * 0.005555555555555556;
double tmp;
if (angle_m <= 1.7e+53) {
tmp = (2.0 * Math.cos(t_2)) * t_1;
} else if (angle_m <= 2.4e+111) {
tmp = 2.0 * t_1;
} else {
tmp = (Math.cos(t_0) * 2.0) * (Math.sin(t_2) * ((b + a) * (b - a)));
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): t_0 = (0.005555555555555556 * angle_m) * math.pi t_1 = (math.sin(t_0) * (a + b)) * (b - a) t_2 = (math.pi * angle_m) * 0.005555555555555556 tmp = 0 if angle_m <= 1.7e+53: tmp = (2.0 * math.cos(t_2)) * t_1 elif angle_m <= 2.4e+111: tmp = 2.0 * t_1 else: tmp = (math.cos(t_0) * 2.0) * (math.sin(t_2) * ((b + a) * (b - a))) return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) t_0 = Float64(Float64(0.005555555555555556 * angle_m) * pi) t_1 = Float64(Float64(sin(t_0) * Float64(a + b)) * Float64(b - a)) t_2 = Float64(Float64(pi * angle_m) * 0.005555555555555556) tmp = 0.0 if (angle_m <= 1.7e+53) tmp = Float64(Float64(2.0 * cos(t_2)) * t_1); elseif (angle_m <= 2.4e+111) tmp = Float64(2.0 * t_1); else tmp = Float64(Float64(cos(t_0) * 2.0) * Float64(sin(t_2) * Float64(Float64(b + a) * Float64(b - a)))); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) t_0 = (0.005555555555555556 * angle_m) * pi; t_1 = (sin(t_0) * (a + b)) * (b - a); t_2 = (pi * angle_m) * 0.005555555555555556; tmp = 0.0; if (angle_m <= 1.7e+53) tmp = (2.0 * cos(t_2)) * t_1; elseif (angle_m <= 2.4e+111) tmp = 2.0 * t_1; else tmp = (cos(t_0) * 2.0) * (sin(t_2) * ((b + a) * (b - a))); end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 1.7e+53], N[(N[(2.0 * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[angle$95$m, 2.4e+111], N[(2.0 * t$95$1), $MachinePrecision], N[(N[(N[Cos[t$95$0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[t$95$2], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]
\begin{array}{l}
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 := \left(\sin t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\
t_2 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 1.7 \cdot 10^{+53}:\\
\;\;\;\;\left(2 \cdot \cos t\_2\right) \cdot t\_1\\
\mathbf{elif}\;angle\_m \leq 2.4 \cdot 10^{+111}:\\
\;\;\;\;2 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\cos t\_0 \cdot 2\right) \cdot \left(\sin t\_2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\
\end{array}
\end{array}
\end{array}
if angle < 1.69999999999999999e53Initial program 71.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 rewrites76.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 rewrites92.1%
if 1.69999999999999999e53 < angle < 2.40000000000000006e111Initial program 28.4%
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.6%
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.8%
Taylor expanded in angle around 0
Applied rewrites32.8%
if 2.40000000000000006e111 < angle Initial program 29.7%
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.6%
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites32.5%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (* 0.005555555555555556 angle_m) PI)))
(*
angle_s
(if (<= angle_m 2.7e+129)
(*
(* 2.0 (sin (fma -0.005555555555555556 (* angle_m PI) (* 0.5 PI))))
(* (* (sin t_0) (+ a b)) (- b a)))
(*
(* (cos t_0) 2.0)
(*
(sin (* (* PI angle_m) 0.005555555555555556))
(* (+ b a) (- b a))))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double t_0 = (0.005555555555555556 * angle_m) * ((double) M_PI);
double tmp;
if (angle_m <= 2.7e+129) {
tmp = (2.0 * sin(fma(-0.005555555555555556, (angle_m * ((double) M_PI)), (0.5 * ((double) M_PI))))) * ((sin(t_0) * (a + b)) * (b - a));
} else {
tmp = (cos(t_0) * 2.0) * (sin(((((double) M_PI) * angle_m) * 0.005555555555555556)) * ((b + a) * (b - a)));
}
return angle_s * tmp;
}
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) t_0 = Float64(Float64(0.005555555555555556 * angle_m) * pi) tmp = 0.0 if (angle_m <= 2.7e+129) tmp = Float64(Float64(2.0 * sin(fma(-0.005555555555555556, Float64(angle_m * pi), Float64(0.5 * pi)))) * Float64(Float64(sin(t_0) * Float64(a + b)) * Float64(b - a))); else tmp = Float64(Float64(cos(t_0) * 2.0) * Float64(sin(Float64(Float64(pi * angle_m) * 0.005555555555555556)) * Float64(Float64(b + a) * Float64(b - a)))); end return Float64(angle_s * tmp) end
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_, angle$95$m_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 2.7e+129], N[(N[(2.0 * N[Sin[N[(-0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[t$95$0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
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\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 2.7 \cdot 10^{+129}:\\
\;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(-0.005555555555555556, angle\_m \cdot \pi, 0.5 \cdot \pi\right)\right)\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\cos t\_0 \cdot 2\right) \cdot \left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\
\end{array}
\end{array}
\end{array}
if angle < 2.7000000000000001e129Initial program 64.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 rewrites68.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 rewrites81.6%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-/.f64N/A
lift-PI.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6481.3
Applied rewrites81.3%
Taylor expanded in angle around 0
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lift-PI.f6481.3
Applied rewrites81.3%
if 2.7000000000000001e129 < angle Initial 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 rewrites33.1%
lift-*.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites33.1%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (* (* PI angle_m) 0.005555555555555556)))
(*
angle_s
(if (<= angle_m 2.4e+111)
(*
2.0
(* (* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b)) (- b a)))
(* (* 2.0 (cos t_0)) (* (sin t_0) (* (+ b a) (- b a))))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
double tmp;
if (angle_m <= 2.4e+111) {
tmp = 2.0 * ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b)) * (b - a));
} else {
tmp = (2.0 * cos(t_0)) * (sin(t_0) * ((b + a) * (b - a)));
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double t_0 = (Math.PI * angle_m) * 0.005555555555555556;
double tmp;
if (angle_m <= 2.4e+111) {
tmp = 2.0 * ((Math.sin(((0.005555555555555556 * angle_m) * Math.PI)) * (a + b)) * (b - a));
} else {
tmp = (2.0 * Math.cos(t_0)) * (Math.sin(t_0) * ((b + a) * (b - a)));
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): t_0 = (math.pi * angle_m) * 0.005555555555555556 tmp = 0 if angle_m <= 2.4e+111: tmp = 2.0 * ((math.sin(((0.005555555555555556 * angle_m) * math.pi)) * (a + b)) * (b - a)) else: tmp = (2.0 * math.cos(t_0)) * (math.sin(t_0) * ((b + a) * (b - a))) return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556) tmp = 0.0 if (angle_m <= 2.4e+111) tmp = Float64(2.0 * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b)) * Float64(b - a))); else tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(sin(t_0) * Float64(Float64(b + a) * Float64(b - a)))); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) t_0 = (pi * angle_m) * 0.005555555555555556; tmp = 0.0; if (angle_m <= 2.4e+111) tmp = 2.0 * ((sin(((0.005555555555555556 * angle_m) * pi)) * (a + b)) * (b - a)); else tmp = (2.0 * cos(t_0)) * (sin(t_0) * ((b + a) * (b - a))); end tmp_2 = angle_s * tmp; end
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_, 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, 2.4e+111], N[(2.0 * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
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 2.4 \cdot 10^{+111}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\sin t\_0 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\
\end{array}
\end{array}
\end{array}
if angle < 2.40000000000000006e111Initial program 65.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 rewrites69.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 rewrites83.7%
Taylor expanded in angle around 0
Applied rewrites81.1%
if 2.40000000000000006e111 < angle Initial program 29.7%
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.6%
angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b angle_m) :precision binary64 (* angle_s (* (* 2.0 (cos (* (* PI angle_m) 0.005555555555555556))) (* (* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b)) (- b a)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
return angle_s * ((2.0 * cos(((((double) M_PI) * angle_m) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b)) * (b - a)));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
return angle_s * ((2.0 * Math.cos(((Math.PI * angle_m) * 0.005555555555555556))) * ((Math.sin(((0.005555555555555556 * angle_m) * Math.PI)) * (a + b)) * (b - a)));
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): return angle_s * ((2.0 * math.cos(((math.pi * angle_m) * 0.005555555555555556))) * ((math.sin(((0.005555555555555556 * angle_m) * math.pi)) * (a + b)) * (b - a)))
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) return Float64(angle_s * Float64(Float64(2.0 * cos(Float64(Float64(pi * angle_m) * 0.005555555555555556))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b)) * Float64(b - a)))) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a, b, angle_m) tmp = angle_s * ((2.0 * cos(((pi * angle_m) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle_m) * pi)) * (a + b)) * (b - a))); end
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_, angle$95$m_] := N[(angle$95$s * N[(N[(2.0 * N[Cos[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(2 \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\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%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) (- INFINITY))
(* (* -0.011111111111111112 a) (* (* angle_m PI) a))
(* (* (* PI angle_m) (* (+ b a) (- b a))) 0.011111111111111112))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -((double) INFINITY)) {
tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * angle_m) * ((b + a) * (b - a))) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -Double.POSITIVE_INFINITY) {
tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * a);
} else {
tmp = ((Math.PI * angle_m) * ((b + a) * (b - a))) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -math.inf: tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a) else: tmp = ((math.pi * angle_m) * ((b + a) * (b - a))) * 0.011111111111111112 return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= Float64(-Inf)) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * a)); else tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b + a) * Float64(b - a))) * 0.011111111111111112); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -Inf) tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * a); else tmp = ((pi * angle_m) * ((b + a) * (b - a))) * 0.011111111111111112; end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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}^{2} - {a}^{2}\right) \leq -\infty:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(b - 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)))) < -inf.0Initial program 53.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--.f6453.5
Applied rewrites53.5%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6453.5
Applied rewrites53.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6453.8
Applied rewrites53.8%
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.f6474.6
Applied rewrites74.6%
if -inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.8%
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--.f6455.1
Applied rewrites55.1%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -20.0)
(* (* -0.011111111111111112 a) (* (* angle_m PI) a))
(* (* angle_m PI) (* (* (- b a) (+ a b)) 0.011111111111111112)))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -20.0) {
tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * a);
} else {
tmp = (angle_m * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -20.0) {
tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * a);
} else {
tmp = (angle_m * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -20.0: tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a) else: tmp = (angle_m * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112) return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -20.0) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * a)); else tmp = Float64(Float64(angle_m * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112)); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -20.0) tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * a); else tmp = (angle_m * pi) * (((b - a) * (a + b)) * 0.011111111111111112); end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -20.0], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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}^{2} - {a}^{2}\right) \leq -20:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(angle\_m \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\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)))) < -20Initial program 54.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--.f6452.4
Applied rewrites52.4%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6452.2
Applied rewrites52.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.3
Applied rewrites52.3%
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.f6463.9
Applied rewrites63.9%
if -20 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.4%
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.0
Applied rewrites56.0%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6456.1
Applied rewrites56.1%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -1e-295)
(* (* -0.011111111111111112 a) (* (* angle_m PI) a))
(* (* (* PI angle_m) (* b (- b a))) 0.011111111111111112))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * angle_m) * (b * (b - a))) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * a);
} else {
tmp = ((Math.PI * angle_m) * (b * (b - a))) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -1e-295: tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a) else: tmp = ((math.pi * angle_m) * (b * (b - a))) * 0.011111111111111112 return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -1e-295) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * a)); else tmp = Float64(Float64(Float64(pi * angle_m) * Float64(b * Float64(b - a))) * 0.011111111111111112); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -1e-295) tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * a); else tmp = ((pi * angle_m) * (b * (b - a))) * 0.011111111111111112; end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-295], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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}^{2} - {a}^{2}\right) \leq -1 \cdot 10^{-295}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b \cdot \left(b - 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
pow2N/A
lift-*.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.6%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -1e-295)
(* (* -0.011111111111111112 a) (* (* angle_m PI) a))
(* (* (* PI angle_m) (* b b)) 0.011111111111111112))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * angle_m) * (b * b)) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * a);
} else {
tmp = ((Math.PI * angle_m) * (b * b)) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -1e-295: tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a) else: tmp = ((math.pi * angle_m) * (b * b)) * 0.011111111111111112 return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -1e-295) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * a)); else tmp = Float64(Float64(Float64(pi * angle_m) * Float64(b * b)) * 0.011111111111111112); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -1e-295) tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * a); else tmp = ((pi * angle_m) * (b * b)) * 0.011111111111111112; end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-295], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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}^{2} - {a}^{2}\right) \leq -1 \cdot 10^{-295}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b \cdot b\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
pow2N/A
lift-*.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
pow2N/A
lift-*.f6455.1
Applied rewrites55.1%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -1e-295)
(* (* -0.011111111111111112 a) (* (* angle_m PI) a))
(* (* (* PI (* b b)) angle_m) 0.011111111111111112))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * (b * b)) * angle_m) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -1e-295) {
tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * a);
} else {
tmp = ((Math.PI * (b * b)) * angle_m) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -1e-295: tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a) else: tmp = ((math.pi * (b * b)) * angle_m) * 0.011111111111111112 return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -1e-295) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * a)); else tmp = Float64(Float64(Float64(pi * Float64(b * b)) * angle_m) * 0.011111111111111112); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -1e-295) tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * a); else tmp = ((pi * (b * b)) * angle_m) * 0.011111111111111112; end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-295], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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}^{2} - {a}^{2}\right) \leq -1 \cdot 10^{-295}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\_m\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
pow2N/A
lift-*.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%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(let* ((t_0 (sin (* (* 0.005555555555555556 angle_m) PI))))
(*
angle_s
(if (<= a 2.6e-81)
(* 2.0 (* (* t_0 (+ a b)) b))
(if (<= a 8e+275)
(* (* (* (* angle_m PI) (+ a b)) (- b a)) 0.011111111111111112)
(* 2.0 (* (- (* a a)) t_0)))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double t_0 = sin(((0.005555555555555556 * angle_m) * ((double) M_PI)));
double tmp;
if (a <= 2.6e-81) {
tmp = 2.0 * ((t_0 * (a + b)) * b);
} else if (a <= 8e+275) {
tmp = (((angle_m * ((double) M_PI)) * (a + b)) * (b - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * (-(a * a) * t_0);
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double t_0 = Math.sin(((0.005555555555555556 * angle_m) * Math.PI));
double tmp;
if (a <= 2.6e-81) {
tmp = 2.0 * ((t_0 * (a + b)) * b);
} else if (a <= 8e+275) {
tmp = (((angle_m * Math.PI) * (a + b)) * (b - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * (-(a * a) * t_0);
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): t_0 = math.sin(((0.005555555555555556 * angle_m) * math.pi)) tmp = 0 if a <= 2.6e-81: tmp = 2.0 * ((t_0 * (a + b)) * b) elif a <= 8e+275: tmp = (((angle_m * math.pi) * (a + b)) * (b - a)) * 0.011111111111111112 else: tmp = 2.0 * (-(a * a) * t_0) return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) t_0 = sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) tmp = 0.0 if (a <= 2.6e-81) tmp = Float64(2.0 * Float64(Float64(t_0 * Float64(a + b)) * b)); elseif (a <= 8e+275) tmp = Float64(Float64(Float64(Float64(angle_m * pi) * Float64(a + b)) * Float64(b - a)) * 0.011111111111111112); else tmp = Float64(2.0 * Float64(Float64(-Float64(a * a)) * t_0)); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) t_0 = sin(((0.005555555555555556 * angle_m) * pi)); tmp = 0.0; if (a <= 2.6e-81) tmp = 2.0 * ((t_0 * (a + b)) * b); elseif (a <= 8e+275) tmp = (((angle_m * pi) * (a + b)) * (b - a)) * 0.011111111111111112; else tmp = 2.0 * (-(a * a) * t_0); end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := Block[{t$95$0 = N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[a, 2.6e-81], N[(2.0 * N[(N[(t$95$0 * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8e+275], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[((-N[(a * a), $MachinePrecision]) * t$95$0), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 2.6 \cdot 10^{-81}:\\
\;\;\;\;2 \cdot \left(\left(t\_0 \cdot \left(a + b\right)\right) \cdot b\right)\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+275}:\\
\;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(-a \cdot a\right) \cdot t\_0\right)\\
\end{array}
\end{array}
\end{array}
if a < 2.5999999999999999e-81Initial program 57.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 rewrites59.6%
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 rewrites68.1%
Taylor expanded in a around 0
Applied rewrites48.9%
Taylor expanded in angle around 0
Applied rewrites47.9%
if 2.5999999999999999e-81 < a < 7.99999999999999968e275Initial program 49.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--.f6450.0
Applied rewrites50.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.5
Applied rewrites62.5%
if 7.99999999999999968e275 < a Initial program 51.1%
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 rewrites74.5%
Taylor expanded in a around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-sin.f6474.0
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6474.5
Applied rewrites74.5%
Taylor expanded in angle around 0
Applied rewrites72.2%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= b 7.8e+231)
(*
2.0
(* (* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b)) (- b a)))
(* (* (* (* angle_m PI) (+ a b)) (- b a)) 0.011111111111111112))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (b <= 7.8e+231) {
tmp = 2.0 * ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b)) * (b - a));
} else {
tmp = (((angle_m * ((double) M_PI)) * (a + b)) * (b - a)) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (b <= 7.8e+231) {
tmp = 2.0 * ((Math.sin(((0.005555555555555556 * angle_m) * Math.PI)) * (a + b)) * (b - a));
} else {
tmp = (((angle_m * Math.PI) * (a + b)) * (b - a)) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if b <= 7.8e+231: tmp = 2.0 * ((math.sin(((0.005555555555555556 * angle_m) * math.pi)) * (a + b)) * (b - a)) else: tmp = (((angle_m * math.pi) * (a + b)) * (b - a)) * 0.011111111111111112 return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (b <= 7.8e+231) tmp = Float64(2.0 * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b)) * Float64(b - a))); else tmp = Float64(Float64(Float64(Float64(angle_m * pi) * Float64(a + b)) * Float64(b - a)) * 0.011111111111111112); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if (b <= 7.8e+231) tmp = 2.0 * ((sin(((0.005555555555555556 * angle_m) * pi)) * (a + b)) * (b - a)); else tmp = (((angle_m * pi) * (a + b)) * (b - a)) * 0.011111111111111112; end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 7.8e+231], N[(2.0 * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 7.8 \cdot 10^{+231}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if b < 7.8000000000000003e231Initial program 55.2%
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.6%
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.2%
Taylor expanded in angle around 0
Applied rewrites65.4%
if 7.8000000000000003e231 < b Initial program 44.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--.f6463.8
Applied rewrites63.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.0
Applied rewrites74.0%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= angle_m 10000000000.0)
(* (* (* (* angle_m PI) (+ a b)) (- b a)) 0.011111111111111112)
(*
2.0
(* (sin (* (* PI angle_m) 0.005555555555555556)) (* (+ b a) (- b a)))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (angle_m <= 10000000000.0) {
tmp = (((angle_m * ((double) M_PI)) * (a + b)) * (b - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * (sin(((((double) M_PI) * angle_m) * 0.005555555555555556)) * ((b + a) * (b - a)));
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (angle_m <= 10000000000.0) {
tmp = (((angle_m * Math.PI) * (a + b)) * (b - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * (Math.sin(((Math.PI * angle_m) * 0.005555555555555556)) * ((b + a) * (b - a)));
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if angle_m <= 10000000000.0: tmp = (((angle_m * math.pi) * (a + b)) * (b - a)) * 0.011111111111111112 else: tmp = 2.0 * (math.sin(((math.pi * angle_m) * 0.005555555555555556)) * ((b + a) * (b - a))) return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (angle_m <= 10000000000.0) tmp = Float64(Float64(Float64(Float64(angle_m * pi) * Float64(a + b)) * Float64(b - a)) * 0.011111111111111112); else tmp = Float64(2.0 * Float64(sin(Float64(Float64(pi * angle_m) * 0.005555555555555556)) * Float64(Float64(b + a) * Float64(b - a)))); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if (angle_m <= 10000000000.0) tmp = (((angle_m * pi) * (a + b)) * (b - a)) * 0.011111111111111112; else tmp = 2.0 * (sin(((pi * angle_m) * 0.005555555555555556)) * ((b + a) * (b - a))); end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 10000000000.0], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 10000000000:\\
\;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\
\end{array}
\end{array}
if angle < 1e10Initial program 76.8%
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--.f6478.9
Applied rewrites78.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--.f6496.6
Applied rewrites96.6%
if 1e10 < angle Initial program 30.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 rewrites33.5%
Taylor expanded in angle around 0
Applied rewrites32.8%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= b 4.2e-178)
(* 2.0 (* (- (* a a)) (sin (* (* 0.005555555555555556 angle_m) PI))))
(* (* (* (* angle_m PI) (+ a b)) (- b a)) 0.011111111111111112))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (b <= 4.2e-178) {
tmp = 2.0 * (-(a * a) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI))));
} else {
tmp = (((angle_m * ((double) M_PI)) * (a + b)) * (b - a)) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (b <= 4.2e-178) {
tmp = 2.0 * (-(a * a) * Math.sin(((0.005555555555555556 * angle_m) * Math.PI)));
} else {
tmp = (((angle_m * Math.PI) * (a + b)) * (b - a)) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if b <= 4.2e-178: tmp = 2.0 * (-(a * a) * math.sin(((0.005555555555555556 * angle_m) * math.pi))) else: tmp = (((angle_m * math.pi) * (a + b)) * (b - a)) * 0.011111111111111112 return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (b <= 4.2e-178) tmp = Float64(2.0 * Float64(Float64(-Float64(a * a)) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)))); else tmp = Float64(Float64(Float64(Float64(angle_m * pi) * Float64(a + b)) * Float64(b - a)) * 0.011111111111111112); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if (b <= 4.2e-178) tmp = 2.0 * (-(a * a) * sin(((0.005555555555555556 * angle_m) * pi))); else tmp = (((angle_m * pi) * (a + b)) * (b - a)) * 0.011111111111111112; end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 4.2e-178], N[(2.0 * N[((-N[(a * a), $MachinePrecision]) * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 4.2 \cdot 10^{-178}:\\
\;\;\;\;2 \cdot \left(\left(-a \cdot a\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if b < 4.2e-178Initial program 56.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 rewrites59.2%
Taylor expanded in a around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-sin.f6442.4
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6442.3
Applied rewrites42.3%
Taylor expanded in angle around 0
Applied rewrites41.3%
if 4.2e-178 < b Initial program 51.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--.f6453.0
Applied rewrites53.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--.f6463.2
Applied rewrites63.2%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= angle_m 8e+162)
(* (* (* (* angle_m PI) (+ a b)) (- b a)) 0.011111111111111112)
(* (- (* a a)) (sin (* (* angle_m PI) 0.011111111111111112))))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (angle_m <= 8e+162) {
tmp = (((angle_m * ((double) M_PI)) * (a + b)) * (b - a)) * 0.011111111111111112;
} else {
tmp = -(a * a) * sin(((angle_m * ((double) M_PI)) * 0.011111111111111112));
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (angle_m <= 8e+162) {
tmp = (((angle_m * Math.PI) * (a + b)) * (b - a)) * 0.011111111111111112;
} else {
tmp = -(a * a) * Math.sin(((angle_m * Math.PI) * 0.011111111111111112));
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if angle_m <= 8e+162: tmp = (((angle_m * math.pi) * (a + b)) * (b - a)) * 0.011111111111111112 else: tmp = -(a * a) * math.sin(((angle_m * math.pi) * 0.011111111111111112)) return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (angle_m <= 8e+162) tmp = Float64(Float64(Float64(Float64(angle_m * pi) * Float64(a + b)) * Float64(b - a)) * 0.011111111111111112); else tmp = Float64(Float64(-Float64(a * a)) * sin(Float64(Float64(angle_m * pi) * 0.011111111111111112))); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if (angle_m <= 8e+162) tmp = (((angle_m * pi) * (a + b)) * (b - a)) * 0.011111111111111112; else tmp = -(a * a) * sin(((angle_m * pi) * 0.011111111111111112)); end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 8e+162], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[((-N[(a * a), $MachinePrecision]) * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 8 \cdot 10^{+162}:\\
\;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(-a \cdot a\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if angle < 7.9999999999999995e162Initial program 61.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--.f6462.1
Applied rewrites62.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--.f6473.4
Applied rewrites73.4%
if 7.9999999999999995e162 < angle Initial program 30.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites20.0%
Taylor expanded in a around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
pow2N/A
lift-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
Applied rewrites24.1%
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
:precision binary64
(*
angle_s
(if (<= angle_m 1.05e+158)
(* (* (* (* angle_m PI) (+ a b)) (- b a)) 0.011111111111111112)
(* (* (* PI angle_m) (* (+ b a) (- a))) 0.011111111111111112))))angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (angle_m <= 1.05e+158) {
tmp = (((angle_m * ((double) M_PI)) * (a + b)) * (b - a)) * 0.011111111111111112;
} else {
tmp = ((((double) M_PI) * angle_m) * ((b + a) * -a)) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
double tmp;
if (angle_m <= 1.05e+158) {
tmp = (((angle_m * Math.PI) * (a + b)) * (b - a)) * 0.011111111111111112;
} else {
tmp = ((Math.PI * angle_m) * ((b + a) * -a)) * 0.011111111111111112;
}
return angle_s * tmp;
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): tmp = 0 if angle_m <= 1.05e+158: tmp = (((angle_m * math.pi) * (a + b)) * (b - a)) * 0.011111111111111112 else: tmp = ((math.pi * angle_m) * ((b + a) * -a)) * 0.011111111111111112 return angle_s * tmp
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) tmp = 0.0 if (angle_m <= 1.05e+158) tmp = Float64(Float64(Float64(Float64(angle_m * pi) * Float64(a + b)) * Float64(b - a)) * 0.011111111111111112); else tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b + a) * Float64(-a))) * 0.011111111111111112); end return Float64(angle_s * tmp) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a, b, angle_m) tmp = 0.0; if (angle_m <= 1.05e+158) tmp = (((angle_m * pi) * (a + b)) * (b - a)) * 0.011111111111111112; else tmp = ((pi * angle_m) * ((b + a) * -a)) * 0.011111111111111112; end tmp_2 = angle_s * tmp; end
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_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 1.05e+158], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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.05 \cdot 10^{+158}:\\
\;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 1.0499999999999999e158Initial program 62.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.5
Applied rewrites62.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--.f6474.0
Applied rewrites74.0%
if 1.0499999999999999e158 < angle Initial program 30.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--.f6430.0
Applied rewrites30.0%
Taylor expanded in a around inf
mul-1-negN/A
lower-neg.f6428.4
Applied rewrites28.4%
angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a b angle_m) :precision binary64 (* angle_s (* (* -0.011111111111111112 a) (* (* angle_m PI) a))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
return angle_s * ((-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * a));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
return angle_s * ((-0.011111111111111112 * a) * ((angle_m * Math.PI) * a));
}
angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a, b, angle_m): return angle_s * ((-0.011111111111111112 * a) * ((angle_m * math.pi) * a))
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) return Float64(angle_s * Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * a))) end
angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a, b, angle_m) tmp = angle_s * ((-0.011111111111111112 * a) * ((angle_m * pi) * a)); end
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_, angle$95$m_] := N[(angle$95$s * N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\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
pow2N/A
lift-*.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)))))