
(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}
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}
Herbie found 19 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}
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}
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) a))
(t_1 (* PI (fabs angle)))
(t_2 (+ a (fabs b))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 3.4e+186)
(*
(* t_2 (* t_0 (* (sin (/ t_1 180.0)) 2.0)))
(sin
(+
1.5707963267948966
(* (* (fabs angle) 0.005555555555555556) PI))))
(*
(* (* t_2 (* t_0 2.0)) (sin (* PI (/ (fabs angle) 180.0))))
(sin (+ (* -0.005555555555555556 t_1) (* PI 0.5))))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - a;
double t_1 = ((double) M_PI) * fabs(angle);
double t_2 = a + fabs(b);
double tmp;
if (fabs(angle) <= 3.4e+186) {
tmp = (t_2 * (t_0 * (sin((t_1 / 180.0)) * 2.0))) * sin((1.5707963267948966 + ((fabs(angle) * 0.005555555555555556) * ((double) M_PI))));
} else {
tmp = ((t_2 * (t_0 * 2.0)) * sin((((double) M_PI) * (fabs(angle) / 180.0)))) * sin(((-0.005555555555555556 * t_1) + (((double) M_PI) * 0.5)));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(b) - a;
double t_1 = Math.PI * Math.abs(angle);
double t_2 = a + Math.abs(b);
double tmp;
if (Math.abs(angle) <= 3.4e+186) {
tmp = (t_2 * (t_0 * (Math.sin((t_1 / 180.0)) * 2.0))) * Math.sin((1.5707963267948966 + ((Math.abs(angle) * 0.005555555555555556) * Math.PI)));
} else {
tmp = ((t_2 * (t_0 * 2.0)) * Math.sin((Math.PI * (Math.abs(angle) / 180.0)))) * Math.sin(((-0.005555555555555556 * t_1) + (Math.PI * 0.5)));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - a t_1 = math.pi * math.fabs(angle) t_2 = a + math.fabs(b) tmp = 0 if math.fabs(angle) <= 3.4e+186: tmp = (t_2 * (t_0 * (math.sin((t_1 / 180.0)) * 2.0))) * math.sin((1.5707963267948966 + ((math.fabs(angle) * 0.005555555555555556) * math.pi))) else: tmp = ((t_2 * (t_0 * 2.0)) * math.sin((math.pi * (math.fabs(angle) / 180.0)))) * math.sin(((-0.005555555555555556 * t_1) + (math.pi * 0.5))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - a) t_1 = Float64(pi * abs(angle)) t_2 = Float64(a + abs(b)) tmp = 0.0 if (abs(angle) <= 3.4e+186) tmp = Float64(Float64(t_2 * Float64(t_0 * Float64(sin(Float64(t_1 / 180.0)) * 2.0))) * sin(Float64(1.5707963267948966 + Float64(Float64(abs(angle) * 0.005555555555555556) * pi)))); else tmp = Float64(Float64(Float64(t_2 * Float64(t_0 * 2.0)) * sin(Float64(pi * Float64(abs(angle) / 180.0)))) * sin(Float64(Float64(-0.005555555555555556 * t_1) + Float64(pi * 0.5)))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - a; t_1 = pi * abs(angle); t_2 = a + abs(b); tmp = 0.0; if (abs(angle) <= 3.4e+186) tmp = (t_2 * (t_0 * (sin((t_1 / 180.0)) * 2.0))) * sin((1.5707963267948966 + ((abs(angle) * 0.005555555555555556) * pi))); else tmp = ((t_2 * (t_0 * 2.0)) * sin((pi * (abs(angle) / 180.0)))) * sin(((-0.005555555555555556 * t_1) + (pi * 0.5))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 3.4e+186], N[(N[(t$95$2 * N[(t$95$0 * N[(N[Sin[N[(t$95$1 / 180.0), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(1.5707963267948966 + N[(N[(N[Abs[angle], $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$2 * N[(t$95$0 * 2.0), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(-0.005555555555555556 * t$95$1), $MachinePrecision] + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left|b\right| - a\\
t_1 := \pi \cdot \left|angle\right|\\
t_2 := a + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 3.4 \cdot 10^{+186}:\\
\;\;\;\;\left(t\_2 \cdot \left(t\_0 \cdot \left(\sin \left(\frac{t\_1}{180}\right) \cdot 2\right)\right)\right) \cdot \sin \left(1.5707963267948966 + \left(\left|angle\right| \cdot 0.005555555555555556\right) \cdot \pi\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t\_2 \cdot \left(t\_0 \cdot 2\right)\right) \cdot \sin \left(\pi \cdot \frac{\left|angle\right|}{180}\right)\right) \cdot \sin \left(-0.005555555555555556 \cdot t\_1 + \pi \cdot 0.5\right)\\
\end{array}
\end{array}
if angle < 3.4000000000000001e186Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-PI.f64N/A
mult-flipN/A
lower-*.f64N/A
metadata-eval67.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.6%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6467.5%
Applied rewrites67.5%
Evaluated real constant67.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
associate-*l/N/A
lift-*.f64N/A
lower-/.f6467.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3%
Applied rewrites67.3%
if 3.4000000000000001e186 < angle Initial program 54.6%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f6458.4%
Applied rewrites58.4%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites57.8%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) a)) (t_1 (+ a (fabs b))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 3.85e+186)
(*
(* t_1 (* t_0 (* (sin (/ (* PI (fabs angle)) 180.0)) 2.0)))
(sin
(+
1.5707963267948966
(* (* (fabs angle) 0.005555555555555556) PI))))
(*
(*
t_1
(*
t_0
(* (sin (* (* 0.005555555555555556 (fabs angle)) PI)) 2.0)))
(sin
(-
(* 0.5 PI)
(* (fabs (fabs angle)) (* PI 0.005555555555555556)))))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - a;
double t_1 = a + fabs(b);
double tmp;
if (fabs(angle) <= 3.85e+186) {
tmp = (t_1 * (t_0 * (sin(((((double) M_PI) * fabs(angle)) / 180.0)) * 2.0))) * sin((1.5707963267948966 + ((fabs(angle) * 0.005555555555555556) * ((double) M_PI))));
} else {
tmp = (t_1 * (t_0 * (sin(((0.005555555555555556 * fabs(angle)) * ((double) M_PI))) * 2.0))) * sin(((0.5 * ((double) M_PI)) - (fabs(fabs(angle)) * (((double) M_PI) * 0.005555555555555556))));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(b) - a;
double t_1 = a + Math.abs(b);
double tmp;
if (Math.abs(angle) <= 3.85e+186) {
tmp = (t_1 * (t_0 * (Math.sin(((Math.PI * Math.abs(angle)) / 180.0)) * 2.0))) * Math.sin((1.5707963267948966 + ((Math.abs(angle) * 0.005555555555555556) * Math.PI)));
} else {
tmp = (t_1 * (t_0 * (Math.sin(((0.005555555555555556 * Math.abs(angle)) * Math.PI)) * 2.0))) * Math.sin(((0.5 * Math.PI) - (Math.abs(Math.abs(angle)) * (Math.PI * 0.005555555555555556))));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - a t_1 = a + math.fabs(b) tmp = 0 if math.fabs(angle) <= 3.85e+186: tmp = (t_1 * (t_0 * (math.sin(((math.pi * math.fabs(angle)) / 180.0)) * 2.0))) * math.sin((1.5707963267948966 + ((math.fabs(angle) * 0.005555555555555556) * math.pi))) else: tmp = (t_1 * (t_0 * (math.sin(((0.005555555555555556 * math.fabs(angle)) * math.pi)) * 2.0))) * math.sin(((0.5 * math.pi) - (math.fabs(math.fabs(angle)) * (math.pi * 0.005555555555555556)))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - a) t_1 = Float64(a + abs(b)) tmp = 0.0 if (abs(angle) <= 3.85e+186) tmp = Float64(Float64(t_1 * Float64(t_0 * Float64(sin(Float64(Float64(pi * abs(angle)) / 180.0)) * 2.0))) * sin(Float64(1.5707963267948966 + Float64(Float64(abs(angle) * 0.005555555555555556) * pi)))); else tmp = Float64(Float64(t_1 * Float64(t_0 * Float64(sin(Float64(Float64(0.005555555555555556 * abs(angle)) * pi)) * 2.0))) * sin(Float64(Float64(0.5 * pi) - Float64(abs(abs(angle)) * Float64(pi * 0.005555555555555556))))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - a; t_1 = a + abs(b); tmp = 0.0; if (abs(angle) <= 3.85e+186) tmp = (t_1 * (t_0 * (sin(((pi * abs(angle)) / 180.0)) * 2.0))) * sin((1.5707963267948966 + ((abs(angle) * 0.005555555555555556) * pi))); else tmp = (t_1 * (t_0 * (sin(((0.005555555555555556 * abs(angle)) * pi)) * 2.0))) * sin(((0.5 * pi) - (abs(abs(angle)) * (pi * 0.005555555555555556)))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]}, Block[{t$95$1 = N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 3.85e+186], N[(N[(t$95$1 * N[(t$95$0 * N[(N[Sin[N[(N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(1.5707963267948966 + N[(N[(N[Abs[angle], $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * N[(t$95$0 * N[(N[Sin[N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(0.5 * Pi), $MachinePrecision] - N[(N[Abs[N[Abs[angle], $MachinePrecision]], $MachinePrecision] * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|b\right| - a\\
t_1 := a + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 3.85 \cdot 10^{+186}:\\
\;\;\;\;\left(t\_1 \cdot \left(t\_0 \cdot \left(\sin \left(\frac{\pi \cdot \left|angle\right|}{180}\right) \cdot 2\right)\right)\right) \cdot \sin \left(1.5707963267948966 + \left(\left|angle\right| \cdot 0.005555555555555556\right) \cdot \pi\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 \cdot \left(t\_0 \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\right) \cdot 2\right)\right)\right) \cdot \sin \left(0.5 \cdot \pi - \left|\left|angle\right|\right| \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\\
\end{array}
\end{array}
if angle < 3.8500000000000002e186Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-PI.f64N/A
mult-flipN/A
lower-*.f64N/A
metadata-eval67.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.6%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6467.5%
Applied rewrites67.5%
Evaluated real constant67.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
associate-*l/N/A
lift-*.f64N/A
lower-/.f6467.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3%
Applied rewrites67.3%
if 3.8500000000000002e186 < angle Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-PI.f64N/A
mult-flipN/A
lower-*.f64N/A
metadata-eval67.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.6%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6467.5%
Applied rewrites67.5%
lift-sin.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
sin-+PI/2-revN/A
cos-fabs-revN/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
Applied rewrites67.6%
lift-+.f64N/A
+-commutativeN/A
lift-neg.f64N/A
sub-flip-reverseN/A
lower--.f6467.6%
lift-fabs.f64N/A
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
lift-/.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
associate-*l*N/A
fabs-mulN/A
fabs-mulN/A
metadata-evalN/A
rem-sqrt-square-revN/A
sqrt-prodN/A
lift-PI.f64N/A
lift-PI.f64N/A
Applied rewrites67.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) a))
(t_1 (* PI (fabs angle)))
(t_2 (+ a (fabs b))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 3.85e+186)
(*
(* t_2 (* t_0 (* (sin (/ t_1 180.0)) 2.0)))
(sin
(+
1.5707963267948966
(* (* (fabs angle) 0.005555555555555556) PI))))
(*
(*
t_2
(*
t_0
(* (sin (* (* 0.005555555555555556 (fabs angle)) PI)) 2.0)))
(sin (+ (* -0.005555555555555556 t_1) (* PI 0.5))))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - a;
double t_1 = ((double) M_PI) * fabs(angle);
double t_2 = a + fabs(b);
double tmp;
if (fabs(angle) <= 3.85e+186) {
tmp = (t_2 * (t_0 * (sin((t_1 / 180.0)) * 2.0))) * sin((1.5707963267948966 + ((fabs(angle) * 0.005555555555555556) * ((double) M_PI))));
} else {
tmp = (t_2 * (t_0 * (sin(((0.005555555555555556 * fabs(angle)) * ((double) M_PI))) * 2.0))) * sin(((-0.005555555555555556 * t_1) + (((double) M_PI) * 0.5)));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(b) - a;
double t_1 = Math.PI * Math.abs(angle);
double t_2 = a + Math.abs(b);
double tmp;
if (Math.abs(angle) <= 3.85e+186) {
tmp = (t_2 * (t_0 * (Math.sin((t_1 / 180.0)) * 2.0))) * Math.sin((1.5707963267948966 + ((Math.abs(angle) * 0.005555555555555556) * Math.PI)));
} else {
tmp = (t_2 * (t_0 * (Math.sin(((0.005555555555555556 * Math.abs(angle)) * Math.PI)) * 2.0))) * Math.sin(((-0.005555555555555556 * t_1) + (Math.PI * 0.5)));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - a t_1 = math.pi * math.fabs(angle) t_2 = a + math.fabs(b) tmp = 0 if math.fabs(angle) <= 3.85e+186: tmp = (t_2 * (t_0 * (math.sin((t_1 / 180.0)) * 2.0))) * math.sin((1.5707963267948966 + ((math.fabs(angle) * 0.005555555555555556) * math.pi))) else: tmp = (t_2 * (t_0 * (math.sin(((0.005555555555555556 * math.fabs(angle)) * math.pi)) * 2.0))) * math.sin(((-0.005555555555555556 * t_1) + (math.pi * 0.5))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - a) t_1 = Float64(pi * abs(angle)) t_2 = Float64(a + abs(b)) tmp = 0.0 if (abs(angle) <= 3.85e+186) tmp = Float64(Float64(t_2 * Float64(t_0 * Float64(sin(Float64(t_1 / 180.0)) * 2.0))) * sin(Float64(1.5707963267948966 + Float64(Float64(abs(angle) * 0.005555555555555556) * pi)))); else tmp = Float64(Float64(t_2 * Float64(t_0 * Float64(sin(Float64(Float64(0.005555555555555556 * abs(angle)) * pi)) * 2.0))) * sin(Float64(Float64(-0.005555555555555556 * t_1) + Float64(pi * 0.5)))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - a; t_1 = pi * abs(angle); t_2 = a + abs(b); tmp = 0.0; if (abs(angle) <= 3.85e+186) tmp = (t_2 * (t_0 * (sin((t_1 / 180.0)) * 2.0))) * sin((1.5707963267948966 + ((abs(angle) * 0.005555555555555556) * pi))); else tmp = (t_2 * (t_0 * (sin(((0.005555555555555556 * abs(angle)) * pi)) * 2.0))) * sin(((-0.005555555555555556 * t_1) + (pi * 0.5))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 3.85e+186], N[(N[(t$95$2 * N[(t$95$0 * N[(N[Sin[N[(t$95$1 / 180.0), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(1.5707963267948966 + N[(N[(N[Abs[angle], $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 * N[(t$95$0 * N[(N[Sin[N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(-0.005555555555555556 * t$95$1), $MachinePrecision] + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left|b\right| - a\\
t_1 := \pi \cdot \left|angle\right|\\
t_2 := a + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 3.85 \cdot 10^{+186}:\\
\;\;\;\;\left(t\_2 \cdot \left(t\_0 \cdot \left(\sin \left(\frac{t\_1}{180}\right) \cdot 2\right)\right)\right) \cdot \sin \left(1.5707963267948966 + \left(\left|angle\right| \cdot 0.005555555555555556\right) \cdot \pi\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_2 \cdot \left(t\_0 \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\right) \cdot 2\right)\right)\right) \cdot \sin \left(-0.005555555555555556 \cdot t\_1 + \pi \cdot 0.5\right)\\
\end{array}
\end{array}
if angle < 3.8500000000000002e186Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-PI.f64N/A
mult-flipN/A
lower-*.f64N/A
metadata-eval67.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.6%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6467.5%
Applied rewrites67.5%
Evaluated real constant67.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
metadata-evalN/A
mult-flipN/A
associate-*l/N/A
lift-*.f64N/A
lower-/.f6467.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3%
Applied rewrites67.3%
if 3.8500000000000002e186 < angle Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites68.1%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* -0.005555555555555556 (* PI (fabs angle)))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 6.2e+193)
(*
(*
(* (- b a) 2.0)
(sin (* (* PI 0.005555555555555556) (fabs angle))))
(* (+ b a) (sin (- 1.5707963267948966 t_0))))
(*
(*
(+ a b)
(*
(- b a)
(* (sin (* (* 0.005555555555555556 (fabs angle)) PI)) 2.0)))
(sin (+ t_0 (* PI 0.5))))))))double code(double a, double b, double angle) {
double t_0 = -0.005555555555555556 * (((double) M_PI) * fabs(angle));
double tmp;
if (fabs(angle) <= 6.2e+193) {
tmp = (((b - a) * 2.0) * sin(((((double) M_PI) * 0.005555555555555556) * fabs(angle)))) * ((b + a) * sin((1.5707963267948966 - t_0)));
} else {
tmp = ((a + b) * ((b - a) * (sin(((0.005555555555555556 * fabs(angle)) * ((double) M_PI))) * 2.0))) * sin((t_0 + (((double) M_PI) * 0.5)));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = -0.005555555555555556 * (Math.PI * Math.abs(angle));
double tmp;
if (Math.abs(angle) <= 6.2e+193) {
tmp = (((b - a) * 2.0) * Math.sin(((Math.PI * 0.005555555555555556) * Math.abs(angle)))) * ((b + a) * Math.sin((1.5707963267948966 - t_0)));
} else {
tmp = ((a + b) * ((b - a) * (Math.sin(((0.005555555555555556 * Math.abs(angle)) * Math.PI)) * 2.0))) * Math.sin((t_0 + (Math.PI * 0.5)));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = -0.005555555555555556 * (math.pi * math.fabs(angle)) tmp = 0 if math.fabs(angle) <= 6.2e+193: tmp = (((b - a) * 2.0) * math.sin(((math.pi * 0.005555555555555556) * math.fabs(angle)))) * ((b + a) * math.sin((1.5707963267948966 - t_0))) else: tmp = ((a + b) * ((b - a) * (math.sin(((0.005555555555555556 * math.fabs(angle)) * math.pi)) * 2.0))) * math.sin((t_0 + (math.pi * 0.5))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(-0.005555555555555556 * Float64(pi * abs(angle))) tmp = 0.0 if (abs(angle) <= 6.2e+193) tmp = Float64(Float64(Float64(Float64(b - a) * 2.0) * sin(Float64(Float64(pi * 0.005555555555555556) * abs(angle)))) * Float64(Float64(b + a) * sin(Float64(1.5707963267948966 - t_0)))); else tmp = Float64(Float64(Float64(a + b) * Float64(Float64(b - a) * Float64(sin(Float64(Float64(0.005555555555555556 * abs(angle)) * pi)) * 2.0))) * sin(Float64(t_0 + Float64(pi * 0.5)))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = -0.005555555555555556 * (pi * abs(angle)); tmp = 0.0; if (abs(angle) <= 6.2e+193) tmp = (((b - a) * 2.0) * sin(((pi * 0.005555555555555556) * abs(angle)))) * ((b + a) * sin((1.5707963267948966 - t_0))); else tmp = ((a + b) * ((b - a) * (sin(((0.005555555555555556 * abs(angle)) * pi)) * 2.0))) * sin((t_0 + (pi * 0.5))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(-0.005555555555555556 * N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 6.2e+193], N[(N[(N[(N[(b - a), $MachinePrecision] * 2.0), $MachinePrecision] * N[Sin[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(1.5707963267948966 - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(t$95$0 + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_0 := -0.005555555555555556 \cdot \left(\pi \cdot \left|angle\right|\right)\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 6.2 \cdot 10^{+193}:\\
\;\;\;\;\left(\left(\left(b - a\right) \cdot 2\right) \cdot \sin \left(\left(\pi \cdot 0.005555555555555556\right) \cdot \left|angle\right|\right)\right) \cdot \left(\left(b + a\right) \cdot \sin \left(1.5707963267948966 - t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\right) \cdot 2\right)\right)\right) \cdot \sin \left(t\_0 + \pi \cdot 0.5\right)\\
\end{array}
\end{array}
if angle < 6.1999999999999997e193Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-PI.f64N/A
mult-flipN/A
lower-*.f64N/A
metadata-eval67.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.6%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6467.5%
Applied rewrites67.5%
Evaluated real constant67.5%
Applied rewrites67.8%
if 6.1999999999999997e193 < angle Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
lower-+.f64N/A
Applied rewrites68.1%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 5e+199)
(*
(*
(* (- b a) 2.0)
(sin (* (* PI 0.005555555555555556) (fabs angle))))
(*
(+ b a)
(sin
(-
1.5707963267948966
(* -0.005555555555555556 (* PI (fabs angle)))))))
(*
0.011111111111111112
(*
(fabs angle)
(*
PI
(*
(sin
(-
(* 0.5 PI)
(fabs (* 0.005555555555555556 (* (fabs angle) PI)))))
(* (+ a b) (- b a)))))))))double code(double a, double b, double angle) {
double tmp;
if (fabs(angle) <= 5e+199) {
tmp = (((b - a) * 2.0) * sin(((((double) M_PI) * 0.005555555555555556) * fabs(angle)))) * ((b + a) * sin((1.5707963267948966 - (-0.005555555555555556 * (((double) M_PI) * fabs(angle))))));
} else {
tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (sin(((0.5 * ((double) M_PI)) - fabs((0.005555555555555556 * (fabs(angle) * ((double) M_PI)))))) * ((a + b) * (b - a)))));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.abs(angle) <= 5e+199) {
tmp = (((b - a) * 2.0) * Math.sin(((Math.PI * 0.005555555555555556) * Math.abs(angle)))) * ((b + a) * Math.sin((1.5707963267948966 - (-0.005555555555555556 * (Math.PI * Math.abs(angle))))));
} else {
tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (Math.sin(((0.5 * Math.PI) - Math.abs((0.005555555555555556 * (Math.abs(angle) * Math.PI))))) * ((a + b) * (b - a)))));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(angle) <= 5e+199: tmp = (((b - a) * 2.0) * math.sin(((math.pi * 0.005555555555555556) * math.fabs(angle)))) * ((b + a) * math.sin((1.5707963267948966 - (-0.005555555555555556 * (math.pi * math.fabs(angle)))))) else: tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (math.sin(((0.5 * math.pi) - math.fabs((0.005555555555555556 * (math.fabs(angle) * math.pi))))) * ((a + b) * (b - a))))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) tmp = 0.0 if (abs(angle) <= 5e+199) tmp = Float64(Float64(Float64(Float64(b - a) * 2.0) * sin(Float64(Float64(pi * 0.005555555555555556) * abs(angle)))) * Float64(Float64(b + a) * sin(Float64(1.5707963267948966 - Float64(-0.005555555555555556 * Float64(pi * abs(angle))))))); else tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(sin(Float64(Float64(0.5 * pi) - abs(Float64(0.005555555555555556 * Float64(abs(angle) * pi))))) * Float64(Float64(a + b) * Float64(b - a)))))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(angle) <= 5e+199) tmp = (((b - a) * 2.0) * sin(((pi * 0.005555555555555556) * abs(angle)))) * ((b + a) * sin((1.5707963267948966 - (-0.005555555555555556 * (pi * abs(angle)))))); else tmp = 0.011111111111111112 * (abs(angle) * (pi * (sin(((0.5 * pi) - abs((0.005555555555555556 * (abs(angle) * pi))))) * ((a + b) * (b - a))))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 5e+199], N[(N[(N[(N[(b - a), $MachinePrecision] * 2.0), $MachinePrecision] * N[Sin[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(1.5707963267948966 - N[(-0.005555555555555556 * N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(N[Sin[N[(N[(0.5 * Pi), $MachinePrecision] - N[Abs[N[(0.005555555555555556 * N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{+199}:\\
\;\;\;\;\left(\left(\left(b - a\right) \cdot 2\right) \cdot \sin \left(\left(\pi \cdot 0.005555555555555556\right) \cdot \left|angle\right|\right)\right) \cdot \left(\left(b + a\right) \cdot \sin \left(1.5707963267948966 - -0.005555555555555556 \cdot \left(\pi \cdot \left|angle\right|\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\sin \left(0.5 \cdot \pi - \left|0.005555555555555556 \cdot \left(\left|angle\right| \cdot \pi\right)\right|\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)\\
\end{array}
if angle < 4.9999999999999998e199Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-PI.f64N/A
mult-flipN/A
lower-*.f64N/A
metadata-eval67.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.6%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6467.5%
Applied rewrites67.5%
Evaluated real constant67.5%
Applied rewrites67.8%
if 4.9999999999999998e199 < angle Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-PI.f64N/A
mult-flipN/A
lower-*.f64N/A
metadata-eval67.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.6%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6467.5%
Applied rewrites67.5%
lift-sin.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
lift-PI.f64N/A
sin-+PI/2-revN/A
cos-fabs-revN/A
cos-neg-revN/A
sin-+PI/2-revN/A
lower-sin.f64N/A
Applied rewrites67.6%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
Applied rewrites54.6%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1.0 angle)
(*
(*
(+ a b)
(*
(- b a)
(* (sin (* (* 0.005555555555555556 (fabs angle)) PI)) 2.0)))
(sin
(+
1.5707963267948966
(* (* (fabs angle) 0.005555555555555556) PI))))))double code(double a, double b, double angle) {
return copysign(1.0, angle) * (((a + b) * ((b - a) * (sin(((0.005555555555555556 * fabs(angle)) * ((double) M_PI))) * 2.0))) * sin((1.5707963267948966 + ((fabs(angle) * 0.005555555555555556) * ((double) M_PI)))));
}
public static double code(double a, double b, double angle) {
return Math.copySign(1.0, angle) * (((a + b) * ((b - a) * (Math.sin(((0.005555555555555556 * Math.abs(angle)) * Math.PI)) * 2.0))) * Math.sin((1.5707963267948966 + ((Math.abs(angle) * 0.005555555555555556) * Math.PI))));
}
def code(a, b, angle): return math.copysign(1.0, angle) * (((a + b) * ((b - a) * (math.sin(((0.005555555555555556 * math.fabs(angle)) * math.pi)) * 2.0))) * math.sin((1.5707963267948966 + ((math.fabs(angle) * 0.005555555555555556) * math.pi))))
function code(a, b, angle) return Float64(copysign(1.0, angle) * Float64(Float64(Float64(a + b) * Float64(Float64(b - a) * Float64(sin(Float64(Float64(0.005555555555555556 * abs(angle)) * pi)) * 2.0))) * sin(Float64(1.5707963267948966 + Float64(Float64(abs(angle) * 0.005555555555555556) * pi))))) end
function tmp = code(a, b, angle) tmp = (sign(angle) * abs(1.0)) * (((a + b) * ((b - a) * (sin(((0.005555555555555556 * abs(angle)) * pi)) * 2.0))) * sin((1.5707963267948966 + ((abs(angle) * 0.005555555555555556) * pi)))); end
code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(1.5707963267948966 + N[(N[(N[Abs[angle], $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \left(\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\right) \cdot 2\right)\right)\right) \cdot \sin \left(1.5707963267948966 + \left(\left|angle\right| \cdot 0.005555555555555556\right) \cdot \pi\right)\right)
Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-PI.f64N/A
mult-flipN/A
lower-*.f64N/A
metadata-eval67.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.6%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6467.5%
Applied rewrites67.5%
Evaluated real constant67.5%
(FPCore (a b angle) :precision binary64 (* (* (+ a b) (* (- b a) (* (sin (* (* 0.005555555555555556 angle) PI)) 2.0))) 1.0))
double code(double a, double b, double angle) {
return ((a + b) * ((b - a) * (sin(((0.005555555555555556 * angle) * ((double) M_PI))) * 2.0))) * 1.0;
}
public static double code(double a, double b, double angle) {
return ((a + b) * ((b - a) * (Math.sin(((0.005555555555555556 * angle) * Math.PI)) * 2.0))) * 1.0;
}
def code(a, b, angle): return ((a + b) * ((b - a) * (math.sin(((0.005555555555555556 * angle) * math.pi)) * 2.0))) * 1.0
function code(a, b, angle) return Float64(Float64(Float64(a + b) * Float64(Float64(b - a) * Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * 2.0))) * 1.0) end
function tmp = code(a, b, angle) tmp = ((a + b) * ((b - a) * (sin(((0.005555555555555556 * angle) * pi)) * 2.0))) * 1.0; end
code[a_, b_, angle_] := N[(N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]
\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 2\right)\right)\right) \cdot 1
Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
Taylor expanded in angle around 0
Applied rewrites66.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) (fabs a))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 4.1e+64)
(*
t_0
(*
(sin (* 0.011111111111111112 (* PI (fabs angle))))
(+ (fabs b) (fabs a))))
(*
0.011111111111111112
(*
(fabs angle)
(*
PI
(*
(sin 1.5707963267948966)
(* (+ (fabs a) (fabs b)) t_0)))))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - fabs(a);
double tmp;
if (fabs(angle) <= 4.1e+64) {
tmp = t_0 * (sin((0.011111111111111112 * (((double) M_PI) * fabs(angle)))) * (fabs(b) + fabs(a)));
} else {
tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (sin(1.5707963267948966) * ((fabs(a) + fabs(b)) * t_0))));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(b) - Math.abs(a);
double tmp;
if (Math.abs(angle) <= 4.1e+64) {
tmp = t_0 * (Math.sin((0.011111111111111112 * (Math.PI * Math.abs(angle)))) * (Math.abs(b) + Math.abs(a)));
} else {
tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (Math.sin(1.5707963267948966) * ((Math.abs(a) + Math.abs(b)) * t_0))));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - math.fabs(a) tmp = 0 if math.fabs(angle) <= 4.1e+64: tmp = t_0 * (math.sin((0.011111111111111112 * (math.pi * math.fabs(angle)))) * (math.fabs(b) + math.fabs(a))) else: tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (math.sin(1.5707963267948966) * ((math.fabs(a) + math.fabs(b)) * t_0)))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - abs(a)) tmp = 0.0 if (abs(angle) <= 4.1e+64) tmp = Float64(t_0 * Float64(sin(Float64(0.011111111111111112 * Float64(pi * abs(angle)))) * Float64(abs(b) + abs(a)))); else tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(sin(1.5707963267948966) * Float64(Float64(abs(a) + abs(b)) * t_0))))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - abs(a); tmp = 0.0; if (abs(angle) <= 4.1e+64) tmp = t_0 * (sin((0.011111111111111112 * (pi * abs(angle)))) * (abs(b) + abs(a))); else tmp = 0.011111111111111112 * (abs(angle) * (pi * (sin(1.5707963267948966) * ((abs(a) + abs(b)) * t_0)))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 4.1e+64], N[(t$95$0 * N[(N[Sin[N[(0.011111111111111112 * N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(N[Sin[1.5707963267948966], $MachinePrecision] * N[(N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \left|b\right| - \left|a\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 4.1 \cdot 10^{+64}:\\
\;\;\;\;t\_0 \cdot \left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot \left|angle\right|\right)\right) \cdot \left(\left|b\right| + \left|a\right|\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\sin 1.5707963267948966 \cdot \left(\left(\left|a\right| + \left|b\right|\right) \cdot t\_0\right)\right)\right)\right)\\
\end{array}
\end{array}
if angle < 4.0999999999999998e64Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-sin.f64N/A
lift-cos.f64N/A
2-sinN/A
count-2N/A
Applied rewrites58.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6468.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6468.6%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6468.6%
Applied rewrites68.6%
if 4.0999999999999998e64 < angle Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squaresN/A
associate-*l*N/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6468.3%
Applied rewrites68.1%
lift-cos.f64N/A
sin-+PI/2-revN/A
lower-sin.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-PI.f64N/A
mult-flipN/A
lower-*.f64N/A
metadata-eval67.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.6%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6467.5%
Applied rewrites67.5%
Evaluated real constant67.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.9%
Applied rewrites54.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (fabs angle))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 2.9e+283)
(*
(- (fabs b) (fabs a))
(* (sin (* 0.011111111111111112 t_0)) (+ (fabs b) (fabs a))))
(*
(* (* (fabs a) (fabs a)) (* t_0 -0.011111111111111112))
1.0)))))double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * fabs(angle);
double tmp;
if (fabs(angle) <= 2.9e+283) {
tmp = (fabs(b) - fabs(a)) * (sin((0.011111111111111112 * t_0)) * (fabs(b) + fabs(a)));
} else {
tmp = ((fabs(a) * fabs(a)) * (t_0 * -0.011111111111111112)) * 1.0;
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * Math.abs(angle);
double tmp;
if (Math.abs(angle) <= 2.9e+283) {
tmp = (Math.abs(b) - Math.abs(a)) * (Math.sin((0.011111111111111112 * t_0)) * (Math.abs(b) + Math.abs(a)));
} else {
tmp = ((Math.abs(a) * Math.abs(a)) * (t_0 * -0.011111111111111112)) * 1.0;
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.pi * math.fabs(angle) tmp = 0 if math.fabs(angle) <= 2.9e+283: tmp = (math.fabs(b) - math.fabs(a)) * (math.sin((0.011111111111111112 * t_0)) * (math.fabs(b) + math.fabs(a))) else: tmp = ((math.fabs(a) * math.fabs(a)) * (t_0 * -0.011111111111111112)) * 1.0 return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(pi * abs(angle)) tmp = 0.0 if (abs(angle) <= 2.9e+283) tmp = Float64(Float64(abs(b) - abs(a)) * Float64(sin(Float64(0.011111111111111112 * t_0)) * Float64(abs(b) + abs(a)))); else tmp = Float64(Float64(Float64(abs(a) * abs(a)) * Float64(t_0 * -0.011111111111111112)) * 1.0); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = pi * abs(angle); tmp = 0.0; if (abs(angle) <= 2.9e+283) tmp = (abs(b) - abs(a)) * (sin((0.011111111111111112 * t_0)) * (abs(b) + abs(a))); else tmp = ((abs(a) * abs(a)) * (t_0 * -0.011111111111111112)) * 1.0; end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 2.9e+283], N[(N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(0.011111111111111112 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Abs[a], $MachinePrecision] * N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * -0.011111111111111112), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \pi \cdot \left|angle\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 2.9 \cdot 10^{+283}:\\
\;\;\;\;\left(\left|b\right| - \left|a\right|\right) \cdot \left(\sin \left(0.011111111111111112 \cdot t\_0\right) \cdot \left(\left|b\right| + \left|a\right|\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left|a\right| \cdot \left|a\right|\right) \cdot \left(t\_0 \cdot -0.011111111111111112\right)\right) \cdot 1\\
\end{array}
\end{array}
if angle < 2.8999999999999999e283Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-sin.f64N/A
lift-cos.f64N/A
2-sinN/A
count-2N/A
Applied rewrites58.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6468.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6468.6%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6468.6%
Applied rewrites68.6%
if 2.8999999999999999e283 < angle Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6435.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.9%
Applied rewrites35.9%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 2.9e+283)
(*
(+ a (fabs b))
(*
(- (fabs b) a)
(sin (* (* (fabs angle) PI) 0.011111111111111112))))
(* (* (* a a) (* (* PI (fabs angle)) -0.011111111111111112)) 1.0))))double code(double a, double b, double angle) {
double tmp;
if (fabs(angle) <= 2.9e+283) {
tmp = (a + fabs(b)) * ((fabs(b) - a) * sin(((fabs(angle) * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = ((a * a) * ((((double) M_PI) * fabs(angle)) * -0.011111111111111112)) * 1.0;
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.abs(angle) <= 2.9e+283) {
tmp = (a + Math.abs(b)) * ((Math.abs(b) - a) * Math.sin(((Math.abs(angle) * Math.PI) * 0.011111111111111112)));
} else {
tmp = ((a * a) * ((Math.PI * Math.abs(angle)) * -0.011111111111111112)) * 1.0;
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(angle) <= 2.9e+283: tmp = (a + math.fabs(b)) * ((math.fabs(b) - a) * math.sin(((math.fabs(angle) * math.pi) * 0.011111111111111112))) else: tmp = ((a * a) * ((math.pi * math.fabs(angle)) * -0.011111111111111112)) * 1.0 return math.copysign(1.0, angle) * tmp
function code(a, b, angle) tmp = 0.0 if (abs(angle) <= 2.9e+283) tmp = Float64(Float64(a + abs(b)) * Float64(Float64(abs(b) - a) * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112)))); else tmp = Float64(Float64(Float64(a * a) * Float64(Float64(pi * abs(angle)) * -0.011111111111111112)) * 1.0); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(angle) <= 2.9e+283) tmp = (a + abs(b)) * ((abs(b) - a) * sin(((abs(angle) * pi) * 0.011111111111111112))); else tmp = ((a * a) * ((pi * abs(angle)) * -0.011111111111111112)) * 1.0; end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 2.9e+283], N[(N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * a), $MachinePrecision] * N[(N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 2.9 \cdot 10^{+283}:\\
\;\;\;\;\left(a + \left|b\right|\right) \cdot \left(\left(\left|b\right| - a\right) \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(a \cdot a\right) \cdot \left(\left(\pi \cdot \left|angle\right|\right) \cdot -0.011111111111111112\right)\right) \cdot 1\\
\end{array}
if angle < 2.8999999999999999e283Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-sin.f64N/A
lift-cos.f64N/A
2-sinN/A
count-2N/A
Applied rewrites68.6%
if 2.8999999999999999e283 < angle Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6435.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.9%
Applied rewrites35.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (pow (fabs b) 2.0) (pow (fabs a) 2.0)))
(t_1 (- (fabs b) (fabs a))))
(if (<= t_0 (- INFINITY))
(*
(* (* (* (* PI angle) (fabs a)) (fabs a)) -0.011111111111111112)
1.0)
(if (<= t_0 2e+122)
(*
(* t_1 (+ (fabs a) (fabs b)))
(sin (* (* 0.011111111111111112 PI) angle)))
(*
t_1
(* (sin (* 0.011111111111111112 (* PI angle))) (fabs b)))))))double code(double a, double b, double angle) {
double t_0 = pow(fabs(b), 2.0) - pow(fabs(a), 2.0);
double t_1 = fabs(b) - fabs(a);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = ((((((double) M_PI) * angle) * fabs(a)) * fabs(a)) * -0.011111111111111112) * 1.0;
} else if (t_0 <= 2e+122) {
tmp = (t_1 * (fabs(a) + fabs(b))) * sin(((0.011111111111111112 * ((double) M_PI)) * angle));
} else {
tmp = t_1 * (sin((0.011111111111111112 * (((double) M_PI) * angle))) * fabs(b));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0);
double t_1 = Math.abs(b) - Math.abs(a);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = ((((Math.PI * angle) * Math.abs(a)) * Math.abs(a)) * -0.011111111111111112) * 1.0;
} else if (t_0 <= 2e+122) {
tmp = (t_1 * (Math.abs(a) + Math.abs(b))) * Math.sin(((0.011111111111111112 * Math.PI) * angle));
} else {
tmp = t_1 * (Math.sin((0.011111111111111112 * (Math.PI * angle))) * Math.abs(b));
}
return tmp;
}
def code(a, b, angle): t_0 = math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0) t_1 = math.fabs(b) - math.fabs(a) tmp = 0 if t_0 <= -math.inf: tmp = ((((math.pi * angle) * math.fabs(a)) * math.fabs(a)) * -0.011111111111111112) * 1.0 elif t_0 <= 2e+122: tmp = (t_1 * (math.fabs(a) + math.fabs(b))) * math.sin(((0.011111111111111112 * math.pi) * angle)) else: tmp = t_1 * (math.sin((0.011111111111111112 * (math.pi * angle))) * math.fabs(b)) return tmp
function code(a, b, angle) t_0 = Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0)) t_1 = Float64(abs(b) - abs(a)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(Float64(Float64(Float64(pi * angle) * abs(a)) * abs(a)) * -0.011111111111111112) * 1.0); elseif (t_0 <= 2e+122) tmp = Float64(Float64(t_1 * Float64(abs(a) + abs(b))) * sin(Float64(Float64(0.011111111111111112 * pi) * angle))); else tmp = Float64(t_1 * Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle))) * abs(b))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (abs(b) ^ 2.0) - (abs(a) ^ 2.0); t_1 = abs(b) - abs(a); tmp = 0.0; if (t_0 <= -Inf) tmp = ((((pi * angle) * abs(a)) * abs(a)) * -0.011111111111111112) * 1.0; elseif (t_0 <= 2e+122) tmp = (t_1 * (abs(a) + abs(b))) * sin(((0.011111111111111112 * pi) * angle)); else tmp = t_1 * (sin((0.011111111111111112 * (pi * angle))) * abs(b)); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(N[(N[(N[(Pi * angle), $MachinePrecision] * N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[Abs[a], $MachinePrecision]), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$0, 2e+122], N[(N[(t$95$1 * N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := {\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\\
t_1 := \left|b\right| - \left|a\right|\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(\left(\left(\left(\pi \cdot angle\right) \cdot \left|a\right|\right) \cdot \left|a\right|\right) \cdot -0.011111111111111112\right) \cdot 1\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+122}:\\
\;\;\;\;\left(t\_1 \cdot \left(\left|a\right| + \left|b\right|\right)\right) \cdot \sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left|b\right|\right)\\
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.9%
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6439.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.5%
Applied rewrites39.5%
if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e122Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-sin.f64N/A
lift-cos.f64N/A
2-sinN/A
count-2N/A
Applied rewrites58.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6458.6%
Applied rewrites58.6%
if 2e122 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-sin.f64N/A
lift-cos.f64N/A
2-sinN/A
count-2N/A
Applied rewrites58.7%
Taylor expanded in a around 0
Applied rewrites38.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6442.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f6442.4%
Applied rewrites42.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (pow (fabs b) 2.0) (pow (fabs a) 2.0)))
(t_1 (- (fabs b) (fabs a))))
(if (<= t_0 -2e+304)
(*
(* (* (* (* PI angle) (fabs a)) (fabs a)) -0.011111111111111112)
1.0)
(if (<= t_0 5e-13)
(*
(* t_1 (+ (fabs a) (fabs b)))
(sin (* (* 0.011111111111111112 angle) PI)))
(*
(* (sin (* 0.011111111111111112 (* PI angle))) t_1)
(fabs b))))))double code(double a, double b, double angle) {
double t_0 = pow(fabs(b), 2.0) - pow(fabs(a), 2.0);
double t_1 = fabs(b) - fabs(a);
double tmp;
if (t_0 <= -2e+304) {
tmp = ((((((double) M_PI) * angle) * fabs(a)) * fabs(a)) * -0.011111111111111112) * 1.0;
} else if (t_0 <= 5e-13) {
tmp = (t_1 * (fabs(a) + fabs(b))) * sin(((0.011111111111111112 * angle) * ((double) M_PI)));
} else {
tmp = (sin((0.011111111111111112 * (((double) M_PI) * angle))) * t_1) * fabs(b);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0);
double t_1 = Math.abs(b) - Math.abs(a);
double tmp;
if (t_0 <= -2e+304) {
tmp = ((((Math.PI * angle) * Math.abs(a)) * Math.abs(a)) * -0.011111111111111112) * 1.0;
} else if (t_0 <= 5e-13) {
tmp = (t_1 * (Math.abs(a) + Math.abs(b))) * Math.sin(((0.011111111111111112 * angle) * Math.PI));
} else {
tmp = (Math.sin((0.011111111111111112 * (Math.PI * angle))) * t_1) * Math.abs(b);
}
return tmp;
}
def code(a, b, angle): t_0 = math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0) t_1 = math.fabs(b) - math.fabs(a) tmp = 0 if t_0 <= -2e+304: tmp = ((((math.pi * angle) * math.fabs(a)) * math.fabs(a)) * -0.011111111111111112) * 1.0 elif t_0 <= 5e-13: tmp = (t_1 * (math.fabs(a) + math.fabs(b))) * math.sin(((0.011111111111111112 * angle) * math.pi)) else: tmp = (math.sin((0.011111111111111112 * (math.pi * angle))) * t_1) * math.fabs(b) return tmp
function code(a, b, angle) t_0 = Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0)) t_1 = Float64(abs(b) - abs(a)) tmp = 0.0 if (t_0 <= -2e+304) tmp = Float64(Float64(Float64(Float64(Float64(pi * angle) * abs(a)) * abs(a)) * -0.011111111111111112) * 1.0); elseif (t_0 <= 5e-13) tmp = Float64(Float64(t_1 * Float64(abs(a) + abs(b))) * sin(Float64(Float64(0.011111111111111112 * angle) * pi))); else tmp = Float64(Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle))) * t_1) * abs(b)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = (abs(b) ^ 2.0) - (abs(a) ^ 2.0); t_1 = abs(b) - abs(a); tmp = 0.0; if (t_0 <= -2e+304) tmp = ((((pi * angle) * abs(a)) * abs(a)) * -0.011111111111111112) * 1.0; elseif (t_0 <= 5e-13) tmp = (t_1 * (abs(a) + abs(b))) * sin(((0.011111111111111112 * angle) * pi)); else tmp = (sin((0.011111111111111112 * (pi * angle))) * t_1) * abs(b); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+304], N[(N[(N[(N[(N[(Pi * angle), $MachinePrecision] * N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[Abs[a], $MachinePrecision]), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$0, 5e-13], N[(N[(t$95$1 * N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(0.011111111111111112 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := {\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\\
t_1 := \left|b\right| - \left|a\right|\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+304}:\\
\;\;\;\;\left(\left(\left(\left(\pi \cdot angle\right) \cdot \left|a\right|\right) \cdot \left|a\right|\right) \cdot -0.011111111111111112\right) \cdot 1\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-13}:\\
\;\;\;\;\left(t\_1 \cdot \left(\left|a\right| + \left|b\right|\right)\right) \cdot \sin \left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot t\_1\right) \cdot \left|b\right|\\
\end{array}
if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -1.9999999999999999e304Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.9%
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6439.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.5%
Applied rewrites39.5%
if -1.9999999999999999e304 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.9999999999999999e-13Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-sin.f64N/A
lift-cos.f64N/A
2-sinN/A
count-2N/A
Applied rewrites58.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6458.5%
Applied rewrites58.5%
if 4.9999999999999999e-13 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-sin.f64N/A
lift-cos.f64N/A
2-sinN/A
count-2N/A
Applied rewrites58.7%
Taylor expanded in a around 0
Applied rewrites38.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6442.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f6442.4%
Applied rewrites42.4%
(FPCore (a b angle)
:precision binary64
(if (<= (* 2.0 (- (pow (fabs b) 2.0) (pow (fabs a) 2.0))) -1e-80)
(*
(* (* (* (* PI angle) (fabs a)) (fabs a)) -0.011111111111111112)
1.0)
(*
(*
(sin (* 0.011111111111111112 (* PI angle)))
(- (fabs b) (fabs a)))
(fabs b))))double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) <= -1e-80) {
tmp = ((((((double) M_PI) * angle) * fabs(a)) * fabs(a)) * -0.011111111111111112) * 1.0;
} else {
tmp = (sin((0.011111111111111112 * (((double) M_PI) * angle))) * (fabs(b) - fabs(a))) * fabs(b);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0))) <= -1e-80) {
tmp = ((((Math.PI * angle) * Math.abs(a)) * Math.abs(a)) * -0.011111111111111112) * 1.0;
} else {
tmp = (Math.sin((0.011111111111111112 * (Math.PI * angle))) * (Math.abs(b) - Math.abs(a))) * Math.abs(b);
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0))) <= -1e-80: tmp = ((((math.pi * angle) * math.fabs(a)) * math.fabs(a)) * -0.011111111111111112) * 1.0 else: tmp = (math.sin((0.011111111111111112 * (math.pi * angle))) * (math.fabs(b) - math.fabs(a))) * math.fabs(b) return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= -1e-80) tmp = Float64(Float64(Float64(Float64(Float64(pi * angle) * abs(a)) * abs(a)) * -0.011111111111111112) * 1.0); else tmp = Float64(Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle))) * Float64(abs(b) - abs(a))) * abs(b)); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= -1e-80) tmp = ((((pi * angle) * abs(a)) * abs(a)) * -0.011111111111111112) * 1.0; else tmp = (sin((0.011111111111111112 * (pi * angle))) * (abs(b) - abs(a))) * abs(b); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[N[Abs[b], $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-80], N[(N[(N[(N[(N[(Pi * angle), $MachinePrecision] * N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[Abs[a], $MachinePrecision]), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right) \leq -1 \cdot 10^{-80}:\\
\;\;\;\;\left(\left(\left(\left(\pi \cdot angle\right) \cdot \left|a\right|\right) \cdot \left|a\right|\right) \cdot -0.011111111111111112\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\left|b\right| - \left|a\right|\right)\right) \cdot \left|b\right|\\
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -9.9999999999999996e-81Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.9%
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6439.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.5%
Applied rewrites39.5%
if -9.9999999999999996e-81 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-sin.f64N/A
lift-cos.f64N/A
2-sinN/A
count-2N/A
Applied rewrites58.7%
Taylor expanded in a around 0
Applied rewrites38.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6442.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f6442.4%
Applied rewrites42.4%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 2.0 (- (pow b 2.0) (pow a 2.0))))
(t_1
(* (* (* (* (* PI angle) a) a) -0.011111111111111112) 1.0)))
(if (<= t_0 -1e-80)
t_1
(if (<= t_0 INFINITY)
(* (sin (* 0.011111111111111112 (* PI angle))) (* b b))
t_1))))double code(double a, double b, double angle) {
double t_0 = 2.0 * (pow(b, 2.0) - pow(a, 2.0));
double t_1 = ((((((double) M_PI) * angle) * a) * a) * -0.011111111111111112) * 1.0;
double tmp;
if (t_0 <= -1e-80) {
tmp = t_1;
} else if (t_0 <= ((double) INFINITY)) {
tmp = sin((0.011111111111111112 * (((double) M_PI) * angle))) * (b * b);
} else {
tmp = t_1;
}
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 t_1 = ((((Math.PI * angle) * a) * a) * -0.011111111111111112) * 1.0;
double tmp;
if (t_0 <= -1e-80) {
tmp = t_1;
} else if (t_0 <= Double.POSITIVE_INFINITY) {
tmp = Math.sin((0.011111111111111112 * (Math.PI * angle))) * (b * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(a, b, angle): t_0 = 2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0)) t_1 = ((((math.pi * angle) * a) * a) * -0.011111111111111112) * 1.0 tmp = 0 if t_0 <= -1e-80: tmp = t_1 elif t_0 <= math.inf: tmp = math.sin((0.011111111111111112 * (math.pi * angle))) * (b * b) else: tmp = t_1 return tmp
function code(a, b, angle) t_0 = Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) t_1 = Float64(Float64(Float64(Float64(Float64(pi * angle) * a) * a) * -0.011111111111111112) * 1.0) tmp = 0.0 if (t_0 <= -1e-80) tmp = t_1; elseif (t_0 <= Inf) tmp = Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle))) * Float64(b * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(a, b, angle) t_0 = 2.0 * ((b ^ 2.0) - (a ^ 2.0)); t_1 = ((((pi * angle) * a) * a) * -0.011111111111111112) * 1.0; tmp = 0.0; if (t_0 <= -1e-80) tmp = t_1; elseif (t_0 <= Inf) tmp = sin((0.011111111111111112 * (pi * angle))) * (b * b); else tmp = t_1; 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]}, Block[{t$95$1 = N[(N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * 1.0), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-80], t$95$1, If[LessEqual[t$95$0, Infinity], N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\
t_1 := \left(\left(\left(\left(\pi \cdot angle\right) \cdot a\right) \cdot a\right) \cdot -0.011111111111111112\right) \cdot 1\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -9.9999999999999996e-81 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 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.9%
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6439.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.5%
Applied rewrites39.5%
if -9.9999999999999996e-81 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0Initial program 54.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-sin.f64N/A
lift-cos.f64N/A
2-sinN/A
count-2N/A
Applied rewrites58.7%
Taylor expanded in a around 0
lower-pow.f6436.1%
Applied rewrites36.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6436.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6436.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6436.1%
lift-pow.f64N/A
unpow2N/A
lower-*.f6436.1%
Applied rewrites36.1%
(FPCore (a b angle) :precision binary64 (* (* (* (* (* PI angle) a) a) -0.011111111111111112) 1.0))
double code(double a, double b, double angle) {
return ((((((double) M_PI) * angle) * a) * a) * -0.011111111111111112) * 1.0;
}
public static double code(double a, double b, double angle) {
return ((((Math.PI * angle) * a) * a) * -0.011111111111111112) * 1.0;
}
def code(a, b, angle): return ((((math.pi * angle) * a) * a) * -0.011111111111111112) * 1.0
function code(a, b, angle) return Float64(Float64(Float64(Float64(Float64(pi * angle) * a) * a) * -0.011111111111111112) * 1.0) end
function tmp = code(a, b, angle) tmp = ((((pi * angle) * a) * a) * -0.011111111111111112) * 1.0; end
code[a_, b_, angle_] := N[(N[(N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * 1.0), $MachinePrecision]
\left(\left(\left(\left(\pi \cdot angle\right) \cdot a\right) \cdot a\right) \cdot -0.011111111111111112\right) \cdot 1
Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.9%
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6439.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.5%
Applied rewrites39.5%
(FPCore (a b angle) :precision binary64 (* (* (* (* -0.011111111111111112 (* a a)) PI) angle) 1.0))
double code(double a, double b, double angle) {
return (((-0.011111111111111112 * (a * a)) * ((double) M_PI)) * angle) * 1.0;
}
public static double code(double a, double b, double angle) {
return (((-0.011111111111111112 * (a * a)) * Math.PI) * angle) * 1.0;
}
def code(a, b, angle): return (((-0.011111111111111112 * (a * a)) * math.pi) * angle) * 1.0
function code(a, b, angle) return Float64(Float64(Float64(Float64(-0.011111111111111112 * Float64(a * a)) * pi) * angle) * 1.0) end
function tmp = code(a, b, angle) tmp = (((-0.011111111111111112 * (a * a)) * pi) * angle) * 1.0; end
code[a_, b_, angle_] := N[(N[(N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * 1.0), $MachinePrecision]
\left(\left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \pi\right) \cdot angle\right) \cdot 1
Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6435.9%
Applied rewrites35.9%
(FPCore (a b angle) :precision binary64 (* (* (* PI angle) (* -0.011111111111111112 (* a a))) 1.0))
double code(double a, double b, double angle) {
return ((((double) M_PI) * angle) * (-0.011111111111111112 * (a * a))) * 1.0;
}
public static double code(double a, double b, double angle) {
return ((Math.PI * angle) * (-0.011111111111111112 * (a * a))) * 1.0;
}
def code(a, b, angle): return ((math.pi * angle) * (-0.011111111111111112 * (a * a))) * 1.0
function code(a, b, angle) return Float64(Float64(Float64(pi * angle) * Float64(-0.011111111111111112 * Float64(a * a))) * 1.0) end
function tmp = code(a, b, angle) tmp = ((pi * angle) * (-0.011111111111111112 * (a * a))) * 1.0; end
code[a_, b_, angle_] := N[(N[(N[(Pi * angle), $MachinePrecision] * N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]
\left(\left(\pi \cdot angle\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right)\right) \cdot 1
Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6435.9%
Applied rewrites35.9%
(FPCore (a b angle) :precision binary64 (* (* (* a a) (* (* PI angle) -0.011111111111111112)) 1.0))
double code(double a, double b, double angle) {
return ((a * a) * ((((double) M_PI) * angle) * -0.011111111111111112)) * 1.0;
}
public static double code(double a, double b, double angle) {
return ((a * a) * ((Math.PI * angle) * -0.011111111111111112)) * 1.0;
}
def code(a, b, angle): return ((a * a) * ((math.pi * angle) * -0.011111111111111112)) * 1.0
function code(a, b, angle) return Float64(Float64(Float64(a * a) * Float64(Float64(pi * angle) * -0.011111111111111112)) * 1.0) end
function tmp = code(a, b, angle) tmp = ((a * a) * ((pi * angle) * -0.011111111111111112)) * 1.0; end
code[a_, b_, angle_] := N[(N[(N[(a * a), $MachinePrecision] * N[(N[(Pi * angle), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]
\left(\left(a \cdot a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot -0.011111111111111112\right)\right) \cdot 1
Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f6435.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.9%
Applied rewrites35.9%
(FPCore (a b angle) :precision binary64 (* (* -0.011111111111111112 (* (* (* a a) PI) angle)) 1.0))
double code(double a, double b, double angle) {
return (-0.011111111111111112 * (((a * a) * ((double) M_PI)) * angle)) * 1.0;
}
public static double code(double a, double b, double angle) {
return (-0.011111111111111112 * (((a * a) * Math.PI) * angle)) * 1.0;
}
def code(a, b, angle): return (-0.011111111111111112 * (((a * a) * math.pi) * angle)) * 1.0
function code(a, b, angle) return Float64(Float64(-0.011111111111111112 * Float64(Float64(Float64(a * a) * pi) * angle)) * 1.0) end
function tmp = code(a, b, angle) tmp = (-0.011111111111111112 * (((a * a) * pi) * angle)) * 1.0; end
code[a_, b_, angle_] := N[(N[(-0.011111111111111112 * N[(N[(N[(a * a), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]
\left(-0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot 1
Initial program 54.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6436.9%
Applied rewrites36.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
Applied rewrites35.9%
lift-pow.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6435.9%
Applied rewrites35.9%
herbie shell --seed 2025258
(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)))))