
(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 20 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 8.5e+57)
(*
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* 0.005555555555555556 (/ PI (/ 1.0 angle)))))))
(cos (/ (* PI angle) 180.0)))
(if (<= a_m 6.8e+224)
(*
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* PI (* angle 0.005555555555555556))))))
(cos (* (/ angle 180.0) (* (sqrt PI) (sqrt PI)))))
(* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 8.5e+57) {
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));
} else if (a_m <= 6.8e+224) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556)))))) * cos(((angle / 180.0) * (sqrt(((double) M_PI)) * sqrt(((double) M_PI)))));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((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 (a_m <= 8.5e+57) {
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));
} else if (a_m <= 6.8e+224) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((Math.PI * (angle * 0.005555555555555556)))))) * Math.cos(((angle / 180.0) * (Math.sqrt(Math.PI) * Math.sqrt(Math.PI))));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if a_m <= 8.5e+57: 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)) elif a_m <= 6.8e+224: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin((math.pi * (angle * 0.005555555555555556)))))) * math.cos(((angle / 180.0) * (math.sqrt(math.pi) * math.sqrt(math.pi)))) else: tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (a_m <= 8.5e+57) 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(Float64(pi * angle) / 180.0))); elseif (a_m <= 6.8e+224) 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(angle / 180.0) * Float64(sqrt(pi) * sqrt(pi))))); else tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (a_m <= 8.5e+57) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((0.005555555555555556 * (pi / (1.0 / angle))))))) * cos(((pi * angle) / 180.0)); elseif (a_m <= 6.8e+224) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((pi * (angle * 0.005555555555555556)))))) * cos(((angle / 180.0) * (sqrt(pi) * sqrt(pi)))); else tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 8.5e+57], 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[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 6.8e+224], 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[(angle / 180.0), $MachinePrecision] * N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 8.5 \cdot 10^{+57}:\\
\;\;\;\;\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(\frac{\pi \cdot angle}{180}\right)\\
\mathbf{elif}\;a\_m \leq 6.8 \cdot 10^{+224}:\\
\;\;\;\;\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{angle}{180} \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 8.5000000000000001e57Initial program 56.0%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites67.9%
lift-PI.f64N/A
associate-*r/N/A
lift-*.f64N/A
lower-/.f6468.1
Applied rewrites68.1%
lift-PI.f64N/A
metadata-evalN/A
div-invN/A
clear-numN/A
associate-*r/N/A
div-invN/A
*-commutativeN/A
times-fracN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6469.4
Applied rewrites69.4%
if 8.5000000000000001e57 < a < 6.8000000000000004e224Initial program 31.8%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites48.8%
add-sqr-sqrtN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6457.5
Applied rewrites57.5%
if 6.8000000000000004e224 < a Initial program 22.8%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6472.8
Applied rewrites72.8%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6492.7
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6492.7
Applied rewrites92.7%
Final simplification68.8%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* PI angle)))
(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))))
(t_3 (* (- b a_m) (* (+ a_m b) t_0))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 5e+256) (* (sin t_0) (* (+ a_m b) (- b a_m))) t_3))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = 0.011111111111111112 * (((double) M_PI) * angle);
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 t_3 = (b - a_m) * ((a_m + b) * t_0);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= 5e+256) {
tmp = sin(t_0) * ((a_m + b) * (b - a_m));
} else {
tmp = t_3;
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double t_0 = 0.011111111111111112 * (Math.PI * angle);
double t_1 = Math.PI * (angle / 180.0);
double t_2 = Math.cos(t_1) * ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) * Math.sin(t_1));
double t_3 = (b - a_m) * ((a_m + b) * t_0);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= 5e+256) {
tmp = Math.sin(t_0) * ((a_m + b) * (b - a_m));
} else {
tmp = t_3;
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = 0.011111111111111112 * (math.pi * angle) t_1 = math.pi * (angle / 180.0) t_2 = math.cos(t_1) * ((2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) * math.sin(t_1)) t_3 = (b - a_m) * ((a_m + b) * t_0) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= 5e+256: tmp = math.sin(t_0) * ((a_m + b) * (b - a_m)) else: tmp = t_3 return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(0.011111111111111112 * Float64(pi * angle)) 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))) t_3 = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * t_0)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= 5e+256) tmp = Float64(sin(t_0) * Float64(Float64(a_m + b) * Float64(b - a_m))); else tmp = t_3; end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = 0.011111111111111112 * (pi * angle); t_1 = pi * (angle / 180.0); t_2 = cos(t_1) * ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_1)); t_3 = (b - a_m) * ((a_m + b) * t_0); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= 5e+256) tmp = sin(t_0) * ((a_m + b) * (b - a_m)); else tmp = t_3; end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(Pi * angle), $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]}, Block[{t$95$3 = N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, 5e+256], N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(\pi \cdot angle\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)\\
t_3 := \left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot t\_0\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+256}:\\
\;\;\;\;\sin t\_0 \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -inf.0 or 5.00000000000000015e256 < (*.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 41.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.8
Applied rewrites51.8%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.7
Applied rewrites74.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))))) < 5.00000000000000015e256Initial program 58.7%
lift-pow.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-cos.f64N/A
associate-*l*N/A
Applied rewrites58.1%
Final simplification66.0%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (- (pow b 2.0) (pow a_m 2.0))))
(if (<= t_0 -2e-131)
(* (+ a_m b) (* (* angle 0.011111111111111112) (* (- b a_m) PI)))
(if (<= t_0 5e+291)
(* (* b b) (sin (* PI (* angle 0.011111111111111112))))
(* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = pow(b, 2.0) - pow(a_m, 2.0);
double tmp;
if (t_0 <= -2e-131) {
tmp = (a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * ((double) M_PI)));
} else if (t_0 <= 5e+291) {
tmp = (b * b) * sin((((double) M_PI) * (angle * 0.011111111111111112)));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((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.pow(b, 2.0) - Math.pow(a_m, 2.0);
double tmp;
if (t_0 <= -2e-131) {
tmp = (a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * Math.PI));
} else if (t_0 <= 5e+291) {
tmp = (b * b) * Math.sin((Math.PI * (angle * 0.011111111111111112)));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = math.pow(b, 2.0) - math.pow(a_m, 2.0) tmp = 0 if t_0 <= -2e-131: tmp = (a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * math.pi)) elif t_0 <= 5e+291: tmp = (b * b) * math.sin((math.pi * (angle * 0.011111111111111112))) else: tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64((b ^ 2.0) - (a_m ^ 2.0)) tmp = 0.0 if (t_0 <= -2e-131) tmp = Float64(Float64(a_m + b) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a_m) * pi))); elseif (t_0 <= 5e+291) tmp = Float64(Float64(b * b) * sin(Float64(pi * Float64(angle * 0.011111111111111112)))); else tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = (b ^ 2.0) - (a_m ^ 2.0); tmp = 0.0; if (t_0 <= -2e-131) tmp = (a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * pi)); elseif (t_0 <= 5e+291) tmp = (b * b) * sin((pi * (angle * 0.011111111111111112))); else tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-131], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+291], N[(N[(b * b), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := {b}^{2} - {a\_m}^{2}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-131}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+291}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \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))) < -2e-131Initial program 45.5%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f6453.6
Applied rewrites53.6%
Taylor expanded in angle around 0
Applied rewrites60.3%
if -2e-131 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 5.0000000000000001e291Initial program 60.4%
Applied rewrites13.9%
Taylor expanded in b around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sin.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6459.9
Applied rewrites59.9%
if 5.0000000000000001e291 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 46.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6458.3
Applied rewrites58.3%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6479.0
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6479.0
Applied rewrites79.0%
Final simplification65.4%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* PI (* angle 0.005555555555555556))))
(if (<= (pow a_m 2.0) 5e+160)
(* (cos t_0) (* (- b a_m) (* (+ a_m b) (* 2.0 (sin t_0)))))
(* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle)))))))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(a_m, 2.0) <= 5e+160) {
tmp = cos(t_0) * ((b - a_m) * ((a_m + b) * (2.0 * sin(t_0))));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((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 * 0.005555555555555556);
double tmp;
if (Math.pow(a_m, 2.0) <= 5e+160) {
tmp = Math.cos(t_0) * ((b - a_m) * ((a_m + b) * (2.0 * Math.sin(t_0))));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = math.pi * (angle * 0.005555555555555556) tmp = 0 if math.pow(a_m, 2.0) <= 5e+160: tmp = math.cos(t_0) * ((b - a_m) * ((a_m + b) * (2.0 * math.sin(t_0)))) else: tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) tmp = 0.0 if ((a_m ^ 2.0) <= 5e+160) tmp = Float64(cos(t_0) * Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(2.0 * sin(t_0))))); else tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = pi * (angle * 0.005555555555555556); tmp = 0.0; if ((a_m ^ 2.0) <= 5e+160) tmp = cos(t_0) * ((b - a_m) * ((a_m + b) * (2.0 * sin(t_0)))); else tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (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 * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 5e+160], N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $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}\;{a\_m}^{2} \leq 5 \cdot 10^{+160}:\\
\;\;\;\;\cos t\_0 \cdot \left(\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(2 \cdot \sin t\_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 5.0000000000000002e160Initial program 60.4%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites66.7%
lift-PI.f6466.7
rem-square-sqrtN/A
sqrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6468.3
Applied rewrites68.3%
lift-PI.f64N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6468.3
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f6467.5
Applied rewrites67.5%
Applied rewrites65.8%
if 5.0000000000000002e160 < (pow.f64 a #s(literal 2 binary64)) Initial program 35.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.5
Applied rewrites51.5%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6469.8
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.8
Applied rewrites69.8%
Final simplification67.4%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* PI (* angle 0.005555555555555556))))
(if (<= (pow a_m 2.0) 5e+160)
(* (cos t_0) (* (+ a_m b) (* (- b a_m) (* 2.0 (sin t_0)))))
(* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle)))))))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(a_m, 2.0) <= 5e+160) {
tmp = cos(t_0) * ((a_m + b) * ((b - a_m) * (2.0 * sin(t_0))));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((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 * 0.005555555555555556);
double tmp;
if (Math.pow(a_m, 2.0) <= 5e+160) {
tmp = Math.cos(t_0) * ((a_m + b) * ((b - a_m) * (2.0 * Math.sin(t_0))));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = math.pi * (angle * 0.005555555555555556) tmp = 0 if math.pow(a_m, 2.0) <= 5e+160: tmp = math.cos(t_0) * ((a_m + b) * ((b - a_m) * (2.0 * math.sin(t_0)))) else: tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle * 0.005555555555555556)) tmp = 0.0 if ((a_m ^ 2.0) <= 5e+160) tmp = Float64(cos(t_0) * Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(t_0))))); else tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = pi * (angle * 0.005555555555555556); tmp = 0.0; if ((a_m ^ 2.0) <= 5e+160) tmp = cos(t_0) * ((a_m + b) * ((b - a_m) * (2.0 * sin(t_0)))); else tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (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 * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 5e+160], N[(N[Cos[t$95$0], $MachinePrecision] * 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]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $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}\;{a\_m}^{2} \leq 5 \cdot 10^{+160}:\\
\;\;\;\;\cos t\_0 \cdot \left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin t\_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 5.0000000000000002e160Initial program 60.4%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites66.7%
lift-PI.f64N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6466.7
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f6465.8
Applied rewrites65.8%
if 5.0000000000000002e160 < (pow.f64 a #s(literal 2 binary64)) Initial program 35.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.5
Applied rewrites51.5%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6469.8
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.8
Applied rewrites69.8%
Final simplification67.4%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= a_m 5.5e+202)
(*
(*
(+ a_m b)
(*
(- b a_m)
(*
2.0
(sin
(*
(* (sqrt (* PI (sqrt PI))) (sqrt (sqrt PI)))
(* angle 0.005555555555555556))))))
(cos (* PI (/ angle 180.0))))
(* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 5.5e+202) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin(((sqrt((((double) M_PI) * sqrt(((double) M_PI)))) * sqrt(sqrt(((double) M_PI)))) * (angle * 0.005555555555555556)))))) * cos((((double) M_PI) * (angle / 180.0)));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((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 (a_m <= 5.5e+202) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin(((Math.sqrt((Math.PI * Math.sqrt(Math.PI))) * Math.sqrt(Math.sqrt(Math.PI))) * (angle * 0.005555555555555556)))))) * Math.cos((Math.PI * (angle / 180.0)));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if a_m <= 5.5e+202: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin(((math.sqrt((math.pi * math.sqrt(math.pi))) * math.sqrt(math.sqrt(math.pi))) * (angle * 0.005555555555555556)))))) * math.cos((math.pi * (angle / 180.0))) else: tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (a_m <= 5.5e+202) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(Float64(sqrt(Float64(pi * sqrt(pi))) * sqrt(sqrt(pi))) * Float64(angle * 0.005555555555555556)))))) * cos(Float64(pi * Float64(angle / 180.0)))); else tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (a_m <= 5.5e+202) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin(((sqrt((pi * sqrt(pi))) * sqrt(sqrt(pi))) * (angle * 0.005555555555555556)))))) * cos((pi * (angle / 180.0))); else tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 5.5e+202], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(N[Sqrt[N[(Pi * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 5.5 \cdot 10^{+202}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 5.50000000000000011e202Initial program 52.2%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites64.8%
lift-PI.f6464.8
rem-square-sqrtN/A
sqrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6466.6
Applied rewrites66.6%
if 5.50000000000000011e202 < a Initial program 25.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6472.2
Applied rewrites72.2%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6493.9
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6493.9
Applied rewrites93.9%
Final simplification68.4%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= a_m 5e+202)
(*
(*
(+ a_m b)
(*
(- b a_m)
(*
2.0
(sin
(*
(* (sqrt (* PI (sqrt PI))) (sqrt (sqrt PI)))
(* angle 0.005555555555555556))))))
(cos (* PI (* angle 0.005555555555555556))))
(* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 5e+202) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin(((sqrt((((double) M_PI) * sqrt(((double) M_PI)))) * sqrt(sqrt(((double) M_PI)))) * (angle * 0.005555555555555556)))))) * cos((((double) M_PI) * (angle * 0.005555555555555556)));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((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 (a_m <= 5e+202) {
tmp = ((a_m + b) * ((b - a_m) * (2.0 * Math.sin(((Math.sqrt((Math.PI * Math.sqrt(Math.PI))) * Math.sqrt(Math.sqrt(Math.PI))) * (angle * 0.005555555555555556)))))) * Math.cos((Math.PI * (angle * 0.005555555555555556)));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if a_m <= 5e+202: tmp = ((a_m + b) * ((b - a_m) * (2.0 * math.sin(((math.sqrt((math.pi * math.sqrt(math.pi))) * math.sqrt(math.sqrt(math.pi))) * (angle * 0.005555555555555556)))))) * math.cos((math.pi * (angle * 0.005555555555555556))) else: tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (a_m <= 5e+202) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(Float64(sqrt(Float64(pi * sqrt(pi))) * sqrt(sqrt(pi))) * Float64(angle * 0.005555555555555556)))))) * cos(Float64(pi * Float64(angle * 0.005555555555555556)))); else tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (a_m <= 5e+202) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin(((sqrt((pi * sqrt(pi))) * sqrt(sqrt(pi))) * (angle * 0.005555555555555556)))))) * cos((pi * (angle * 0.005555555555555556))); else tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 5e+202], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(N[Sqrt[N[(Pi * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 5 \cdot 10^{+202}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 4.9999999999999999e202Initial program 52.2%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites64.8%
lift-PI.f6464.8
rem-square-sqrtN/A
sqrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6466.6
Applied rewrites66.6%
lift-PI.f64N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6466.6
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f6466.5
Applied rewrites66.5%
if 4.9999999999999999e202 < a Initial program 25.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6472.2
Applied rewrites72.2%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6493.9
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6493.9
Applied rewrites93.9%
Final simplification68.3%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= a_m 4.2e+186)
(*
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* 0.005555555555555556 (/ PI (/ 1.0 angle)))))))
(cos (/ (* PI angle) 180.0)))
(* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 4.2e+186) {
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));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((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 (a_m <= 4.2e+186) {
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));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if a_m <= 4.2e+186: 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)) else: tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (a_m <= 4.2e+186) 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(Float64(pi * angle) / 180.0))); else tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (a_m <= 4.2e+186) tmp = ((a_m + b) * ((b - a_m) * (2.0 * sin((0.005555555555555556 * (pi / (1.0 / angle))))))) * cos(((pi * angle) / 180.0)); else tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 4.2e+186], 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[(N[(Pi * angle), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 4.2 \cdot 10^{+186}:\\
\;\;\;\;\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(\frac{\pi \cdot angle}{180}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 4.2e186Initial program 52.6%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites64.6%
lift-PI.f64N/A
associate-*r/N/A
lift-*.f64N/A
lower-/.f6464.2
Applied rewrites64.2%
lift-PI.f64N/A
metadata-evalN/A
div-invN/A
clear-numN/A
associate-*r/N/A
div-invN/A
*-commutativeN/A
times-fracN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6467.0
Applied rewrites67.0%
if 4.2e186 < a Initial program 25.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6468.4
Applied rewrites68.4%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6490.3
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6490.3
Applied rewrites90.3%
Final simplification68.9%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= a_m 2.8e+80)
(*
(cos (* PI (/ angle 180.0)))
(*
(+ a_m b)
(* (- b a_m) (* 2.0 (sin (* PI (* angle 0.005555555555555556)))))))
(* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (a_m <= 2.8e+80) {
tmp = cos((((double) M_PI) * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * sin((((double) M_PI) * (angle * 0.005555555555555556))))));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((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 (a_m <= 2.8e+80) {
tmp = Math.cos((Math.PI * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * Math.sin((Math.PI * (angle * 0.005555555555555556))))));
} else {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if a_m <= 2.8e+80: tmp = math.cos((math.pi * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * math.sin((math.pi * (angle * 0.005555555555555556)))))) else: tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (a_m <= 2.8e+80) 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))))))); else tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (a_m <= 2.8e+80) tmp = cos((pi * (angle / 180.0))) * ((a_m + b) * ((b - a_m) * (2.0 * sin((pi * (angle * 0.005555555555555556)))))); else tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (pi * angle))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 2.8e+80], 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], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 2.8 \cdot 10^{+80}:\\
\;\;\;\;\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)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.79999999999999984e80Initial program 54.8%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites67.2%
if 2.79999999999999984e80 < a Initial program 29.7%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6450.6
Applied rewrites50.6%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6465.0
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6465.0
Applied rewrites65.0%
Final simplification66.8%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(if (<= (/ angle 180.0) 4e+21)
(* (+ a_m b) (* (- b a_m) (sin (* 0.011111111111111112 (* PI angle)))))
(if (<= (/ angle 180.0) 1.5e+208)
(* (* (- b a_m) (* (+ a_m b) PI)) (* angle 0.011111111111111112))
(*
(* (+ a_m b) (* (* angle 0.011111111111111112) (* (- b a_m) PI)))
(cos
(* (* (sqrt (* PI (sqrt PI))) (sqrt (sqrt PI))) (/ angle 180.0)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 4e+21) {
tmp = (a_m + b) * ((b - a_m) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
} else if ((angle / 180.0) <= 1.5e+208) {
tmp = ((b - a_m) * ((a_m + b) * ((double) M_PI))) * (angle * 0.011111111111111112);
} else {
tmp = ((a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * ((double) M_PI)))) * cos(((sqrt((((double) M_PI) * sqrt(((double) M_PI)))) * sqrt(sqrt(((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 ((angle / 180.0) <= 4e+21) {
tmp = (a_m + b) * ((b - a_m) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
} else if ((angle / 180.0) <= 1.5e+208) {
tmp = ((b - a_m) * ((a_m + b) * Math.PI)) * (angle * 0.011111111111111112);
} else {
tmp = ((a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * Math.PI))) * Math.cos(((Math.sqrt((Math.PI * Math.sqrt(Math.PI))) * Math.sqrt(Math.sqrt(Math.PI))) * (angle / 180.0)));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (angle / 180.0) <= 4e+21: tmp = (a_m + b) * ((b - a_m) * math.sin((0.011111111111111112 * (math.pi * angle)))) elif (angle / 180.0) <= 1.5e+208: tmp = ((b - a_m) * ((a_m + b) * math.pi)) * (angle * 0.011111111111111112) else: tmp = ((a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * math.pi))) * math.cos(((math.sqrt((math.pi * math.sqrt(math.pi))) * math.sqrt(math.sqrt(math.pi))) * (angle / 180.0))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 4e+21) tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(0.011111111111111112 * Float64(pi * angle))))); elseif (Float64(angle / 180.0) <= 1.5e+208) tmp = Float64(Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * pi)) * Float64(angle * 0.011111111111111112)); else tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a_m) * pi))) * cos(Float64(Float64(sqrt(Float64(pi * sqrt(pi))) * sqrt(sqrt(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 ((angle / 180.0) <= 4e+21) tmp = (a_m + b) * ((b - a_m) * sin((0.011111111111111112 * (pi * angle)))); elseif ((angle / 180.0) <= 1.5e+208) tmp = ((b - a_m) * ((a_m + b) * pi)) * (angle * 0.011111111111111112); else tmp = ((a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * pi))) * cos(((sqrt((pi * sqrt(pi))) * sqrt(sqrt(pi))) * (angle / 180.0))); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 4e+21], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1.5e+208], N[(N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(N[Sqrt[N[(Pi * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+21}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+208}:\\
\;\;\;\;\left(\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \pi\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right) \cdot \cos \left(\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right) \cdot \frac{angle}{180}\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 4e21Initial program 58.9%
Applied rewrites77.3%
if 4e21 < (/.f64 angle #s(literal 180 binary64)) < 1.49999999999999997e208Initial program 30.1%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites29.8%
lift-PI.f6429.8
rem-square-sqrtN/A
sqrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6436.4
Applied rewrites36.4%
lift-PI.f64N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6436.4
lift-/.f64N/A
div-invN/A
metadata-evalN/A
lift-*.f6438.3
Applied rewrites38.3%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-+.f64N/A
lower--.f6434.4
Applied rewrites34.4%
if 1.49999999999999997e208 < (/.f64 angle #s(literal 180 binary64)) Initial program 29.4%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites30.1%
lift-PI.f6430.1
rem-square-sqrtN/A
sqrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
add-sqr-sqrtN/A
associate-*r*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lift-PI.f64N/A
lower-sqrt.f6432.0
Applied rewrites32.0%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f6436.0
Applied rewrites36.0%
Final simplification64.9%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (- (pow b 2.0) (pow a_m 2.0)) 2e-314) (* (* PI angle) (* -0.011111111111111112 (* a_m a_m))) (* 0.011111111111111112 (* (* b PI) (* b 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)) <= 2e-314) {
tmp = (((double) M_PI) * angle) * (-0.011111111111111112 * (a_m * a_m));
} else {
tmp = 0.011111111111111112 * ((b * ((double) M_PI)) * (b * 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)) <= 2e-314) {
tmp = (Math.PI * angle) * (-0.011111111111111112 * (a_m * a_m));
} else {
tmp = 0.011111111111111112 * ((b * Math.PI) * (b * 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)) <= 2e-314: tmp = (math.pi * angle) * (-0.011111111111111112 * (a_m * a_m)) else: tmp = 0.011111111111111112 * ((b * math.pi) * (b * 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)) <= 2e-314) tmp = Float64(Float64(pi * angle) * Float64(-0.011111111111111112 * Float64(a_m * a_m))); else tmp = Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(b * 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)) <= 2e-314) tmp = (pi * angle) * (-0.011111111111111112 * (a_m * a_m)); else tmp = 0.011111111111111112 * ((b * pi) * (b * 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], 2e-314], N[(N[(Pi * angle), $MachinePrecision] * N[(-0.011111111111111112 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq 2 \cdot 10^{-314}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)\\
\end{array}
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 1.9999999999e-314Initial program 52.8%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.3
Applied rewrites54.3%
Taylor expanded in b around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6453.8
Applied rewrites53.8%
if 1.9999999999e-314 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 47.9%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.1
Applied rewrites51.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6448.6
Applied rewrites48.6%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6459.0
Applied rewrites59.0%
Final simplification56.3%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (pow b 2.0) 2e+290) (* 0.011111111111111112 (* angle (* PI (* (+ a_m b) (- b a_m))))) (* (* b (* PI angle)) (* b 0.011111111111111112))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (pow(b, 2.0) <= 2e+290) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((a_m + b) * (b - a_m))));
} else {
tmp = (b * (((double) M_PI) * angle)) * (b * 0.011111111111111112);
}
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) <= 2e+290) {
tmp = 0.011111111111111112 * (angle * (Math.PI * ((a_m + b) * (b - a_m))));
} else {
tmp = (b * (Math.PI * angle)) * (b * 0.011111111111111112);
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if math.pow(b, 2.0) <= 2e+290: tmp = 0.011111111111111112 * (angle * (math.pi * ((a_m + b) * (b - a_m)))) else: tmp = (b * (math.pi * angle)) * (b * 0.011111111111111112) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if ((b ^ 2.0) <= 2e+290) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(a_m + b) * Float64(b - a_m))))); else tmp = Float64(Float64(b * Float64(pi * angle)) * Float64(b * 0.011111111111111112)); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((b ^ 2.0) <= 2e+290) tmp = 0.011111111111111112 * (angle * (pi * ((a_m + b) * (b - a_m)))); else tmp = (b * (pi * angle)) * (b * 0.011111111111111112); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 2e+290], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision] * N[(b * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+290}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 2.00000000000000012e290Initial program 52.4%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites59.8%
Taylor expanded in angle around 0
+-commutativeN/A
difference-of-squaresN/A
unpow2N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
+-commutativeN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.1
Applied rewrites51.1%
if 2.00000000000000012e290 < (pow.f64 b #s(literal 2 binary64)) Initial program 45.5%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6456.8
Applied rewrites56.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6453.8
Applied rewrites53.8%
lift-PI.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6471.4
Applied rewrites71.4%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f6471.5
Applied rewrites71.5%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* 0.011111111111111112 (* PI angle))))
(if (<= a_m 2.5e+166)
(* (+ a_m b) (* (- b a_m) (sin t_0)))
(* (- b a_m) (* (+ a_m b) t_0)))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = 0.011111111111111112 * (((double) M_PI) * angle);
double tmp;
if (a_m <= 2.5e+166) {
tmp = (a_m + b) * ((b - a_m) * sin(t_0));
} else {
tmp = (b - a_m) * ((a_m + b) * t_0);
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double t_0 = 0.011111111111111112 * (Math.PI * angle);
double tmp;
if (a_m <= 2.5e+166) {
tmp = (a_m + b) * ((b - a_m) * Math.sin(t_0));
} else {
tmp = (b - a_m) * ((a_m + b) * t_0);
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): t_0 = 0.011111111111111112 * (math.pi * angle) tmp = 0 if a_m <= 2.5e+166: tmp = (a_m + b) * ((b - a_m) * math.sin(t_0)) else: tmp = (b - a_m) * ((a_m + b) * t_0) return tmp
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(0.011111111111111112 * Float64(pi * angle)) tmp = 0.0 if (a_m <= 2.5e+166) tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(t_0))); else tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * t_0)); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) t_0 = 0.011111111111111112 * (pi * angle); tmp = 0.0; if (a_m <= 2.5e+166) tmp = (a_m + b) * ((b - a_m) * sin(t_0)); else tmp = (b - a_m) * ((a_m + b) * t_0); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a$95$m, 2.5e+166], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(\pi \cdot angle\right)\\
\mathbf{if}\;a\_m \leq 2.5 \cdot 10^{+166}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot t\_0\right)\\
\end{array}
\end{array}
if a < 2.5000000000000001e166Initial program 53.3%
Applied rewrites63.6%
if 2.5000000000000001e166 < a Initial program 24.6%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6463.3
Applied rewrites63.3%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6488.3
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6488.3
Applied rewrites88.3%
Final simplification66.1%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (+ a_m b) (- b a_m)))
(t_1 (fma (* -1.54320987654321e-5 (* angle angle)) (* PI PI) 1.0)))
(if (<= (/ angle 180.0) 0.5)
(* (* (+ a_m b) (* (* angle 0.011111111111111112) (* (- b a_m) PI))) t_1)
(if (<= (/ angle 180.0) 1.5e+208)
(* 0.011111111111111112 (* (* PI angle) t_0))
(* t_1 (* t_0 (* angle (* PI 0.011111111111111112))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (a_m + b) * (b - a_m);
double t_1 = fma((-1.54320987654321e-5 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 1.0);
double tmp;
if ((angle / 180.0) <= 0.5) {
tmp = ((a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * ((double) M_PI)))) * t_1;
} else if ((angle / 180.0) <= 1.5e+208) {
tmp = 0.011111111111111112 * ((((double) M_PI) * angle) * t_0);
} else {
tmp = t_1 * (t_0 * (angle * (((double) M_PI) * 0.011111111111111112)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(a_m + b) * Float64(b - a_m)) t_1 = fma(Float64(-1.54320987654321e-5 * Float64(angle * angle)), Float64(pi * pi), 1.0) tmp = 0.0 if (Float64(angle / 180.0) <= 0.5) tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a_m) * pi))) * t_1); elseif (Float64(angle / 180.0) <= 1.5e+208) tmp = Float64(0.011111111111111112 * Float64(Float64(pi * angle) * t_0)); else tmp = Float64(t_1 * Float64(t_0 * 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[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.54320987654321e-5 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 0.5], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1.5e+208], N[(0.011111111111111112 * N[(N[(Pi * angle), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$0 * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(a\_m + b\right) \cdot \left(b - a\_m\right)\\
t_1 := \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 0.5:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right) \cdot t\_1\\
\mathbf{elif}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+208}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t\_0 \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 0.5Initial program 59.5%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites78.8%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f6474.8
Applied rewrites74.8%
Taylor expanded in angle around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6472.9
Applied rewrites72.9%
if 0.5 < (/.f64 angle #s(literal 180 binary64)) < 1.49999999999999997e208Initial program 29.8%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6432.4
Applied rewrites32.4%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
difference-of-squaresN/A
pow2N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites32.4%
if 1.49999999999999997e208 < (/.f64 angle #s(literal 180 binary64)) Initial program 29.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6420.1
Applied rewrites20.1%
Taylor expanded in angle around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6423.4
Applied rewrites23.4%
Final simplification59.4%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (+ a_m b) (- b a_m))))
(if (<= (/ angle 180.0) 5e-54)
(* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle))))
(if (<= (/ angle 180.0) 1.5e+208)
(* 0.011111111111111112 (* angle (* PI t_0)))
(*
(fma (* -1.54320987654321e-5 (* angle angle)) (* PI PI) 1.0)
(* t_0 (* angle (* PI 0.011111111111111112))))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (a_m + b) * (b - a_m);
double tmp;
if ((angle / 180.0) <= 5e-54) {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((double) M_PI) * angle)));
} else if ((angle / 180.0) <= 1.5e+208) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * t_0));
} else {
tmp = fma((-1.54320987654321e-5 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 1.0) * (t_0 * (angle * (((double) M_PI) * 0.011111111111111112)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(a_m + b) * Float64(b - a_m)) tmp = 0.0 if (Float64(angle / 180.0) <= 5e-54) tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); elseif (Float64(angle / 180.0) <= 1.5e+208) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_0))); else tmp = Float64(fma(Float64(-1.54320987654321e-5 * Float64(angle * angle)), Float64(pi * pi), 1.0) * Float64(t_0 * 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[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-54], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1.5e+208], N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-1.54320987654321e-5 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 1.0), $MachinePrecision] * N[(t$95$0 * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(a\_m + b\right) \cdot \left(b - a\_m\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-54}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{elif}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+208}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right) \cdot \left(t\_0 \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000015e-54Initial program 57.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.7
Applied rewrites61.7%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.1
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6476.1
Applied rewrites76.1%
if 5.00000000000000015e-54 < (/.f64 angle #s(literal 180 binary64)) < 1.49999999999999997e208Initial program 42.2%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites42.3%
Taylor expanded in angle around 0
+-commutativeN/A
difference-of-squaresN/A
unpow2N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
+-commutativeN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6442.7
Applied rewrites42.7%
if 1.49999999999999997e208 < (/.f64 angle #s(literal 180 binary64)) Initial program 29.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6420.1
Applied rewrites20.1%
Taylor expanded in angle around 0
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-PI.f6423.4
Applied rewrites23.4%
Final simplification62.2%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (/ angle 180.0) 5e-54) (* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle)))) (* 0.011111111111111112 (* angle (* PI (* (+ a_m b) (- b a_m)))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((angle / 180.0) <= 5e-54) {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((double) M_PI) * angle)));
} else {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((a_m + b) * (b - a_m))));
}
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-54) {
tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
} else {
tmp = 0.011111111111111112 * (angle * (Math.PI * ((a_m + b) * (b - a_m))));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (angle / 180.0) <= 5e-54: tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle))) else: tmp = 0.011111111111111112 * (angle * (math.pi * ((a_m + b) * (b - a_m)))) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(angle / 180.0) <= 5e-54) tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle)))); else tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(a_m + b) * Float64(b - a_m))))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((angle / 180.0) <= 5e-54) tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (pi * angle))); else tmp = 0.011111111111111112 * (angle * (pi * ((a_m + b) * (b - a_m)))); 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-54], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $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^{-54}:\\
\;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\right)\right)\\
\end{array}
\end{array}
if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000015e-54Initial program 57.1%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.7
Applied rewrites61.7%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.1
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6476.1
Applied rewrites76.1%
if 5.00000000000000015e-54 < (/.f64 angle #s(literal 180 binary64)) Initial program 37.6%
lift-pow.f64N/A
lift-pow.f64N/A
flip--N/A
associate-*r/N/A
*-commutativeN/A
lift-PI.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
flip--N/A
lift--.f64N/A
Applied rewrites37.9%
Taylor expanded in angle around 0
+-commutativeN/A
difference-of-squaresN/A
unpow2N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
+-commutativeN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6435.6
Applied rewrites35.6%
Final simplification62.2%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= b 2.6e+145) (* 0.011111111111111112 (* (* PI angle) (* (+ a_m b) (- b a_m)))) (* (* b (* PI angle)) (* b 0.011111111111111112))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if (b <= 2.6e+145) {
tmp = 0.011111111111111112 * ((((double) M_PI) * angle) * ((a_m + b) * (b - a_m)));
} else {
tmp = (b * (((double) M_PI) * angle)) * (b * 0.011111111111111112);
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if (b <= 2.6e+145) {
tmp = 0.011111111111111112 * ((Math.PI * angle) * ((a_m + b) * (b - a_m)));
} else {
tmp = (b * (Math.PI * angle)) * (b * 0.011111111111111112);
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if b <= 2.6e+145: tmp = 0.011111111111111112 * ((math.pi * angle) * ((a_m + b) * (b - a_m))) else: tmp = (b * (math.pi * angle)) * (b * 0.011111111111111112) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (b <= 2.6e+145) tmp = Float64(0.011111111111111112 * Float64(Float64(pi * angle) * Float64(Float64(a_m + b) * Float64(b - a_m)))); else tmp = Float64(Float64(b * Float64(pi * angle)) * Float64(b * 0.011111111111111112)); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if (b <= 2.6e+145) tmp = 0.011111111111111112 * ((pi * angle) * ((a_m + b) * (b - a_m))); else tmp = (b * (pi * angle)) * (b * 0.011111111111111112); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[b, 2.6e+145], N[(0.011111111111111112 * N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision] * N[(b * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.6 \cdot 10^{+145}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if b < 2.60000000000000003e145Initial program 51.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6453.8
Applied rewrites53.8%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
difference-of-squaresN/A
pow2N/A
lift-pow.f64N/A
pow2N/A
lift-pow.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites53.9%
if 2.60000000000000003e145 < b Initial program 46.2%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6446.6
Applied rewrites46.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6444.1
Applied rewrites44.1%
lift-PI.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
Final simplification56.0%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (* 0.011111111111111112 (* (* b PI) (* b angle))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
return 0.011111111111111112 * ((b * ((double) M_PI)) * (b * angle));
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
return 0.011111111111111112 * ((b * Math.PI) * (b * angle));
}
a_m = math.fabs(a) def code(a_m, b, angle): return 0.011111111111111112 * ((b * math.pi) * (b * angle))
a_m = abs(a) function code(a_m, b, angle) return Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(b * angle))) end
a_m = abs(a); function tmp = code(a_m, b, angle) tmp = 0.011111111111111112 * ((b * pi) * (b * angle)); end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)
\end{array}
Initial program 50.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.7
Applied rewrites52.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6433.4
Applied rewrites33.4%
lift-PI.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6437.5
Applied rewrites37.5%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (* 0.011111111111111112 (* b (* angle (* b PI)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
return 0.011111111111111112 * (b * (angle * (b * ((double) M_PI))));
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
return 0.011111111111111112 * (b * (angle * (b * Math.PI)));
}
a_m = math.fabs(a) def code(a_m, b, angle): return 0.011111111111111112 * (b * (angle * (b * math.pi)))
a_m = abs(a) function code(a_m, b, angle) return Float64(0.011111111111111112 * Float64(b * Float64(angle * Float64(b * pi)))) end
a_m = abs(a); function tmp = code(a_m, b, angle) tmp = 0.011111111111111112 * (b * (angle * (b * pi))); end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(b * N[(angle * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)
\end{array}
Initial program 50.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.7
Applied rewrites52.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6433.4
Applied rewrites33.4%
lift-PI.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6437.4
Applied rewrites37.4%
Final simplification37.4%
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 50.4%
Taylor expanded in angle around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.7
Applied rewrites52.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-PI.f64N/A
unpow2N/A
lower-*.f6433.4
Applied rewrites33.4%
herbie shell --seed 2024216
(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)))))