
(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}
(FPCore (a b angle)
:precision binary64
(let* ((t_0
(* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a))))
(if (<= angle 4.1e+83)
(*
(* 2.0 (sin (+ (* (* 0.005555555555555556 angle) (- PI)) (/ PI 2.0))))
t_0)
(*
(*
2.0
(sin (* (fma (/ PI angle) 0.5 (* 0.005555555555555556 PI)) angle)))
t_0))))
double code(double a, double b, double angle) {
double t_0 = (sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a);
double tmp;
if (angle <= 4.1e+83) {
tmp = (2.0 * sin((((0.005555555555555556 * angle) * -((double) M_PI)) + (((double) M_PI) / 2.0)))) * t_0;
} else {
tmp = (2.0 * sin((fma((((double) M_PI) / angle), 0.5, (0.005555555555555556 * ((double) M_PI))) * angle))) * t_0;
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a)) tmp = 0.0 if (angle <= 4.1e+83) tmp = Float64(Float64(2.0 * sin(Float64(Float64(Float64(0.005555555555555556 * angle) * Float64(-pi)) + Float64(pi / 2.0)))) * t_0); else tmp = Float64(Float64(2.0 * sin(Float64(fma(Float64(pi / angle), 0.5, Float64(0.005555555555555556 * pi)) * angle))) * t_0); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, 4.1e+83], N[(N[(2.0 * N[Sin[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * (-Pi)), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(2.0 * N[Sin[N[(N[(N[(Pi / angle), $MachinePrecision] * 0.5 + N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\
\mathbf{if}\;angle \leq 4.1 \cdot 10^{+83}:\\
\;\;\;\;\left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(-\pi\right) + \frac{\pi}{2}\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{\pi}{angle}, 0.5, 0.005555555555555556 \cdot \pi\right) \cdot angle\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if angle < 4.1000000000000001e83Initial program 60.6%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.9%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites75.9%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lift-PI.f6479.6
Applied rewrites79.6%
if 4.1000000000000001e83 < angle Initial program 25.1%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites33.2%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites33.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6440.4
Applied rewrites40.4%
Taylor expanded in angle around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lift-PI.f6441.1
Applied rewrites41.1%
Final simplification72.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0)))
(t_1 (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+294)))
(* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112)
(*
2.0
(* (sin (* (* PI angle) 0.005555555555555556)) (* (+ b a) (- b a)))))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double t_1 = ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+294)) {
tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * (sin(((((double) M_PI) * angle) * 0.005555555555555556)) * ((b + a) * (b - a)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double t_1 = ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+294)) {
tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
} else {
tmp = 2.0 * (Math.sin(((Math.PI * angle) * 0.005555555555555556)) * ((b + a) * (b - a)));
}
return tmp;
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) t_1 = ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+294): tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112 else: tmp = 2.0 * (math.sin(((math.pi * angle) * 0.005555555555555556)) * ((b + a) * (b - a))) return tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) t_1 = Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+294)) tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112); else tmp = Float64(2.0 * Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(Float64(b + a) * Float64(b - a)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = pi * (angle / 180.0); t_1 = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+294))) tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112; else tmp = 2.0 * (sin(((pi * angle) * 0.005555555555555556)) * ((b + a) * (b - a))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+294]], $MachinePrecision]], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+294}\right):\\
\;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -inf.0 or 4.9999999999999999e294 < (*.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.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2
Applied rewrites54.2%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites60.7%
Taylor expanded in angle around 0
associate-*r*N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f64N/A
lift--.f6477.9
Applied rewrites77.9%
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))))) < 4.9999999999999999e294Initial program 63.3%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.1%
Taylor expanded in angle around 0
Applied rewrites63.0%
Final simplification69.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (/ angle 180.0))))
(if (<=
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
-5e+141)
(* (* -0.011111111111111112 a) (* (* angle PI) a))
(* (* (* (* a a) angle) PI) -0.011111111111111112))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
double tmp;
if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -5e+141) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = (((a * a) * angle) * ((double) M_PI)) * -0.011111111111111112;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
double tmp;
if ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0)) <= -5e+141) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = (((a * a) * angle) * Math.PI) * -0.011111111111111112;
}
return tmp;
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) tmp = 0 if (((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)) <= -5e+141: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = (((a * a) * angle) * math.pi) * -0.011111111111111112 return tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -5e+141) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(Float64(Float64(a * a) * angle) * pi) * -0.011111111111111112); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = 0.0; if ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -5e+141) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = (((a * a) * angle) * pi) * -0.011111111111111112; end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[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], -5e+141], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(a * a), $MachinePrecision] * angle), $MachinePrecision] * Pi), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -5 \cdot 10^{+141}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \cdot -0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -5.00000000000000025e141Initial program 44.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6447.0
Applied rewrites47.0%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6421.5
Applied rewrites21.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6421.5
Applied rewrites21.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6434.1
Applied rewrites34.1%
if -5.00000000000000025e141 < (*.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 57.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6460.6
Applied rewrites60.6%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6443.0
Applied rewrites43.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lift-PI.f6443.0
Applied rewrites43.0%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 2.0 (- (pow b 2.0) (pow a 2.0)))))
(if (or (<= t_0 -4e-286) (not (<= t_0 INFINITY)))
(* (* -0.011111111111111112 a) (* (* angle PI) a))
(* (* (* PI (* b b)) angle) 0.011111111111111112))))
double code(double a, double b, double angle) {
double t_0 = 2.0 * (pow(b, 2.0) - pow(a, 2.0));
double tmp;
if ((t_0 <= -4e-286) || !(t_0 <= ((double) INFINITY))) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * (b * b)) * angle) * 0.011111111111111112;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0));
double tmp;
if ((t_0 <= -4e-286) || !(t_0 <= Double.POSITIVE_INFINITY)) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = ((Math.PI * (b * b)) * angle) * 0.011111111111111112;
}
return tmp;
}
def code(a, b, angle): t_0 = 2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0)) tmp = 0 if (t_0 <= -4e-286) or not (t_0 <= math.inf): tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = ((math.pi * (b * b)) * angle) * 0.011111111111111112 return tmp
function code(a, b, angle) t_0 = Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) tmp = 0.0 if ((t_0 <= -4e-286) || !(t_0 <= Inf)) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(Float64(pi * Float64(b * b)) * angle) * 0.011111111111111112); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = 2.0 * ((b ^ 2.0) - (a ^ 2.0)); tmp = 0.0; if ((t_0 <= -4e-286) || ~((t_0 <= Inf))) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = ((pi * (b * b)) * angle) * 0.011111111111111112; end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -4e-286], N[Not[LessEqual[t$95$0, Infinity]], $MachinePrecision]], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\
\mathbf{if}\;t\_0 \leq -4 \cdot 10^{-286} \lor \neg \left(t\_0 \leq \infty\right):\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\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.0000000000000002e-286 or +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 45.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6451.6
Applied rewrites51.6%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6452.6
Applied rewrites52.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.7
Applied rewrites52.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6465.3
Applied rewrites65.3%
if -4.0000000000000002e-286 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0Initial program 62.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.3
Applied rewrites62.3%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
lower-*.f6462.1
Applied rewrites62.1%
Final simplification63.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (* angle PI) 0.005555555555555556)))
(if (<= angle 6.6e+84)
(*
(* 2.0 (sin (+ (* (* 0.005555555555555556 angle) (- PI)) (/ PI 2.0))))
(* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a)))
(* (* (* (* (sin (fma 0.5 PI t_0)) (+ a b)) (- b a)) (sin t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = (angle * ((double) M_PI)) * 0.005555555555555556;
double tmp;
if (angle <= 6.6e+84) {
tmp = (2.0 * sin((((0.005555555555555556 * angle) * -((double) M_PI)) + (((double) M_PI) / 2.0)))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a));
} else {
tmp = (((sin(fma(0.5, ((double) M_PI), t_0)) * (a + b)) * (b - a)) * sin(t_0)) * 2.0;
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(angle * pi) * 0.005555555555555556) tmp = 0.0 if (angle <= 6.6e+84) tmp = Float64(Float64(2.0 * sin(Float64(Float64(Float64(0.005555555555555556 * angle) * Float64(-pi)) + Float64(pi / 2.0)))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a))); else tmp = Float64(Float64(Float64(Float64(sin(fma(0.5, pi, t_0)) * Float64(a + b)) * Float64(b - a)) * sin(t_0)) * 2.0); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[angle, 6.6e+84], N[(N[(2.0 * N[Sin[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * (-Pi)), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Sin[N[(0.5 * Pi + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
\mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\
\;\;\;\;\left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(-\pi\right) + \frac{\pi}{2}\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin t\_0\right) \cdot 2\\
\end{array}
\end{array}
if angle < 6.60000000000000034e84Initial program 60.6%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.9%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites75.9%
lift-cos.f64N/A
cos-neg-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lift-PI.f6479.6
Applied rewrites79.6%
if 6.60000000000000034e84 < angle Initial program 25.1%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites33.2%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites33.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6440.4
Applied rewrites40.4%
Taylor expanded in angle around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.6%
Final simplification72.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* (* angle PI) 0.005555555555555556)))
(if (<= angle 4.3e+83)
(*
(* 2.0 (cos (* (* PI angle) 0.005555555555555556)))
(* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a)))
(* (* (* (* (sin (fma 0.5 PI t_0)) (+ a b)) (- b a)) (sin t_0)) 2.0))))
double code(double a, double b, double angle) {
double t_0 = (angle * ((double) M_PI)) * 0.005555555555555556;
double tmp;
if (angle <= 4.3e+83) {
tmp = (2.0 * cos(((((double) M_PI) * angle) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a));
} else {
tmp = (((sin(fma(0.5, ((double) M_PI), t_0)) * (a + b)) * (b - a)) * sin(t_0)) * 2.0;
}
return tmp;
}
function code(a, b, angle) t_0 = Float64(Float64(angle * pi) * 0.005555555555555556) tmp = 0.0 if (angle <= 4.3e+83) tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle) * 0.005555555555555556))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a))); else tmp = Float64(Float64(Float64(Float64(sin(fma(0.5, pi, t_0)) * Float64(a + b)) * Float64(b - a)) * sin(t_0)) * 2.0); end return tmp end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[angle, 4.3e+83], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Sin[N[(0.5 * Pi + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
\mathbf{if}\;angle \leq 4.3 \cdot 10^{+83}:\\
\;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin t\_0\right) \cdot 2\\
\end{array}
\end{array}
if angle < 4.3e83Initial program 60.6%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.9%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites75.9%
if 4.3e83 < angle Initial program 25.1%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites33.2%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites33.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6440.4
Applied rewrites40.4%
Taylor expanded in angle around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0
(* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a))))
(if (<= angle 1.35e+84)
(* (* 2.0 (cos (* (* PI angle) 0.005555555555555556))) t_0)
(* (* 2.0 (sin (* (* angle PI) 0.005555555555555556))) t_0))))
double code(double a, double b, double angle) {
double t_0 = (sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a);
double tmp;
if (angle <= 1.35e+84) {
tmp = (2.0 * cos(((((double) M_PI) * angle) * 0.005555555555555556))) * t_0;
} else {
tmp = (2.0 * sin(((angle * ((double) M_PI)) * 0.005555555555555556))) * t_0;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = (Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b)) * (b - a);
double tmp;
if (angle <= 1.35e+84) {
tmp = (2.0 * Math.cos(((Math.PI * angle) * 0.005555555555555556))) * t_0;
} else {
tmp = (2.0 * Math.sin(((angle * Math.PI) * 0.005555555555555556))) * t_0;
}
return tmp;
}
def code(a, b, angle): t_0 = (math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b)) * (b - a) tmp = 0 if angle <= 1.35e+84: tmp = (2.0 * math.cos(((math.pi * angle) * 0.005555555555555556))) * t_0 else: tmp = (2.0 * math.sin(((angle * math.pi) * 0.005555555555555556))) * t_0 return tmp
function code(a, b, angle) t_0 = Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a)) tmp = 0.0 if (angle <= 1.35e+84) tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle) * 0.005555555555555556))) * t_0); else tmp = Float64(Float64(2.0 * sin(Float64(Float64(angle * pi) * 0.005555555555555556))) * t_0); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (sin(((0.005555555555555556 * angle) * pi)) * (a + b)) * (b - a); tmp = 0.0; if (angle <= 1.35e+84) tmp = (2.0 * cos(((pi * angle) * 0.005555555555555556))) * t_0; else tmp = (2.0 * sin(((angle * pi) * 0.005555555555555556))) * t_0; end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, 1.35e+84], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(2.0 * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\
\mathbf{if}\;angle \leq 1.35 \cdot 10^{+84}:\\
\;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if angle < 1.35e84Initial program 60.6%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.9%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites75.9%
if 1.35e84 < angle Initial program 25.1%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites33.2%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites33.7%
lift-cos.f64N/A
sin-+PI/2-revN/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lower-/.f64N/A
lift-PI.f6440.4
Applied rewrites40.4%
Taylor expanded in angle around inf
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6436.2
Applied rewrites36.2%
(FPCore (a b angle)
:precision binary64
(if (<= angle 6.6e+84)
(*
(* 2.0 (cos (* (* PI angle) 0.005555555555555556)))
(* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a)))
(* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 6.6e+84) {
tmp = (2.0 * cos(((((double) M_PI) * angle) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a));
} else {
tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 6.6e+84) {
tmp = (2.0 * Math.cos(((Math.PI * angle) * 0.005555555555555556))) * ((Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b)) * (b - a));
} else {
tmp = (angle * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= 6.6e+84: tmp = (2.0 * math.cos(((math.pi * angle) * 0.005555555555555556))) * ((math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b)) * (b - a)) else: tmp = (angle * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= 6.6e+84) tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle) * 0.005555555555555556))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a))); else tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 6.6e+84) tmp = (2.0 * cos(((pi * angle) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle) * pi)) * (a + b)) * (b - a)); else tmp = (angle * pi) * (((b - a) * (a + b)) * 0.011111111111111112); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, 6.6e+84], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\
\;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if angle < 6.60000000000000034e84Initial program 60.6%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.9%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites75.9%
if 6.60000000000000034e84 < angle Initial program 25.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6436.7
Applied rewrites36.7%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6436.7
Applied rewrites36.7%
(FPCore (a b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -4e-286) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* (* PI angle) (* b (- b a))) 0.011111111111111112)))
double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -4e-286) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = ((((double) M_PI) * angle) * (b * (b - a))) * 0.011111111111111112;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -4e-286) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = ((Math.PI * angle) * (b * (b - a))) * 0.011111111111111112;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -4e-286: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = ((math.pi * angle) * (b * (b - a))) * 0.011111111111111112 return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -4e-286) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(Float64(pi * angle) * Float64(b * Float64(b - a))) * 0.011111111111111112); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -4e-286) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = ((pi * angle) * (b * (b - a))) * 0.011111111111111112; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e-286], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(b * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{-286}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.0000000000000002e-286Initial program 51.0%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6450.8
Applied rewrites50.8%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6450.3
Applied rewrites50.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6464.5
Applied rewrites64.5%
if -4.0000000000000002e-286 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 56.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6461.8
Applied rewrites61.8%
Taylor expanded in a around 0
Applied rewrites59.3%
(FPCore (a b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -1e+224) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* (* -0.011111111111111112 (* a a)) angle) PI)))
double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -1e+224) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = ((-0.011111111111111112 * (a * a)) * angle) * ((double) M_PI);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -1e+224) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = ((-0.011111111111111112 * (a * a)) * angle) * Math.PI;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -1e+224: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = ((-0.011111111111111112 * (a * a)) * angle) * math.pi return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -1e+224) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(Float64(-0.011111111111111112 * Float64(a * a)) * angle) * pi); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -1e+224) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = ((-0.011111111111111112 * (a * a)) * angle) * pi; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e+224], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -1 \cdot 10^{+224}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right) \cdot \pi\\
\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.9999999999999997e223Initial program 45.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6448.0
Applied rewrites48.0%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6448.0
Applied rewrites48.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6448.0
Applied rewrites48.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6474.6
Applied rewrites74.6%
if -9.9999999999999997e223 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 56.4%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.8
Applied rewrites59.8%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6434.2
Applied rewrites34.2%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f6434.3
Applied rewrites34.3%
(FPCore (a b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e+276) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* (* -0.011111111111111112 a) a) (* angle PI))))
double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e+276) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = ((-0.011111111111111112 * a) * a) * (angle * ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e+276) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = ((-0.011111111111111112 * a) * a) * (angle * Math.PI);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e+276: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = ((-0.011111111111111112 * a) * a) * (angle * math.pi) return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e+276) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(Float64(-0.011111111111111112 * a) * a) * Float64(angle * pi)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e+276) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = ((-0.011111111111111112 * a) * a) * (angle * pi); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+276], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * a), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+276}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -5.00000000000000001e276Initial program 45.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6448.6
Applied rewrites48.6%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6448.6
Applied rewrites48.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6448.6
Applied rewrites48.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6477.7
Applied rewrites77.7%
if -5.00000000000000001e276 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 56.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.3
Applied rewrites59.3%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6434.4
Applied rewrites34.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6434.4
Applied rewrites34.4%
(FPCore (a b angle) :precision binary64 (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e+170) (* (* -0.011111111111111112 a) (* (* angle PI) a)) (* (* -0.011111111111111112 (* a a)) (* angle PI))))
double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e+170) {
tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
} else {
tmp = (-0.011111111111111112 * (a * a)) * (angle * ((double) M_PI));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e+170) {
tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
} else {
tmp = (-0.011111111111111112 * (a * a)) * (angle * Math.PI);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e+170: tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a) else: tmp = (-0.011111111111111112 * (a * a)) * (angle * math.pi) return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e+170) tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)); else tmp = Float64(Float64(-0.011111111111111112 * Float64(a * a)) * Float64(angle * pi)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e+170) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); else tmp = (-0.011111111111111112 * (a * a)) * (angle * pi); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+170], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+170}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.99999999999999977e170Initial program 45.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6446.6
Applied rewrites46.6%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6446.6
Applied rewrites46.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6471.5
Applied rewrites71.5%
if -4.99999999999999977e170 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 56.8%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6460.5
Applied rewrites60.5%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6434.4
Applied rewrites34.4%
(FPCore (a b angle)
:precision binary64
(if (<= angle 6.6e+84)
(*
(fma (pow (* angle PI) 2.0) -3.08641975308642e-5 2.0)
(* (* (* (* angle PI) 0.005555555555555556) (+ a b)) (- b a)))
(* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 6.6e+84) {
tmp = fma(pow((angle * ((double) M_PI)), 2.0), -3.08641975308642e-5, 2.0) * ((((angle * ((double) M_PI)) * 0.005555555555555556) * (a + b)) * (b - a));
} else {
tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return tmp;
}
function code(a, b, angle) tmp = 0.0 if (angle <= 6.6e+84) tmp = Float64(fma((Float64(angle * pi) ^ 2.0), -3.08641975308642e-5, 2.0) * Float64(Float64(Float64(Float64(angle * pi) * 0.005555555555555556) * Float64(a + b)) * Float64(b - a))); else tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112)); end return tmp end
code[a_, b_, angle_] := If[LessEqual[angle, 6.6e+84], N[(N[(N[Power[N[(angle * Pi), $MachinePrecision], 2.0], $MachinePrecision] * -3.08641975308642e-5 + 2.0), $MachinePrecision] * N[(N[(N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\
\;\;\;\;\mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \cdot \left(\left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if angle < 6.60000000000000034e84Initial program 60.6%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.9%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites75.9%
Taylor expanded in angle around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
pow-prod-downN/A
lower-pow.f64N/A
lift-*.f64N/A
lift-PI.f6471.9
Applied rewrites71.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6469.5
Applied rewrites69.5%
if 6.60000000000000034e84 < angle Initial program 25.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6436.7
Applied rewrites36.7%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6436.7
Applied rewrites36.7%
(FPCore (a b angle) :precision binary64 (if (<= angle 6.8e+81) (* 2.0 (* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a))) (* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 6.8e+81) {
tmp = 2.0 * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a));
} else {
tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 6.8e+81) {
tmp = 2.0 * ((Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b)) * (b - a));
} else {
tmp = (angle * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= 6.8e+81: tmp = 2.0 * ((math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b)) * (b - a)) else: tmp = (angle * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= 6.8e+81) tmp = Float64(2.0 * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a))); else tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 6.8e+81) tmp = 2.0 * ((sin(((0.005555555555555556 * angle) * pi)) * (a + b)) * (b - a)); else tmp = (angle * pi) * (((b - a) * (a + b)) * 0.011111111111111112); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, 6.8e+81], N[(2.0 * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 6.8 \cdot 10^{+81}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if angle < 6.80000000000000005e81Initial program 60.4%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites63.7%
lift-*.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites75.8%
Taylor expanded in angle around 0
Applied rewrites74.4%
if 6.80000000000000005e81 < angle Initial program 26.6%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6436.0
Applied rewrites36.0%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6436.0
Applied rewrites36.0%
(FPCore (a b angle)
:precision binary64
(if (<= angle 0.0024)
(* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112)
(if (<= angle 6.6e+84)
(* (sin (* (* angle PI) 0.011111111111111112)) (* b b))
(* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112)))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 0.0024) {
tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
} else if (angle <= 6.6e+84) {
tmp = sin(((angle * ((double) M_PI)) * 0.011111111111111112)) * (b * b);
} else {
tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 0.0024) {
tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
} else if (angle <= 6.6e+84) {
tmp = Math.sin(((angle * Math.PI) * 0.011111111111111112)) * (b * b);
} else {
tmp = (angle * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= 0.0024: tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112 elif angle <= 6.6e+84: tmp = math.sin(((angle * math.pi) * 0.011111111111111112)) * (b * b) else: tmp = (angle * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= 0.0024) tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112); elseif (angle <= 6.6e+84) tmp = Float64(sin(Float64(Float64(angle * pi) * 0.011111111111111112)) * Float64(b * b)); else tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 0.0024) tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112; elseif (angle <= 6.6e+84) tmp = sin(((angle * pi) * 0.011111111111111112)) * (b * b); else tmp = (angle * pi) * (((b - a) * (a + b)) * 0.011111111111111112); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, 0.0024], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle, 6.6e+84], N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 0.0024:\\
\;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{elif}\;angle \leq 6.6 \cdot 10^{+84}:\\
\;\;\;\;\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if angle < 0.00239999999999999979Initial program 61.7%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6465.8
Applied rewrites65.8%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites67.0%
Taylor expanded in angle around 0
associate-*r*N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f64N/A
lift--.f6476.9
Applied rewrites76.9%
if 0.00239999999999999979 < angle < 6.60000000000000034e84Initial program 47.8%
Taylor expanded in angle around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
Applied rewrites65.8%
Taylor expanded in b around inf
Applied rewrites31.4%
Taylor expanded in a around 0
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-PI.f6446.6
Applied rewrites46.6%
if 6.60000000000000034e84 < angle Initial program 25.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6436.7
Applied rewrites36.7%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6436.7
Applied rewrites36.7%
(FPCore (a b angle) :precision binary64 (if (<= angle 1e+24) (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112) (* (* PI (* angle (* (- b a) (+ a b)))) 0.011111111111111112)))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 1e+24) {
tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
} else {
tmp = (((double) M_PI) * (angle * ((b - a) * (a + b)))) * 0.011111111111111112;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 1e+24) {
tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
} else {
tmp = (Math.PI * (angle * ((b - a) * (a + b)))) * 0.011111111111111112;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= 1e+24: tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112 else: tmp = (math.pi * (angle * ((b - a) * (a + b)))) * 0.011111111111111112 return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= 1e+24) tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112); else tmp = Float64(Float64(pi * Float64(angle * Float64(Float64(b - a) * Float64(a + b)))) * 0.011111111111111112); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 1e+24) tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112; else tmp = (pi * (angle * ((b - a) * (a + b)))) * 0.011111111111111112; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, 1e+24], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(Pi * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 10^{+24}:\\
\;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(\pi \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if angle < 9.9999999999999998e23Initial program 61.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6465.1
Applied rewrites65.1%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites67.3%
Taylor expanded in angle around 0
associate-*r*N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f64N/A
lift--.f6476.0
Applied rewrites76.0%
if 9.9999999999999998e23 < angle Initial program 30.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6432.0
Applied rewrites32.0%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6432.0
Applied rewrites32.0%
(FPCore (a b angle) :precision binary64 (if (<= angle 2e+68) (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112) (* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 2e+68) {
tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
} else {
tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 2e+68) {
tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
} else {
tmp = (angle * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= 2e+68: tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112 else: tmp = (angle * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= 2e+68) tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112); else tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 2e+68) tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112; else tmp = (angle * pi) * (((b - a) * (a + b)) * 0.011111111111111112); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, 2e+68], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 2 \cdot 10^{+68}:\\
\;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if angle < 1.99999999999999991e68Initial program 60.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.8
Applied rewrites62.8%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites65.0%
Taylor expanded in angle around 0
associate-*r*N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f64N/A
lift--.f6473.2
Applied rewrites73.2%
if 1.99999999999999991e68 < angle Initial program 30.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6435.2
Applied rewrites35.2%
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6435.2
Applied rewrites35.2%
(FPCore (a b angle) :precision binary64 (if (<= angle 2e+68) (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112) (* (* 0.011111111111111112 angle) (* (* PI (+ a b)) (- b a)))))
double code(double a, double b, double angle) {
double tmp;
if (angle <= 2e+68) {
tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
} else {
tmp = (0.011111111111111112 * angle) * ((((double) M_PI) * (a + b)) * (b - a));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (angle <= 2e+68) {
tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
} else {
tmp = (0.011111111111111112 * angle) * ((Math.PI * (a + b)) * (b - a));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if angle <= 2e+68: tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112 else: tmp = (0.011111111111111112 * angle) * ((math.pi * (a + b)) * (b - a)) return tmp
function code(a, b, angle) tmp = 0.0 if (angle <= 2e+68) tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112); else tmp = Float64(Float64(0.011111111111111112 * angle) * Float64(Float64(pi * Float64(a + b)) * Float64(b - a))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (angle <= 2e+68) tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112; else tmp = (0.011111111111111112 * angle) * ((pi * (a + b)) * (b - a)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[angle, 2e+68], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 2 \cdot 10^{+68}:\\
\;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
\end{array}
\end{array}
if angle < 1.99999999999999991e68Initial program 60.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6462.8
Applied rewrites62.8%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites65.0%
Taylor expanded in angle around 0
associate-*r*N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f64N/A
lift--.f6473.2
Applied rewrites73.2%
if 1.99999999999999991e68 < angle Initial program 30.3%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6435.2
Applied rewrites35.2%
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
+-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
+-commutativeN/A
lower-+.f64N/A
Applied rewrites35.2%
(FPCore (a b angle) :precision binary64 (if (<= a 2e-153) (* (* (* PI (* b b)) angle) 0.011111111111111112) (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112)))
double code(double a, double b, double angle) {
double tmp;
if (a <= 2e-153) {
tmp = ((((double) M_PI) * (b * b)) * angle) * 0.011111111111111112;
} else {
tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (a <= 2e-153) {
tmp = ((Math.PI * (b * b)) * angle) * 0.011111111111111112;
} else {
tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
}
return tmp;
}
def code(a, b, angle): tmp = 0 if a <= 2e-153: tmp = ((math.pi * (b * b)) * angle) * 0.011111111111111112 else: tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112 return tmp
function code(a, b, angle) tmp = 0.0 if (a <= 2e-153) tmp = Float64(Float64(Float64(pi * Float64(b * b)) * angle) * 0.011111111111111112); else tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (a <= 2e-153) tmp = ((pi * (b * b)) * angle) * 0.011111111111111112; else tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112; end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[a, 2e-153], N[(N[(N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2 \cdot 10^{-153}:\\
\;\;\;\;\left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
\end{array}
\end{array}
if a < 2.00000000000000008e-153Initial program 56.1%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6459.6
Applied rewrites59.6%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
lower-*.f6444.3
Applied rewrites44.3%
if 2.00000000000000008e-153 < a Initial program 50.2%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6452.7
Applied rewrites52.7%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites54.3%
Taylor expanded in angle around 0
associate-*r*N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
lift-PI.f64N/A
lift--.f6466.3
Applied rewrites66.3%
(FPCore (a b angle) :precision binary64 (* (* -0.011111111111111112 a) (* (* angle PI) a)))
double code(double a, double b, double angle) {
return (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
}
public static double code(double a, double b, double angle) {
return (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
}
def code(a, b, angle): return (-0.011111111111111112 * a) * ((angle * math.pi) * a)
function code(a, b, angle) return Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a)) end
function tmp = code(a, b, angle) tmp = (-0.011111111111111112 * a) * ((angle * pi) * a); end
code[a_, b_, angle_] := N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)
\end{array}
Initial program 53.9%
Taylor expanded in angle around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
unpow2N/A
unpow2N/A
difference-of-squaresN/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6457.1
Applied rewrites57.1%
Taylor expanded in a around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-*.f64N/A
lift-PI.f6437.4
Applied rewrites37.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6437.4
Applied rewrites37.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6439.8
Applied rewrites39.8%
herbie shell --seed 2025064
(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)))))