
(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 15 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 (* PI (/ (fabs angle) 180.0))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 1e+133)
(*
(*
(cos (* (* -0.005555555555555556 (fabs angle)) PI))
(* 2.0 (* (sin (/ (* PI (fabs angle)) 180.0)) (- b a))))
(+ b a))
(* (* (* 2.0 (fma (- a) a (* b b))) (sin t_0)) (cos t_0))))))double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (fabs(angle) / 180.0);
double tmp;
if (fabs(angle) <= 1e+133) {
tmp = (cos(((-0.005555555555555556 * fabs(angle)) * ((double) M_PI))) * (2.0 * (sin(((((double) M_PI) * fabs(angle)) / 180.0)) * (b - a)))) * (b + a);
} else {
tmp = ((2.0 * fma(-a, a, (b * b))) * sin(t_0)) * cos(t_0);
}
return copysign(1.0, angle) * tmp;
}
function code(a, b, angle) t_0 = Float64(pi * Float64(abs(angle) / 180.0)) tmp = 0.0 if (abs(angle) <= 1e+133) tmp = Float64(Float64(cos(Float64(Float64(-0.005555555555555556 * abs(angle)) * pi)) * Float64(2.0 * Float64(sin(Float64(Float64(pi * abs(angle)) / 180.0)) * Float64(b - a)))) * Float64(b + a)); else tmp = Float64(Float64(Float64(2.0 * fma(Float64(-a), a, Float64(b * b))) * sin(t_0)) * cos(t_0)); end return Float64(copysign(1.0, angle) * tmp) end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180.0), $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], 1e+133], N[(N[(N[Cos[N[(N[(-0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[((-a) * a + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \pi \cdot \frac{\left|angle\right|}{180}\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 10^{+133}:\\
\;\;\;\;\left(\cos \left(\left(-0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\right) \cdot \left(2 \cdot \left(\sin \left(\frac{\pi \cdot \left|angle\right|}{180}\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \left(b + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
\end{array}
\end{array}
if angle < 1e133Initial program 54.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites68.3%
Applied rewrites68.3%
lift-*.f64N/A
lift-*.f64N/A
metadata-evalN/A
mult-flipN/A
associate-*l/N/A
lift-*.f64N/A
lower-/.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
if 1e133 < angle Initial program 54.5%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6457.3%
lift-pow.f64N/A
unpow2N/A
lower-*.f6457.3%
Applied rewrites57.3%
(FPCore (a b angle) :precision binary64 (* (+ a b) (* (- b a) (sin (* (* 0.011111111111111112 angle) PI)))))
double code(double a, double b, double angle) {
return (a + b) * ((b - a) * sin(((0.011111111111111112 * angle) * ((double) M_PI))));
}
public static double code(double a, double b, double angle) {
return (a + b) * ((b - a) * Math.sin(((0.011111111111111112 * angle) * Math.PI)));
}
def code(a, b, angle): return (a + b) * ((b - a) * math.sin(((0.011111111111111112 * angle) * math.pi)))
function code(a, b, angle) return Float64(Float64(a + b) * Float64(Float64(b - a) * sin(Float64(Float64(0.011111111111111112 * angle) * pi)))) end
function tmp = code(a, b, angle) tmp = (a + b) * ((b - a) * sin(((0.011111111111111112 * angle) * pi))); end
code[a_, b_, angle_] := N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(0.011111111111111112 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right)\right)
Initial program 54.5%
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.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6468.3%
Applied rewrites68.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) a)) (t_1 (+ a (fabs b))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 1e-24)
(* (* (* (fabs angle) t_1) t_0) (* PI 0.011111111111111112))
(* (* t_0 t_1) (sin (* (* (fabs angle) PI) 0.011111111111111112)))))))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) <= 1e-24) {
tmp = ((fabs(angle) * t_1) * t_0) * (((double) M_PI) * 0.011111111111111112);
} else {
tmp = (t_0 * t_1) * sin(((fabs(angle) * ((double) M_PI)) * 0.011111111111111112));
}
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) <= 1e-24) {
tmp = ((Math.abs(angle) * t_1) * t_0) * (Math.PI * 0.011111111111111112);
} else {
tmp = (t_0 * t_1) * Math.sin(((Math.abs(angle) * Math.PI) * 0.011111111111111112));
}
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) <= 1e-24: tmp = ((math.fabs(angle) * t_1) * t_0) * (math.pi * 0.011111111111111112) else: tmp = (t_0 * t_1) * math.sin(((math.fabs(angle) * math.pi) * 0.011111111111111112)) 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) <= 1e-24) tmp = Float64(Float64(Float64(abs(angle) * t_1) * t_0) * Float64(pi * 0.011111111111111112)); else tmp = Float64(Float64(t_0 * t_1) * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112))); 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) <= 1e-24) tmp = ((abs(angle) * t_1) * t_0) * (pi * 0.011111111111111112); else tmp = (t_0 * t_1) * sin(((abs(angle) * pi) * 0.011111111111111112)); 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], 1e-24], N[(N[(N[(N[Abs[angle], $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * t$95$1), $MachinePrecision] * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 0.011111111111111112), $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 10^{-24}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot t\_1\right) \cdot t\_0\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot t\_1\right) \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot 0.011111111111111112\right)\\
\end{array}
\end{array}
if angle < 9.99999999999999924e-25Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
lower-*.f6462.8%
Applied rewrites62.8%
if 9.99999999999999924e-25 < angle Initial program 54.5%
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.2%
(FPCore (a b angle) :precision binary64 (* (- b a) (* (+ a b) (sin (* (* angle PI) 0.011111111111111112)))))
double code(double a, double b, double angle) {
return (b - a) * ((a + b) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
}
public static double code(double a, double b, double angle) {
return (b - a) * ((a + b) * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
}
def code(a, b, angle): return (b - a) * ((a + b) * math.sin(((angle * math.pi) * 0.011111111111111112)))
function code(a, b, angle) return Float64(Float64(b - a) * Float64(Float64(a + b) * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))) end
function tmp = code(a, b, angle) tmp = (b - a) * ((a + b) * sin(((angle * pi) * 0.011111111111111112))); end
code[a_, b_, angle_] := N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)
Initial program 54.5%
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.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6468.1%
lift-+.f64N/A
+-commutativeN/A
lift-+.f6468.1%
Applied rewrites68.1%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) (fabs b))))
(if (<= (fabs a) 2.6e-122)
(* t_0 (* (fabs b) (sin (* 0.011111111111111112 (* angle PI)))))
(* (* (* angle t_0) (- (fabs b) (fabs a))) (* PI 0.011111111111111112)))))double code(double a, double b, double angle) {
double t_0 = fabs(a) + fabs(b);
double tmp;
if (fabs(a) <= 2.6e-122) {
tmp = t_0 * (fabs(b) * sin((0.011111111111111112 * (angle * ((double) M_PI)))));
} else {
tmp = ((angle * t_0) * (fabs(b) - fabs(a))) * (((double) M_PI) * 0.011111111111111112);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(a) + Math.abs(b);
double tmp;
if (Math.abs(a) <= 2.6e-122) {
tmp = t_0 * (Math.abs(b) * Math.sin((0.011111111111111112 * (angle * Math.PI))));
} else {
tmp = ((angle * t_0) * (Math.abs(b) - Math.abs(a))) * (Math.PI * 0.011111111111111112);
}
return tmp;
}
def code(a, b, angle): t_0 = math.fabs(a) + math.fabs(b) tmp = 0 if math.fabs(a) <= 2.6e-122: tmp = t_0 * (math.fabs(b) * math.sin((0.011111111111111112 * (angle * math.pi)))) else: tmp = ((angle * t_0) * (math.fabs(b) - math.fabs(a))) * (math.pi * 0.011111111111111112) return tmp
function code(a, b, angle) t_0 = Float64(abs(a) + abs(b)) tmp = 0.0 if (abs(a) <= 2.6e-122) tmp = Float64(t_0 * Float64(abs(b) * sin(Float64(0.011111111111111112 * Float64(angle * pi))))); else tmp = Float64(Float64(Float64(angle * t_0) * Float64(abs(b) - abs(a))) * Float64(pi * 0.011111111111111112)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = abs(a) + abs(b); tmp = 0.0; if (abs(a) <= 2.6e-122) tmp = t_0 * (abs(b) * sin((0.011111111111111112 * (angle * pi)))); else tmp = ((angle * t_0) * (abs(b) - abs(a))) * (pi * 0.011111111111111112); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 2.6e-122], N[(t$95$0 * N[(N[Abs[b], $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(angle * t$95$0), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|a\right| + \left|b\right|\\
\mathbf{if}\;\left|a\right| \leq 2.6 \cdot 10^{-122}:\\
\;\;\;\;t\_0 \cdot \left(\left|b\right| \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(angle \cdot t\_0\right) \cdot \left(\left|b\right| - \left|a\right|\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
\end{array}
if a < 2.59999999999999975e-122Initial program 54.5%
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.1%
Taylor expanded in a around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.2%
Applied rewrites42.2%
if 2.59999999999999975e-122 < a Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
lower-*.f6462.8%
Applied rewrites62.8%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) (fabs a)))
(t_1 (* (fabs angle) (+ (fabs a) (fabs b)))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 5e+121)
(* (* t_1 t_0) (* PI 0.011111111111111112))
(if (<= (fabs angle) 1.85e+194)
(log (exp (* (* 0.011111111111111112 PI) (* t_1 (fabs b)))))
(*
0.011111111111111112
(*
(fabs angle)
(log (pow (exp PI) (* t_0 (+ (fabs b) (fabs a))))))))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - fabs(a);
double t_1 = fabs(angle) * (fabs(a) + fabs(b));
double tmp;
if (fabs(angle) <= 5e+121) {
tmp = (t_1 * t_0) * (((double) M_PI) * 0.011111111111111112);
} else if (fabs(angle) <= 1.85e+194) {
tmp = log(exp(((0.011111111111111112 * ((double) M_PI)) * (t_1 * fabs(b)))));
} else {
tmp = 0.011111111111111112 * (fabs(angle) * log(pow(exp(((double) M_PI)), (t_0 * (fabs(b) + fabs(a))))));
}
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 t_1 = Math.abs(angle) * (Math.abs(a) + Math.abs(b));
double tmp;
if (Math.abs(angle) <= 5e+121) {
tmp = (t_1 * t_0) * (Math.PI * 0.011111111111111112);
} else if (Math.abs(angle) <= 1.85e+194) {
tmp = Math.log(Math.exp(((0.011111111111111112 * Math.PI) * (t_1 * Math.abs(b)))));
} else {
tmp = 0.011111111111111112 * (Math.abs(angle) * Math.log(Math.pow(Math.exp(Math.PI), (t_0 * (Math.abs(b) + Math.abs(a))))));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - math.fabs(a) t_1 = math.fabs(angle) * (math.fabs(a) + math.fabs(b)) tmp = 0 if math.fabs(angle) <= 5e+121: tmp = (t_1 * t_0) * (math.pi * 0.011111111111111112) elif math.fabs(angle) <= 1.85e+194: tmp = math.log(math.exp(((0.011111111111111112 * math.pi) * (t_1 * math.fabs(b))))) else: tmp = 0.011111111111111112 * (math.fabs(angle) * math.log(math.pow(math.exp(math.pi), (t_0 * (math.fabs(b) + math.fabs(a)))))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - abs(a)) t_1 = Float64(abs(angle) * Float64(abs(a) + abs(b))) tmp = 0.0 if (abs(angle) <= 5e+121) tmp = Float64(Float64(t_1 * t_0) * Float64(pi * 0.011111111111111112)); elseif (abs(angle) <= 1.85e+194) tmp = log(exp(Float64(Float64(0.011111111111111112 * pi) * Float64(t_1 * abs(b))))); else tmp = Float64(0.011111111111111112 * Float64(abs(angle) * log((exp(pi) ^ Float64(t_0 * Float64(abs(b) + abs(a))))))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - abs(a); t_1 = abs(angle) * (abs(a) + abs(b)); tmp = 0.0; if (abs(angle) <= 5e+121) tmp = (t_1 * t_0) * (pi * 0.011111111111111112); elseif (abs(angle) <= 1.85e+194) tmp = log(exp(((0.011111111111111112 * pi) * (t_1 * abs(b))))); else tmp = 0.011111111111111112 * (abs(angle) * log((exp(pi) ^ (t_0 * (abs(b) + abs(a)))))); 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]}, Block[{t$95$1 = N[(N[Abs[angle], $MachinePrecision] * N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $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], 5e+121], N[(N[(t$95$1 * t$95$0), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 1.85e+194], N[Log[N[Exp[N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * N[(t$95$1 * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(0.011111111111111112 * N[(N[Abs[angle], $MachinePrecision] * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], N[(t$95$0 * N[(N[Abs[b], $MachinePrecision] + N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|b\right| - \left|a\right|\\
t_1 := \left|angle\right| \cdot \left(\left|a\right| + \left|b\right|\right)\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{+121}:\\
\;\;\;\;\left(t\_1 \cdot t\_0\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;\left|angle\right| \leq 1.85 \cdot 10^{+194}:\\
\;\;\;\;\log \left(e^{\left(0.011111111111111112 \cdot \pi\right) \cdot \left(t\_1 \cdot \left|b\right|\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left|angle\right| \cdot \log \left({\left(e^{\pi}\right)}^{\left(t\_0 \cdot \left(\left|b\right| + \left|a\right|\right)\right)}\right)\right)\\
\end{array}
\end{array}
if angle < 5.00000000000000007e121Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
lower-*.f6462.8%
Applied rewrites62.8%
if 5.00000000000000007e121 < angle < 1.8500000000000001e194Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
Taylor expanded in a around 0
Applied rewrites37.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lift-PI.f64N/A
pow-expN/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lower-exp.f6431.3%
Applied rewrites31.3%
if 1.8500000000000001e194 < angle Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lower-pow.f64N/A
lift-PI.f64N/A
lower-exp.f6432.1%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6435.7%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6435.7%
Applied rewrites35.7%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) (fabs a)))
(t_1 (* (fabs angle) (+ (fabs a) (fabs b)))))
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 5e+121)
(* (* t_1 t_0) (* PI 0.011111111111111112))
(if (<= (fabs angle) 1.95e+194)
(log (exp (* (* 0.011111111111111112 PI) (* t_1 (fabs b)))))
(*
0.011111111111111112
(* (* (fabs angle) (* t_0 (+ (fabs b) (fabs a)))) PI)))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - fabs(a);
double t_1 = fabs(angle) * (fabs(a) + fabs(b));
double tmp;
if (fabs(angle) <= 5e+121) {
tmp = (t_1 * t_0) * (((double) M_PI) * 0.011111111111111112);
} else if (fabs(angle) <= 1.95e+194) {
tmp = log(exp(((0.011111111111111112 * ((double) M_PI)) * (t_1 * fabs(b)))));
} else {
tmp = 0.011111111111111112 * ((fabs(angle) * (t_0 * (fabs(b) + fabs(a)))) * ((double) M_PI));
}
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 t_1 = Math.abs(angle) * (Math.abs(a) + Math.abs(b));
double tmp;
if (Math.abs(angle) <= 5e+121) {
tmp = (t_1 * t_0) * (Math.PI * 0.011111111111111112);
} else if (Math.abs(angle) <= 1.95e+194) {
tmp = Math.log(Math.exp(((0.011111111111111112 * Math.PI) * (t_1 * Math.abs(b)))));
} else {
tmp = 0.011111111111111112 * ((Math.abs(angle) * (t_0 * (Math.abs(b) + Math.abs(a)))) * Math.PI);
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - math.fabs(a) t_1 = math.fabs(angle) * (math.fabs(a) + math.fabs(b)) tmp = 0 if math.fabs(angle) <= 5e+121: tmp = (t_1 * t_0) * (math.pi * 0.011111111111111112) elif math.fabs(angle) <= 1.95e+194: tmp = math.log(math.exp(((0.011111111111111112 * math.pi) * (t_1 * math.fabs(b))))) else: tmp = 0.011111111111111112 * ((math.fabs(angle) * (t_0 * (math.fabs(b) + math.fabs(a)))) * math.pi) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - abs(a)) t_1 = Float64(abs(angle) * Float64(abs(a) + abs(b))) tmp = 0.0 if (abs(angle) <= 5e+121) tmp = Float64(Float64(t_1 * t_0) * Float64(pi * 0.011111111111111112)); elseif (abs(angle) <= 1.95e+194) tmp = log(exp(Float64(Float64(0.011111111111111112 * pi) * Float64(t_1 * abs(b))))); else tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * Float64(t_0 * Float64(abs(b) + abs(a)))) * pi)); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - abs(a); t_1 = abs(angle) * (abs(a) + abs(b)); tmp = 0.0; if (abs(angle) <= 5e+121) tmp = (t_1 * t_0) * (pi * 0.011111111111111112); elseif (abs(angle) <= 1.95e+194) tmp = log(exp(((0.011111111111111112 * pi) * (t_1 * abs(b))))); else tmp = 0.011111111111111112 * ((abs(angle) * (t_0 * (abs(b) + abs(a)))) * pi); 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]}, Block[{t$95$1 = N[(N[Abs[angle], $MachinePrecision] * N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $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], 5e+121], N[(N[(t$95$1 * t$95$0), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 1.95e+194], N[Log[N[Exp[N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * N[(t$95$1 * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(t$95$0 * N[(N[Abs[b], $MachinePrecision] + N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|b\right| - \left|a\right|\\
t_1 := \left|angle\right| \cdot \left(\left|a\right| + \left|b\right|\right)\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{+121}:\\
\;\;\;\;\left(t\_1 \cdot t\_0\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
\mathbf{elif}\;\left|angle\right| \leq 1.95 \cdot 10^{+194}:\\
\;\;\;\;\log \left(e^{\left(0.011111111111111112 \cdot \pi\right) \cdot \left(t\_1 \cdot \left|b\right|\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \left(t\_0 \cdot \left(\left|b\right| + \left|a\right|\right)\right)\right) \cdot \pi\right)\\
\end{array}
\end{array}
if angle < 5.00000000000000007e121Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
lower-*.f6462.8%
Applied rewrites62.8%
if 5.00000000000000007e121 < angle < 1.95000000000000008e194Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
Taylor expanded in a around 0
Applied rewrites37.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-PI.f64N/A
add-log-expN/A
log-pow-revN/A
lower-log.f64N/A
lift-PI.f64N/A
pow-expN/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lower-exp.f6431.3%
Applied rewrites31.3%
if 1.95000000000000008e194 < angle Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
(FPCore (a b angle) :precision binary64 (* (* (* angle (+ a (fabs b))) (- (fabs b) a)) (* PI 0.011111111111111112)))
double code(double a, double b, double angle) {
return ((angle * (a + fabs(b))) * (fabs(b) - a)) * (((double) M_PI) * 0.011111111111111112);
}
public static double code(double a, double b, double angle) {
return ((angle * (a + Math.abs(b))) * (Math.abs(b) - a)) * (Math.PI * 0.011111111111111112);
}
def code(a, b, angle): return ((angle * (a + math.fabs(b))) * (math.fabs(b) - a)) * (math.pi * 0.011111111111111112)
function code(a, b, angle) return Float64(Float64(Float64(angle * Float64(a + abs(b))) * Float64(abs(b) - a)) * Float64(pi * 0.011111111111111112)) end
function tmp = code(a, b, angle) tmp = ((angle * (a + abs(b))) * (abs(b) - a)) * (pi * 0.011111111111111112); end
code[a_, b_, angle_] := N[(N[(N[(angle * N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]
\left(\left(angle \cdot \left(a + \left|b\right|\right)\right) \cdot \left(\left|b\right| - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)
Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
lower-*.f6462.8%
Applied rewrites62.8%
(FPCore (a b angle) :precision binary64 (* (* (* 0.011111111111111112 (* (- (fabs b) a) angle)) (+ a (fabs b))) PI))
double code(double a, double b, double angle) {
return ((0.011111111111111112 * ((fabs(b) - a) * angle)) * (a + fabs(b))) * ((double) M_PI);
}
public static double code(double a, double b, double angle) {
return ((0.011111111111111112 * ((Math.abs(b) - a) * angle)) * (a + Math.abs(b))) * Math.PI;
}
def code(a, b, angle): return ((0.011111111111111112 * ((math.fabs(b) - a) * angle)) * (a + math.fabs(b))) * math.pi
function code(a, b, angle) return Float64(Float64(Float64(0.011111111111111112 * Float64(Float64(abs(b) - a) * angle)) * Float64(a + abs(b))) * pi) end
function tmp = code(a, b, angle) tmp = ((0.011111111111111112 * ((abs(b) - a) * angle)) * (a + abs(b))) * pi; end
code[a_, b_, angle_] := N[(N[(N[(0.011111111111111112 * N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision] * N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]
\left(\left(0.011111111111111112 \cdot \left(\left(\left|b\right| - a\right) \cdot angle\right)\right) \cdot \left(a + \left|b\right|\right)\right) \cdot \pi
Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.9%
lift-+.f64N/A
+-commutativeN/A
lift-+.f6462.9%
Applied rewrites62.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (/ (fabs angle) 180.0))))
(*
(copysign 1.0 angle)
(if (<=
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
1e+213)
(* (* (* 0.011111111111111112 (fabs angle)) (* (- b a) (+ b a))) PI)
(* (* (* (fabs angle) (+ a b)) b) (* 0.011111111111111112 PI))))))double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (fabs(angle) / 180.0);
double tmp;
if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= 1e+213) {
tmp = ((0.011111111111111112 * fabs(angle)) * ((b - a) * (b + a))) * ((double) M_PI);
} else {
tmp = ((fabs(angle) * (a + b)) * b) * (0.011111111111111112 * ((double) M_PI));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (Math.abs(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)) <= 1e+213) {
tmp = ((0.011111111111111112 * Math.abs(angle)) * ((b - a) * (b + a))) * Math.PI;
} else {
tmp = ((Math.abs(angle) * (a + b)) * b) * (0.011111111111111112 * Math.PI);
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.pi * (math.fabs(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)) <= 1e+213: tmp = ((0.011111111111111112 * math.fabs(angle)) * ((b - a) * (b + a))) * math.pi else: tmp = ((math.fabs(angle) * (a + b)) * b) * (0.011111111111111112 * math.pi) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(abs(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)) <= 1e+213) tmp = Float64(Float64(Float64(0.011111111111111112 * abs(angle)) * Float64(Float64(b - a) * Float64(b + a))) * pi); else tmp = Float64(Float64(Float64(abs(angle) * Float64(a + b)) * b) * Float64(0.011111111111111112 * pi)); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = pi * (abs(angle) / 180.0); tmp = 0.0; if ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 1e+213) tmp = ((0.011111111111111112 * abs(angle)) * ((b - a) * (b + a))) * pi; else tmp = ((abs(angle) * (a + b)) * b) * (0.011111111111111112 * pi); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $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], 1e+213], N[(N[(N[(0.011111111111111112 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \pi \cdot \frac{\left|angle\right|}{180}\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 10^{+213}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot \left|angle\right|\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(a + b\right)\right) \cdot b\right) \cdot \left(0.011111111111111112 \cdot \pi\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 9.99999999999999984e212Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.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-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
if 9.99999999999999984e212 < (*.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 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
Taylor expanded in a around 0
Applied rewrites37.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
*-commutativeN/A
lower-*.f6441.5%
Applied rewrites41.5%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (/ (fabs angle) 180.0))))
(*
(copysign 1.0 angle)
(if (<=
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
1e+213)
(* (* PI (fabs angle)) (* (* (- b a) (+ b a)) 0.011111111111111112))
(* (* (* (fabs angle) (+ a b)) b) (* 0.011111111111111112 PI))))))double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (fabs(angle) / 180.0);
double tmp;
if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= 1e+213) {
tmp = (((double) M_PI) * fabs(angle)) * (((b - a) * (b + a)) * 0.011111111111111112);
} else {
tmp = ((fabs(angle) * (a + b)) * b) * (0.011111111111111112 * ((double) M_PI));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (Math.abs(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)) <= 1e+213) {
tmp = (Math.PI * Math.abs(angle)) * (((b - a) * (b + a)) * 0.011111111111111112);
} else {
tmp = ((Math.abs(angle) * (a + b)) * b) * (0.011111111111111112 * Math.PI);
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.pi * (math.fabs(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)) <= 1e+213: tmp = (math.pi * math.fabs(angle)) * (((b - a) * (b + a)) * 0.011111111111111112) else: tmp = ((math.fabs(angle) * (a + b)) * b) * (0.011111111111111112 * math.pi) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(abs(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)) <= 1e+213) tmp = Float64(Float64(pi * abs(angle)) * Float64(Float64(Float64(b - a) * Float64(b + a)) * 0.011111111111111112)); else tmp = Float64(Float64(Float64(abs(angle) * Float64(a + b)) * b) * Float64(0.011111111111111112 * pi)); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = pi * (abs(angle) / 180.0); tmp = 0.0; if ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 1e+213) tmp = (pi * abs(angle)) * (((b - a) * (b + a)) * 0.011111111111111112); else tmp = ((abs(angle) * (a + b)) * b) * (0.011111111111111112 * pi); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $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], 1e+213], N[(N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \pi \cdot \frac{\left|angle\right|}{180}\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 10^{+213}:\\
\;\;\;\;\left(\pi \cdot \left|angle\right|\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(a + b\right)\right) \cdot b\right) \cdot \left(0.011111111111111112 \cdot \pi\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 9.99999999999999984e212Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6451.3%
Applied rewrites54.8%
if 9.99999999999999984e212 < (*.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 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
Taylor expanded in a around 0
Applied rewrites37.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
*-commutativeN/A
lower-*.f6441.5%
Applied rewrites41.5%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (/ (fabs angle) 180.0))))
(*
(copysign 1.0 angle)
(if (<=
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
1e+213)
(* 0.011111111111111112 (* (* (fabs angle) (* (- b a) (+ b a))) PI))
(* (* (* (fabs angle) (+ a b)) b) (* 0.011111111111111112 PI))))))double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (fabs(angle) / 180.0);
double tmp;
if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= 1e+213) {
tmp = 0.011111111111111112 * ((fabs(angle) * ((b - a) * (b + a))) * ((double) M_PI));
} else {
tmp = ((fabs(angle) * (a + b)) * b) * (0.011111111111111112 * ((double) M_PI));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (Math.abs(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)) <= 1e+213) {
tmp = 0.011111111111111112 * ((Math.abs(angle) * ((b - a) * (b + a))) * Math.PI);
} else {
tmp = ((Math.abs(angle) * (a + b)) * b) * (0.011111111111111112 * Math.PI);
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.pi * (math.fabs(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)) <= 1e+213: tmp = 0.011111111111111112 * ((math.fabs(angle) * ((b - a) * (b + a))) * math.pi) else: tmp = ((math.fabs(angle) * (a + b)) * b) * (0.011111111111111112 * math.pi) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(pi * Float64(abs(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)) <= 1e+213) tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * Float64(Float64(b - a) * Float64(b + a))) * pi)); else tmp = Float64(Float64(Float64(abs(angle) * Float64(a + b)) * b) * Float64(0.011111111111111112 * pi)); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = pi * (abs(angle) / 180.0); tmp = 0.0; if ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 1e+213) tmp = 0.011111111111111112 * ((abs(angle) * ((b - a) * (b + a))) * pi); else tmp = ((abs(angle) * (a + b)) * b) * (0.011111111111111112 * pi); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $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], 1e+213], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \pi \cdot \frac{\left|angle\right|}{180}\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 10^{+213}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(a + b\right)\right) \cdot b\right) \cdot \left(0.011111111111111112 \cdot \pi\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 9.99999999999999984e212Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
if 9.99999999999999984e212 < (*.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 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
Taylor expanded in a around 0
Applied rewrites37.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
*-commutativeN/A
lower-*.f6441.5%
Applied rewrites41.5%
(FPCore (a b angle) :precision binary64 (* (* (* angle (+ a b)) b) (* 0.011111111111111112 PI)))
double code(double a, double b, double angle) {
return ((angle * (a + b)) * b) * (0.011111111111111112 * ((double) M_PI));
}
public static double code(double a, double b, double angle) {
return ((angle * (a + b)) * b) * (0.011111111111111112 * Math.PI);
}
def code(a, b, angle): return ((angle * (a + b)) * b) * (0.011111111111111112 * math.pi)
function code(a, b, angle) return Float64(Float64(Float64(angle * Float64(a + b)) * b) * Float64(0.011111111111111112 * pi)) end
function tmp = code(a, b, angle) tmp = ((angle * (a + b)) * b) * (0.011111111111111112 * pi); end
code[a_, b_, angle_] := N[(N[(N[(angle * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]
\left(\left(angle \cdot \left(a + b\right)\right) \cdot b\right) \cdot \left(0.011111111111111112 \cdot \pi\right)
Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
Taylor expanded in a around 0
Applied rewrites37.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
*-commutativeN/A
lower-*.f6441.5%
Applied rewrites41.5%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* (* (* angle (+ a b)) b) PI)))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (((angle * (a + b)) * b) * ((double) M_PI));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (((angle * (a + b)) * b) * Math.PI);
}
def code(a, b, angle): return 0.011111111111111112 * (((angle * (a + b)) * b) * math.pi)
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(Float64(angle * Float64(a + b)) * b) * pi)) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (((angle * (a + b)) * b) * pi); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(N[(N[(angle * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]
0.011111111111111112 \cdot \left(\left(\left(angle \cdot \left(a + b\right)\right) \cdot b\right) \cdot \pi\right)
Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
Taylor expanded in a around 0
Applied rewrites37.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6441.5%
lift-+.f64N/A
+-commutativeN/A
lift-+.f6441.5%
Applied rewrites41.5%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* (* angle (* (fabs b) (+ (fabs b) a))) PI)))
double code(double a, double b, double angle) {
return 0.011111111111111112 * ((angle * (fabs(b) * (fabs(b) + a))) * ((double) M_PI));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * ((angle * (Math.abs(b) * (Math.abs(b) + a))) * Math.PI);
}
def code(a, b, angle): return 0.011111111111111112 * ((angle * (math.fabs(b) * (math.fabs(b) + a))) * math.pi)
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(angle * Float64(abs(b) * Float64(abs(b) + a))) * pi)) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * ((angle * (abs(b) * (abs(b) + a))) * pi); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(N[(angle * N[(N[Abs[b], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]
0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left|b\right| \cdot \left(\left|b\right| + a\right)\right)\right) \cdot \pi\right)
Initial program 54.5%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower--.f64N/A
lower-pow.f64N/A
lower-pow.f6451.2%
Applied rewrites51.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.2%
lift--.f64N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
difference-of-squares-revN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f6454.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6454.8%
Applied rewrites54.8%
Taylor expanded in a around 0
Applied rewrites37.5%
herbie shell --seed 2025187
(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)))))