
(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 23 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}
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= a_m 1.05e-149)
(*
(* (+ a_m b) (* (- b a_m) (* 2.0 (sin (/ 1.0 (/ 180.0 (* PI angle)))))))
1.0)
(if (<= a_m 3e+235)
(*
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* PI (* angle 0.005555555555555556))))))
(cos (/ 1.0 (* (/ 1.0 angle) (/ 180.0 PI)))))
(*
(*
(+ a_m b)
(*
(- b a_m)
(* 2.0 (sin (* 0.005555555555555556 (/ PI (/ 1.0 angle)))))))
(cos (* PI (/ angle 180.0)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 1.05e-149) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((1.0 / (180.0 / (((double) M_PI) * angle))))))) * 1.0;
} else if (a_m <= 3e+235) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556)))))) * cos((1.0 / ((1.0 / angle) * (180.0 / ((double) M_PI)))));
} else {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((0.005555555555555556 * (((double) M_PI) / (1.0 / angle))))))) * cos((((double) M_PI) * (angle / 180.0)));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 1.05e-149) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((1.0 / (180.0 / (Math.PI * angle))))))) * 1.0;
} else if (a_m <= 3e+235) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((Math.PI * (angle * 0.005555555555555556)))))) * Math.cos((1.0 / ((1.0 / angle) * (180.0 / Math.PI))));
} else {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((0.005555555555555556 * (Math.PI / (1.0 / angle))))))) * Math.cos((Math.PI * (angle / 180.0)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if a_m <= 1.05e-149: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin((1.0 / (180.0 / (math.pi * angle))))))) * 1.0 elif a_m <= 3e+235: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin((math.pi * (angle * 0.005555555555555556)))))) * math.cos((1.0 / ((1.0 / angle) * (180.0 / math.pi)))) else: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin((0.005555555555555556 * (math.pi / (1.0 / angle))))))) * math.cos((math.pi * (angle / 180.0))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (a_m <= 1.05e-149) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(1.0 / Float64(180.0 / Float64(pi * angle))))))) * 1.0); elseif (a_m <= 3e+235) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(pi * Float64(angle * 0.005555555555555556)))))) * cos(Float64(1.0 / Float64(Float64(1.0 / angle) * Float64(180.0 / pi))))); else tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(0.005555555555555556 * Float64(pi / Float64(1.0 / angle))))))) * cos(Float64(pi * Float64(angle / 180.0)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (a_m <= 1.05e-149) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((1.0 / (180.0 / (pi * angle))))))) * 1.0; elseif (a_m <= 3e+235) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((pi * (angle * 0.005555555555555556)))))) * cos((1.0 / ((1.0 / angle) * (180.0 / pi)))); else tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((0.005555555555555556 * (pi / (1.0 / angle))))))) * cos((pi * (angle / 180.0))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 1.05e-149], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(1.0 / N[(180.0 / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[a$95$m, 3e+235], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(1.0 / N[(N[(1.0 / angle), $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(0.005555555555555556 * N[(Pi / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 1.05 \cdot 10^{-149}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right)\right)\right)\right) \cdot 1\\
\mathbf{elif}\;a\_m \leq 3 \cdot 10^{+235}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{1}{\frac{1}{angle} \cdot \frac{180}{\pi}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \frac{\pi}{\frac{1}{angle}}\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\\
\end{array}
\end{array}
if a < 1.05000000000000005e-149Initial program 56.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6470.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval70.9
Applied rewrites70.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6471.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6471.2
Applied rewrites71.2%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
frac-2negN/A
associate-*r/N/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
clear-numN/A
frac-2negN/A
lift-/.f64N/A
lift-/.f6472.0
Applied rewrites72.0%
Taylor expanded in angle around 0
Applied rewrites69.9%
if 1.05000000000000005e-149 < a < 3.00000000000000016e235Initial program 53.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6466.7
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval66.5
Applied rewrites66.5%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
div-invN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6466.8
Applied rewrites66.8%
if 3.00000000000000016e235 < a Initial program 43.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6468.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval68.4
Applied rewrites68.4%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
clear-numN/A
associate-*r/N/A
*-commutativeN/A
div-invN/A
times-fracN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6487.3
Applied rewrites87.3%
Final simplification70.0%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* PI angle) (* -0.011111111111111112 (* a_m a_m))))
(t_1 (* PI (/ angle 180.0)))
(t_2
(* (cos t_1) (* (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) (sin t_1)))))
(if (<= t_2 -5e-86)
(fma
a_m
(* -0.011111111111111112 (* a_m (* PI angle)))
(fma 0.011111111111111112 (* angle (* PI (* b b))) 0.0))
(if (<= t_2 0.0)
t_0
(if (<= t_2 INFINITY)
(fma b (* 0.011111111111111112 (* PI (* b angle))) t_0)
(* (* (+ a_m b) (- b a_m)) (* angle (* PI 0.011111111111111112))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (((double) M_PI) * angle) * (-0.011111111111111112 * (a_m * a_m));
double t_1 = ((double) M_PI) * (angle / 180.0);
double t_2 = cos(t_1) * ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) * sin(t_1));
double tmp;
if (t_2 <= -5e-86) {
tmp = fma(a_m, (-0.011111111111111112 * (a_m * (((double) M_PI) * angle))), fma(0.011111111111111112, (angle * (((double) M_PI) * (b * b))), 0.0));
} else if (t_2 <= 0.0) {
tmp = t_0;
} else if (t_2 <= ((double) INFINITY)) {
tmp = fma(b, (0.011111111111111112 * (((double) M_PI) * (b * angle))), t_0);
} else {
tmp = ((a_m + b) * (b - a_m)) * (angle * (((double) M_PI) * 0.011111111111111112));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(pi * angle) * Float64(-0.011111111111111112 * Float64(a_m * a_m))) t_1 = Float64(pi * Float64(angle / 180.0)) t_2 = Float64(cos(t_1) * Float64(Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_1))) tmp = 0.0 if (t_2 <= -5e-86) tmp = fma(a_m, Float64(-0.011111111111111112 * Float64(a_m * Float64(pi * angle))), fma(0.011111111111111112, Float64(angle * Float64(pi * Float64(b * b))), 0.0)); elseif (t_2 <= 0.0) tmp = t_0; elseif (t_2 <= Inf) tmp = fma(b, Float64(0.011111111111111112 * Float64(pi * Float64(b * angle))), t_0); else tmp = Float64(Float64(Float64(a_m + b) * Float64(b - a_m)) * Float64(angle * Float64(pi * 0.011111111111111112))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * N[(-0.011111111111111112 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-86], N[(a$95$m * N[(-0.011111111111111112 * N[(a$95$m * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], t$95$0, If[LessEqual[t$95$2, Infinity], N[(b * N[(0.011111111111111112 * N[(Pi * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\
t_1 := \pi \cdot \frac{angle}{180}\\
t_2 := \cos t\_1 \cdot \left(\left(2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_1\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-86}:\\
\;\;\;\;\mathsf{fma}\left(a\_m, -0.011111111111111112 \cdot \left(a\_m \cdot \left(\pi \cdot angle\right)\right), \mathsf{fma}\left(0.011111111111111112, angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right), 0\right)\right)\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(b, 0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot angle\right)\right), t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\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))))) < -4.9999999999999999e-86Initial program 53.2%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.9
Applied rewrites55.9%
Taylor expanded in a around 0
Applied rewrites61.0%
if -4.9999999999999999e-86 < (*.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))))) < 0.0Initial program 89.2%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6485.7
Applied rewrites85.7%
Taylor expanded in b around 0
Applied rewrites79.0%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < +inf.0Initial program 49.4%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6440.4
Applied rewrites40.4%
Taylor expanded in b around 0
Applied rewrites49.8%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 0.0%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6458.8
Applied rewrites58.8%
Applied rewrites58.8%
Final simplification59.4%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0)))
(t_1 (cos t_0))
(t_2 (* t_1 (* (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) (sin t_0))))
(t_3 (* 2.0 (sin (* PI (* angle 0.005555555555555556))))))
(if (<= t_2 1e+250)
(* (* (+ a_m b) (* (- b a_m) t_3)) (cos (/ (* PI angle) 180.0)))
(if (<= t_2 INFINITY)
(* t_1 (* (+ a_m b) (/ t_3 (/ 1.0 (+ a_m b)))))
(*
t_1
(*
(+ a_m b)
(*
(- b a_m)
(*
2.0
(*
angle
(fma
-2.8577960676726107e-8
(* (* angle angle) (* PI (* PI PI)))
(* PI 0.005555555555555556)))))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double t_1 = cos(t_0);
double t_2 = t_1 * ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) * sin(t_0));
double t_3 = 2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556)));
double tmp;
if (t_2 <= 1e+250) {
tmp = ((a_m + b) * ((b - a_m) * t_3)) * cos(((((double) M_PI) * angle) / 180.0));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_1 * ((a_m + b) * (t_3 / (1.0 / (a_m + b))));
} else {
tmp = t_1 * ((a_m + b) * ((b - a_m) * (2.0 * (angle * fma(-2.8577960676726107e-8, ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.005555555555555556))))));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) t_1 = cos(t_0) t_2 = Float64(t_1 * Float64(Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_0))) t_3 = Float64(2.0 * sin(Float64(pi * Float64(angle * 0.005555555555555556)))) tmp = 0.0 if (t_2 <= 1e+250) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * t_3)) * cos(Float64(Float64(pi * angle) / 180.0))); elseif (t_2 <= Inf) tmp = Float64(t_1 * Float64(Float64(a_m + b) * Float64(t_3 / Float64(1.0 / Float64(a_m + b))))); else tmp = Float64(t_1 * Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * Float64(angle * fma(-2.8577960676726107e-8, Float64(Float64(angle * angle) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.005555555555555556))))))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 1e+250], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(t$95$1 * N[(N[(a$95$m + b), $MachinePrecision] * N[(t$95$3 / N[(1.0 / N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[(angle * N[(-2.8577960676726107e-8 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \cos t\_0\\
t_2 := t\_1 \cdot \left(\left(2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right)\\
t_3 := 2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\
\mathbf{if}\;t\_2 \leq 10^{+250}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot t\_3\right)\right) \cdot \cos \left(\frac{\pi \cdot angle}{180}\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1 \cdot \left(\left(a\_m + b\right) \cdot \frac{t\_3}{\frac{1}{a\_m + b}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\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))))) < 9.9999999999999992e249Initial program 60.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6466.2
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval65.7
Applied rewrites65.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
lower-/.f6466.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6466.1
Applied rewrites66.1%
if 9.9999999999999992e249 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < +inf.0Initial program 46.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6477.8
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval80.3
Applied rewrites80.3%
Applied rewrites62.7%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 0.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6485.3
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval85.3
Applied rewrites85.3%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f6492.6
Applied rewrites92.6%
Final simplification67.0%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))) (t_1 (cos t_0)))
(if (<= (* t_1 (* (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) (sin t_0))) 1e+250)
(*
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* PI (* angle 0.005555555555555556))))))
(cos (/ (* PI angle) 180.0)))
(*
t_1
(*
(+ a_m b)
(*
(- b a_m)
(*
2.0
(*
angle
(fma
-2.8577960676726107e-8
(* (* angle angle) (* PI (* PI PI)))
(* PI 0.005555555555555556))))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double t_1 = cos(t_0);
double tmp;
if ((t_1 * ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) * sin(t_0))) <= 1e+250) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556)))))) * cos(((((double) M_PI) * angle) / 180.0));
} else {
tmp = t_1 * ((a_m + b) * ((b - a_m) * (2.0 * (angle * fma(-2.8577960676726107e-8, ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.005555555555555556))))));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) t_1 = cos(t_0) tmp = 0.0 if (Float64(t_1 * Float64(Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_0))) <= 1e+250) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(pi * Float64(angle * 0.005555555555555556)))))) * cos(Float64(Float64(pi * angle) / 180.0))); else tmp = Float64(t_1 * Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * Float64(angle * fma(-2.8577960676726107e-8, Float64(Float64(angle * angle) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.005555555555555556))))))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[N[(t$95$1 * N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+250], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[(angle * N[(-2.8577960676726107e-8 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \cos t\_0\\
\mathbf{if}\;t\_1 \cdot \left(\left(2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \leq 10^{+250}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{\pi \cdot angle}{180}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\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))))) < 9.9999999999999992e249Initial program 60.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6466.2
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval65.7
Applied rewrites65.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
lower-/.f6466.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6466.1
Applied rewrites66.1%
if 9.9999999999999992e249 < (*.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 35.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6479.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval81.5
Applied rewrites81.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f6484.4
Applied rewrites84.4%
Final simplification70.2%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))) (t_1 (cos t_0)))
(if (<= (* t_1 (* (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) (sin t_0))) 1e+250)
(*
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* PI (* angle 0.005555555555555556))))))
(cos (* angle (* PI 0.005555555555555556))))
(*
t_1
(*
(+ a_m b)
(*
(- b a_m)
(*
2.0
(*
angle
(fma
-2.8577960676726107e-8
(* (* angle angle) (* PI (* PI PI)))
(* PI 0.005555555555555556))))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double t_1 = cos(t_0);
double tmp;
if ((t_1 * ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) * sin(t_0))) <= 1e+250) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556)))))) * cos((angle * (((double) M_PI) * 0.005555555555555556)));
} else {
tmp = t_1 * ((a_m + b) * ((b - a_m) * (2.0 * (angle * fma(-2.8577960676726107e-8, ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.005555555555555556))))));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) t_1 = cos(t_0) tmp = 0.0 if (Float64(t_1 * Float64(Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_0))) <= 1e+250) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(pi * Float64(angle * 0.005555555555555556)))))) * cos(Float64(angle * Float64(pi * 0.005555555555555556)))); else tmp = Float64(t_1 * Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * Float64(angle * fma(-2.8577960676726107e-8, Float64(Float64(angle * angle) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.005555555555555556))))))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[N[(t$95$1 * N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+250], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[(angle * N[(-2.8577960676726107e-8 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \cos t\_0\\
\mathbf{if}\;t\_1 \cdot \left(\left(2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \leq 10^{+250}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\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))))) < 9.9999999999999992e249Initial program 60.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6466.2
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval65.7
Applied rewrites65.7%
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lower-*.f64N/A
div-invN/A
metadata-evalN/A
lower-*.f6465.5
Applied rewrites65.5%
if 9.9999999999999992e249 < (*.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 35.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6479.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval81.5
Applied rewrites81.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f6484.4
Applied rewrites84.4%
Final simplification69.8%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))))
(if (<=
(* (cos t_0) (* (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) (sin t_0)))
0.0)
(* 0.011111111111111112 (* angle (* PI (* b b))))
(* 0.011111111111111112 (* b (* b (* PI angle)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((cos(t_0) * ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) * sin(t_0))) <= 0.0) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
} else {
tmp = 0.011111111111111112 * (b * (b * (((double) M_PI) * angle)));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double tmp;
if ((Math.cos(t_0) * ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) * Math.sin(t_0))) <= 0.0) {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
} else {
tmp = 0.011111111111111112 * (b * (b * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = math.pi * (angle / 180.0) tmp = 0 if (math.cos(t_0) * ((2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) * math.sin(t_0))) <= 0.0: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) else: tmp = 0.011111111111111112 * (b * (b * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(cos(t_0) * Float64(Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_0))) <= 0.0) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); else tmp = Float64(0.011111111111111112 * Float64(b * Float64(b * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = pi * (angle / 180.0); tmp = 0.0; if ((cos(t_0) * ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_0))) <= 0.0) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); else tmp = 0.011111111111111112 * (b * (b * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b * N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\cos t\_0 \cdot \left(\left(2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \leq 0:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\right)\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))))) < 0.0Initial program 63.2%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6464.1
Applied rewrites64.1%
Taylor expanded in b around inf
Applied rewrites38.1%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 43.1%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6442.7
Applied rewrites42.7%
Taylor expanded in b around inf
Applied rewrites25.6%
Applied rewrites34.0%
Final simplification36.3%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))))
(if (<=
(* (cos t_0) (* (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) (sin t_0)))
5e-99)
(* 0.011111111111111112 (* angle (* PI (* b b))))
(* 0.011111111111111112 (* PI (* b (* b angle)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((cos(t_0) * ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) * sin(t_0))) <= 5e-99) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
} else {
tmp = 0.011111111111111112 * (((double) M_PI) * (b * (b * angle)));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double tmp;
if ((Math.cos(t_0) * ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) * Math.sin(t_0))) <= 5e-99) {
tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
} else {
tmp = 0.011111111111111112 * (Math.PI * (b * (b * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = math.pi * (angle / 180.0) tmp = 0 if (math.cos(t_0) * ((2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) * math.sin(t_0))) <= 5e-99: tmp = 0.011111111111111112 * (angle * (math.pi * (b * b))) else: tmp = 0.011111111111111112 * (math.pi * (b * (b * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(cos(t_0) * Float64(Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_0))) <= 5e-99) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))); else tmp = Float64(0.011111111111111112 * Float64(pi * Float64(b * Float64(b * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = pi * (angle / 180.0); tmp = 0.0; if ((cos(t_0) * ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_0))) <= 5e-99) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); else tmp = 0.011111111111111112 * (pi * (b * (b * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e-99], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(Pi * N[(b * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\cos t\_0 \cdot \left(\left(2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \leq 5 \cdot 10^{-99}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\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))))) < 4.99999999999999969e-99Initial program 62.3%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-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 b around inf
Applied rewrites37.7%
if 4.99999999999999969e-99 < (*.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 39.2%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6440.3
Applied rewrites40.3%
Taylor expanded in b around inf
Applied rewrites22.8%
Applied rewrites33.4%
Applied rewrites33.4%
Final simplification36.3%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= (- (pow b 2.0) (pow a_m 2.0)) -1e+297)
(fma
a_m
(* -0.011111111111111112 (* a_m (* PI angle)))
(fma 0.011111111111111112 (* angle (* PI (* b b))) 0.0))
(*
(cos (/ 1.0 (/ 180.0 (* PI angle))))
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* PI (* angle 0.005555555555555556)))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -1e+297) {
tmp = fma(a_m, (-0.011111111111111112 * (a_m * (((double) M_PI) * angle))), fma(0.011111111111111112, (angle * (((double) M_PI) * (b * b))), 0.0));
} else {
tmp = cos((1.0 / (180.0 / (((double) M_PI) * angle)))) * ((a_m + b) * ((b - a_m) * (2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556))))));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -1e+297) tmp = fma(a_m, Float64(-0.011111111111111112 * Float64(a_m * Float64(pi * angle))), fma(0.011111111111111112, Float64(angle * Float64(pi * Float64(b * b))), 0.0)); else tmp = Float64(cos(Float64(1.0 / Float64(180.0 / Float64(pi * angle)))) * Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(pi * Float64(angle * 0.005555555555555556))))))); end return tmp end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -1e+297], N[(a$95$m * N[(-0.011111111111111112 * N[(a$95$m * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(1.0 / N[(180.0 / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -1 \cdot 10^{+297}:\\
\;\;\;\;\mathsf{fma}\left(a\_m, -0.011111111111111112 \cdot \left(a\_m \cdot \left(\pi \cdot angle\right)\right), \mathsf{fma}\left(0.011111111111111112, angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right), 0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right) \cdot \left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1e297Initial program 48.3%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6463.2
Applied rewrites63.2%
Taylor expanded in a around 0
Applied rewrites82.8%
if -1e297 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 55.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6468.1
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval68.2
Applied rewrites68.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6468.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6468.7
Applied rewrites68.7%
Final simplification71.3%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* PI (* angle 0.005555555555555556))))
(if (<= (pow b 2.0) 2e+279)
(* (* (+ a_m b) (* (- b a_m) (* 2.0 (sin t_0)))) (cos t_0))
(*
(cos (* PI (/ angle 180.0)))
(*
(+ a_m b)
(*
(- b a_m)
(*
2.0
(*
angle
(fma
-2.8577960676726107e-8
(* (* angle angle) (* PI (* PI PI)))
(* PI 0.005555555555555556))))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
double tmp;
if (pow(b, 2.0) <= 2e+279) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin(t_0)))) * cos(t_0);
} else {
tmp = cos((((double) M_PI) * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * (angle * fma(-2.8577960676726107e-8, ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.005555555555555556))))));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) tmp = 0.0 if ((b ^ 2.0) <= 2e+279) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(t_0)))) * cos(t_0)); else tmp = Float64(cos(Float64(pi * Float64(angle / 180.0))) * Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * Float64(angle * fma(-2.8577960676726107e-8, Float64(Float64(angle * angle) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.005555555555555556))))))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 2e+279], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[(angle * N[(-2.8577960676726107e-8 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+279}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin t\_0\right)\right)\right) \cdot \cos t\_0\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 2.00000000000000012e279Initial program 57.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6463.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval63.0
Applied rewrites63.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6463.0
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f6463.9
Applied rewrites63.9%
if 2.00000000000000012e279 < (pow.f64 b #s(literal 2 binary64)) Initial program 45.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6486.1
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval87.8
Applied rewrites87.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-PI.f6489.1
Applied rewrites89.1%
Final simplification70.3%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= (/ angle 180.0) 5e+247)
(*
(cos (/ 1.0 (/ 180.0 (* PI angle))))
(*
(+ a_m b)
(*
(- b a_m)
(* 2.0 (sin (/ 0.005555555555555556 (/ 1.0 (* PI angle))))))))
(*
(cos (* PI (/ angle 180.0)))
(*
(+ a_m b)
(/
(* 2.0 (sin (* PI (* angle 0.005555555555555556))))
(/ 1.0 (+ a_m b)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 5e+247) {
tmp = cos((1.0 / (180.0 / (((double) M_PI) * angle)))) * ((a_m + b) * ((b - a_m) * (2.0 * sin((0.005555555555555556 / (1.0 / (((double) M_PI) * angle)))))));
} else {
tmp = cos((((double) M_PI) * (angle / 180.0))) * ((a_m + b) * ((2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556)))) / (1.0 / (a_m + b))));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 5e+247) {
tmp = Math.cos((1.0 / (180.0 / (Math.PI * angle)))) * ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((0.005555555555555556 / (1.0 / (Math.PI * angle)))))));
} else {
tmp = Math.cos((Math.PI * (angle / 180.0))) * ((a_m + b) * ((2.0 * Math.sin((Math.PI * (angle * 0.005555555555555556)))) / (1.0 / (a_m + b))));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (angle / 180.0) <= 5e+247: tmp = math.cos((1.0 / (180.0 / (math.pi * angle)))) * ((a_m + b) * ((b - a_m) * (2.0 * math.sin((0.005555555555555556 / (1.0 / (math.pi * angle))))))) else: tmp = math.cos((math.pi * (angle / 180.0))) * ((a_m + b) * ((2.0 * math.sin((math.pi * (angle * 0.005555555555555556)))) / (1.0 / (a_m + b)))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 5e+247) tmp = Float64(cos(Float64(1.0 / Float64(180.0 / Float64(pi * angle)))) * Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(0.005555555555555556 / Float64(1.0 / Float64(pi * angle)))))))); else tmp = Float64(cos(Float64(pi * Float64(angle / 180.0))) * Float64(Float64(a_m + b) * Float64(Float64(2.0 * sin(Float64(pi * Float64(angle * 0.005555555555555556)))) / Float64(1.0 / Float64(a_m + b))))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((angle / 180.0) <= 5e+247) tmp = cos((1.0 / (180.0 / (pi * angle)))) * ((a_m + b) * ((b - a_m) * (2.0 * sin((0.005555555555555556 / (1.0 / (pi * angle))))))); else tmp = cos((pi * (angle / 180.0))) * ((a_m + b) * ((2.0 * sin((pi * (angle * 0.005555555555555556)))) / (1.0 / (a_m + b)))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+247], N[(N[Cos[N[(1.0 / N[(180.0 / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(0.005555555555555556 / N[(1.0 / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(2.0 * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+247}:\\
\;\;\;\;\cos \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right) \cdot \left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\frac{0.005555555555555556}{\frac{1}{\pi \cdot angle}}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(a\_m + b\right) \cdot \frac{2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}{\frac{1}{a\_m + b}}\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000023e247Initial program 56.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6471.7
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval71.8
Applied rewrites71.8%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6472.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6472.3
Applied rewrites72.3%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
frac-2negN/A
associate-*r/N/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
clear-numN/A
frac-2negN/A
div-invN/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-/.f6473.1
lift-*.f64N/A
*-commutativeN/A
lift-*.f6473.1
Applied rewrites73.1%
if 5.00000000000000023e247 < (/.f64 angle #s(literal 180 binary64)) Initial program 23.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6423.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval23.6
Applied rewrites23.6%
Applied rewrites31.2%
Final simplification71.0%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (/ 1.0 (/ 180.0 (* PI angle)))))
(if (<= a_m 2e+205)
(* (* (+ a_m b) (* (- b a_m) (* 2.0 (sin t_0)))) (cos t_0))
(*
(*
(+ a_m b)
(*
(- b a_m)
(* 2.0 (sin (* 0.005555555555555556 (/ PI (/ 1.0 angle)))))))
(cos (* PI (/ angle 180.0)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = 1.0 / (180.0 / (((double) M_PI) * angle));
double tmp;
if (a_m <= 2e+205) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin(t_0)))) * cos(t_0);
} else {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((0.005555555555555556 * (((double) M_PI) / (1.0 / angle))))))) * cos((((double) M_PI) * (angle / 180.0)));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double t_0 = 1.0 / (180.0 / (Math.PI * angle));
double tmp;
if (a_m <= 2e+205) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin(t_0)))) * Math.cos(t_0);
} else {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((0.005555555555555556 * (Math.PI / (1.0 / angle))))))) * Math.cos((Math.PI * (angle / 180.0)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = 1.0 / (180.0 / (math.pi * angle)) tmp = 0 if a_m <= 2e+205: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin(t_0)))) * math.cos(t_0) else: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin((0.005555555555555556 * (math.pi / (1.0 / angle))))))) * math.cos((math.pi * (angle / 180.0))) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(1.0 / Float64(180.0 / Float64(pi * angle))) tmp = 0.0 if (a_m <= 2e+205) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(t_0)))) * cos(t_0)); else tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(0.005555555555555556 * Float64(pi / Float64(1.0 / angle))))))) * cos(Float64(pi * Float64(angle / 180.0)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = 1.0 / (180.0 / (pi * angle)); tmp = 0.0; if (a_m <= 2e+205) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin(t_0)))) * cos(t_0); else tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((0.005555555555555556 * (pi / (1.0 / angle))))))) * cos((pi * (angle / 180.0))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(1.0 / N[(180.0 / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a$95$m, 2e+205], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(0.005555555555555556 * N[(Pi / N[(1.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \frac{1}{\frac{180}{\pi \cdot angle}}\\
\mathbf{if}\;a\_m \leq 2 \cdot 10^{+205}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin t\_0\right)\right)\right) \cdot \cos t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \frac{\pi}{\frac{1}{angle}}\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\\
\end{array}
\end{array}
if a < 2.00000000000000003e205Initial program 56.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6469.9
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval70.0
Applied rewrites70.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6470.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6470.0
Applied rewrites70.0%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
frac-2negN/A
associate-*r/N/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
clear-numN/A
frac-2negN/A
lift-/.f64N/A
lift-/.f6470.7
Applied rewrites70.7%
if 2.00000000000000003e205 < a Initial program 33.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6461.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval61.6
Applied rewrites61.6%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
clear-numN/A
associate-*r/N/A
*-commutativeN/A
div-invN/A
times-fracN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6480.7
Applied rewrites80.7%
Final simplification71.6%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= a_m 1.06e-175)
(*
(* (+ a_m b) (* (- b a_m) (* 2.0 (sin (/ 1.0 (/ 180.0 (* PI angle)))))))
1.0)
(*
(cos (* PI (/ angle 180.0)))
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* PI (* angle 0.005555555555555556)))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 1.06e-175) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((1.0 / (180.0 / (((double) M_PI) * angle))))))) * 1.0;
} else {
tmp = cos((((double) M_PI) * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556))))));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 1.06e-175) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((1.0 / (180.0 / (Math.PI * angle))))))) * 1.0;
} else {
tmp = Math.cos((Math.PI * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((Math.PI * (angle * 0.005555555555555556))))));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if a_m <= 1.06e-175: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin((1.0 / (180.0 / (math.pi * angle))))))) * 1.0 else: tmp = math.cos((math.pi * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * math.sin((math.pi * (angle * 0.005555555555555556)))))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (a_m <= 1.06e-175) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(1.0 / Float64(180.0 / Float64(pi * angle))))))) * 1.0); else tmp = Float64(cos(Float64(pi * Float64(angle / 180.0))) * Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(pi * Float64(angle * 0.005555555555555556))))))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (a_m <= 1.06e-175) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((1.0 / (180.0 / (pi * angle))))))) * 1.0; else tmp = cos((pi * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * sin((pi * (angle * 0.005555555555555556)))))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 1.06e-175], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(1.0 / N[(180.0 / N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 1.06 \cdot 10^{-175}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right)\right)\right)\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if a < 1.06000000000000002e-175Initial program 55.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6470.1
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval70.4
Applied rewrites70.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6470.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6470.8
Applied rewrites70.8%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
frac-2negN/A
associate-*r/N/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
clear-numN/A
frac-2negN/A
lift-/.f64N/A
lift-/.f6471.6
Applied rewrites71.6%
Taylor expanded in angle around 0
Applied rewrites69.5%
if 1.06000000000000002e-175 < a Initial program 53.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.9
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval67.7
Applied rewrites67.7%
Final simplification68.8%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (* (cos (* PI (/ angle 180.0))) (* (+ a_m b) (* (- b a_m) (* 2.0 (sin (/ (* PI angle) 180.0)))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
return cos((((double) M_PI) * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * sin(((((double) M_PI) * angle) / 180.0)))));
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
return Math.cos((Math.PI * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * Math.sin(((Math.PI * angle) / 180.0)))));
}
a_m = math.fabs(a) def code(a_m, b, angle): return math.cos((math.pi * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * math.sin(((math.pi * angle) / 180.0)))))
a_m = abs(a) function code(a_m, b, angle) return Float64(cos(Float64(pi * Float64(angle / 180.0))) * Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(Float64(pi * angle) / 180.0)))))) end
a_m = abs(a); function tmp = code(a_m, b, angle) tmp = cos((pi * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * sin(((pi * angle) / 180.0))))); end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\right)\right)\right)
\end{array}
Initial program 54.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6469.2
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval69.3
Applied rewrites69.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
metadata-evalN/A
div-invN/A
lower-/.f6469.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.6
Applied rewrites69.6%
Final simplification69.6%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (- (pow b 2.0) (pow a_m 2.0)) 1e-247) (* (* a_m a_m) (* (* PI angle) -0.011111111111111112)) (* 0.011111111111111112 (* b (* b (* PI angle))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a_m, 2.0)) <= 1e-247) {
tmp = (a_m * a_m) * ((((double) M_PI) * angle) * -0.011111111111111112);
} else {
tmp = 0.011111111111111112 * (b * (b * (((double) M_PI) * angle)));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= 1e-247) {
tmp = (a_m * a_m) * ((Math.PI * angle) * -0.011111111111111112);
} else {
tmp = 0.011111111111111112 * (b * (b * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= 1e-247: tmp = (a_m * a_m) * ((math.pi * angle) * -0.011111111111111112) else: tmp = 0.011111111111111112 * (b * (b * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= 1e-247) tmp = Float64(Float64(a_m * a_m) * Float64(Float64(pi * angle) * -0.011111111111111112)); else tmp = Float64(0.011111111111111112 * Float64(b * Float64(b * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (((b ^ 2.0) - (a_m ^ 2.0)) <= 1e-247) tmp = (a_m * a_m) * ((pi * angle) * -0.011111111111111112); else tmp = 0.011111111111111112 * (b * (b * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 1e-247], N[(N[(a$95$m * a$95$m), $MachinePrecision] * N[(N[(Pi * angle), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b * N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq 10^{-247}:\\
\;\;\;\;\left(a\_m \cdot a\_m\right) \cdot \left(\left(\pi \cdot angle\right) \cdot -0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 1e-247Initial program 59.2%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.0
Applied rewrites61.0%
Taylor expanded in b around inf
Applied rewrites21.1%
Taylor expanded in a around inf
Applied rewrites60.0%
if 1e-247 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 49.2%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6448.0
Applied rewrites48.0%
Taylor expanded in b around inf
Applied rewrites45.4%
Applied rewrites56.7%
Final simplification58.4%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (- (pow b 2.0) (pow a_m 2.0)) 1e-247) (* (* PI angle) (* -0.011111111111111112 (* a_m a_m))) (* 0.011111111111111112 (* b (* b (* PI angle))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((pow(b, 2.0) - pow(a_m, 2.0)) <= 1e-247) {
tmp = (((double) M_PI) * angle) * (-0.011111111111111112 * (a_m * a_m));
} else {
tmp = 0.011111111111111112 * (b * (b * (((double) M_PI) * angle)));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= 1e-247) {
tmp = (Math.PI * angle) * (-0.011111111111111112 * (a_m * a_m));
} else {
tmp = 0.011111111111111112 * (b * (b * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= 1e-247: tmp = (math.pi * angle) * (-0.011111111111111112 * (a_m * a_m)) else: tmp = 0.011111111111111112 * (b * (b * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= 1e-247) tmp = Float64(Float64(pi * angle) * Float64(-0.011111111111111112 * Float64(a_m * a_m))); else tmp = Float64(0.011111111111111112 * Float64(b * Float64(b * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (((b ^ 2.0) - (a_m ^ 2.0)) <= 1e-247) tmp = (pi * angle) * (-0.011111111111111112 * (a_m * a_m)); else tmp = 0.011111111111111112 * (b * (b * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 1e-247], N[(N[(Pi * angle), $MachinePrecision] * N[(-0.011111111111111112 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b * N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq 10^{-247}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 1e-247Initial program 59.2%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.0
Applied rewrites61.0%
Taylor expanded in b around 0
Applied rewrites60.0%
if 1e-247 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 49.2%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6448.0
Applied rewrites48.0%
Taylor expanded in b around inf
Applied rewrites45.4%
Applied rewrites56.7%
Final simplification58.4%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= (/ angle 180.0) 2e+88)
(* (+ a_m b) (* (- b a_m) (sin (* (* PI angle) 0.011111111111111112))))
(if (<= (/ angle 180.0) 5e+247)
(*
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* PI (* angle 0.005555555555555556))))))
1.0)
(*
(+ a_m b)
(*
(* (+ a_m b) 2.0)
(* (sin (* PI (* angle 0.011111111111111112))) 0.5))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 2e+88) {
tmp = (a_m + b) * ((b - a_m) * sin(((((double) M_PI) * angle) * 0.011111111111111112)));
} else if ((angle / 180.0) <= 5e+247) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556)))))) * 1.0;
} else {
tmp = (a_m + b) * (((a_m + b) * 2.0) * (sin((((double) M_PI) * (angle * 0.011111111111111112))) * 0.5));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 2e+88) {
tmp = (a_m + b) * ((b - a_m) * Math.sin(((Math.PI * angle) * 0.011111111111111112)));
} else if ((angle / 180.0) <= 5e+247) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((Math.PI * (angle * 0.005555555555555556)))))) * 1.0;
} else {
tmp = (a_m + b) * (((a_m + b) * 2.0) * (Math.sin((Math.PI * (angle * 0.011111111111111112))) * 0.5));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (angle / 180.0) <= 2e+88: tmp = (a_m + b) * ((b - a_m) * math.sin(((math.pi * angle) * 0.011111111111111112))) elif (angle / 180.0) <= 5e+247: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin((math.pi * (angle * 0.005555555555555556)))))) * 1.0 else: tmp = (a_m + b) * (((a_m + b) * 2.0) * (math.sin((math.pi * (angle * 0.011111111111111112))) * 0.5)) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 2e+88) tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(Float64(pi * angle) * 0.011111111111111112)))); elseif (Float64(angle / 180.0) <= 5e+247) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(pi * Float64(angle * 0.005555555555555556)))))) * 1.0); else tmp = Float64(Float64(a_m + b) * Float64(Float64(Float64(a_m + b) * 2.0) * Float64(sin(Float64(pi * Float64(angle * 0.011111111111111112))) * 0.5))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((angle / 180.0) <= 2e+88) tmp = (a_m + b) * ((b - a_m) * sin(((pi * angle) * 0.011111111111111112))); elseif ((angle / 180.0) <= 5e+247) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((pi * (angle * 0.005555555555555556)))))) * 1.0; else tmp = (a_m + b) * (((a_m + b) * 2.0) * (sin((pi * (angle * 0.011111111111111112))) * 0.5)); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+88], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+247], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(N[(a$95$m + b), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+88}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+247}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(\left(a\_m + b\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 1.99999999999999992e88Initial program 61.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites78.5%
if 1.99999999999999992e88 < (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000023e247Initial program 22.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6425.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval27.4
Applied rewrites27.4%
Taylor expanded in angle around 0
Applied rewrites31.7%
if 5.00000000000000023e247 < (/.f64 angle #s(literal 180 binary64)) Initial program 23.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6423.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval23.6
Applied rewrites23.6%
Applied rewrites31.2%
Final simplification69.9%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* PI (* angle 0.005555555555555556))))
(if (<= (/ angle 180.0) 2e+88)
(* (+ a_m b) (* (- b a_m) (sin (* (* PI angle) 0.011111111111111112))))
(if (<= (/ angle 180.0) 5e+247)
(* (* (+ a_m b) (* (- b a_m) (* 2.0 (sin t_0)))) 1.0)
(* (fma a_m a_m (* b b)) (sin (* 2.0 t_0)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
double tmp;
if ((angle / 180.0) <= 2e+88) {
tmp = (a_m + b) * ((b - a_m) * sin(((((double) M_PI) * angle) * 0.011111111111111112)));
} else if ((angle / 180.0) <= 5e+247) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin(t_0)))) * 1.0;
} else {
tmp = fma(a_m, a_m, (b * b)) * sin((2.0 * t_0));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) tmp = 0.0 if (Float64(angle / 180.0) <= 2e+88) tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(Float64(pi * angle) * 0.011111111111111112)))); elseif (Float64(angle / 180.0) <= 5e+247) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(t_0)))) * 1.0); else tmp = Float64(fma(a_m, a_m, Float64(b * b)) * sin(Float64(2.0 * t_0))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+88], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+247], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(a$95$m * a$95$m + N[(b * b), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+88}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+247}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin t\_0\right)\right)\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a\_m, a\_m, b \cdot b\right) \cdot \sin \left(2 \cdot t\_0\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 1.99999999999999992e88Initial program 61.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites78.5%
if 1.99999999999999992e88 < (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000023e247Initial program 22.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6425.5
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval27.4
Applied rewrites27.4%
Taylor expanded in angle around 0
Applied rewrites31.7%
if 5.00000000000000023e247 < (/.f64 angle #s(literal 180 binary64)) Initial program 23.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6423.6
lift-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval23.6
Applied rewrites23.6%
Applied rewrites31.2%
Final simplification69.9%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.011111111111111112))
(t_1 (* (* PI angle) (* (+ a_m b) 0.011111111111111112))))
(if (<= (/ angle 180.0) 4e-59)
(fma t_1 b (* t_1 (- a_m)))
(if (<= (/ angle 180.0) 5e+87)
(* (sin t_0) (* (+ a_m b) (- b a_m)))
(* t_0 (* (- b a_m) (- a_m b)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (((double) M_PI) * angle) * 0.011111111111111112;
double t_1 = (((double) M_PI) * angle) * ((a_m + b) * 0.011111111111111112);
double tmp;
if ((angle / 180.0) <= 4e-59) {
tmp = fma(t_1, b, (t_1 * -a_m));
} else if ((angle / 180.0) <= 5e+87) {
tmp = sin(t_0) * ((a_m + b) * (b - a_m));
} else {
tmp = t_0 * ((b - a_m) * (a_m - b));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(pi * angle) * 0.011111111111111112) t_1 = Float64(Float64(pi * angle) * Float64(Float64(a_m + b) * 0.011111111111111112)) tmp = 0.0 if (Float64(angle / 180.0) <= 4e-59) tmp = fma(t_1, b, Float64(t_1 * Float64(-a_m))); elseif (Float64(angle / 180.0) <= 5e+87) tmp = Float64(sin(t_0) * Float64(Float64(a_m + b) * Float64(b - a_m))); else tmp = Float64(t_0 * Float64(Float64(b - a_m) * Float64(a_m - b))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]}, Block[{t$95$1 = N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 4e-59], N[(t$95$1 * b + N[(t$95$1 * (-a$95$m)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+87], N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.011111111111111112\\
t_1 := \left(\pi \cdot angle\right) \cdot \left(\left(a\_m + b\right) \cdot 0.011111111111111112\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{-59}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, t\_1 \cdot \left(-a\_m\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+87}:\\
\;\;\;\;\sin t\_0 \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m - b\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 4.0000000000000001e-59Initial program 59.1%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.0
Applied rewrites61.0%
Applied rewrites70.0%
if 4.0000000000000001e-59 < (/.f64 angle #s(literal 180 binary64)) < 4.9999999999999998e87Initial program 74.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f64N/A
Applied rewrites74.6%
if 4.9999999999999998e87 < (/.f64 angle #s(literal 180 binary64)) Initial program 22.8%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6423.5
Applied rewrites23.5%
Applied rewrites1.7%
Taylor expanded in b around 0
Applied rewrites27.0%
Final simplification62.7%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* PI angle) 0.011111111111111112)))
(if (<= (/ angle 180.0) 5e+87)
(* (+ a_m b) (* (- b a_m) (sin t_0)))
(* t_0 (* (- b a_m) (- a_m b))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (((double) M_PI) * angle) * 0.011111111111111112;
double tmp;
if ((angle / 180.0) <= 5e+87) {
tmp = (a_m + b) * ((b - a_m) * sin(t_0));
} else {
tmp = t_0 * ((b - a_m) * (a_m - b));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double t_0 = (Math.PI * angle) * 0.011111111111111112;
double tmp;
if ((angle / 180.0) <= 5e+87) {
tmp = (a_m + b) * ((b - a_m) * Math.sin(t_0));
} else {
tmp = t_0 * ((b - a_m) * (a_m - b));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = (math.pi * angle) * 0.011111111111111112 tmp = 0 if (angle / 180.0) <= 5e+87: tmp = (a_m + b) * ((b - a_m) * math.sin(t_0)) else: tmp = t_0 * ((b - a_m) * (a_m - b)) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(pi * angle) * 0.011111111111111112) tmp = 0.0 if (Float64(angle / 180.0) <= 5e+87) tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(t_0))); else tmp = Float64(t_0 * Float64(Float64(b - a_m) * Float64(a_m - b))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = (pi * angle) * 0.011111111111111112; tmp = 0.0; if ((angle / 180.0) <= 5e+87) tmp = (a_m + b) * ((b - a_m) * sin(t_0)); else tmp = t_0 * ((b - a_m) * (a_m - b)); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+87], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot 0.011111111111111112\\
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+87}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m - b\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 4.9999999999999998e87Initial program 61.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites78.5%
if 4.9999999999999998e87 < (/.f64 angle #s(literal 180 binary64)) Initial program 22.8%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6423.5
Applied rewrites23.5%
Applied rewrites1.7%
Taylor expanded in b around 0
Applied rewrites27.0%
Final simplification69.0%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* PI angle) (* (+ a_m b) 0.011111111111111112))))
(if (<= (/ angle 180.0) 5e+31)
(fma t_0 b (* t_0 (- a_m)))
(* (* (* PI angle) 0.011111111111111112) (* (- b a_m) (- a_m b))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (((double) M_PI) * angle) * ((a_m + b) * 0.011111111111111112);
double tmp;
if ((angle / 180.0) <= 5e+31) {
tmp = fma(t_0, b, (t_0 * -a_m));
} else {
tmp = ((((double) M_PI) * angle) * 0.011111111111111112) * ((b - a_m) * (a_m - b));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(pi * angle) * Float64(Float64(a_m + b) * 0.011111111111111112)) tmp = 0.0 if (Float64(angle / 180.0) <= 5e+31) tmp = fma(t_0, b, Float64(t_0 * Float64(-a_m))); else tmp = Float64(Float64(Float64(pi * angle) * 0.011111111111111112) * Float64(Float64(b - a_m) * Float64(a_m - b))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+31], N[(t$95$0 * b + N[(t$95$0 * (-a$95$m)), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\right) \cdot \left(\left(a\_m + b\right) \cdot 0.011111111111111112\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, b, t\_0 \cdot \left(-a\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m - b\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000027e31Initial program 62.4%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.6
Applied rewrites62.6%
Applied rewrites70.5%
if 5.00000000000000027e31 < (/.f64 angle #s(literal 180 binary64)) Initial program 26.1%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6427.1
Applied rewrites27.1%
Applied rewrites1.7%
Taylor expanded in b around 0
Applied rewrites26.6%
Final simplification60.9%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= (/ angle 180.0) 1e+98)
(fma
b
(* 0.011111111111111112 (* angle (* b PI)))
(* (* PI angle) (* -0.011111111111111112 (* a_m a_m))))
(* (* (* PI angle) 0.011111111111111112) (* (- b a_m) (- a_m b)))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 1e+98) {
tmp = fma(b, (0.011111111111111112 * (angle * (b * ((double) M_PI)))), ((((double) M_PI) * angle) * (-0.011111111111111112 * (a_m * a_m))));
} else {
tmp = ((((double) M_PI) * angle) * 0.011111111111111112) * ((b - a_m) * (a_m - b));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 1e+98) tmp = fma(b, Float64(0.011111111111111112 * Float64(angle * Float64(b * pi))), Float64(Float64(pi * angle) * Float64(-0.011111111111111112 * Float64(a_m * a_m)))); else tmp = Float64(Float64(Float64(pi * angle) * 0.011111111111111112) * Float64(Float64(b - a_m) * Float64(a_m - b))); end return tmp end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+98], N[(b * N[(0.011111111111111112 * N[(angle * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(Pi * angle), $MachinePrecision] * N[(-0.011111111111111112 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 10^{+98}:\\
\;\;\;\;\mathsf{fma}\left(b, 0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right), \left(\pi \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m - b\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999998e97Initial program 61.0%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.2
Applied rewrites61.2%
Taylor expanded in b around inf
Applied rewrites37.3%
Taylor expanded in b around 0
Applied rewrites63.4%
if 9.99999999999999998e97 < (/.f64 angle #s(literal 180 binary64)) Initial program 22.2%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6423.1
Applied rewrites23.1%
Applied rewrites1.6%
Taylor expanded in b around 0
Applied rewrites27.2%
Final simplification57.4%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= b 2.45e+166) (* (* (* PI angle) 0.011111111111111112) (* (+ a_m b) (- b a_m))) (* 0.011111111111111112 (* b (* b (* PI angle))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (b <= 2.45e+166) {
tmp = ((((double) M_PI) * angle) * 0.011111111111111112) * ((a_m + b) * (b - a_m));
} else {
tmp = 0.011111111111111112 * (b * (b * (((double) M_PI) * angle)));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if (b <= 2.45e+166) {
tmp = ((Math.PI * angle) * 0.011111111111111112) * ((a_m + b) * (b - a_m));
} else {
tmp = 0.011111111111111112 * (b * (b * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if b <= 2.45e+166: tmp = ((math.pi * angle) * 0.011111111111111112) * ((a_m + b) * (b - a_m)) else: tmp = 0.011111111111111112 * (b * (b * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (b <= 2.45e+166) tmp = Float64(Float64(Float64(pi * angle) * 0.011111111111111112) * Float64(Float64(a_m + b) * Float64(b - a_m))); else tmp = Float64(0.011111111111111112 * Float64(b * Float64(b * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (b <= 2.45e+166) tmp = ((pi * angle) * 0.011111111111111112) * ((a_m + b) * (b - a_m)); else tmp = 0.011111111111111112 * (b * (b * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[b, 2.45e+166], N[(N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b * N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.45 \cdot 10^{+166}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if b < 2.44999999999999985e166Initial program 54.5%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.9
Applied rewrites53.9%
if 2.44999999999999985e166 < b Initial program 54.1%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.9
Applied rewrites61.9%
Taylor expanded in b around inf
Applied rewrites57.7%
Applied rewrites67.8%
Final simplification55.5%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (* 0.011111111111111112 (* angle (* PI (* b b)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
return 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
return 0.011111111111111112 * (angle * (Math.PI * (b * b)));
}
a_m = math.fabs(a) def code(a_m, b, angle): return 0.011111111111111112 * (angle * (math.pi * (b * b)))
a_m = abs(a) function code(a_m, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b)))) end
a_m = abs(a); function tmp = code(a_m, b, angle) tmp = 0.011111111111111112 * (angle * (pi * (b * b))); end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Initial program 54.5%
Taylor expanded in angle around 0
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.8
Applied rewrites54.8%
Taylor expanded in b around inf
Applied rewrites32.7%
herbie shell --seed 2024237
(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)))))