
(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 (- (fabs b) a)) (t_1 (/ 180.0 (fabs angle))) (t_2 (+ a (fabs b))))
(*
(copysign 1.0 angle)
(if (<= (fabs b) 3.1e+51)
(*
(* t_2 (* t_0 (* (sin (/ 1.0 (/ t_1 PI))) 2.0)))
(cos (* PI (exp (* (log t_1) -1.0)))))
(*
(*
t_2
(*
t_0
(*
(sin (/ (* 0.005555555555555556 (fabs angle)) 0.3183098861837907))
2.0)))
(cos (* PI (/ (fabs angle) 180.0))))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - a;
double t_1 = 180.0 / fabs(angle);
double t_2 = a + fabs(b);
double tmp;
if (fabs(b) <= 3.1e+51) {
tmp = (t_2 * (t_0 * (sin((1.0 / (t_1 / ((double) M_PI)))) * 2.0))) * cos((((double) M_PI) * exp((log(t_1) * -1.0))));
} else {
tmp = (t_2 * (t_0 * (sin(((0.005555555555555556 * fabs(angle)) / 0.3183098861837907)) * 2.0))) * cos((((double) M_PI) * (fabs(angle) / 180.0)));
}
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 = 180.0 / Math.abs(angle);
double t_2 = a + Math.abs(b);
double tmp;
if (Math.abs(b) <= 3.1e+51) {
tmp = (t_2 * (t_0 * (Math.sin((1.0 / (t_1 / Math.PI))) * 2.0))) * Math.cos((Math.PI * Math.exp((Math.log(t_1) * -1.0))));
} else {
tmp = (t_2 * (t_0 * (Math.sin(((0.005555555555555556 * Math.abs(angle)) / 0.3183098861837907)) * 2.0))) * Math.cos((Math.PI * (Math.abs(angle) / 180.0)));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - a t_1 = 180.0 / math.fabs(angle) t_2 = a + math.fabs(b) tmp = 0 if math.fabs(b) <= 3.1e+51: tmp = (t_2 * (t_0 * (math.sin((1.0 / (t_1 / math.pi))) * 2.0))) * math.cos((math.pi * math.exp((math.log(t_1) * -1.0)))) else: tmp = (t_2 * (t_0 * (math.sin(((0.005555555555555556 * math.fabs(angle)) / 0.3183098861837907)) * 2.0))) * math.cos((math.pi * (math.fabs(angle) / 180.0))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - a) t_1 = Float64(180.0 / abs(angle)) t_2 = Float64(a + abs(b)) tmp = 0.0 if (abs(b) <= 3.1e+51) tmp = Float64(Float64(t_2 * Float64(t_0 * Float64(sin(Float64(1.0 / Float64(t_1 / pi))) * 2.0))) * cos(Float64(pi * exp(Float64(log(t_1) * -1.0))))); else tmp = Float64(Float64(t_2 * Float64(t_0 * Float64(sin(Float64(Float64(0.005555555555555556 * abs(angle)) / 0.3183098861837907)) * 2.0))) * cos(Float64(pi * Float64(abs(angle) / 180.0)))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - a; t_1 = 180.0 / abs(angle); t_2 = a + abs(b); tmp = 0.0; if (abs(b) <= 3.1e+51) tmp = (t_2 * (t_0 * (sin((1.0 / (t_1 / pi))) * 2.0))) * cos((pi * exp((log(t_1) * -1.0)))); else tmp = (t_2 * (t_0 * (sin(((0.005555555555555556 * abs(angle)) / 0.3183098861837907)) * 2.0))) * cos((pi * (abs(angle) / 180.0))); 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[(180.0 / 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[b], $MachinePrecision], 3.1e+51], N[(N[(t$95$2 * N[(t$95$0 * N[(N[Sin[N[(1.0 / N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[Exp[N[(N[Log[t$95$1], $MachinePrecision] * -1.0), $MachinePrecision]], $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] / 0.3183098861837907), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left|b\right| - a\\
t_1 := \frac{180}{\left|angle\right|}\\
t_2 := a + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 3.1 \cdot 10^{+51}:\\
\;\;\;\;\left(t\_2 \cdot \left(t\_0 \cdot \left(\sin \left(\frac{1}{\frac{t\_1}{\pi}}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot e^{\log t\_1 \cdot -1}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_2 \cdot \left(t\_0 \cdot \left(\sin \left(\frac{0.005555555555555556 \cdot \left|angle\right|}{0.3183098861837907}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{\left|angle\right|}{180}\right)\\
\end{array}
\end{array}
if b < 3.10000000000000011e51Initial program 54.5%
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-*.f6467.7
Applied rewrites67.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
metadata-evalN/A
mult-flip-revN/A
associate-/r/N/A
lift-/.f64N/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f6467.2
Applied rewrites67.2%
lift-/.f64N/A
div-flip-revN/A
lift-/.f64N/A
inv-powN/A
pow-to-expN/A
lower-unsound-exp.f64N/A
lower-unsound-*.f64N/A
lower-unsound-log.f6433.6
Applied rewrites33.6%
if 3.10000000000000011e51 < b Initial program 54.5%
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-*.f6467.7
Applied rewrites67.6%
lift-*.f64N/A
metadata-evalN/A
associate-/r/N/A
div-flip-revN/A
lift-/.f6467.7
Applied rewrites67.7%
lift-*.f64N/A
lift-/.f64N/A
div-flip-revN/A
lift-/.f64N/A
associate-/r/N/A
mult-flipN/A
associate-/r*N/A
lift-/.f64N/A
div-flip-revN/A
lift-/.f64N/A
lower-/.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6467.5
Applied rewrites67.5%
Evaluated real constant67.5%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) b)) (t_1 (- b (fabs a))))
(if (<= (fabs a) 6.8e+174)
(* t_0 (* t_1 (sin (* (* angle PI) 0.011111111111111112))))
(*
(* t_0 (* t_1 (* 0.011111111111111112 (* angle PI))))
(cos (* PI (* angle 0.005555555555555556)))))))double code(double a, double b, double angle) {
double t_0 = fabs(a) + b;
double t_1 = b - fabs(a);
double tmp;
if (fabs(a) <= 6.8e+174) {
tmp = t_0 * (t_1 * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = (t_0 * (t_1 * (0.011111111111111112 * (angle * ((double) M_PI))))) * cos((((double) M_PI) * (angle * 0.005555555555555556)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(a) + b;
double t_1 = b - Math.abs(a);
double tmp;
if (Math.abs(a) <= 6.8e+174) {
tmp = t_0 * (t_1 * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
} else {
tmp = (t_0 * (t_1 * (0.011111111111111112 * (angle * Math.PI)))) * Math.cos((Math.PI * (angle * 0.005555555555555556)));
}
return tmp;
}
def code(a, b, angle): t_0 = math.fabs(a) + b t_1 = b - math.fabs(a) tmp = 0 if math.fabs(a) <= 6.8e+174: tmp = t_0 * (t_1 * math.sin(((angle * math.pi) * 0.011111111111111112))) else: tmp = (t_0 * (t_1 * (0.011111111111111112 * (angle * math.pi)))) * math.cos((math.pi * (angle * 0.005555555555555556))) return tmp
function code(a, b, angle) t_0 = Float64(abs(a) + b) t_1 = Float64(b - abs(a)) tmp = 0.0 if (abs(a) <= 6.8e+174) tmp = Float64(t_0 * Float64(t_1 * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))); else tmp = Float64(Float64(t_0 * Float64(t_1 * Float64(0.011111111111111112 * Float64(angle * pi)))) * cos(Float64(pi * Float64(angle * 0.005555555555555556)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = abs(a) + b; t_1 = b - abs(a); tmp = 0.0; if (abs(a) <= 6.8e+174) tmp = t_0 * (t_1 * sin(((angle * pi) * 0.011111111111111112))); else tmp = (t_0 * (t_1 * (0.011111111111111112 * (angle * pi)))) * cos((pi * (angle * 0.005555555555555556))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$1 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 6.8e+174], N[(t$95$0 * N[(t$95$1 * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[(t$95$1 * N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left|a\right| + b\\
t_1 := b - \left|a\right|\\
\mathbf{if}\;\left|a\right| \leq 6.8 \cdot 10^{+174}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot \left(t\_1 \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\
\end{array}
if a < 6.8000000000000002e174Initial 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 rewrites67.5%
if 6.8000000000000002e174 < a Initial program 54.5%
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-*.f6467.7
Applied rewrites67.6%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6463.0
Applied rewrites63.0%
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
lower-*.f6462.7
Applied rewrites62.7%
(FPCore (a b angle)
:precision binary64
(*
(*
(+ a b)
(*
(- b a)
(* (sin (/ (* 0.005555555555555556 angle) 0.3183098861837907)) 2.0)))
(cos (* PI (/ angle 180.0)))))double code(double a, double b, double angle) {
return ((a + b) * ((b - a) * (sin(((0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * cos((((double) M_PI) * (angle / 180.0)));
}
public static double code(double a, double b, double angle) {
return ((a + b) * ((b - a) * (Math.sin(((0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * Math.cos((Math.PI * (angle / 180.0)));
}
def code(a, b, angle): return ((a + b) * ((b - a) * (math.sin(((0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * math.cos((math.pi * (angle / 180.0)))
function code(a, b, angle) return Float64(Float64(Float64(a + b) * Float64(Float64(b - a) * Float64(sin(Float64(Float64(0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * cos(Float64(pi * Float64(angle / 180.0)))) end
function tmp = code(a, b, angle) tmp = ((a + b) * ((b - a) * (sin(((0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * cos((pi * (angle / 180.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] / 0.3183098861837907), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{0.005555555555555556 \cdot angle}{0.3183098861837907}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
Initial program 54.5%
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-*.f6467.7
Applied rewrites67.6%
lift-*.f64N/A
metadata-evalN/A
associate-/r/N/A
div-flip-revN/A
lift-/.f6467.7
Applied rewrites67.7%
lift-*.f64N/A
lift-/.f64N/A
div-flip-revN/A
lift-/.f64N/A
associate-/r/N/A
mult-flipN/A
associate-/r*N/A
lift-/.f64N/A
div-flip-revN/A
lift-/.f64N/A
lower-/.f64N/A
lift-/.f64N/A
mult-flipN/A
metadata-evalN/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6467.5
Applied rewrites67.5%
Evaluated real constant67.5%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- b (fabs a))))
(if (<= (fabs a) 5e+166)
(* (+ (fabs a) b) (* t_0 (sin (* (* angle PI) 0.011111111111111112))))
(*
(+ b (fabs a))
(*
(* (* PI angle) 0.011111111111111112)
(* t_0 (cos (* -0.005555555555555556 (* PI angle)))))))))double code(double a, double b, double angle) {
double t_0 = b - fabs(a);
double tmp;
if (fabs(a) <= 5e+166) {
tmp = (fabs(a) + b) * (t_0 * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = (b + fabs(a)) * (((((double) M_PI) * angle) * 0.011111111111111112) * (t_0 * cos((-0.005555555555555556 * (((double) M_PI) * angle)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = b - Math.abs(a);
double tmp;
if (Math.abs(a) <= 5e+166) {
tmp = (Math.abs(a) + b) * (t_0 * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
} else {
tmp = (b + Math.abs(a)) * (((Math.PI * angle) * 0.011111111111111112) * (t_0 * Math.cos((-0.005555555555555556 * (Math.PI * angle)))));
}
return tmp;
}
def code(a, b, angle): t_0 = b - math.fabs(a) tmp = 0 if math.fabs(a) <= 5e+166: tmp = (math.fabs(a) + b) * (t_0 * math.sin(((angle * math.pi) * 0.011111111111111112))) else: tmp = (b + math.fabs(a)) * (((math.pi * angle) * 0.011111111111111112) * (t_0 * math.cos((-0.005555555555555556 * (math.pi * angle))))) return tmp
function code(a, b, angle) t_0 = Float64(b - abs(a)) tmp = 0.0 if (abs(a) <= 5e+166) tmp = Float64(Float64(abs(a) + b) * Float64(t_0 * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))); else tmp = Float64(Float64(b + abs(a)) * Float64(Float64(Float64(pi * angle) * 0.011111111111111112) * Float64(t_0 * cos(Float64(-0.005555555555555556 * Float64(pi * angle)))))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = b - abs(a); tmp = 0.0; if (abs(a) <= 5e+166) tmp = (abs(a) + b) * (t_0 * sin(((angle * pi) * 0.011111111111111112))); else tmp = (b + abs(a)) * (((pi * angle) * 0.011111111111111112) * (t_0 * cos((-0.005555555555555556 * (pi * angle))))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 5e+166], N[(N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision] * N[(t$95$0 * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(t$95$0 * N[Cos[N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := b - \left|a\right|\\
\mathbf{if}\;\left|a\right| \leq 5 \cdot 10^{+166}:\\
\;\;\;\;\left(\left|a\right| + b\right) \cdot \left(t\_0 \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b + \left|a\right|\right) \cdot \left(\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(t\_0 \cdot \cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\\
\end{array}
if a < 5.0000000000000002e166Initial 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 rewrites67.5%
if 5.0000000000000002e166 < a Initial program 54.5%
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-*.f6467.7
Applied rewrites67.6%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6463.0
Applied rewrites63.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
Applied rewrites62.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) b)) (t_1 (- b (fabs a))))
(if (<= (fabs a) 4.5e+176)
(* t_0 (* t_1 (sin (* (* angle PI) 0.011111111111111112))))
(*
(* t_0 (* t_1 (* (sin (* (* 0.005555555555555556 angle) PI)) 2.0)))
1.0))))double code(double a, double b, double angle) {
double t_0 = fabs(a) + b;
double t_1 = b - fabs(a);
double tmp;
if (fabs(a) <= 4.5e+176) {
tmp = t_0 * (t_1 * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = (t_0 * (t_1 * (sin(((0.005555555555555556 * angle) * ((double) M_PI))) * 2.0))) * 1.0;
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(a) + b;
double t_1 = b - Math.abs(a);
double tmp;
if (Math.abs(a) <= 4.5e+176) {
tmp = t_0 * (t_1 * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
} else {
tmp = (t_0 * (t_1 * (Math.sin(((0.005555555555555556 * angle) * Math.PI)) * 2.0))) * 1.0;
}
return tmp;
}
def code(a, b, angle): t_0 = math.fabs(a) + b t_1 = b - math.fabs(a) tmp = 0 if math.fabs(a) <= 4.5e+176: tmp = t_0 * (t_1 * math.sin(((angle * math.pi) * 0.011111111111111112))) else: tmp = (t_0 * (t_1 * (math.sin(((0.005555555555555556 * angle) * math.pi)) * 2.0))) * 1.0 return tmp
function code(a, b, angle) t_0 = Float64(abs(a) + b) t_1 = Float64(b - abs(a)) tmp = 0.0 if (abs(a) <= 4.5e+176) tmp = Float64(t_0 * Float64(t_1 * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))); else tmp = Float64(Float64(t_0 * Float64(t_1 * Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * 2.0))) * 1.0); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = abs(a) + b; t_1 = b - abs(a); tmp = 0.0; if (abs(a) <= 4.5e+176) tmp = t_0 * (t_1 * sin(((angle * pi) * 0.011111111111111112))); else tmp = (t_0 * (t_1 * (sin(((0.005555555555555556 * angle) * pi)) * 2.0))) * 1.0; end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$1 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 4.5e+176], N[(t$95$0 * N[(t$95$1 * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[(t$95$1 * N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left|a\right| + b\\
t_1 := b - \left|a\right|\\
\mathbf{if}\;\left|a\right| \leq 4.5 \cdot 10^{+176}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot \left(t\_1 \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 2\right)\right)\right) \cdot 1\\
\end{array}
if a < 4.50000000000000003e176Initial 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 rewrites67.5%
if 4.50000000000000003e176 < a Initial program 54.5%
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-*.f6467.7
Applied rewrites67.6%
Taylor expanded in angle around 0
Applied rewrites65.5%
(FPCore (a b angle) :precision binary64 (* (* (+ a b) (* (- b a) (* (sin (* (/ angle 180.0) PI)) 2.0))) (cos (* PI (/ angle 180.0)))))
double code(double a, double b, double angle) {
return ((a + b) * ((b - a) * (sin(((angle / 180.0) * ((double) M_PI))) * 2.0))) * cos((((double) M_PI) * (angle / 180.0)));
}
public static double code(double a, double b, double angle) {
return ((a + b) * ((b - a) * (Math.sin(((angle / 180.0) * Math.PI)) * 2.0))) * Math.cos((Math.PI * (angle / 180.0)));
}
def code(a, b, angle): return ((a + b) * ((b - a) * (math.sin(((angle / 180.0) * math.pi)) * 2.0))) * math.cos((math.pi * (angle / 180.0)))
function code(a, b, angle) return Float64(Float64(Float64(a + b) * Float64(Float64(b - a) * Float64(sin(Float64(Float64(angle / 180.0) * pi)) * 2.0))) * cos(Float64(pi * Float64(angle / 180.0)))) end
function tmp = code(a, b, angle) tmp = ((a + b) * ((b - a) * (sin(((angle / 180.0) * pi)) * 2.0))) * cos((pi * (angle / 180.0))); end
code[a_, b_, angle_] := N[(N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
Initial program 54.5%
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-*.f6467.7
Applied rewrites67.6%
lift-*.f64N/A
metadata-evalN/A
associate-/r/N/A
div-flip-revN/A
lift-/.f6467.7
Applied rewrites67.7%
(FPCore (a b angle) :precision binary64 (* (* (cos (* -0.005555555555555556 (* PI angle))) (* (* (sin (* (* angle 0.005555555555555556) PI)) (- b a)) 2.0)) (+ b a)))
double code(double a, double b, double angle) {
return (cos((-0.005555555555555556 * (((double) M_PI) * angle))) * ((sin(((angle * 0.005555555555555556) * ((double) M_PI))) * (b - a)) * 2.0)) * (b + a);
}
public static double code(double a, double b, double angle) {
return (Math.cos((-0.005555555555555556 * (Math.PI * angle))) * ((Math.sin(((angle * 0.005555555555555556) * Math.PI)) * (b - a)) * 2.0)) * (b + a);
}
def code(a, b, angle): return (math.cos((-0.005555555555555556 * (math.pi * angle))) * ((math.sin(((angle * 0.005555555555555556) * math.pi)) * (b - a)) * 2.0)) * (b + a)
function code(a, b, angle) return Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(pi * angle))) * Float64(Float64(sin(Float64(Float64(angle * 0.005555555555555556) * pi)) * Float64(b - a)) * 2.0)) * Float64(b + a)) end
function tmp = code(a, b, angle) tmp = (cos((-0.005555555555555556 * (pi * angle))) * ((sin(((angle * 0.005555555555555556) * pi)) * (b - a)) * 2.0)) * (b + a); end
code[a_, b_, angle_] := N[(N[(N[Cos[N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]
\left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot 2\right)\right) \cdot \left(b + a\right)
Initial program 54.5%
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-*.f6467.7
Applied rewrites67.6%
Applied rewrites67.5%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 7.5e-70)
(* (* (* (fabs angle) (+ b a)) (- b a)) (* PI 0.011111111111111112))
(*
(* (- b a) (+ a b))
(sin (* (* (fabs angle) PI) 0.011111111111111112))))))double code(double a, double b, double angle) {
double tmp;
if (fabs(angle) <= 7.5e-70) {
tmp = ((fabs(angle) * (b + a)) * (b - a)) * (((double) M_PI) * 0.011111111111111112);
} else {
tmp = ((b - a) * (a + b)) * 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 tmp;
if (Math.abs(angle) <= 7.5e-70) {
tmp = ((Math.abs(angle) * (b + a)) * (b - a)) * (Math.PI * 0.011111111111111112);
} else {
tmp = ((b - a) * (a + b)) * Math.sin(((Math.abs(angle) * Math.PI) * 0.011111111111111112));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(angle) <= 7.5e-70: tmp = ((math.fabs(angle) * (b + a)) * (b - a)) * (math.pi * 0.011111111111111112) else: tmp = ((b - a) * (a + b)) * math.sin(((math.fabs(angle) * math.pi) * 0.011111111111111112)) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) tmp = 0.0 if (abs(angle) <= 7.5e-70) tmp = Float64(Float64(Float64(abs(angle) * Float64(b + a)) * Float64(b - a)) * Float64(pi * 0.011111111111111112)); else tmp = Float64(Float64(Float64(b - a) * Float64(a + b)) * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(angle) <= 7.5e-70) tmp = ((abs(angle) * (b + a)) * (b - a)) * (pi * 0.011111111111111112); else tmp = ((b - a) * (a + b)) * sin(((abs(angle) * pi) * 0.011111111111111112)); 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], 7.5e-70], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 7.5 \cdot 10^{-70}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot 0.011111111111111112\right)\\
\end{array}
if angle < 7.49999999999999973e-70Initial 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites62.9%
if 7.49999999999999973e-70 < 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.0%
(FPCore (a b angle) :precision binary64 (* (+ a b) (* (- b a) (sin (* (* angle PI) 0.011111111111111112)))))
double code(double a, double b, double angle) {
return (a + b) * ((b - a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
}
public static double code(double a, double b, double angle) {
return (a + b) * ((b - a) * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
}
def code(a, b, angle): return (a + b) * ((b - a) * math.sin(((angle * math.pi) * 0.011111111111111112)))
function code(a, b, angle) return Float64(Float64(a + b) * Float64(Float64(b - a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))) end
function tmp = code(a, b, angle) tmp = (a + b) * ((b - a) * sin(((angle * pi) * 0.011111111111111112))); end
code[a_, b_, angle_] := N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(a + b\right) \cdot \left(\left(b - a\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 rewrites67.5%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 3e+41)
(* (* (* (fabs angle) (+ b a)) (- b a)) (* PI 0.011111111111111112))
(*
0.011111111111111112
(* (log (exp (* (* (- b a) PI) (+ b a)))) (fabs angle))))))double code(double a, double b, double angle) {
double tmp;
if (fabs(angle) <= 3e+41) {
tmp = ((fabs(angle) * (b + a)) * (b - a)) * (((double) M_PI) * 0.011111111111111112);
} else {
tmp = 0.011111111111111112 * (log(exp((((b - a) * ((double) M_PI)) * (b + a)))) * fabs(angle));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.abs(angle) <= 3e+41) {
tmp = ((Math.abs(angle) * (b + a)) * (b - a)) * (Math.PI * 0.011111111111111112);
} else {
tmp = 0.011111111111111112 * (Math.log(Math.exp((((b - a) * Math.PI) * (b + a)))) * Math.abs(angle));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(angle) <= 3e+41: tmp = ((math.fabs(angle) * (b + a)) * (b - a)) * (math.pi * 0.011111111111111112) else: tmp = 0.011111111111111112 * (math.log(math.exp((((b - a) * math.pi) * (b + a)))) * math.fabs(angle)) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) tmp = 0.0 if (abs(angle) <= 3e+41) tmp = Float64(Float64(Float64(abs(angle) * Float64(b + a)) * Float64(b - a)) * Float64(pi * 0.011111111111111112)); else tmp = Float64(0.011111111111111112 * Float64(log(exp(Float64(Float64(Float64(b - a) * pi) * Float64(b + a)))) * abs(angle))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(angle) <= 3e+41) tmp = ((abs(angle) * (b + a)) * (b - a)) * (pi * 0.011111111111111112); else tmp = 0.011111111111111112 * (log(exp((((b - a) * pi) * (b + a)))) * abs(angle)); 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], 3e+41], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[Log[N[Exp[N[(N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 3 \cdot 10^{+41}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\log \left(e^{\left(\left(b - a\right) \cdot \pi\right) \cdot \left(b + a\right)}\right) \cdot \left|angle\right|\right)\\
\end{array}
if angle < 2.9999999999999998e41Initial 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites62.9%
if 2.9999999999999998e41 < 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lift-+.f6455.2
Applied rewrites55.2%
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
*-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
difference-of-squares-revN/A
unpow2N/A
lift-pow.f64N/A
unpow2N/A
lift-pow.f64N/A
lift--.f64N/A
pow-expN/A
*-commutativeN/A
Applied rewrites36.6%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 5e-70)
(* (* (* (fabs angle) (+ b a)) (- b a)) (* PI 0.011111111111111112))
(* 0.011111111111111112 (* (* (fabs angle) (* (- b a) (+ b a))) PI)))))double code(double a, double b, double angle) {
double tmp;
if (fabs(angle) <= 5e-70) {
tmp = ((fabs(angle) * (b + a)) * (b - a)) * (((double) M_PI) * 0.011111111111111112);
} else {
tmp = 0.011111111111111112 * ((fabs(angle) * ((b - a) * (b + a))) * ((double) M_PI));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.abs(angle) <= 5e-70) {
tmp = ((Math.abs(angle) * (b + a)) * (b - a)) * (Math.PI * 0.011111111111111112);
} else {
tmp = 0.011111111111111112 * ((Math.abs(angle) * ((b - a) * (b + a))) * Math.PI);
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(angle) <= 5e-70: tmp = ((math.fabs(angle) * (b + a)) * (b - a)) * (math.pi * 0.011111111111111112) else: tmp = 0.011111111111111112 * ((math.fabs(angle) * ((b - a) * (b + a))) * math.pi) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) tmp = 0.0 if (abs(angle) <= 5e-70) tmp = Float64(Float64(Float64(abs(angle) * Float64(b + a)) * Float64(b - a)) * Float64(pi * 0.011111111111111112)); else tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * Float64(Float64(b - a) * Float64(b + a))) * pi)); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(angle) <= 5e-70) tmp = ((abs(angle) * (b + a)) * (b - a)) * (pi * 0.011111111111111112); else tmp = 0.011111111111111112 * ((abs(angle) * ((b - a) * (b + a))) * pi); 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-70], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{-70}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right)\\
\end{array}
if angle < 4.9999999999999998e-70Initial 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites62.9%
if 4.9999999999999998e-70 < 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1.0 angle)
(if (<= (fabs angle) 1.1e-69)
(* (* (* 0.011111111111111112 (* (fabs angle) (- b a))) (+ b a)) PI)
(* 0.011111111111111112 (* (* (fabs angle) (* (- b a) (+ b a))) PI)))))double code(double a, double b, double angle) {
double tmp;
if (fabs(angle) <= 1.1e-69) {
tmp = ((0.011111111111111112 * (fabs(angle) * (b - a))) * (b + a)) * ((double) M_PI);
} else {
tmp = 0.011111111111111112 * ((fabs(angle) * ((b - a) * (b + a))) * ((double) M_PI));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.abs(angle) <= 1.1e-69) {
tmp = ((0.011111111111111112 * (Math.abs(angle) * (b - a))) * (b + a)) * Math.PI;
} else {
tmp = 0.011111111111111112 * ((Math.abs(angle) * ((b - a) * (b + a))) * Math.PI);
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(angle) <= 1.1e-69: tmp = ((0.011111111111111112 * (math.fabs(angle) * (b - a))) * (b + a)) * math.pi else: tmp = 0.011111111111111112 * ((math.fabs(angle) * ((b - a) * (b + a))) * math.pi) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) tmp = 0.0 if (abs(angle) <= 1.1e-69) tmp = Float64(Float64(Float64(0.011111111111111112 * Float64(abs(angle) * Float64(b - a))) * Float64(b + a)) * pi); else tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * Float64(Float64(b - a) * Float64(b + a))) * pi)); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(angle) <= 1.1e-69) tmp = ((0.011111111111111112 * (abs(angle) * (b - a))) * (b + a)) * pi; else tmp = 0.011111111111111112 * ((abs(angle) * ((b - a) * (b + a))) * pi); 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], 1.1e-69], N[(N[(N[(0.011111111111111112 * N[(N[Abs[angle], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 1.1 \cdot 10^{-69}:\\
\;\;\;\;\left(\left(0.011111111111111112 \cdot \left(\left|angle\right| \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right)\\
\end{array}
if angle < 1.1e-69Initial 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.9
lift-+.f64N/A
+-commutativeN/A
lift-+.f6462.9
Applied rewrites62.9%
if 1.1e-69 < 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* (* angle (* (- b a) (+ b a))) PI)))
double code(double a, double b, double angle) {
return 0.011111111111111112 * ((angle * ((b - a) * (b + a))) * ((double) M_PI));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * ((angle * ((b - a) * (b + a))) * Math.PI);
}
def code(a, b, angle): return 0.011111111111111112 * ((angle * ((b - a) * (b + a))) * math.pi)
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(angle * Float64(Float64(b - a) * Float64(b + a))) * pi)) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * ((angle * ((b - a) * (b + a))) * pi); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(N[(angle * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]
0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) (fabs a))))
(if (<= (* 2.0 (- (pow (fabs b) 2.0) (pow (fabs a) 2.0))) -1e-133)
(* 0.011111111111111112 (* (* t_0 (* (fabs a) PI)) angle))
(* 0.011111111111111112 (* (* t_0 (* (fabs b) PI)) angle)))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - fabs(a);
double tmp;
if ((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) <= -1e-133) {
tmp = 0.011111111111111112 * ((t_0 * (fabs(a) * ((double) M_PI))) * angle);
} else {
tmp = 0.011111111111111112 * ((t_0 * (fabs(b) * ((double) M_PI))) * angle);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(b) - Math.abs(a);
double tmp;
if ((2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0))) <= -1e-133) {
tmp = 0.011111111111111112 * ((t_0 * (Math.abs(a) * Math.PI)) * angle);
} else {
tmp = 0.011111111111111112 * ((t_0 * (Math.abs(b) * Math.PI)) * angle);
}
return tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - math.fabs(a) tmp = 0 if (2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0))) <= -1e-133: tmp = 0.011111111111111112 * ((t_0 * (math.fabs(a) * math.pi)) * angle) else: tmp = 0.011111111111111112 * ((t_0 * (math.fabs(b) * math.pi)) * angle) return tmp
function code(a, b, angle) t_0 = Float64(abs(b) - abs(a)) tmp = 0.0 if (Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= -1e-133) tmp = Float64(0.011111111111111112 * Float64(Float64(t_0 * Float64(abs(a) * pi)) * angle)); else tmp = Float64(0.011111111111111112 * Float64(Float64(t_0 * Float64(abs(b) * pi)) * angle)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - abs(a); tmp = 0.0; if ((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= -1e-133) tmp = 0.011111111111111112 * ((t_0 * (abs(a) * pi)) * angle); else tmp = 0.011111111111111112 * ((t_0 * (abs(b) * pi)) * angle); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, 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-133], N[(0.011111111111111112 * N[(N[(t$95$0 * N[(N[Abs[a], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(t$95$0 * N[(N[Abs[b], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|b\right| - \left|a\right|\\
\mathbf{if}\;2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right) \leq -1 \cdot 10^{-133}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(t\_0 \cdot \left(\left|a\right| \cdot \pi\right)\right) \cdot angle\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(t\_0 \cdot \left(\left|b\right| \cdot \pi\right)\right) \cdot angle\right)\\
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -1.0000000000000001e-133Initial 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lift-+.f6455.2
Applied rewrites55.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-PI.f6438.1
Applied rewrites38.1%
if -1.0000000000000001e-133 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lift-+.f6455.2
Applied rewrites55.2%
Taylor expanded in a around 0
lower-*.f64N/A
lower-PI.f6438.2
Applied rewrites38.2%
(FPCore (a b angle) :precision binary64 (* 0.011111111111111112 (* (* (- (fabs b) (fabs a)) (* (fabs a) PI)) angle)))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (((fabs(b) - fabs(a)) * (fabs(a) * ((double) M_PI))) * angle);
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (((Math.abs(b) - Math.abs(a)) * (Math.abs(a) * Math.PI)) * angle);
}
def code(a, b, angle): return 0.011111111111111112 * (((math.fabs(b) - math.fabs(a)) * (math.fabs(a) * math.pi)) * angle)
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(Float64(abs(b) - abs(a)) * Float64(abs(a) * pi)) * angle)) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (((abs(b) - abs(a)) * (abs(a) * pi)) * angle); end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(N[(N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[a], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]
0.011111111111111112 \cdot \left(\left(\left(\left|b\right| - \left|a\right|\right) \cdot \left(\left|a\right| \cdot \pi\right)\right) \cdot angle\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.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.6
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
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6455.2
Applied rewrites55.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-+.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6455.2
lift-+.f64N/A
+-commutativeN/A
lift-+.f6455.2
Applied rewrites55.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-PI.f6438.1
Applied rewrites38.1%
herbie shell --seed 2025166
(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)))))