
(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}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* -0.005555555555555556 angle) PI))
(t_1 (/ t_0 2.0))
(t_2
(*
(* (sin (* (* PI angle) 0.005555555555555556)) (+ a b_m))
(- b_m a)))
(t_3 (* (* angle PI) 0.005555555555555556))
(t_4 (cos (/ (+ t_3 t_3) 2.0)))
(t_5 (/ t_3 2.0)))
(if (<= b_m 6.4e-97)
(* (* 2.0 (* (cos (/ (+ t_3 t_0) 2.0)) t_4)) t_2)
(if (<= b_m 1.1e+58)
(*
(*
2.0
(*
(cos
(/
(fma
(* 0.005555555555555556 angle)
PI
(* (* angle PI) (- 0.005555555555555556)))
2.0))
(fma (cos t_5) (cos t_1) (* (sin t_5) (sin t_1)))))
t_2)
(*
(*
2.0
(* (cos (/ (fma (* angle PI) -0.005555555555555556 t_3) 2.0)) t_4))
t_2)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (-0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = t_0 / 2.0;
double t_2 = (sin(((((double) M_PI) * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a);
double t_3 = (angle * ((double) M_PI)) * 0.005555555555555556;
double t_4 = cos(((t_3 + t_3) / 2.0));
double t_5 = t_3 / 2.0;
double tmp;
if (b_m <= 6.4e-97) {
tmp = (2.0 * (cos(((t_3 + t_0) / 2.0)) * t_4)) * t_2;
} else if (b_m <= 1.1e+58) {
tmp = (2.0 * (cos((fma((0.005555555555555556 * angle), ((double) M_PI), ((angle * ((double) M_PI)) * -0.005555555555555556)) / 2.0)) * fma(cos(t_5), cos(t_1), (sin(t_5) * sin(t_1))))) * t_2;
} else {
tmp = (2.0 * (cos((fma((angle * ((double) M_PI)), -0.005555555555555556, t_3) / 2.0)) * t_4)) * t_2;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(-0.005555555555555556 * angle) * pi) t_1 = Float64(t_0 / 2.0) t_2 = Float64(Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(a + b_m)) * Float64(b_m - a)) t_3 = Float64(Float64(angle * pi) * 0.005555555555555556) t_4 = cos(Float64(Float64(t_3 + t_3) / 2.0)) t_5 = Float64(t_3 / 2.0) tmp = 0.0 if (b_m <= 6.4e-97) tmp = Float64(Float64(2.0 * Float64(cos(Float64(Float64(t_3 + t_0) / 2.0)) * t_4)) * t_2); elseif (b_m <= 1.1e+58) tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(0.005555555555555556 * angle), pi, Float64(Float64(angle * pi) * Float64(-0.005555555555555556))) / 2.0)) * fma(cos(t_5), cos(t_1), Float64(sin(t_5) * sin(t_1))))) * t_2); else tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(angle * pi), -0.005555555555555556, t_3) / 2.0)) * t_4)) * t_2); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(-0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$4 = N[Cos[N[(N[(t$95$3 + t$95$3), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 / 2.0), $MachinePrecision]}, If[LessEqual[b$95$m, 6.4e-97], N[(N[(2.0 * N[(N[Cos[N[(N[(t$95$3 + t$95$0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[b$95$m, 1.1e+58], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(N[(angle * Pi), $MachinePrecision] * (-0.005555555555555556)), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t$95$5], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision] + N[(N[Sin[t$95$5], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(angle * Pi), $MachinePrecision] * -0.005555555555555556 + t$95$3), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(-0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := \frac{t\_0}{2}\\
t_2 := \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\
t_3 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
t_4 := \cos \left(\frac{t\_3 + t\_3}{2}\right)\\
t_5 := \frac{t\_3}{2}\\
\mathbf{if}\;b\_m \leq 6.4 \cdot 10^{-97}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{t\_3 + t\_0}{2}\right) \cdot t\_4\right)\right) \cdot t\_2\\
\mathbf{elif}\;b\_m \leq 1.1 \cdot 10^{+58}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \left(angle \cdot \pi\right) \cdot \left(-0.005555555555555556\right)\right)}{2}\right) \cdot \mathsf{fma}\left(\cos t\_5, \cos t\_1, \sin t\_5 \cdot \sin t\_1\right)\right)\right) \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(angle \cdot \pi, -0.005555555555555556, t\_3\right)}{2}\right) \cdot t\_4\right)\right) \cdot t\_2\\
\end{array}
\end{array}
if b < 6.39999999999999961e-97Initial program 56.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites60.9%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites62.6%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites62.4%
lift-PI.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-+.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6462.6
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6465.4
Applied rewrites65.4%
if 6.39999999999999961e-97 < b < 1.1e58Initial program 41.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites41.2%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites47.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites54.0%
lift-cos.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
Applied rewrites54.6%
if 1.1e58 < b Initial program 37.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites49.2%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites68.4%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites74.5%
lift-PI.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
+-commutativeN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6480.6
Applied rewrites80.6%
Final simplification67.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0)))
(t_1
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
(if (<= t_1 -1e+260)
(* (* (* (* PI angle) (+ a b_m)) (- b_m a)) 0.011111111111111112)
(if (<= t_1 5e+286)
(* (* (- b_m a) (+ a b_m)) (sin (* 2.0 t_0)))
(*
(* 2.0 (cos (* (* PI angle) 0.005555555555555556)))
(* (* (* (* (+ a b_m) PI) angle) 0.005555555555555556) (- b_m a)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double t_1 = ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
double tmp;
if (t_1 <= -1e+260) {
tmp = (((((double) M_PI) * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else if (t_1 <= 5e+286) {
tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * t_0));
} else {
tmp = (2.0 * cos(((((double) M_PI) * angle) * 0.005555555555555556))) * (((((a + b_m) * ((double) M_PI)) * angle) * 0.005555555555555556) * (b_m - a));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double t_1 = ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
double tmp;
if (t_1 <= -1e+260) {
tmp = (((Math.PI * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else if (t_1 <= 5e+286) {
tmp = ((b_m - a) * (a + b_m)) * Math.sin((2.0 * t_0));
} else {
tmp = (2.0 * Math.cos(((Math.PI * angle) * 0.005555555555555556))) * (((((a + b_m) * Math.PI) * angle) * 0.005555555555555556) * (b_m - a));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pi * (angle / 180.0) t_1 = ((2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0) tmp = 0 if t_1 <= -1e+260: tmp = (((math.pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112 elif t_1 <= 5e+286: tmp = ((b_m - a) * (a + b_m)) * math.sin((2.0 * t_0)) else: tmp = (2.0 * math.cos(((math.pi * angle) * 0.005555555555555556))) * (((((a + b_m) * math.pi) * angle) * 0.005555555555555556) * (b_m - a)) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(pi * Float64(angle / 180.0)) t_1 = Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) tmp = 0.0 if (t_1 <= -1e+260) tmp = Float64(Float64(Float64(Float64(pi * angle) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); elseif (t_1 <= 5e+286) tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(2.0 * t_0))); else tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle) * 0.005555555555555556))) * Float64(Float64(Float64(Float64(Float64(a + b_m) * pi) * angle) * 0.005555555555555556) * Float64(b_m - a))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = pi * (angle / 180.0); t_1 = ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); tmp = 0.0; if (t_1 <= -1e+260) tmp = (((pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112; elseif (t_1 <= 5e+286) tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * t_0)); else tmp = (2.0 * cos(((pi * angle) * 0.005555555555555556))) * (((((a + b_m) * pi) * angle) * 0.005555555555555556) * (b_m - a)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+260], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[t$95$1, 5e+286], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(a + b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+260}:\\
\;\;\;\;\left(\left(\left(\pi \cdot angle\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(2 \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\_m\right) \cdot \pi\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(b\_m - a\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -1.00000000000000007e260Initial program 50.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.6
Applied rewrites54.6%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6468.4
Applied rewrites68.4%
if -1.00000000000000007e260 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 5.0000000000000004e286Initial program 59.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites59.5%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites59.5%
if 5.0000000000000004e286 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 36.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites56.7%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites73.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f6470.4
Applied rewrites70.4%
Final simplification64.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556))
(t_1 (* PI (/ angle 180.0))))
(if (<=
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_1)) (cos t_1))
5e+286)
(*
(*
2.0
(*
(cos
(/
(fma
(* 0.005555555555555556 angle)
PI
(* (* angle PI) (- 0.005555555555555556)))
2.0))
1.0))
(* (* (sin t_0) (+ a b_m)) (- b_m a)))
(*
(* 2.0 (cos t_0))
(* (* (* (* (+ a b_m) PI) angle) 0.005555555555555556) (- b_m a))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_1 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_1)) * cos(t_1)) <= 5e+286) {
tmp = (2.0 * (cos((fma((0.005555555555555556 * angle), ((double) M_PI), ((angle * ((double) M_PI)) * -0.005555555555555556)) / 2.0)) * 1.0)) * ((sin(t_0) * (a + b_m)) * (b_m - a));
} else {
tmp = (2.0 * cos(t_0)) * (((((a + b_m) * ((double) M_PI)) * angle) * 0.005555555555555556) * (b_m - a));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 5e+286) tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(0.005555555555555556 * angle), pi, Float64(Float64(angle * pi) * Float64(-0.005555555555555556))) / 2.0)) * 1.0)) * Float64(Float64(sin(t_0) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(Float64(Float64(Float64(Float64(a + b_m) * pi) * angle) * 0.005555555555555556) * Float64(b_m - a))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 5e+286], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(N[(angle * Pi), $MachinePrecision] * (-0.005555555555555556)), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(a + b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \left(angle \cdot \pi\right) \cdot \left(-0.005555555555555556\right)\right)}{2}\right) \cdot 1\right)\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\left(\left(\left(a + b\_m\right) \cdot \pi\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(b\_m - a\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 5.0000000000000004e286Initial program 56.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites56.5%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites57.9%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites61.3%
Taylor expanded in angle around 0
Applied rewrites60.2%
if 5.0000000000000004e286 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 36.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites56.7%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites73.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f6470.4
Applied rewrites70.4%
Final simplification63.0%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556))
(t_1 (* PI (/ angle 180.0))))
(if (<=
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_1)) (cos t_1))
1e+306)
(*
(* 2.0 (sin (fma (* 0.005555555555555556 angle) PI (/ PI 2.0))))
(* (* (sin t_0) (+ a b_m)) (- b_m a)))
(*
(* 2.0 (cos t_0))
(* (* (* (* (+ a b_m) PI) angle) 0.005555555555555556) (- b_m a))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double t_1 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_1)) * cos(t_1)) <= 1e+306) {
tmp = (2.0 * sin(fma((0.005555555555555556 * angle), ((double) M_PI), (((double) M_PI) / 2.0)))) * ((sin(t_0) * (a + b_m)) * (b_m - a));
} else {
tmp = (2.0 * cos(t_0)) * (((((a + b_m) * ((double) M_PI)) * angle) * 0.005555555555555556) * (b_m - a));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) t_1 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 1e+306) tmp = Float64(Float64(2.0 * sin(fma(Float64(0.005555555555555556 * angle), pi, Float64(pi / 2.0)))) * Float64(Float64(sin(t_0) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(Float64(Float64(Float64(Float64(a + b_m) * pi) * angle) * 0.005555555555555556) * Float64(b_m - a))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 1e+306], N[(N[(2.0 * N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(a + b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
t_1 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq 10^{+306}:\\
\;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\left(\left(\left(a + b\_m\right) \cdot \pi\right) \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(b\_m - a\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1.00000000000000002e306Initial program 55.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites55.7%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites57.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
associate-*r*N/A
lift-/.f64N/A
lift-PI.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f6460.7
Applied rewrites60.7%
if 1.00000000000000002e306 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 38.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites58.9%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites76.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f6473.4
Applied rewrites73.4%
Final simplification64.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))))
(if (<=
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
-1e+270)
(* (* (* (* PI angle) (+ a b_m)) (- b_m a)) 0.011111111111111112)
(*
(* 2.0 1.0)
(*
(* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b_m))
(- b_m a))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -1e+270) {
tmp = (((((double) M_PI) * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = (2.0 * 1.0) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b_m)) * (b_m - a));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double tmp;
if ((((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0)) <= -1e+270) {
tmp = (((Math.PI * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = (2.0 * 1.0) * ((Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b_m)) * (b_m - a));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pi * (angle / 180.0) tmp = 0 if (((2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)) <= -1e+270: tmp = (((math.pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112 else: tmp = (2.0 * 1.0) * ((math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b_m)) * (b_m - a)) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -1e+270) tmp = Float64(Float64(Float64(Float64(pi * angle) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); else tmp = Float64(Float64(2.0 * 1.0) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b_m)) * Float64(b_m - a))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = pi * (angle / 180.0); tmp = 0.0; if ((((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -1e+270) tmp = (((pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112; else tmp = (2.0 * 1.0) * ((sin(((0.005555555555555556 * angle) * pi)) * (a + b_m)) * (b_m - a)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], -1e+270], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(2.0 * 1.0), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -1 \cdot 10^{+270}:\\
\;\;\;\;\left(\left(\left(\pi \cdot angle\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot 1\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -1e270Initial program 51.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.4
Applied rewrites55.4%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6469.4
Applied rewrites69.4%
if -1e270 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 50.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites58.2%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites63.4%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6463.5
Applied rewrites63.5%
Taylor expanded in angle around 0
Applied rewrites61.7%
Final simplification63.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))))
(if (<=
(* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
-1e+260)
(* (* (* (* PI angle) (+ a b_m)) (- b_m a)) 0.011111111111111112)
(*
2.0
(*
(* (sin (* (* PI angle) 0.005555555555555556)) (+ a b_m))
(- b_m a))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -1e+260) {
tmp = (((((double) M_PI) * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * ((sin(((((double) M_PI) * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double tmp;
if ((((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0)) <= -1e+260) {
tmp = (((Math.PI * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * ((Math.sin(((Math.PI * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = math.pi * (angle / 180.0) tmp = 0 if (((2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)) <= -1e+260: tmp = (((math.pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112 else: tmp = 2.0 * ((math.sin(((math.pi * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a)) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -1e+260) tmp = Float64(Float64(Float64(Float64(pi * angle) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); else tmp = Float64(2.0 * Float64(Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(a + b_m)) * Float64(b_m - a))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = pi * (angle / 180.0); tmp = 0.0; if ((((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -1e+260) tmp = (((pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112; else tmp = 2.0 * ((sin(((pi * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a)); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], -1e+260], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -1 \cdot 10^{+260}:\\
\;\;\;\;\left(\left(\left(\pi \cdot angle\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -1.00000000000000007e260Initial program 50.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.6
Applied rewrites54.6%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6468.4
Applied rewrites68.4%
if -1.00000000000000007e260 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 51.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites58.5%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites63.7%
Taylor expanded in angle around 0
Applied rewrites62.1%
Final simplification63.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* 2.0 (- (pow b_m 2.0) (pow a 2.0)))))
(if (<= t_0 -4e-209)
(* (* -0.011111111111111112 a) (* (* angle PI) a))
(if (<= t_0 INFINITY)
(* (* (* PI (* b_m b_m)) angle) 0.011111111111111112)
(* (* (* PI angle) (* a (- b_m a))) 0.011111111111111112)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = 2.0 * (pow(b_m, 2.0) - pow(a, 2.0));
double tmp;
if (t_0 <= -4e-209) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else if (t_0 <= ((double) INFINITY)) {
tmp = ((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112;
} else {
tmp = ((((double) M_PI) * angle) * (a * (b_m - a))) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = 2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0));
double tmp;
if (t_0 <= -4e-209) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = ((Math.PI * (b_m * b_m)) * angle) * 0.011111111111111112;
} else {
tmp = ((Math.PI * angle) * (a * (b_m - a))) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = 2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0)) tmp = 0 if t_0 <= -4e-209: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) elif t_0 <= math.inf: tmp = ((math.pi * (b_m * b_m)) * angle) * 0.011111111111111112 else: tmp = ((math.pi * angle) * (a * (b_m - a))) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) tmp = 0.0 if (t_0 <= -4e-209) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); elseif (t_0 <= Inf) tmp = Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112); else tmp = Float64(Float64(Float64(pi * angle) * Float64(a * Float64(b_m - a))) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = 2.0 * ((b_m ^ 2.0) - (a ^ 2.0)); tmp = 0.0; if (t_0 <= -4e-209) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); elseif (t_0 <= Inf) tmp = ((pi * (b_m * b_m)) * angle) * 0.011111111111111112; else tmp = ((pi * angle) * (a * (b_m - a))) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -4e-209], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(a * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := 2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\\
\mathbf{if}\;t\_0 \leq -4 \cdot 10^{-209}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(a \cdot \left(b\_m - a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.0000000000000002e-209Initial program 51.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6445.4
Applied rewrites45.4%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6445.4
Applied rewrites45.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6445.4
Applied rewrites45.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6454.3
Applied rewrites54.3%
if -4.0000000000000002e-209 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0Initial program 57.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6458.8
Applied rewrites58.8%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
pow2N/A
lift-*.f6458.8
Applied rewrites58.8%
if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 0.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.3
Applied rewrites62.3%
Taylor expanded in a around inf
Applied rewrites67.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* -0.005555555555555556 angle) PI))
(t_1
(*
(* (sin (* (* PI angle) 0.005555555555555556)) (+ a b_m))
(- b_m a)))
(t_2 (* (* angle PI) 0.005555555555555556))
(t_3 (cos (/ (+ t_2 t_2) 2.0))))
(if (<= b_m 1.15e-96)
(* (* 2.0 (* (cos (/ (+ t_2 t_0) 2.0)) t_3)) t_1)
(if (<= b_m 1.15e+58)
(*
(*
2.0
(*
(cos
(/
(fma
(* 0.005555555555555556 angle)
PI
(* (* angle PI) (- 0.005555555555555556)))
2.0))
(sin (+ (/ (- t_2 t_0) 2.0) (/ PI 2.0)))))
t_1)
(*
(*
2.0
(* (cos (/ (fma (* angle PI) -0.005555555555555556 t_2) 2.0)) t_3))
t_1)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (-0.005555555555555556 * angle) * ((double) M_PI);
double t_1 = (sin(((((double) M_PI) * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a);
double t_2 = (angle * ((double) M_PI)) * 0.005555555555555556;
double t_3 = cos(((t_2 + t_2) / 2.0));
double tmp;
if (b_m <= 1.15e-96) {
tmp = (2.0 * (cos(((t_2 + t_0) / 2.0)) * t_3)) * t_1;
} else if (b_m <= 1.15e+58) {
tmp = (2.0 * (cos((fma((0.005555555555555556 * angle), ((double) M_PI), ((angle * ((double) M_PI)) * -0.005555555555555556)) / 2.0)) * sin((((t_2 - t_0) / 2.0) + (((double) M_PI) / 2.0))))) * t_1;
} else {
tmp = (2.0 * (cos((fma((angle * ((double) M_PI)), -0.005555555555555556, t_2) / 2.0)) * t_3)) * t_1;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(-0.005555555555555556 * angle) * pi) t_1 = Float64(Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(a + b_m)) * Float64(b_m - a)) t_2 = Float64(Float64(angle * pi) * 0.005555555555555556) t_3 = cos(Float64(Float64(t_2 + t_2) / 2.0)) tmp = 0.0 if (b_m <= 1.15e-96) tmp = Float64(Float64(2.0 * Float64(cos(Float64(Float64(t_2 + t_0) / 2.0)) * t_3)) * t_1); elseif (b_m <= 1.15e+58) tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(0.005555555555555556 * angle), pi, Float64(Float64(angle * pi) * Float64(-0.005555555555555556))) / 2.0)) * sin(Float64(Float64(Float64(t_2 - t_0) / 2.0) + Float64(pi / 2.0))))) * t_1); else tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(angle * pi), -0.005555555555555556, t_2) / 2.0)) * t_3)) * t_1); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(-0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(N[(t$95$2 + t$95$2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 1.15e-96], N[(N[(2.0 * N[(N[Cos[N[(N[(t$95$2 + t$95$0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[b$95$m, 1.15e+58], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(N[(angle * Pi), $MachinePrecision] * (-0.005555555555555556)), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(N[(t$95$2 - t$95$0), $MachinePrecision] / 2.0), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(angle * Pi), $MachinePrecision] * -0.005555555555555556 + t$95$2), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(-0.005555555555555556 \cdot angle\right) \cdot \pi\\
t_1 := \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\
t_2 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
t_3 := \cos \left(\frac{t\_2 + t\_2}{2}\right)\\
\mathbf{if}\;b\_m \leq 1.15 \cdot 10^{-96}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{t\_2 + t\_0}{2}\right) \cdot t\_3\right)\right) \cdot t\_1\\
\mathbf{elif}\;b\_m \leq 1.15 \cdot 10^{+58}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \left(angle \cdot \pi\right) \cdot \left(-0.005555555555555556\right)\right)}{2}\right) \cdot \sin \left(\frac{t\_2 - t\_0}{2} + \frac{\pi}{2}\right)\right)\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(angle \cdot \pi, -0.005555555555555556, t\_2\right)}{2}\right) \cdot t\_3\right)\right) \cdot t\_1\\
\end{array}
\end{array}
if b < 1.15e-96Initial program 56.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites60.9%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites62.6%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites62.4%
lift-PI.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-+.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6462.6
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6465.4
Applied rewrites65.4%
if 1.15e-96 < b < 1.15000000000000001e58Initial program 41.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites41.2%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites47.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites54.0%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites46.3%
if 1.15000000000000001e58 < b Initial program 37.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites49.2%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites68.4%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites74.5%
lift-PI.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
+-commutativeN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6480.6
Applied rewrites80.6%
Final simplification66.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0)))
(t_1 (* (* angle PI) 0.005555555555555556))
(t_2
(*
(* (sin (* (* PI angle) 0.005555555555555556)) (+ a b_m))
(- b_m a))))
(if (<= b_m 1.6e-200)
(*
(* (* (+ b_m a) (- b_m a)) 2.0)
(/
(+
(sin (+ t_0 t_0))
(sin (fma PI (/ angle 180.0) (* (- PI) (/ angle 180.0)))))
2.0))
(if (<= b_m 1.12e+56)
(*
(*
2.0
(*
(cos
(/
(fma
(* 0.005555555555555556 angle)
PI
(* (* angle PI) (- 0.005555555555555556)))
2.0))
1.0))
t_2)
(*
(*
2.0
(*
(cos (/ (fma (* angle PI) -0.005555555555555556 t_1) 2.0))
(cos (/ (+ t_1 t_1) 2.0))))
t_2)))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double t_1 = (angle * ((double) M_PI)) * 0.005555555555555556;
double t_2 = (sin(((((double) M_PI) * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a);
double tmp;
if (b_m <= 1.6e-200) {
tmp = (((b_m + a) * (b_m - a)) * 2.0) * ((sin((t_0 + t_0)) + sin(fma(((double) M_PI), (angle / 180.0), (-((double) M_PI) * (angle / 180.0))))) / 2.0);
} else if (b_m <= 1.12e+56) {
tmp = (2.0 * (cos((fma((0.005555555555555556 * angle), ((double) M_PI), ((angle * ((double) M_PI)) * -0.005555555555555556)) / 2.0)) * 1.0)) * t_2;
} else {
tmp = (2.0 * (cos((fma((angle * ((double) M_PI)), -0.005555555555555556, t_1) / 2.0)) * cos(((t_1 + t_1) / 2.0)))) * t_2;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(pi * Float64(angle / 180.0)) t_1 = Float64(Float64(angle * pi) * 0.005555555555555556) t_2 = Float64(Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(a + b_m)) * Float64(b_m - a)) tmp = 0.0 if (b_m <= 1.6e-200) tmp = Float64(Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * 2.0) * Float64(Float64(sin(Float64(t_0 + t_0)) + sin(fma(pi, Float64(angle / 180.0), Float64(Float64(-pi) * Float64(angle / 180.0))))) / 2.0)); elseif (b_m <= 1.12e+56) tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(0.005555555555555556 * angle), pi, Float64(Float64(angle * pi) * Float64(-0.005555555555555556))) / 2.0)) * 1.0)) * t_2); else tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(angle * pi), -0.005555555555555556, t_1) / 2.0)) * cos(Float64(Float64(t_1 + t_1) / 2.0)))) * t_2); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1.6e-200], N[(N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(N[Sin[N[(t$95$0 + t$95$0), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision] + N[((-Pi) * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.12e+56], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(N[(angle * Pi), $MachinePrecision] * (-0.005555555555555556)), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(angle * Pi), $MachinePrecision] * -0.005555555555555556 + t$95$1), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$1 + t$95$1), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
t_2 := \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\
\mathbf{if}\;b\_m \leq 1.6 \cdot 10^{-200}:\\
\;\;\;\;\left(\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \frac{\sin \left(t\_0 + t\_0\right) + \sin \left(\mathsf{fma}\left(\pi, \frac{angle}{180}, \left(-\pi\right) \cdot \frac{angle}{180}\right)\right)}{2}\\
\mathbf{elif}\;b\_m \leq 1.12 \cdot 10^{+56}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \left(angle \cdot \pi\right) \cdot \left(-0.005555555555555556\right)\right)}{2}\right) \cdot 1\right)\right) \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(angle \cdot \pi, -0.005555555555555556, t\_1\right)}{2}\right) \cdot \cos \left(\frac{t\_1 + t\_1}{2}\right)\right)\right) \cdot t\_2\\
\end{array}
\end{array}
if b < 1.59999999999999991e-200Initial program 55.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites60.9%
lift-*.f64N/A
lift-sin.f64N/A
lift-cos.f64N/A
cos-neg-revN/A
sin-cos-multN/A
lower-/.f64N/A
Applied rewrites60.1%
if 1.59999999999999991e-200 < b < 1.12e56Initial program 49.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites49.7%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites56.6%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites55.7%
Taylor expanded in angle around 0
Applied rewrites56.7%
if 1.12e56 < b Initial program 37.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites49.2%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites68.4%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites74.5%
lift-PI.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
+-commutativeN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6480.6
Applied rewrites80.6%
Final simplification63.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0
(*
(* (sin (* (* PI angle) 0.005555555555555556)) (+ a b_m))
(- b_m a)))
(t_1 (* (* angle PI) 0.005555555555555556))
(t_2 (cos (/ (+ t_1 t_1) 2.0))))
(if (<= b_m 1.2e+56)
(*
(*
2.0
(* (cos (/ (+ t_1 (* (* -0.005555555555555556 angle) PI)) 2.0)) t_2))
t_0)
(*
(*
2.0
(* (cos (/ (fma (* angle PI) -0.005555555555555556 t_1) 2.0)) t_2))
t_0))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (sin(((((double) M_PI) * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a);
double t_1 = (angle * ((double) M_PI)) * 0.005555555555555556;
double t_2 = cos(((t_1 + t_1) / 2.0));
double tmp;
if (b_m <= 1.2e+56) {
tmp = (2.0 * (cos(((t_1 + ((-0.005555555555555556 * angle) * ((double) M_PI))) / 2.0)) * t_2)) * t_0;
} else {
tmp = (2.0 * (cos((fma((angle * ((double) M_PI)), -0.005555555555555556, t_1) / 2.0)) * t_2)) * t_0;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(a + b_m)) * Float64(b_m - a)) t_1 = Float64(Float64(angle * pi) * 0.005555555555555556) t_2 = cos(Float64(Float64(t_1 + t_1) / 2.0)) tmp = 0.0 if (b_m <= 1.2e+56) tmp = Float64(Float64(2.0 * Float64(cos(Float64(Float64(t_1 + Float64(Float64(-0.005555555555555556 * angle) * pi)) / 2.0)) * t_2)) * t_0); else tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(angle * pi), -0.005555555555555556, t_1) / 2.0)) * t_2)) * t_0); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(N[(t$95$1 + t$95$1), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 1.2e+56], N[(N[(2.0 * N[(N[Cos[N[(N[(t$95$1 + N[(N[(-0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(angle * Pi), $MachinePrecision] * -0.005555555555555556 + t$95$1), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\
t_1 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
t_2 := \cos \left(\frac{t\_1 + t\_1}{2}\right)\\
\mathbf{if}\;b\_m \leq 1.2 \cdot 10^{+56}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{t\_1 + \left(-0.005555555555555556 \cdot angle\right) \cdot \pi}{2}\right) \cdot t\_2\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(angle \cdot \pi, -0.005555555555555556, t\_1\right)}{2}\right) \cdot t\_2\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if b < 1.20000000000000007e56Initial program 54.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites58.5%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites60.7%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites61.4%
lift-PI.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-+.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6460.7
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6463.0
Applied rewrites63.0%
if 1.20000000000000007e56 < b Initial program 37.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites49.2%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites68.4%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites74.5%
lift-PI.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
+-commutativeN/A
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6480.6
Applied rewrites80.6%
Final simplification66.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* angle PI) 0.005555555555555556)))
(if (<= angle 3.2e+168)
(*
(*
2.0
(*
(cos
(/
(fma
angle
(* 0.005555555555555556 PI)
(* (* -0.005555555555555556 angle) PI))
2.0))
(cos (/ (+ t_0 t_0) 2.0))))
(* (* (sin (* (* PI angle) 0.005555555555555556)) (+ a b_m)) (- b_m a)))
(*
(*
(* 2.0 (* (- (* (/ b_m a) (/ b_m a)) 1.0) (* a a)))
(sin (* PI (/ angle 180.0))))
(cos (* PI (* 0.005555555555555556 angle)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (angle * ((double) M_PI)) * 0.005555555555555556;
double tmp;
if (angle <= 3.2e+168) {
tmp = (2.0 * (cos((fma(angle, (0.005555555555555556 * ((double) M_PI)), ((-0.005555555555555556 * angle) * ((double) M_PI))) / 2.0)) * cos(((t_0 + t_0) / 2.0)))) * ((sin(((((double) M_PI) * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a));
} else {
tmp = ((2.0 * ((((b_m / a) * (b_m / a)) - 1.0) * (a * a))) * sin((((double) M_PI) * (angle / 180.0)))) * cos((((double) M_PI) * (0.005555555555555556 * angle)));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(angle * pi) * 0.005555555555555556) tmp = 0.0 if (angle <= 3.2e+168) tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(angle, Float64(0.005555555555555556 * pi), Float64(Float64(-0.005555555555555556 * angle) * pi)) / 2.0)) * cos(Float64(Float64(t_0 + t_0) / 2.0)))) * Float64(Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(Float64(2.0 * Float64(Float64(Float64(Float64(b_m / a) * Float64(b_m / a)) - 1.0) * Float64(a * a))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(0.005555555555555556 * angle)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[angle, 3.2e+168], N[(N[(2.0 * N[(N[Cos[N[(N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision] + N[(N[(-0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 + t$95$0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[(N[(N[(b$95$m / a), $MachinePrecision] * N[(b$95$m / a), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
\mathbf{if}\;angle \leq 3.2 \cdot 10^{+168}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(angle, 0.005555555555555556 \cdot \pi, \left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)}{2}\right) \cdot \cos \left(\frac{t\_0 + t\_0}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(\frac{b\_m}{a} \cdot \frac{b\_m}{a} - 1\right) \cdot \left(a \cdot a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
\end{array}
\end{array}
if angle < 3.2000000000000001e168Initial program 53.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites59.9%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites68.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites70.3%
lift-PI.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lift-PI.f6471.0
lift-neg.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6471.6
Applied rewrites71.6%
if 3.2000000000000001e168 < angle Initial program 36.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6435.0
Applied rewrites35.0%
Taylor expanded in angle around 0
lift-*.f6441.5
Applied rewrites41.5%
Final simplification66.9%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0
(*
(* (sin (* (* PI angle) 0.005555555555555556)) (+ a b_m))
(- b_m a)))
(t_1
(cos
(/
(fma
(* 0.005555555555555556 angle)
PI
(* (* angle PI) (- 0.005555555555555556)))
2.0))))
(if (<= a 1e+235)
(* (* 2.0 (* t_1 (cos (* (* angle PI) 0.005555555555555556)))) t_0)
(* (* 2.0 (* t_1 1.0)) t_0))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (sin(((((double) M_PI) * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a);
double t_1 = cos((fma((0.005555555555555556 * angle), ((double) M_PI), ((angle * ((double) M_PI)) * -0.005555555555555556)) / 2.0));
double tmp;
if (a <= 1e+235) {
tmp = (2.0 * (t_1 * cos(((angle * ((double) M_PI)) * 0.005555555555555556)))) * t_0;
} else {
tmp = (2.0 * (t_1 * 1.0)) * t_0;
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(a + b_m)) * Float64(b_m - a)) t_1 = cos(Float64(fma(Float64(0.005555555555555556 * angle), pi, Float64(Float64(angle * pi) * Float64(-0.005555555555555556))) / 2.0)) tmp = 0.0 if (a <= 1e+235) tmp = Float64(Float64(2.0 * Float64(t_1 * cos(Float64(Float64(angle * pi) * 0.005555555555555556)))) * t_0); else tmp = Float64(Float64(2.0 * Float64(t_1 * 1.0)) * t_0); end return tmp end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(N[(angle * Pi), $MachinePrecision] * (-0.005555555555555556)), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a, 1e+235], N[(N[(2.0 * N[(t$95$1 * N[Cos[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(2.0 * N[(t$95$1 * 1.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\
t_1 := \cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \left(angle \cdot \pi\right) \cdot \left(-0.005555555555555556\right)\right)}{2}\right)\\
\mathbf{if}\;a \leq 10^{+235}:\\
\;\;\;\;\left(2 \cdot \left(t\_1 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(t\_1 \cdot 1\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if a < 1.0000000000000001e235Initial program 51.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites56.2%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites62.4%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites64.2%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6464.2
Applied rewrites64.2%
if 1.0000000000000001e235 < a Initial program 45.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites61.8%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites61.0%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites61.0%
Taylor expanded in angle around 0
Applied rewrites83.2%
Final simplification65.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 9e+168)
(*
(*
2.0
(*
(cos
(/
(fma
(* 0.005555555555555556 angle)
PI
(* (* angle PI) (- 0.005555555555555556)))
2.0))
1.0))
(* (* (sin (* (* PI angle) 0.005555555555555556)) (+ a b_m)) (- b_m a)))
(*
(*
(* 2.0 (* (- (* (/ b_m a) (/ b_m a)) 1.0) (* a a)))
(sin (* PI (/ angle 180.0))))
(cos (* PI (* 0.005555555555555556 angle))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 9e+168) {
tmp = (2.0 * (cos((fma((0.005555555555555556 * angle), ((double) M_PI), ((angle * ((double) M_PI)) * -0.005555555555555556)) / 2.0)) * 1.0)) * ((sin(((((double) M_PI) * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a));
} else {
tmp = ((2.0 * ((((b_m / a) * (b_m / a)) - 1.0) * (a * a))) * sin((((double) M_PI) * (angle / 180.0)))) * cos((((double) M_PI) * (0.005555555555555556 * angle)));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 9e+168) tmp = Float64(Float64(2.0 * Float64(cos(Float64(fma(Float64(0.005555555555555556 * angle), pi, Float64(Float64(angle * pi) * Float64(-0.005555555555555556))) / 2.0)) * 1.0)) * Float64(Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(Float64(2.0 * Float64(Float64(Float64(Float64(b_m / a) * Float64(b_m / a)) - 1.0) * Float64(a * a))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(0.005555555555555556 * angle)))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 9e+168], N[(N[(2.0 * N[(N[Cos[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(N[(angle * Pi), $MachinePrecision] * (-0.005555555555555556)), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[(N[(N[(b$95$m / a), $MachinePrecision] * N[(b$95$m / a), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 9 \cdot 10^{+168}:\\
\;\;\;\;\left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \left(angle \cdot \pi\right) \cdot \left(-0.005555555555555556\right)\right)}{2}\right) \cdot 1\right)\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(\frac{b\_m}{a} \cdot \frac{b\_m}{a} - 1\right) \cdot \left(a \cdot a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
\end{array}
\end{array}
if angle < 9.00000000000000024e168Initial program 53.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites59.9%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites68.2%
lift-cos.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
count-2-revN/A
cos-neg-revN/A
sum-cosN/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites70.3%
Taylor expanded in angle around 0
Applied rewrites71.3%
if 9.00000000000000024e168 < angle Initial program 36.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6435.0
Applied rewrites35.0%
Taylor expanded in angle around 0
lift-*.f6441.5
Applied rewrites41.5%
Final simplification66.6%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 3.6e+102)
(*
(* 2.0 (cos (* (* PI angle) 0.005555555555555556)))
(* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b_m)) (- b_m a)))
(if (<= angle 3.6e+164)
(*
(*
(*
(* (sin (fma -0.005555555555555556 (* angle PI) (* 0.5 PI))) (+ a b_m))
(- b_m a))
(sin (* (* angle PI) 0.005555555555555556)))
2.0)
(* (* (- b_m a) (+ a b_m)) (sin (* 2.0 (* PI (/ angle 180.0))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 3.6e+102) {
tmp = (2.0 * cos(((((double) M_PI) * angle) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b_m)) * (b_m - a));
} else if (angle <= 3.6e+164) {
tmp = (((sin(fma(-0.005555555555555556, (angle * ((double) M_PI)), (0.5 * ((double) M_PI)))) * (a + b_m)) * (b_m - a)) * sin(((angle * ((double) M_PI)) * 0.005555555555555556))) * 2.0;
} else {
tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * (((double) M_PI) * (angle / 180.0))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 3.6e+102) tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle) * 0.005555555555555556))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b_m)) * Float64(b_m - a))); elseif (angle <= 3.6e+164) tmp = Float64(Float64(Float64(Float64(sin(fma(-0.005555555555555556, Float64(angle * pi), Float64(0.5 * pi))) * Float64(a + b_m)) * Float64(b_m - a)) * sin(Float64(Float64(angle * pi) * 0.005555555555555556))) * 2.0); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(2.0 * Float64(pi * Float64(angle / 180.0))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 3.6e+102], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 3.6e+164], N[(N[(N[(N[(N[Sin[N[(-0.005555555555555556 * N[(angle * Pi), $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3.6 \cdot 10^{+102}:\\
\;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{elif}\;angle \leq 3.6 \cdot 10^{+164}:\\
\;\;\;\;\left(\left(\left(\sin \left(\mathsf{fma}\left(-0.005555555555555556, angle \cdot \pi, 0.5 \cdot \pi\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)\\
\end{array}
\end{array}
if angle < 3.6000000000000002e102Initial program 56.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites62.6%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites71.7%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6473.4
Applied rewrites73.4%
if 3.6000000000000002e102 < angle < 3.5999999999999999e164Initial program 18.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites25.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lift-PI.f6432.6
Applied rewrites32.6%
Taylor expanded in angle around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites32.4%
if 3.5999999999999999e164 < angle Initial program 35.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites37.5%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites37.5%
Final simplification65.4%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 4.5e+53)
(*
(* 2.0 (sin (fma (* -0.005555555555555556 angle) PI (/ PI 2.0))))
(* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b_m)) (- b_m a)))
(* (* (- b_m a) (+ a b_m)) (sin (* 2.0 (* PI (/ angle 180.0)))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 4.5e+53) {
tmp = (2.0 * sin(fma((-0.005555555555555556 * angle), ((double) M_PI), (((double) M_PI) / 2.0)))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b_m)) * (b_m - a));
} else {
tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * (((double) M_PI) * (angle / 180.0))));
}
return tmp;
}
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 4.5e+53) tmp = Float64(Float64(2.0 * sin(fma(Float64(-0.005555555555555556 * angle), pi, Float64(pi / 2.0)))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(2.0 * Float64(pi * Float64(angle / 180.0))))); end return tmp end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 4.5e+53], N[(N[(2.0 * N[Sin[N[(N[(-0.005555555555555556 * angle), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 4.5 \cdot 10^{+53}:\\
\;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(-0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)\\
\end{array}
\end{array}
if angle < 4.5000000000000002e53Initial program 57.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites63.4%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites74.1%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6474.2
Applied rewrites74.2%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
Applied rewrites74.9%
if 4.5000000000000002e53 < angle Initial program 32.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites36.9%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites36.9%
Final simplification65.1%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.005555555555555556)))
(if (<= angle 5e+57)
(* (* 2.0 (cos t_0)) (* (* (sin t_0) (+ a b_m)) (- b_m a)))
(* (* (- b_m a) (+ a b_m)) (sin (* 2.0 (* PI (/ angle 180.0))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double t_0 = (((double) M_PI) * angle) * 0.005555555555555556;
double tmp;
if (angle <= 5e+57) {
tmp = (2.0 * cos(t_0)) * ((sin(t_0) * (a + b_m)) * (b_m - a));
} else {
tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * (((double) M_PI) * (angle / 180.0))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double t_0 = (Math.PI * angle) * 0.005555555555555556;
double tmp;
if (angle <= 5e+57) {
tmp = (2.0 * Math.cos(t_0)) * ((Math.sin(t_0) * (a + b_m)) * (b_m - a));
} else {
tmp = ((b_m - a) * (a + b_m)) * Math.sin((2.0 * (Math.PI * (angle / 180.0))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): t_0 = (math.pi * angle) * 0.005555555555555556 tmp = 0 if angle <= 5e+57: tmp = (2.0 * math.cos(t_0)) * ((math.sin(t_0) * (a + b_m)) * (b_m - a)) else: tmp = ((b_m - a) * (a + b_m)) * math.sin((2.0 * (math.pi * (angle / 180.0)))) return tmp
b_m = abs(b) function code(a, b_m, angle) t_0 = Float64(Float64(pi * angle) * 0.005555555555555556) tmp = 0.0 if (angle <= 5e+57) tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(Float64(sin(t_0) * Float64(a + b_m)) * Float64(b_m - a))); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(2.0 * Float64(pi * Float64(angle / 180.0))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) t_0 = (pi * angle) * 0.005555555555555556; tmp = 0.0; if (angle <= 5e+57) tmp = (2.0 * cos(t_0)) * ((sin(t_0) * (a + b_m)) * (b_m - a)); else tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * (pi * (angle / 180.0)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[angle, 5e+57], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.005555555555555556\\
\mathbf{if}\;angle \leq 5 \cdot 10^{+57}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)\\
\end{array}
\end{array}
if angle < 4.99999999999999972e57Initial program 57.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites62.9%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites74.0%
if 4.99999999999999972e57 < angle Initial program 33.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites37.7%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites37.7%
Final simplification64.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (- INFINITY)) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* PI (* angle (* (- b_m a) (+ a b_m)))) 0.011111111111111112)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -((double) INFINITY)) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = (((double) M_PI) * (angle * ((b_m - a) * (a + b_m)))) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= -Double.POSITIVE_INFINITY) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = (Math.PI * (angle * ((b_m - a) * (a + b_m)))) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= -math.inf: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = (math.pi * (angle * ((b_m - a) * (a + b_m)))) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= Float64(-Inf)) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(pi * Float64(angle * Float64(Float64(b_m - a) * Float64(a + b_m)))) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= -Inf) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = (pi * (angle * ((b_m - a) * (a + b_m)))) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -\infty:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\pi \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -inf.0Initial program 55.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6449.5
Applied rewrites49.5%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6449.5
Applied rewrites49.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6449.5
Applied rewrites49.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6468.6
Applied rewrites68.6%
if -inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 49.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.6
Applied rewrites54.6%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6454.6
Applied rewrites54.6%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -5e+124) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* PI angle) (* (* (- b_m a) (+ a b_m)) 0.011111111111111112))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -5e+124) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = (((double) M_PI) * angle) * (((b_m - a) * (a + b_m)) * 0.011111111111111112);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= -5e+124) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = (Math.PI * angle) * (((b_m - a) * (a + b_m)) * 0.011111111111111112);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= -5e+124: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = (math.pi * angle) * (((b_m - a) * (a + b_m)) * 0.011111111111111112) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -5e+124) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(pi * angle) * Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * 0.011111111111111112)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= -5e+124) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = (pi * angle) * (((b_m - a) * (a + b_m)) * 0.011111111111111112); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+124], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * angle), $MachinePrecision] * N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+124}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.9999999999999996e124Initial program 49.5%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6443.8
Applied rewrites43.8%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6443.8
Applied rewrites43.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6443.8
Applied rewrites43.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6456.2
Applied rewrites56.2%
if -4.9999999999999996e124 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 51.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6457.6
Applied rewrites57.6%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6457.6
Applied rewrites57.6%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -4e-209) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* (* PI angle) (* b_m (- b_m a))) 0.011111111111111112)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -4e-209) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * angle) * (b_m * (b_m - a))) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= -4e-209) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = ((Math.PI * angle) * (b_m * (b_m - a))) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= -4e-209: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = ((math.pi * angle) * (b_m * (b_m - a))) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -4e-209) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(Float64(pi * angle) * Float64(b_m * Float64(b_m - a))) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= -4e-209) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = ((pi * angle) * (b_m * (b_m - a))) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e-209], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{-209}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.0000000000000002e-209Initial program 51.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6445.4
Applied rewrites45.4%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6445.4
Applied rewrites45.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6445.4
Applied rewrites45.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6454.3
Applied rewrites54.3%
if -4.0000000000000002e-209 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 50.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.2
Applied rewrites59.2%
Taylor expanded in a around 0
Applied rewrites56.9%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -4e-209) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* (* PI (* b_m b_m)) angle) 0.011111111111111112)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -4e-209) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * (b_m * b_m)) * angle) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= -4e-209) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = ((Math.PI * (b_m * b_m)) * angle) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= -4e-209: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = ((math.pi * (b_m * b_m)) * angle) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -4e-209) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= -4e-209) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = ((pi * (b_m * b_m)) * angle) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e-209], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{-209}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.0000000000000002e-209Initial program 51.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6445.4
Applied rewrites45.4%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6445.4
Applied rewrites45.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6445.4
Applied rewrites45.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6454.3
Applied rewrites54.3%
if -4.0000000000000002e-209 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 50.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.2
Applied rewrites59.2%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
pow2N/A
lift-*.f6456.5
Applied rewrites56.5%
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
:precision binary64
(if (<= angle 8.3e+18)
(*
2.0
(* (* (sin (* (* PI angle) 0.005555555555555556)) (+ a b_m)) (- b_m a)))
(if (<= angle 1.02e+61)
(*
(* (* (+ b_m a) (- b_m a)) 2.0)
(*
(* (* angle PI) 0.005555555555555556)
(sin (+ (* (- PI) (/ angle 180.0)) (/ PI 2.0)))))
(* (* (- b_m a) (+ a b_m)) (sin (* 2.0 (* PI (/ angle 180.0))))))))b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 8.3e+18) {
tmp = 2.0 * ((sin(((((double) M_PI) * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a));
} else if (angle <= 1.02e+61) {
tmp = (((b_m + a) * (b_m - a)) * 2.0) * (((angle * ((double) M_PI)) * 0.005555555555555556) * sin(((-((double) M_PI) * (angle / 180.0)) + (((double) M_PI) / 2.0))));
} else {
tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * (((double) M_PI) * (angle / 180.0))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 8.3e+18) {
tmp = 2.0 * ((Math.sin(((Math.PI * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a));
} else if (angle <= 1.02e+61) {
tmp = (((b_m + a) * (b_m - a)) * 2.0) * (((angle * Math.PI) * 0.005555555555555556) * Math.sin(((-Math.PI * (angle / 180.0)) + (Math.PI / 2.0))));
} else {
tmp = ((b_m - a) * (a + b_m)) * Math.sin((2.0 * (Math.PI * (angle / 180.0))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if angle <= 8.3e+18: tmp = 2.0 * ((math.sin(((math.pi * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a)) elif angle <= 1.02e+61: tmp = (((b_m + a) * (b_m - a)) * 2.0) * (((angle * math.pi) * 0.005555555555555556) * math.sin(((-math.pi * (angle / 180.0)) + (math.pi / 2.0)))) else: tmp = ((b_m - a) * (a + b_m)) * math.sin((2.0 * (math.pi * (angle / 180.0)))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 8.3e+18) tmp = Float64(2.0 * Float64(Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(a + b_m)) * Float64(b_m - a))); elseif (angle <= 1.02e+61) tmp = Float64(Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * 2.0) * Float64(Float64(Float64(angle * pi) * 0.005555555555555556) * sin(Float64(Float64(Float64(-pi) * Float64(angle / 180.0)) + Float64(pi / 2.0))))); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(2.0 * Float64(pi * Float64(angle / 180.0))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (angle <= 8.3e+18) tmp = 2.0 * ((sin(((pi * angle) * 0.005555555555555556)) * (a + b_m)) * (b_m - a)); elseif (angle <= 1.02e+61) tmp = (((b_m + a) * (b_m - a)) * 2.0) * (((angle * pi) * 0.005555555555555556) * sin(((-pi * (angle / 180.0)) + (pi / 2.0)))); else tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * (pi * (angle / 180.0)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 8.3e+18], N[(2.0 * N[(N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 1.02e+61], N[(N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[Sin[N[(N[((-Pi) * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 8.3 \cdot 10^{+18}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
\mathbf{elif}\;angle \leq 1.02 \cdot 10^{+61}:\\
\;\;\;\;\left(\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \sin \left(\left(-\pi\right) \cdot \frac{angle}{180} + \frac{\pi}{2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)\\
\end{array}
\end{array}
if angle < 8.3e18Initial program 58.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites64.7%
Taylor expanded in angle around inf
+-commutativeN/A
difference-of-squares-revN/A
pow2N/A
unpow2N/A
Applied rewrites75.2%
Taylor expanded in angle around 0
Applied rewrites73.2%
if 8.3e18 < angle < 1.01999999999999999e61Initial program 23.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites33.8%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lift-PI.f6455.1
Applied rewrites55.1%
Taylor expanded in angle around 0
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6470.7
Applied rewrites70.7%
if 1.01999999999999999e61 < angle Initial program 31.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites35.2%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites35.2%
Final simplification64.2%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= angle 4.1e+68) (* (* (* (* PI angle) (+ a b_m)) (- b_m a)) 0.011111111111111112) (* (* (- b_m a) (+ a b_m)) (sin (* 2.0 (* PI (/ angle 180.0)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 4.1e+68) {
tmp = (((((double) M_PI) * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * (((double) M_PI) * (angle / 180.0))));
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 4.1e+68) {
tmp = (((Math.PI * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
} else {
tmp = ((b_m - a) * (a + b_m)) * Math.sin((2.0 * (Math.PI * (angle / 180.0))));
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if angle <= 4.1e+68: tmp = (((math.pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112 else: tmp = ((b_m - a) * (a + b_m)) * math.sin((2.0 * (math.pi * (angle / 180.0)))) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 4.1e+68) tmp = Float64(Float64(Float64(Float64(pi * angle) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); else tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(2.0 * Float64(pi * Float64(angle / 180.0))))); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (angle <= 4.1e+68) tmp = (((pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112; else tmp = ((b_m - a) * (a + b_m)) * sin((2.0 * (pi * (angle / 180.0)))); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 4.1e+68], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 4.1 \cdot 10^{+68}:\\
\;\;\;\;\left(\left(\left(\pi \cdot angle\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)\\
\end{array}
\end{array}
if angle < 4.0999999999999999e68Initial program 56.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6460.6
Applied rewrites60.6%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6469.5
Applied rewrites69.5%
if 4.0999999999999999e68 < angle Initial program 31.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites34.7%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites34.7%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= b_m 1.6e-162) (* (* (* (+ b_m a) (- b_m a)) 2.0) (* (* PI angle) 0.005555555555555556)) (* (* (* (* PI angle) (+ a b_m)) (- b_m a)) 0.011111111111111112)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 1.6e-162) {
tmp = (((b_m + a) * (b_m - a)) * 2.0) * ((((double) M_PI) * angle) * 0.005555555555555556);
} else {
tmp = (((((double) M_PI) * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 1.6e-162) {
tmp = (((b_m + a) * (b_m - a)) * 2.0) * ((Math.PI * angle) * 0.005555555555555556);
} else {
tmp = (((Math.PI * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if b_m <= 1.6e-162: tmp = (((b_m + a) * (b_m - a)) * 2.0) * ((math.pi * angle) * 0.005555555555555556) else: tmp = (((math.pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 1.6e-162) tmp = Float64(Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * 2.0) * Float64(Float64(pi * angle) * 0.005555555555555556)); else tmp = Float64(Float64(Float64(Float64(pi * angle) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (b_m <= 1.6e-162) tmp = (((b_m + a) * (b_m - a)) * 2.0) * ((pi * angle) * 0.005555555555555556); else tmp = (((pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 1.6e-162], N[(N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.6 \cdot 10^{-162}:\\
\;\;\;\;\left(\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\pi \cdot angle\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if b < 1.59999999999999988e-162Initial program 56.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-cos.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites61.4%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6458.2
Applied rewrites58.2%
if 1.59999999999999988e-162 < b Initial program 41.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6445.4
Applied rewrites45.4%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6459.7
Applied rewrites59.7%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= b_m 2.8e-162) (* (* (* (* a a) angle) PI) -0.011111111111111112) (* (* (* (* PI angle) (+ a b_m)) (- b_m a)) 0.011111111111111112)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 2.8e-162) {
tmp = (((a * a) * angle) * ((double) M_PI)) * -0.011111111111111112;
} else {
tmp = (((((double) M_PI) * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (b_m <= 2.8e-162) {
tmp = (((a * a) * angle) * Math.PI) * -0.011111111111111112;
} else {
tmp = (((Math.PI * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112;
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if b_m <= 2.8e-162: tmp = (((a * a) * angle) * math.pi) * -0.011111111111111112 else: tmp = (((math.pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112 return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (b_m <= 2.8e-162) tmp = Float64(Float64(Float64(Float64(a * a) * angle) * pi) * -0.011111111111111112); else tmp = Float64(Float64(Float64(Float64(pi * angle) * Float64(a + b_m)) * Float64(b_m - a)) * 0.011111111111111112); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (b_m <= 2.8e-162) tmp = (((a * a) * angle) * pi) * -0.011111111111111112; else tmp = (((pi * angle) * (a + b_m)) * (b_m - a)) * 0.011111111111111112; end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 2.8e-162], N[(N[(N[(N[(a * a), $MachinePrecision] * angle), $MachinePrecision] * Pi), $MachinePrecision] * -0.011111111111111112), $MachinePrecision], N[(N[(N[(N[(Pi * angle), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.8 \cdot 10^{-162}:\\
\;\;\;\;\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \cdot -0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\pi \cdot angle\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if b < 2.80000000000000022e-162Initial program 56.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6458.1
Applied rewrites58.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6438.5
Applied rewrites38.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-PI.f6438.6
Applied rewrites38.6%
if 2.80000000000000022e-162 < b Initial program 41.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6445.4
Applied rewrites45.4%
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift--.f6459.7
Applied rewrites59.7%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (if (<= angle 1.15e-83) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* -0.011111111111111112 (* a a)) (* PI angle))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 1.15e-83) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = (-0.011111111111111112 * (a * a)) * (((double) M_PI) * angle);
}
return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
double tmp;
if (angle <= 1.15e-83) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = (-0.011111111111111112 * (a * a)) * (Math.PI * angle);
}
return tmp;
}
b_m = math.fabs(b) def code(a, b_m, angle): tmp = 0 if angle <= 1.15e-83: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = (-0.011111111111111112 * (a * a)) * (math.pi * angle) return tmp
b_m = abs(b) function code(a, b_m, angle) tmp = 0.0 if (angle <= 1.15e-83) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(-0.011111111111111112 * Float64(a * a)) * Float64(pi * angle)); end return tmp end
b_m = abs(b); function tmp_2 = code(a, b_m, angle) tmp = 0.0; if (angle <= 1.15e-83) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = (-0.011111111111111112 * (a * a)) * (pi * angle); end tmp_2 = tmp; end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := If[LessEqual[angle, 1.15e-83], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 1.15 \cdot 10^{-83}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right)\\
\end{array}
\end{array}
if angle < 1.14999999999999995e-83Initial program 56.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.8
Applied rewrites59.8%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6432.3
Applied rewrites32.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6432.3
Applied rewrites32.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6436.5
Applied rewrites36.5%
if 1.14999999999999995e-83 < angle Initial program 39.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6440.9
Applied rewrites40.9%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6431.3
Applied rewrites31.3%
b_m = (fabs.f64 b) (FPCore (a b_m angle) :precision binary64 (* (* -0.011111111111111112 a) (* (* angle PI) a)))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
return (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
return (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
}
b_m = math.fabs(b) def code(a, b_m, angle): return (-0.011111111111111112 * a) * ((angle * math.pi) * a)
b_m = abs(b) function code(a, b_m, angle) return Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)) end
b_m = abs(b); function tmp = code(a, b_m, angle) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); end
b_m = N[Abs[b], $MachinePrecision] code[a_, b$95$m_, angle_] := N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)
\end{array}
Initial program 51.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.6
Applied rewrites53.6%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6431.9
Applied rewrites31.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6431.9
Applied rewrites31.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6434.1
Applied rewrites34.1%
herbie shell --seed 2025072
(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)))))