
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
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 5.8e+29)
(*
(*
(- b a)
(* (* (+ a b) (sin (* (* 0.005555555555555556 angle_m) PI))) 2.0))
(cos (* (* PI 0.005555555555555556) angle_m)))
(if (<= angle_m 4.6e+285)
(*
(*
(* (- b a) (+ b a))
(* 2.0 (sin (* (* angle_m PI) 0.005555555555555556))))
(cos (* (log (pow (exp PI) 0.005555555555555556)) angle_m)))
(*
(* (* 2.0 (fma (- a) a (* b b))) (sin (* PI (/ angle_m 180.0))))
(sin (fma (* 0.005555555555555556 angle_m) PI (* 0.5 PI))))))))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 <= 5.8e+29) {
tmp = ((b - a) * (((a + b) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI)))) * 2.0)) * cos(((((double) M_PI) * 0.005555555555555556) * angle_m));
} else if (angle_m <= 4.6e+285) {
tmp = (((b - a) * (b + a)) * (2.0 * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)))) * cos((log(pow(exp(((double) M_PI)), 0.005555555555555556)) * angle_m));
} else {
tmp = ((2.0 * fma(-a, a, (b * b))) * sin((((double) M_PI) * (angle_m / 180.0)))) * sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (0.5 * ((double) M_PI))));
}
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 <= 5.8e+29) tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))) * 2.0)) * cos(Float64(Float64(pi * 0.005555555555555556) * angle_m))); elseif (angle_m <= 4.6e+285) tmp = Float64(Float64(Float64(Float64(b - a) * Float64(b + a)) * Float64(2.0 * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)))) * cos(Float64(log((exp(pi) ^ 0.005555555555555556)) * angle_m))); else tmp = Float64(Float64(Float64(2.0 * fma(Float64(-a), a, Float64(b * b))) * sin(Float64(pi * Float64(angle_m / 180.0)))) * sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(0.5 * pi)))); 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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 5.8e+29], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 4.6e+285], N[(N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[Log[N[Power[N[Exp[Pi], $MachinePrecision], 0.005555555555555556], $MachinePrecision]], $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[((-a) * a + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(0.5 * Pi), $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 5.8 \cdot 10^{+29}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\right) \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\
\mathbf{elif}\;angle\_m \leq 4.6 \cdot 10^{+285}:\\
\;\;\;\;\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \left(\log \left({\left(e^{\pi}\right)}^{0.005555555555555556}\right) \cdot angle\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, 0.5 \cdot \pi\right)\right)\\
\end{array}
\end{array}
if angle < 5.7999999999999999e29Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
pow2N/A
lift-pow.f64N/A
+-commutativeN/A
lift-neg.f64N/A
fp-cancel-sub-sign-invN/A
unpow2N/A
lift-pow.f64N/A
lift--.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites57.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites67.3%
if 5.7999999999999999e29 < angle < 4.6000000000000001e285Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
pow2N/A
lift-pow.f64N/A
+-commutativeN/A
lift-neg.f64N/A
fp-cancel-sub-sign-invN/A
unpow2N/A
lift-pow.f64N/A
lift--.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites57.4%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6457.3
Applied rewrites57.3%
if 4.6000000000000001e285 < angle Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lift-PI.f64N/A
mult-flipN/A
metadata-evalN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6456.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.4
Applied rewrites56.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
(if (<= a 2e+223)
(*
(*
(- b a)
(* (* (+ a b) (sin (* (* 0.005555555555555556 angle_m) PI))) 2.0))
(cos (* (* PI 0.005555555555555556) angle_m)))
(if (<= a 4.5e+263)
(* 0.011111111111111112 (* (+ b a) (* (* (- b a) PI) angle_m)))
(*
(*
(* (- b a) (+ b a))
(* 2.0 (sin (* (* angle_m PI) 0.005555555555555556))))
1.0)))))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 (a <= 2e+223) {
tmp = ((b - a) * (((a + b) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI)))) * 2.0)) * cos(((((double) M_PI) * 0.005555555555555556) * angle_m));
} else if (a <= 4.5e+263) {
tmp = 0.011111111111111112 * ((b + a) * (((b - a) * ((double) M_PI)) * angle_m));
} else {
tmp = (((b - a) * (b + a)) * (2.0 * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)))) * 1.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 tmp;
if (a <= 2e+223) {
tmp = ((b - a) * (((a + b) * Math.sin(((0.005555555555555556 * angle_m) * Math.PI))) * 2.0)) * Math.cos(((Math.PI * 0.005555555555555556) * angle_m));
} else if (a <= 4.5e+263) {
tmp = 0.011111111111111112 * ((b + a) * (((b - a) * Math.PI) * angle_m));
} else {
tmp = (((b - a) * (b + a)) * (2.0 * Math.sin(((angle_m * Math.PI) * 0.005555555555555556)))) * 1.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): tmp = 0 if a <= 2e+223: tmp = ((b - a) * (((a + b) * math.sin(((0.005555555555555556 * angle_m) * math.pi))) * 2.0)) * math.cos(((math.pi * 0.005555555555555556) * angle_m)) elif a <= 4.5e+263: tmp = 0.011111111111111112 * ((b + a) * (((b - a) * math.pi) * angle_m)) else: tmp = (((b - a) * (b + a)) * (2.0 * math.sin(((angle_m * math.pi) * 0.005555555555555556)))) * 1.0 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 (a <= 2e+223) tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))) * 2.0)) * cos(Float64(Float64(pi * 0.005555555555555556) * angle_m))); elseif (a <= 4.5e+263) tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(Float64(Float64(b - a) * pi) * angle_m))); else tmp = Float64(Float64(Float64(Float64(b - a) * Float64(b + a)) * Float64(2.0 * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)))) * 1.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) tmp = 0.0; if (a <= 2e+223) tmp = ((b - a) * (((a + b) * sin(((0.005555555555555556 * angle_m) * pi))) * 2.0)) * cos(((pi * 0.005555555555555556) * angle_m)); elseif (a <= 4.5e+263) tmp = 0.011111111111111112 * ((b + a) * (((b - a) * pi) * angle_m)); else tmp = (((b - a) * (b + a)) * (2.0 * sin(((angle_m * pi) * 0.005555555555555556)))) * 1.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_] := N[(angle$95$s * If[LessEqual[a, 2e+223], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+263], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $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}\;a \leq 2 \cdot 10^{+223}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\right) \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{+263}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot 1\\
\end{array}
\end{array}
if a < 2.00000000000000009e223Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
pow2N/A
lift-pow.f64N/A
+-commutativeN/A
lift-neg.f64N/A
fp-cancel-sub-sign-invN/A
unpow2N/A
lift-pow.f64N/A
lift--.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites57.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites67.3%
if 2.00000000000000009e223 < a < 4.50000000000000014e263Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.2
Applied rewrites62.2%
if 4.50000000000000014e263 < a Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
pow2N/A
lift-pow.f64N/A
+-commutativeN/A
lift-neg.f64N/A
fp-cancel-sub-sign-invN/A
unpow2N/A
lift-pow.f64N/A
lift--.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites57.4%
Taylor expanded in angle around 0
Applied rewrites55.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
(if (<= angle_m 2.6e-37)
(* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
(if (<= angle_m 1.55e+147)
(*
(*
(* (- b a) (+ b a))
(* 2.0 (sin (* (* angle_m PI) 0.005555555555555556))))
(cos (* (* PI 0.005555555555555556) angle_m)))
(*
0.011111111111111112
(* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m))))))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 <= 2.6e-37) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
} else if (angle_m <= 1.55e+147) {
tmp = (((b - a) * (b + a)) * (2.0 * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)))) * cos(((((double) M_PI) * 0.005555555555555556) * angle_m));
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
}
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 <= 2.6e-37) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
} else if (angle_m <= 1.55e+147) {
tmp = (((b - a) * (b + a)) * (2.0 * Math.sin(((angle_m * Math.PI) * 0.005555555555555556)))) * Math.cos(((Math.PI * 0.005555555555555556) * angle_m));
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
}
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 <= 2.6e-37: tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi elif angle_m <= 1.55e+147: tmp = (((b - a) * (b + a)) * (2.0 * math.sin(((angle_m * math.pi) * 0.005555555555555556)))) * math.cos(((math.pi * 0.005555555555555556) * angle_m)) else: tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m) 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 <= 2.6e-37) tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi); elseif (angle_m <= 1.55e+147) tmp = Float64(Float64(Float64(Float64(b - a) * Float64(b + a)) * Float64(2.0 * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)))) * cos(Float64(Float64(pi * 0.005555555555555556) * angle_m))); else tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m)); 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 <= 2.6e-37) tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi; elseif (angle_m <= 1.55e+147) tmp = (((b - a) * (b + a)) * (2.0 * sin(((angle_m * pi) * 0.005555555555555556)))) * cos(((pi * 0.005555555555555556) * angle_m)); else tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m); 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, 2.6e-37], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], If[LessEqual[angle$95$m, 1.55e+147], N[(N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 2.6 \cdot 10^{-37}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
\mathbf{elif}\;angle\_m \leq 1.55 \cdot 10^{+147}:\\
\;\;\;\;\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if angle < 2.5999999999999998e-37Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.3
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6462.3
Applied rewrites62.3%
if 2.5999999999999998e-37 < angle < 1.55e147Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
pow2N/A
lift-pow.f64N/A
+-commutativeN/A
lift-neg.f64N/A
fp-cancel-sub-sign-invN/A
unpow2N/A
lift-pow.f64N/A
lift--.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites57.4%
if 1.55e147 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.9%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
pow-to-expN/A
lift-log.f64N/A
lift-*.f64N/A
lift-exp.f64N/A
lift--.f64N/A
lift-+.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites38.4%
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 (cos (* (* PI 0.005555555555555556) angle_m))))
(*
angle_s
(if (<= angle_m 6e+169)
(*
(*
(- b a)
(* (* (+ a b) (sin (* (* 0.005555555555555556 angle_m) PI))) 2.0))
t_0)
(*
(* (* 2.0 (fma (- a) a (* b b))) (sin (/ 1.0 (/ 180.0 (* angle_m PI)))))
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 = cos(((((double) M_PI) * 0.005555555555555556) * angle_m));
double tmp;
if (angle_m <= 6e+169) {
tmp = ((b - a) * (((a + b) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI)))) * 2.0)) * t_0;
} else {
tmp = ((2.0 * fma(-a, a, (b * b))) * sin((1.0 / (180.0 / (angle_m * ((double) M_PI)))))) * 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 = cos(Float64(Float64(pi * 0.005555555555555556) * angle_m)) tmp = 0.0 if (angle_m <= 6e+169) tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))) * 2.0)) * t_0); else tmp = Float64(Float64(Float64(2.0 * fma(Float64(-a), a, Float64(b * b))) * sin(Float64(1.0 / Float64(180.0 / Float64(angle_m * pi))))) * t_0); 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[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 6e+169], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[(2.0 * N[((-a) * a + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(1.0 / N[(180.0 / N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 6 \cdot 10^{+169}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\frac{1}{\frac{180}{angle\_m \cdot \pi}}\right)\right) \cdot t\_0\\
\end{array}
\end{array}
\end{array}
if angle < 5.9999999999999999e169Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
pow2N/A
lift-pow.f64N/A
+-commutativeN/A
lift-neg.f64N/A
fp-cancel-sub-sign-invN/A
unpow2N/A
lift-pow.f64N/A
lift--.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites57.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites67.3%
if 5.9999999999999999e169 < angle Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
div-flipN/A
lower-/.f64N/A
lower-/.f6456.2
Applied rewrites56.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 3.2e-68)
(* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
(if (<= angle_m 4.3e+139)
(*
(*
(cos (* -0.005555555555555556 (* angle_m PI)))
(sin (* (* PI 0.005555555555555556) angle_m)))
(* (* (+ b a) (- b a)) 2.0))
(*
0.011111111111111112
(* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m))))))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 <= 3.2e-68) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
} else if (angle_m <= 4.3e+139) {
tmp = (cos((-0.005555555555555556 * (angle_m * ((double) M_PI)))) * sin(((((double) M_PI) * 0.005555555555555556) * angle_m))) * (((b + a) * (b - a)) * 2.0);
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
}
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 <= 3.2e-68) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
} else if (angle_m <= 4.3e+139) {
tmp = (Math.cos((-0.005555555555555556 * (angle_m * Math.PI))) * Math.sin(((Math.PI * 0.005555555555555556) * angle_m))) * (((b + a) * (b - a)) * 2.0);
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
}
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 <= 3.2e-68: tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi elif angle_m <= 4.3e+139: tmp = (math.cos((-0.005555555555555556 * (angle_m * math.pi))) * math.sin(((math.pi * 0.005555555555555556) * angle_m))) * (((b + a) * (b - a)) * 2.0) else: tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m) 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 <= 3.2e-68) tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi); elseif (angle_m <= 4.3e+139) tmp = Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(angle_m * pi))) * sin(Float64(Float64(pi * 0.005555555555555556) * angle_m))) * Float64(Float64(Float64(b + a) * Float64(b - a)) * 2.0)); else tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m)); 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 <= 3.2e-68) tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi; elseif (angle_m <= 4.3e+139) tmp = (cos((-0.005555555555555556 * (angle_m * pi))) * sin(((pi * 0.005555555555555556) * angle_m))) * (((b + a) * (b - a)) * 2.0); else tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m); 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, 3.2e-68], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], If[LessEqual[angle$95$m, 4.3e+139], N[(N[(N[Cos[N[(-0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 3.2 \cdot 10^{-68}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
\mathbf{elif}\;angle\_m \leq 4.3 \cdot 10^{+139}:\\
\;\;\;\;\left(\cos \left(-0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \sin \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if angle < 3.1999999999999999e-68Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.3
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6462.3
Applied rewrites62.3%
if 3.1999999999999999e-68 < angle < 4.2999999999999998e139Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
Applied rewrites57.5%
if 4.2999999999999998e139 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.9%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
pow-to-expN/A
lift-log.f64N/A
lift-*.f64N/A
lift-exp.f64N/A
lift--.f64N/A
lift-+.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites38.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
(if (<= angle_m 2.6e-37)
(* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
(if (<= angle_m 4.3e+139)
(*
(*
(cos (* -0.005555555555555556 (* angle_m PI)))
(sin (* (* angle_m PI) 0.005555555555555556)))
(* (* 2.0 (- b a)) (+ b a)))
(*
0.011111111111111112
(* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m))))))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 <= 2.6e-37) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
} else if (angle_m <= 4.3e+139) {
tmp = (cos((-0.005555555555555556 * (angle_m * ((double) M_PI)))) * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556))) * ((2.0 * (b - a)) * (b + a));
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
}
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 <= 2.6e-37) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
} else if (angle_m <= 4.3e+139) {
tmp = (Math.cos((-0.005555555555555556 * (angle_m * Math.PI))) * Math.sin(((angle_m * Math.PI) * 0.005555555555555556))) * ((2.0 * (b - a)) * (b + a));
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
}
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 <= 2.6e-37: tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi elif angle_m <= 4.3e+139: tmp = (math.cos((-0.005555555555555556 * (angle_m * math.pi))) * math.sin(((angle_m * math.pi) * 0.005555555555555556))) * ((2.0 * (b - a)) * (b + a)) else: tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m) 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 <= 2.6e-37) tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi); elseif (angle_m <= 4.3e+139) tmp = Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(angle_m * pi))) * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556))) * Float64(Float64(2.0 * Float64(b - a)) * Float64(b + a))); else tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m)); 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 <= 2.6e-37) tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi; elseif (angle_m <= 4.3e+139) tmp = (cos((-0.005555555555555556 * (angle_m * pi))) * sin(((angle_m * pi) * 0.005555555555555556))) * ((2.0 * (b - a)) * (b + a)); else tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m); 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, 2.6e-37], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], If[LessEqual[angle$95$m, 4.3e+139], N[(N[(N[Cos[N[(-0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 2.6 \cdot 10^{-37}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
\mathbf{elif}\;angle\_m \leq 4.3 \cdot 10^{+139}:\\
\;\;\;\;\left(\cos \left(-0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if angle < 2.5999999999999998e-37Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.3
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6462.3
Applied rewrites62.3%
if 2.5999999999999998e-37 < angle < 4.2999999999999998e139Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
Applied rewrites57.3%
if 4.2999999999999998e139 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.9%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
pow-to-expN/A
lift-log.f64N/A
lift-*.f64N/A
lift-exp.f64N/A
lift--.f64N/A
lift-+.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites38.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
(if (<= angle_m 3.2e-68)
(* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
(if (<= angle_m 1.8e+147)
(*
(* (+ b a) (- b a))
(sin (* 2.0 (* (* PI 0.005555555555555556) angle_m))))
(*
0.011111111111111112
(* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m))))))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 <= 3.2e-68) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
} else if (angle_m <= 1.8e+147) {
tmp = ((b + a) * (b - a)) * sin((2.0 * ((((double) M_PI) * 0.005555555555555556) * angle_m)));
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
}
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 <= 3.2e-68) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
} else if (angle_m <= 1.8e+147) {
tmp = ((b + a) * (b - a)) * Math.sin((2.0 * ((Math.PI * 0.005555555555555556) * angle_m)));
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
}
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 <= 3.2e-68: tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi elif angle_m <= 1.8e+147: tmp = ((b + a) * (b - a)) * math.sin((2.0 * ((math.pi * 0.005555555555555556) * angle_m))) else: tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m) 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 <= 3.2e-68) tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi); elseif (angle_m <= 1.8e+147) tmp = Float64(Float64(Float64(b + a) * Float64(b - a)) * sin(Float64(2.0 * Float64(Float64(pi * 0.005555555555555556) * angle_m)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m)); 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 <= 3.2e-68) tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi; elseif (angle_m <= 1.8e+147) tmp = ((b + a) * (b - a)) * sin((2.0 * ((pi * 0.005555555555555556) * angle_m))); else tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m); 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, 3.2e-68], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], If[LessEqual[angle$95$m, 1.8e+147], N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 3.2 \cdot 10^{-68}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
\mathbf{elif}\;angle\_m \leq 1.8 \cdot 10^{+147}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if angle < 3.1999999999999999e-68Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.3
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6462.3
Applied rewrites62.3%
if 3.1999999999999999e-68 < angle < 1.8000000000000001e147Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
Applied rewrites57.5%
if 1.8000000000000001e147 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.9%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
pow-to-expN/A
lift-log.f64N/A
lift-*.f64N/A
lift-exp.f64N/A
lift--.f64N/A
lift-+.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites38.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
(if (<= angle_m 4.3e+139)
(*
(* (cos (* -0.005555555555555556 (* PI angle_m))) (- b a))
(* (* (+ a b) (sin (* (* 0.005555555555555556 angle_m) PI))) 2.0))
(*
0.011111111111111112
(* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m)))))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 <= 4.3e+139) {
tmp = (cos((-0.005555555555555556 * (((double) M_PI) * angle_m))) * (b - a)) * (((a + b) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI)))) * 2.0);
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
}
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 <= 4.3e+139) {
tmp = (Math.cos((-0.005555555555555556 * (Math.PI * angle_m))) * (b - a)) * (((a + b) * Math.sin(((0.005555555555555556 * angle_m) * Math.PI))) * 2.0);
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
}
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 <= 4.3e+139: tmp = (math.cos((-0.005555555555555556 * (math.pi * angle_m))) * (b - a)) * (((a + b) * math.sin(((0.005555555555555556 * angle_m) * math.pi))) * 2.0) else: tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m) 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 <= 4.3e+139) tmp = Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(pi * angle_m))) * Float64(b - a)) * Float64(Float64(Float64(a + b) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))) * 2.0)); else tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m)); 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 <= 4.3e+139) tmp = (cos((-0.005555555555555556 * (pi * angle_m))) * (b - a)) * (((a + b) * sin(((0.005555555555555556 * angle_m) * pi))) * 2.0); else tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m); 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, 4.3e+139], N[(N[(N[Cos[N[(-0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 4.3 \cdot 10^{+139}:\\
\;\;\;\;\left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if angle < 4.2999999999999998e139Initial program 53.7%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6456.4
lift-pow.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
pow2N/A
lift-pow.f64N/A
+-commutativeN/A
lift-neg.f64N/A
fp-cancel-sub-sign-invN/A
unpow2N/A
lift-pow.f64N/A
lift--.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites57.4%
Applied rewrites67.5%
if 4.2999999999999998e139 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.9%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
pow-to-expN/A
lift-log.f64N/A
lift-*.f64N/A
lift-exp.f64N/A
lift--.f64N/A
lift-+.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites38.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
(if (<= angle_m 1.85e+81)
(* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
(*
0.011111111111111112
(* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m)))))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.85e+81) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
}
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.85e+81) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
} else {
tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
}
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.85e+81: tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi else: tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m) 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.85e+81) tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi); else tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m)); 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.85e+81) tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi; else tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m); 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.85e+81], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 1.85 \cdot 10^{+81}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if angle < 1.85e81Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.3
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6462.3
Applied rewrites62.3%
if 1.85e81 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.9%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
pow-to-expN/A
lift-log.f64N/A
lift-*.f64N/A
lift-exp.f64N/A
lift--.f64N/A
lift-+.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites38.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
(if (<= angle_m 2e-37)
(* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
(* (* (* angle_m (* (+ b a) (- b a))) 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 <= 2e-37) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
} else {
tmp = ((angle_m * ((b + a) * (b - a))) * ((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 <= 2e-37) {
tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
} else {
tmp = ((angle_m * ((b + a) * (b - a))) * 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 <= 2e-37: tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi else: tmp = ((angle_m * ((b + a) * (b - a))) * 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 <= 2e-37) tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi); else tmp = Float64(Float64(Float64(angle_m * Float64(Float64(b + a) * Float64(b - a))) * 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 <= 2e-37) tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi; else tmp = ((angle_m * ((b + a) * (b - a))) * 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, 2e-37], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], N[(N[(N[(angle$95$m * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $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 2 \cdot 10^{-37}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
\mathbf{else}:\\
\;\;\;\;\left(\left(angle\_m \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 2.00000000000000013e-37Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.3
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6462.3
Applied rewrites62.3%
if 2.00000000000000013e-37 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.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 4.5e-69)
(* (* (* 0.011111111111111112 angle_m) (+ b a)) (* (- b a) PI))
(* (* (* 0.011111111111111112 angle_m) PI) (* (+ 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 <= 4.5e-69) {
tmp = ((0.011111111111111112 * angle_m) * (b + a)) * ((b - a) * ((double) M_PI));
} else {
tmp = ((0.011111111111111112 * angle_m) * ((double) M_PI)) * ((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 <= 4.5e-69) {
tmp = ((0.011111111111111112 * angle_m) * (b + a)) * ((b - a) * Math.PI);
} else {
tmp = ((0.011111111111111112 * angle_m) * Math.PI) * ((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 <= 4.5e-69: tmp = ((0.011111111111111112 * angle_m) * (b + a)) * ((b - a) * math.pi) else: tmp = ((0.011111111111111112 * angle_m) * math.pi) * ((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 <= 4.5e-69) tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * Float64(b + a)) * Float64(Float64(b - a) * pi)); else tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * pi) * 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 <= 4.5e-69) tmp = ((0.011111111111111112 * angle_m) * (b + a)) * ((b - a) * pi); else tmp = ((0.011111111111111112 * angle_m) * pi) * ((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, 4.5e-69], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b + a), $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 \begin{array}{l}
\mathbf{if}\;angle\_m \leq 4.5 \cdot 10^{-69}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
if angle < 4.50000000000000009e-69Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
if 4.50000000000000009e-69 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-pow.f64N/A
pow2N/A
lift-*.f64N/A
lower--.f64N/A
lift-pow.f64N/A
unpow2N/A
fp-cancel-sub-signN/A
lift-*.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6452.7
lift-fma.f64N/A
Applied rewrites54.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 4.6e-69)
(* 0.011111111111111112 (* (+ b a) (* (* (- b a) PI) angle_m)))
(* (* (* 0.011111111111111112 angle_m) PI) (* (+ 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 <= 4.6e-69) {
tmp = 0.011111111111111112 * ((b + a) * (((b - a) * ((double) M_PI)) * angle_m));
} else {
tmp = ((0.011111111111111112 * angle_m) * ((double) M_PI)) * ((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 <= 4.6e-69) {
tmp = 0.011111111111111112 * ((b + a) * (((b - a) * Math.PI) * angle_m));
} else {
tmp = ((0.011111111111111112 * angle_m) * Math.PI) * ((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 <= 4.6e-69: tmp = 0.011111111111111112 * ((b + a) * (((b - a) * math.pi) * angle_m)) else: tmp = ((0.011111111111111112 * angle_m) * math.pi) * ((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 <= 4.6e-69) tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(Float64(Float64(b - a) * pi) * angle_m))); else tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * pi) * 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 <= 4.6e-69) tmp = 0.011111111111111112 * ((b + a) * (((b - a) * pi) * angle_m)); else tmp = ((0.011111111111111112 * angle_m) * pi) * ((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, 4.6e-69], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b + a), $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 \begin{array}{l}
\mathbf{if}\;angle\_m \leq 4.6 \cdot 10^{-69}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
if angle < 4.6000000000000001e-69Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.2
Applied rewrites62.2%
if 4.6000000000000001e-69 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-pow.f64N/A
pow2N/A
lift-*.f64N/A
lower--.f64N/A
lift-pow.f64N/A
unpow2N/A
fp-cancel-sub-signN/A
lift-*.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6452.7
lift-fma.f64N/A
Applied rewrites54.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 4.6e-69)
(* 0.011111111111111112 (* (+ b a) (* (* (- b a) PI) angle_m)))
(* 0.011111111111111112 (* (* (* (+ b a) (- b a)) PI) angle_m)))))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 <= 4.6e-69) {
tmp = 0.011111111111111112 * ((b + a) * (((b - a) * ((double) M_PI)) * angle_m));
} else {
tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * ((double) M_PI)) * angle_m);
}
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 <= 4.6e-69) {
tmp = 0.011111111111111112 * ((b + a) * (((b - a) * Math.PI) * angle_m));
} else {
tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * Math.PI) * angle_m);
}
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 <= 4.6e-69: tmp = 0.011111111111111112 * ((b + a) * (((b - a) * math.pi) * angle_m)) else: tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * math.pi) * angle_m) 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 <= 4.6e-69) tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(Float64(Float64(b - a) * pi) * angle_m))); else tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(b + a) * Float64(b - a)) * pi) * angle_m)); 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 <= 4.6e-69) tmp = 0.011111111111111112 * ((b + a) * (((b - a) * pi) * angle_m)); else tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * pi) * angle_m); 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, 4.6e-69], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 4.6 \cdot 10^{-69}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\_m\right)\\
\end{array}
\end{array}
if angle < 4.6000000000000001e-69Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.2
Applied rewrites62.2%
if 4.6000000000000001e-69 < angle Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
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 (* 2.0 (- (pow b 2.0) (pow a 2.0)))))
(*
angle_s
(if (<= t_0 (- INFINITY))
(* (* 0.011111111111111112 (* a angle_m)) (* (- b a) PI))
(if (<= t_0 2e+148)
(* 0.011111111111111112 (* (* (* (+ b a) (- b a)) PI) angle_m))
(* (* (* 0.011111111111111112 angle_m) (+ b a)) (* b PI)))))))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 = 2.0 * (pow(b, 2.0) - pow(a, 2.0));
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * ((double) M_PI));
} else if (t_0 <= 2e+148) {
tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * ((double) M_PI)) * angle_m);
} else {
tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * ((double) M_PI));
}
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 = 2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0));
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * Math.PI);
} else if (t_0 <= 2e+148) {
tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * Math.PI) * angle_m);
} else {
tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * Math.PI);
}
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 = 2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0)) tmp = 0 if t_0 <= -math.inf: tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * math.pi) elif t_0 <= 2e+148: tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * math.pi) * angle_m) else: tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * math.pi) 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(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(0.011111111111111112 * Float64(a * angle_m)) * Float64(Float64(b - a) * pi)); elseif (t_0 <= 2e+148) tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(b + a) * Float64(b - a)) * pi) * angle_m)); else tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * Float64(b + a)) * Float64(b * pi)); 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 = 2.0 * ((b ^ 2.0) - (a ^ 2.0)); tmp = 0.0; if (t_0 <= -Inf) tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * pi); elseif (t_0 <= 2e+148) tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * pi) * angle_m); else tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * pi); 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[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(0.011111111111111112 * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+148], N[(0.011111111111111112 * N[(N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+148}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \pi\right)\\
\end{array}
\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
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 2.0000000000000001e148Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
if 2.0000000000000001e148 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
Taylor expanded in a around 0
lower-*.f64N/A
lower-PI.f6442.1
Applied rewrites42.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-288)
(* (* 0.011111111111111112 (* a angle_m)) (* (- b a) PI))
(* (* (* 0.011111111111111112 angle_m) (+ b a)) (* b PI)))))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-288) {
tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * ((double) M_PI));
} else {
tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * ((double) M_PI));
}
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-288) {
tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * Math.PI);
} else {
tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * Math.PI);
}
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-288: tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * math.pi) else: tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * math.pi) 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-288) tmp = Float64(Float64(0.011111111111111112 * Float64(a * angle_m)) * Float64(Float64(b - a) * pi)); else tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * Float64(b + a)) * Float64(b * pi)); 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-288) tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * pi); else tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * pi); 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-288], N[(N[(0.011111111111111112 * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b * Pi), $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 10^{-288}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \pi\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)))) < 1.00000000000000006e-288Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if 1.00000000000000006e-288 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
Taylor expanded in a around 0
lower-*.f64N/A
lower-PI.f6442.1
Applied rewrites42.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 (* (- b a) PI)))
(*
angle_s
(if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 1e-288)
(* (* 0.011111111111111112 (* a angle_m)) t_0)
(* (* 0.011111111111111112 (* angle_m b)) 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 = (b - a) * ((double) M_PI);
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= 1e-288) {
tmp = (0.011111111111111112 * (a * angle_m)) * t_0;
} else {
tmp = (0.011111111111111112 * (angle_m * b)) * 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 = (b - a) * Math.PI;
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= 1e-288) {
tmp = (0.011111111111111112 * (a * angle_m)) * t_0;
} else {
tmp = (0.011111111111111112 * (angle_m * b)) * 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 = (b - a) * math.pi tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= 1e-288: tmp = (0.011111111111111112 * (a * angle_m)) * t_0 else: tmp = (0.011111111111111112 * (angle_m * b)) * 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 = Float64(Float64(b - a) * pi) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= 1e-288) tmp = Float64(Float64(0.011111111111111112 * Float64(a * angle_m)) * t_0); else tmp = Float64(Float64(0.011111111111111112 * Float64(angle_m * b)) * 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 = (b - a) * pi; tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= 1e-288) tmp = (0.011111111111111112 * (a * angle_m)) * t_0; else tmp = (0.011111111111111112 * (angle_m * b)) * 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[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]}, 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-288], N[(N[(0.011111111111111112 * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(0.011111111111111112 * N[(angle$95$m * b), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \pi\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-288}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot b\right)\right) \cdot t\_0\\
\end{array}
\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-288Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if 1.00000000000000006e-288 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6440.5
Applied rewrites40.5%
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-288)
(* (* 0.011111111111111112 (* a angle_m)) (* (- b a) PI))
(* 0.011111111111111112 (* b (* (* PI (- b a)) angle_m))))))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-288) {
tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * ((double) M_PI));
} else {
tmp = 0.011111111111111112 * (b * ((((double) M_PI) * (b - a)) * angle_m));
}
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-288) {
tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * Math.PI);
} else {
tmp = 0.011111111111111112 * (b * ((Math.PI * (b - a)) * angle_m));
}
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-288: tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * math.pi) else: tmp = 0.011111111111111112 * (b * ((math.pi * (b - a)) * angle_m)) 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-288) tmp = Float64(Float64(0.011111111111111112 * Float64(a * angle_m)) * Float64(Float64(b - a) * pi)); else tmp = Float64(0.011111111111111112 * Float64(b * Float64(Float64(pi * Float64(b - a)) * angle_m))); 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-288) tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * pi); else tmp = 0.011111111111111112 * (b * ((pi * (b - a)) * angle_m)); 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-288], N[(N[(0.011111111111111112 * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b * N[(N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision] * angle$95$m), $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}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-288}:\\
\;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\_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)))) < 1.00000000000000006e-288Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if 1.00000000000000006e-288 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6441.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6441.6
Applied rewrites41.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 (* 0.011111111111111112 (* b (* (* PI (- b a)) angle_m)))))
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 * (b * ((((double) M_PI) * (b - a)) * angle_m)));
}
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 * (b * ((Math.PI * (b - a)) * angle_m)));
}
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 * (b * ((math.pi * (b - a)) * angle_m)))
angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a, b, angle_m) return Float64(angle_s * Float64(0.011111111111111112 * Float64(b * Float64(Float64(pi * Float64(b - a)) * angle_m)))) 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 * (b * ((pi * (b - a)) * angle_m))); 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[(0.011111111111111112 * N[(b * N[(N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\_m\right)\right)\right)
\end{array}
Initial program 53.7%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6441.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6441.6
Applied rewrites41.6%
herbie shell --seed 2025156
(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)))))