
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\end{array}
\end{array}
Herbie found 14 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
(let* ((t_0 (* PI (/ angle 180.0)))
(t_1 (* (* PI 0.005555555555555556) angle))
(t_2 (* (sin t_1) (cos t_1))))
(if (<= a_m 9.5e+153)
(fma
(* 2.0 (fma b t_2 (* t_2 (* 0.0 a_m))))
b
(* (* -2.0 (* a_m a_m)) t_2))
(if (<= a_m 2.95e+231)
(*
(*
(*
(*
(*
(fma
PI
0.005555555555555556
(* (* -2.8577960676726107e-8 (* angle angle)) (* (* PI PI) PI)))
angle)
a_m)
a_m)
-2.0)
(cos t_0))
(*
(* (* 2.0 (* (- b a_m) (+ a_m b))) (sin t_0))
(cos (* PI (* 0.005555555555555556 angle))))))))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 = (((double) M_PI) * 0.005555555555555556) * angle;
double t_2 = sin(t_1) * cos(t_1);
double tmp;
if (a_m <= 9.5e+153) {
tmp = fma((2.0 * fma(b, t_2, (t_2 * (0.0 * a_m)))), b, ((-2.0 * (a_m * a_m)) * t_2));
} else if (a_m <= 2.95e+231) {
tmp = ((((fma(((double) M_PI), 0.005555555555555556, ((-2.8577960676726107e-8 * (angle * angle)) * ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)))) * angle) * a_m) * a_m) * -2.0) * cos(t_0);
} else {
tmp = ((2.0 * ((b - a_m) * (a_m + b))) * sin(t_0)) * cos((((double) M_PI) * (0.005555555555555556 * angle)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) t_1 = Float64(Float64(pi * 0.005555555555555556) * angle) t_2 = Float64(sin(t_1) * cos(t_1)) tmp = 0.0 if (a_m <= 9.5e+153) tmp = fma(Float64(2.0 * fma(b, t_2, Float64(t_2 * Float64(0.0 * a_m)))), b, Float64(Float64(-2.0 * Float64(a_m * a_m)) * t_2)); elseif (a_m <= 2.95e+231) tmp = Float64(Float64(Float64(Float64(Float64(fma(pi, 0.005555555555555556, Float64(Float64(-2.8577960676726107e-8 * Float64(angle * angle)) * Float64(Float64(pi * pi) * pi))) * angle) * a_m) * a_m) * -2.0) * cos(t_0)); else tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b - a_m) * Float64(a_m + b))) * sin(t_0)) * cos(Float64(pi * Float64(0.005555555555555556 * angle)))); 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[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$1], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a$95$m, 9.5e+153], N[(N[(2.0 * N[(b * t$95$2 + N[(t$95$2 * N[(0.0 * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b + N[(N[(-2.0 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 2.95e+231], N[(N[(N[(N[(N[(N[(Pi * 0.005555555555555556 + N[(N[(-2.8577960676726107e-8 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * a$95$m), $MachinePrecision] * a$95$m), $MachinePrecision] * -2.0), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \left(\pi \cdot 0.005555555555555556\right) \cdot angle\\
t_2 := \sin t\_1 \cdot \cos t\_1\\
\mathbf{if}\;a\_m \leq 9.5 \cdot 10^{+153}:\\
\;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(b, t\_2, t\_2 \cdot \left(0 \cdot a\_m\right)\right), b, \left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot t\_2\right)\\
\mathbf{elif}\;a\_m \leq 2.95 \cdot 10^{+231}:\\
\;\;\;\;\left(\left(\left(\left(\mathsf{fma}\left(\pi, 0.005555555555555556, \left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\right) \cdot a\_m\right) \cdot a\_m\right) \cdot -2\right) \cdot \cos t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right)\right) \cdot \sin t\_0\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
\end{array}
\end{array}
if a < 9.4999999999999995e153Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in b around 0
Applied rewrites62.4%
if 9.4999999999999995e153 < a < 2.95e231Initial program 55.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.3%
Applied rewrites41.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.6%
if 2.95e231 < a Initial program 55.5%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f6455.5
Applied rewrites55.5%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
sub-flipN/A
pow2N/A
pow2N/A
difference-of-squares-revN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6458.9
Applied rewrites58.9%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* PI 0.005555555555555556) angle)))
(if (<= angle 1.45e+104)
(fma
(*
2.0
(*
(fma
(* 0.005555555555555556 b)
PI
(* (* (* angle angle) b) (* (* (* PI PI) PI) -1.1431184270690443e-7)))
angle))
b
(* (* -2.0 (* a_m a_m)) (* (sin t_0) (cos t_0))))
(*
(* (* 2.0 (* (- b a_m) (+ a_m b))) (sin (* PI (/ angle 180.0))))
(cos (* PI (* 0.005555555555555556 angle)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (((double) M_PI) * 0.005555555555555556) * angle;
double tmp;
if (angle <= 1.45e+104) {
tmp = fma((2.0 * (fma((0.005555555555555556 * b), ((double) M_PI), (((angle * angle) * b) * (((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * -1.1431184270690443e-7))) * angle)), b, ((-2.0 * (a_m * a_m)) * (sin(t_0) * cos(t_0))));
} else {
tmp = ((2.0 * ((b - a_m) * (a_m + b))) * sin((((double) M_PI) * (angle / 180.0)))) * cos((((double) M_PI) * (0.005555555555555556 * angle)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(pi * 0.005555555555555556) * angle) tmp = 0.0 if (angle <= 1.45e+104) tmp = fma(Float64(2.0 * Float64(fma(Float64(0.005555555555555556 * b), pi, Float64(Float64(Float64(angle * angle) * b) * Float64(Float64(Float64(pi * pi) * pi) * -1.1431184270690443e-7))) * angle)), b, Float64(Float64(-2.0 * Float64(a_m * a_m)) * Float64(sin(t_0) * cos(t_0)))); else tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b - a_m) * Float64(a_m + b))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(0.005555555555555556 * angle)))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[angle, 1.45e+104], N[(N[(2.0 * N[(N[(N[(0.005555555555555556 * b), $MachinePrecision] * Pi + N[(N[(N[(angle * angle), $MachinePrecision] * b), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * -1.1431184270690443e-7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision] * b + N[(N[(-2.0 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot 0.005555555555555556\right) \cdot angle\\
\mathbf{if}\;angle \leq 1.45 \cdot 10^{+104}:\\
\;\;\;\;\mathsf{fma}\left(2 \cdot \left(\mathsf{fma}\left(0.005555555555555556 \cdot b, \pi, \left(\left(angle \cdot angle\right) \cdot b\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right)\right) \cdot angle\right), b, \left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
\end{array}
\end{array}
if angle < 1.4499999999999999e104Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in b around 0
Applied rewrites62.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites55.5%
if 1.4499999999999999e104 < angle Initial program 55.5%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f6455.5
Applied rewrites55.5%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
sub-flipN/A
pow2N/A
pow2N/A
difference-of-squares-revN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6458.9
Applied rewrites58.9%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* PI 0.005555555555555556) angle)))
(if (<= angle 1.2e-95)
(fma
(* (* (* PI b) angle) 0.011111111111111112)
b
(* (* -2.0 (* a_m a_m)) (* (sin t_0) (cos t_0))))
(*
(* (* 2.0 (* (- b a_m) (+ a_m b))) (sin (* PI (/ angle 180.0))))
(cos (* PI (* 0.005555555555555556 angle)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (((double) M_PI) * 0.005555555555555556) * angle;
double tmp;
if (angle <= 1.2e-95) {
tmp = fma((((((double) M_PI) * b) * angle) * 0.011111111111111112), b, ((-2.0 * (a_m * a_m)) * (sin(t_0) * cos(t_0))));
} else {
tmp = ((2.0 * ((b - a_m) * (a_m + b))) * sin((((double) M_PI) * (angle / 180.0)))) * cos((((double) M_PI) * (0.005555555555555556 * angle)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(pi * 0.005555555555555556) * angle) tmp = 0.0 if (angle <= 1.2e-95) tmp = fma(Float64(Float64(Float64(pi * b) * angle) * 0.011111111111111112), b, Float64(Float64(-2.0 * Float64(a_m * a_m)) * Float64(sin(t_0) * cos(t_0)))); else tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b - a_m) * Float64(a_m + b))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(0.005555555555555556 * angle)))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[angle, 1.2e-95], N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b + N[(N[(-2.0 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(\pi \cdot 0.005555555555555556\right) \cdot angle\\
\mathbf{if}\;angle \leq 1.2 \cdot 10^{-95}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(\pi \cdot b\right) \cdot angle\right) \cdot 0.011111111111111112, b, \left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
\end{array}
\end{array}
if angle < 1.2e-95Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in b around 0
Applied rewrites62.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6458.3
Applied rewrites58.3%
if 1.2e-95 < angle Initial program 55.5%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f6455.5
Applied rewrites55.5%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
sub-flipN/A
pow2N/A
pow2N/A
difference-of-squares-revN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6458.9
Applied rewrites58.9%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* angle PI) 0.005555555555555556)))
(if (<= angle 1.2e-95)
(fma
(* 2.0 (fma b t_0 (* t_0 (* 0.0 a_m))))
b
(* (* -2.0 (* a_m a_m)) t_0))
(*
(* (* 2.0 (* (- b a_m) (+ a_m b))) (sin (* PI (/ angle 180.0))))
(cos (* PI (* 0.005555555555555556 angle)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (angle * ((double) M_PI)) * 0.005555555555555556;
double tmp;
if (angle <= 1.2e-95) {
tmp = fma((2.0 * fma(b, t_0, (t_0 * (0.0 * a_m)))), b, ((-2.0 * (a_m * a_m)) * t_0));
} else {
tmp = ((2.0 * ((b - a_m) * (a_m + b))) * sin((((double) M_PI) * (angle / 180.0)))) * cos((((double) M_PI) * (0.005555555555555556 * angle)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(angle * pi) * 0.005555555555555556) tmp = 0.0 if (angle <= 1.2e-95) tmp = fma(Float64(2.0 * fma(b, t_0, Float64(t_0 * Float64(0.0 * a_m)))), b, Float64(Float64(-2.0 * Float64(a_m * a_m)) * t_0)); else tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b - a_m) * Float64(a_m + b))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(0.005555555555555556 * angle)))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[angle, 1.2e-95], N[(N[(2.0 * N[(b * t$95$0 + N[(t$95$0 * N[(0.0 * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b + N[(N[(-2.0 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
\mathbf{if}\;angle \leq 1.2 \cdot 10^{-95}:\\
\;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(b, t\_0, t\_0 \cdot \left(0 \cdot a\_m\right)\right), b, \left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\
\end{array}
\end{array}
if angle < 1.2e-95Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in b around 0
Applied rewrites62.4%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6458.3
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6458.3
Applied rewrites58.3%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6458.2
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6458.2
Applied rewrites58.2%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6455.2
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.2
Applied rewrites55.2%
if 1.2e-95 < angle Initial program 55.5%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f6455.5
Applied rewrites55.5%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
sub-flipN/A
pow2N/A
pow2N/A
difference-of-squares-revN/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6458.9
Applied rewrites58.9%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* angle PI) 0.005555555555555556))
(t_1 (* (* (+ b a_m) (- b a_m)) 2.0))
(t_2
(*
t_1
(*
(fma
PI
0.005555555555555556
(* (* (* (* PI PI) PI) -1.1431184270690443e-7) (* angle angle)))
angle))))
(if (<= angle 3.1e+96)
(fma
(* 2.0 (fma b t_0 (* t_0 (* 0.0 a_m))))
b
(* (* -2.0 (* a_m a_m)) t_0))
(if (<= angle 4.8e+104)
t_2
(if (<= angle 1.5e+187)
(* t_1 (* (* PI 0.005555555555555556) angle))
t_2)))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (angle * ((double) M_PI)) * 0.005555555555555556;
double t_1 = ((b + a_m) * (b - a_m)) * 2.0;
double t_2 = t_1 * (fma(((double) M_PI), 0.005555555555555556, ((((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * -1.1431184270690443e-7) * (angle * angle))) * angle);
double tmp;
if (angle <= 3.1e+96) {
tmp = fma((2.0 * fma(b, t_0, (t_0 * (0.0 * a_m)))), b, ((-2.0 * (a_m * a_m)) * t_0));
} else if (angle <= 4.8e+104) {
tmp = t_2;
} else if (angle <= 1.5e+187) {
tmp = t_1 * ((((double) M_PI) * 0.005555555555555556) * angle);
} else {
tmp = t_2;
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(angle * pi) * 0.005555555555555556) t_1 = Float64(Float64(Float64(b + a_m) * Float64(b - a_m)) * 2.0) t_2 = Float64(t_1 * Float64(fma(pi, 0.005555555555555556, Float64(Float64(Float64(Float64(pi * pi) * pi) * -1.1431184270690443e-7) * Float64(angle * angle))) * angle)) tmp = 0.0 if (angle <= 3.1e+96) tmp = fma(Float64(2.0 * fma(b, t_0, Float64(t_0 * Float64(0.0 * a_m)))), b, Float64(Float64(-2.0 * Float64(a_m * a_m)) * t_0)); elseif (angle <= 4.8e+104) tmp = t_2; elseif (angle <= 1.5e+187) tmp = Float64(t_1 * Float64(Float64(pi * 0.005555555555555556) * angle)); else tmp = t_2; end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(Pi * 0.005555555555555556 + N[(N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * -1.1431184270690443e-7), $MachinePrecision] * N[(angle * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, 3.1e+96], N[(N[(2.0 * N[(b * t$95$0 + N[(t$95$0 * N[(0.0 * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b + N[(N[(-2.0 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 4.8e+104], t$95$2, If[LessEqual[angle, 1.5e+187], N[(t$95$1 * N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
t_1 := \left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right) \cdot 2\\
t_2 := t\_1 \cdot \left(\mathsf{fma}\left(\pi, 0.005555555555555556, \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle\right)\\
\mathbf{if}\;angle \leq 3.1 \cdot 10^{+96}:\\
\;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(b, t\_0, t\_0 \cdot \left(0 \cdot a\_m\right)\right), b, \left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot t\_0\right)\\
\mathbf{elif}\;angle \leq 4.8 \cdot 10^{+104}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;angle \leq 1.5 \cdot 10^{+187}:\\
\;\;\;\;t\_1 \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if angle < 3.0999999999999998e96Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in b around 0
Applied rewrites62.4%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6458.3
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6458.3
Applied rewrites58.3%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6458.2
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6458.2
Applied rewrites58.2%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6455.2
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.2
Applied rewrites55.2%
if 3.0999999999999998e96 < angle < 4.8e104 or 1.5e187 < angle Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites53.6%
if 4.8e104 < angle < 1.5e187Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in angle around 0
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6455.5
Applied rewrites55.5%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* angle PI) 0.005555555555555556)))
(if (<= angle 1.2e-95)
(fma
(* 2.0 (fma b t_0 (* t_0 (* 0.0 a_m))))
b
(* (* -2.0 (* a_m a_m)) t_0))
(*
(* (- b a_m) (+ a_m b))
(sin (* 2.0 (* (* PI 0.005555555555555556) angle)))))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = (angle * ((double) M_PI)) * 0.005555555555555556;
double tmp;
if (angle <= 1.2e-95) {
tmp = fma((2.0 * fma(b, t_0, (t_0 * (0.0 * a_m)))), b, ((-2.0 * (a_m * a_m)) * t_0));
} else {
tmp = ((b - a_m) * (a_m + b)) * sin((2.0 * ((((double) M_PI) * 0.005555555555555556) * angle)));
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(angle * pi) * 0.005555555555555556) tmp = 0.0 if (angle <= 1.2e-95) tmp = fma(Float64(2.0 * fma(b, t_0, Float64(t_0 * Float64(0.0 * a_m)))), b, Float64(Float64(-2.0 * Float64(a_m * a_m)) * t_0)); else tmp = Float64(Float64(Float64(b - a_m) * Float64(a_m + b)) * sin(Float64(2.0 * Float64(Float64(pi * 0.005555555555555556) * angle)))); end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[angle, 1.2e-95], N[(N[(2.0 * N[(b * t$95$0 + N[(t$95$0 * N[(0.0 * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b + N[(N[(-2.0 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
\mathbf{if}\;angle \leq 1.2 \cdot 10^{-95}:\\
\;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(b, t\_0, t\_0 \cdot \left(0 \cdot a\_m\right)\right), b, \left(-2 \cdot \left(a\_m \cdot a\_m\right)\right) \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b - a\_m\right) \cdot \left(a\_m + b\right)\right) \cdot \sin \left(2 \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\right)\\
\end{array}
\end{array}
if angle < 1.2e-95Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in b around 0
Applied rewrites62.4%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6458.3
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6458.3
Applied rewrites58.3%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6458.2
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6458.2
Applied rewrites58.2%
Taylor expanded in angle around 0
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-*.f6455.2
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.2
Applied rewrites55.2%
if 1.2e-95 < angle Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Applied rewrites59.2%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) -5e-232) (* (* -0.011111111111111112 a_m) (* a_m (* angle PI))) (* (* (* (* (sin (* (* 0.005555555555555556 PI) angle)) b) b) 2.0) 1.0)))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) <= -5e-232) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * ((double) M_PI)));
} else {
tmp = (((sin(((0.005555555555555556 * ((double) M_PI)) * angle)) * b) * b) * 2.0) * 1.0;
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) <= -5e-232) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * Math.PI));
} else {
tmp = (((Math.sin(((0.005555555555555556 * Math.PI) * angle)) * b) * b) * 2.0) * 1.0;
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) <= -5e-232: tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * math.pi)) else: tmp = (((math.sin(((0.005555555555555556 * math.pi) * angle)) * b) * b) * 2.0) * 1.0 return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) <= -5e-232) tmp = Float64(Float64(-0.011111111111111112 * a_m) * Float64(a_m * Float64(angle * pi))); else tmp = Float64(Float64(Float64(Float64(sin(Float64(Float64(0.005555555555555556 * pi) * angle)) * b) * b) * 2.0) * 1.0); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) <= -5e-232) tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * pi)); else tmp = (((sin(((0.005555555555555556 * pi) * angle)) * b) * b) * 2.0) * 1.0; end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-232], N[(N[(-0.011111111111111112 * a$95$m), $MachinePrecision] * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision] * b), $MachinePrecision] * b), $MachinePrecision] * 2.0), $MachinePrecision] * 1.0), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -5 \cdot 10^{-232}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\sin \left(\left(0.005555555555555556 \cdot \pi\right) \cdot angle\right) \cdot b\right) \cdot b\right) \cdot 2\right) \cdot 1\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.9999999999999999e-232Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6435.4
Applied rewrites35.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6438.6
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6438.6
Applied rewrites38.6%
if -4.9999999999999999e-232 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Taylor expanded in angle around 0
Applied rewrites53.6%
Taylor expanded in a around 0
associate-*l*N/A
metadata-evalN/A
mult-flipN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.0%
Applied rewrites40.7%
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
:precision binary64
(let* ((t_0 (* (* (+ b a_m) (- b a_m)) 2.0))
(t_1
(*
t_0
(*
(fma
PI
0.005555555555555556
(* (* (* (* PI PI) PI) -1.1431184270690443e-7) (* angle angle)))
angle))))
(if (<= angle 4.8e+104)
t_1
(if (<= angle 1.5e+187)
(* t_0 (* (* PI 0.005555555555555556) angle))
t_1))))a_m = fabs(a);
double code(double a_m, double b, double angle) {
double t_0 = ((b + a_m) * (b - a_m)) * 2.0;
double t_1 = t_0 * (fma(((double) M_PI), 0.005555555555555556, ((((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * -1.1431184270690443e-7) * (angle * angle))) * angle);
double tmp;
if (angle <= 4.8e+104) {
tmp = t_1;
} else if (angle <= 1.5e+187) {
tmp = t_0 * ((((double) M_PI) * 0.005555555555555556) * angle);
} else {
tmp = t_1;
}
return tmp;
}
a_m = abs(a) function code(a_m, b, angle) t_0 = Float64(Float64(Float64(b + a_m) * Float64(b - a_m)) * 2.0) t_1 = Float64(t_0 * Float64(fma(pi, 0.005555555555555556, Float64(Float64(Float64(Float64(pi * pi) * pi) * -1.1431184270690443e-7) * Float64(angle * angle))) * angle)) tmp = 0.0 if (angle <= 4.8e+104) tmp = t_1; elseif (angle <= 1.5e+187) tmp = Float64(t_0 * Float64(Float64(pi * 0.005555555555555556) * angle)); else tmp = t_1; end return tmp end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(N[(Pi * 0.005555555555555556 + N[(N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * -1.1431184270690443e-7), $MachinePrecision] * N[(angle * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, 4.8e+104], t$95$1, If[LessEqual[angle, 1.5e+187], N[(t$95$0 * N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
t_0 := \left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right) \cdot 2\\
t_1 := t\_0 \cdot \left(\mathsf{fma}\left(\pi, 0.005555555555555556, \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle\right)\\
\mathbf{if}\;angle \leq 4.8 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;angle \leq 1.5 \cdot 10^{+187}:\\
\;\;\;\;t\_0 \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if angle < 4.8e104 or 1.5e187 < angle Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites53.6%
if 4.8e104 < angle < 1.5e187Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in angle around 0
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6455.5
Applied rewrites55.5%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) -4e+196) (* (* -0.011111111111111112 a_m) (* a_m (* angle PI))) (* (* (* (* PI (+ a_m b)) (- b a_m)) angle) 0.011111111111111112)))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) <= -4e+196) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * ((double) M_PI)));
} else {
tmp = (((((double) M_PI) * (a_m + b)) * (b - a_m)) * angle) * 0.011111111111111112;
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) <= -4e+196) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * Math.PI));
} else {
tmp = (((Math.PI * (a_m + b)) * (b - a_m)) * angle) * 0.011111111111111112;
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) <= -4e+196: tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * math.pi)) else: tmp = (((math.pi * (a_m + b)) * (b - a_m)) * angle) * 0.011111111111111112 return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) <= -4e+196) tmp = Float64(Float64(-0.011111111111111112 * a_m) * Float64(a_m * Float64(angle * pi))); else tmp = Float64(Float64(Float64(Float64(pi * Float64(a_m + b)) * Float64(b - a_m)) * angle) * 0.011111111111111112); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) <= -4e+196) tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * pi)); else tmp = (((pi * (a_m + b)) * (b - a_m)) * angle) * 0.011111111111111112; end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e+196], N[(N[(-0.011111111111111112 * a$95$m), $MachinePrecision] * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(Pi * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -4 \cdot 10^{+196}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\pi \cdot \left(a\_m + b\right)\right) \cdot \left(b - a\_m\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -3.9999999999999998e196Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6435.4
Applied rewrites35.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6438.6
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6438.6
Applied rewrites38.6%
if -3.9999999999999998e196 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in angle around 0
Applied rewrites55.4%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) -1e+112) (* (* -0.011111111111111112 a_m) (* a_m (* angle PI))) (* (* (* angle PI) 0.011111111111111112) (* (+ b a_m) (- b a_m)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) <= -1e+112) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * ((double) M_PI)));
} else {
tmp = ((angle * ((double) M_PI)) * 0.011111111111111112) * ((b + a_m) * (b - a_m));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) <= -1e+112) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * Math.PI));
} else {
tmp = ((angle * Math.PI) * 0.011111111111111112) * ((b + a_m) * (b - a_m));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) <= -1e+112: tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * math.pi)) else: tmp = ((angle * math.pi) * 0.011111111111111112) * ((b + a_m) * (b - a_m)) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) <= -1e+112) tmp = Float64(Float64(-0.011111111111111112 * a_m) * Float64(a_m * Float64(angle * pi))); else tmp = Float64(Float64(Float64(angle * pi) * 0.011111111111111112) * Float64(Float64(b + a_m) * Float64(b - a_m))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) <= -1e+112) tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * pi)); else tmp = ((angle * pi) * 0.011111111111111112) * ((b + a_m) * (b - a_m)); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e+112], N[(N[(-0.011111111111111112 * a$95$m), $MachinePrecision] * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{+112}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -9.9999999999999993e111Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6435.4
Applied rewrites35.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6438.6
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6438.6
Applied rewrites38.6%
if -9.9999999999999993e111 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.5
Applied rewrites55.5%
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6455.6
Applied rewrites55.6%
Applied rewrites59.2%
Taylor expanded in b around 0
Applied rewrites62.4%
Taylor expanded in angle around 0
pow2N/A
pow2N/A
associate-*l*N/A
associate-*r*N/A
associate-*r*N/A
pow2N/A
pow2N/A
lower-*.f64N/A
Applied rewrites55.5%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) -1.6e+24) (* (* -0.011111111111111112 a_m) (* a_m (* angle PI))) (* (* (* 0.011111111111111112 angle) PI) (* (+ b a_m) (- b a_m)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) <= -1.6e+24) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * ((double) M_PI)));
} else {
tmp = ((0.011111111111111112 * angle) * ((double) M_PI)) * ((b + a_m) * (b - a_m));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) <= -1.6e+24) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * Math.PI));
} else {
tmp = ((0.011111111111111112 * angle) * Math.PI) * ((b + a_m) * (b - a_m));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) <= -1.6e+24: tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * math.pi)) else: tmp = ((0.011111111111111112 * angle) * math.pi) * ((b + a_m) * (b - a_m)) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) <= -1.6e+24) tmp = Float64(Float64(-0.011111111111111112 * a_m) * Float64(a_m * Float64(angle * pi))); else tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * pi) * Float64(Float64(b + a_m) * Float64(b - a_m))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) <= -1.6e+24) tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * pi)); else tmp = ((0.011111111111111112 * angle) * pi) * ((b + a_m) * (b - a_m)); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.6e+24], N[(N[(-0.011111111111111112 * a$95$m), $MachinePrecision] * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -1.6 \cdot 10^{+24}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -1.5999999999999999e24Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6435.4
Applied rewrites35.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6438.6
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6438.6
Applied rewrites38.6%
if -1.5999999999999999e24 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lift--.f64N/A
lift-*.f64N/A
pow2N/A
lift-*.f64N/A
pow2N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
pow2N/A
pow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6455.5
Applied rewrites55.5%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) -5e-232) (* (* -0.011111111111111112 a_m) (* a_m (* angle PI))) (* (* 0.011111111111111112 angle) (* PI (* b b)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) <= -5e-232) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * ((double) M_PI)));
} else {
tmp = (0.011111111111111112 * angle) * (((double) M_PI) * (b * b));
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) <= -5e-232) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * Math.PI));
} else {
tmp = (0.011111111111111112 * angle) * (Math.PI * (b * b));
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) <= -5e-232: tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * math.pi)) else: tmp = (0.011111111111111112 * angle) * (math.pi * (b * b)) return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) <= -5e-232) tmp = Float64(Float64(-0.011111111111111112 * a_m) * Float64(a_m * Float64(angle * pi))); else tmp = Float64(Float64(0.011111111111111112 * angle) * Float64(pi * Float64(b * b))); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) <= -5e-232) tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * pi)); else tmp = (0.011111111111111112 * angle) * (pi * (b * b)); end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-232], N[(N[(-0.011111111111111112 * a$95$m), $MachinePrecision] * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -5 \cdot 10^{-232}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.9999999999999999e-232Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6435.4
Applied rewrites35.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6438.6
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6438.6
Applied rewrites38.6%
if -4.9999999999999999e-232 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
pow2N/A
lift-*.f6436.2
Applied rewrites36.2%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) -5e-232) (* (* -0.011111111111111112 a_m) (* a_m (* angle PI))) (* (* (* PI (* b b)) angle) 0.011111111111111112)))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) <= -5e-232) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * ((double) M_PI)));
} else {
tmp = ((((double) M_PI) * (b * b)) * angle) * 0.011111111111111112;
}
return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) <= -5e-232) {
tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * Math.PI));
} else {
tmp = ((Math.PI * (b * b)) * angle) * 0.011111111111111112;
}
return tmp;
}
a_m = math.fabs(a) def code(a_m, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) <= -5e-232: tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * math.pi)) else: tmp = ((math.pi * (b * b)) * angle) * 0.011111111111111112 return tmp
a_m = abs(a) function code(a_m, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) <= -5e-232) tmp = Float64(Float64(-0.011111111111111112 * a_m) * Float64(a_m * Float64(angle * pi))); else tmp = Float64(Float64(Float64(pi * Float64(b * b)) * angle) * 0.011111111111111112); end return tmp end
a_m = abs(a); function tmp_2 = code(a_m, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) <= -5e-232) tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * pi)); else tmp = ((pi * (b * b)) * angle) * 0.011111111111111112; end tmp_2 = tmp; end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-232], N[(N[(-0.011111111111111112 * a$95$m), $MachinePrecision] * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -5 \cdot 10^{-232}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.9999999999999999e-232Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6435.4
Applied rewrites35.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6438.6
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6438.6
Applied rewrites38.6%
if -4.9999999999999999e-232 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
pow2N/A
lift-*.f6436.2
Applied rewrites36.2%
a_m = (fabs.f64 a) (FPCore (a_m b angle) :precision binary64 (* (* -0.011111111111111112 a_m) (* a_m (* angle PI))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
return (-0.011111111111111112 * a_m) * (a_m * (angle * ((double) M_PI)));
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
return (-0.011111111111111112 * a_m) * (a_m * (angle * Math.PI));
}
a_m = math.fabs(a) def code(a_m, b, angle): return (-0.011111111111111112 * a_m) * (a_m * (angle * math.pi))
a_m = abs(a) function code(a_m, b, angle) return Float64(Float64(-0.011111111111111112 * a_m) * Float64(a_m * Float64(angle * pi))) end
a_m = abs(a); function tmp = code(a_m, b, angle) tmp = (-0.011111111111111112 * a_m) * (a_m * (angle * pi)); end
a_m = N[Abs[a], $MachinePrecision] code[a$95$m_, b_, angle_] := N[(N[(-0.011111111111111112 * a$95$m), $MachinePrecision] * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
\left(-0.011111111111111112 \cdot a\_m\right) \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)
\end{array}
Initial program 55.5%
Taylor expanded in angle around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f6435.3
Applied rewrites35.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6435.4
Applied rewrites35.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f6438.6
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f6438.6
Applied rewrites38.6%
herbie shell --seed 2025130
(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)))))