
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180)))) (* (* (* 2 (- (pow b 2) (pow a 2))) (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), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2 * N[(N[Power[b, 2], $MachinePrecision] - N[Power[a, 2], $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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180)))) (* (* (* 2 (- (pow b 2) (pow a 2))) (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), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2 * N[(N[Power[b, 2], $MachinePrecision] - N[Power[a, 2], $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 (+ a (fabs b))) (t_1 (- (fabs b) a)))
(*
(copysign 1 angle)
(if (<=
(fabs angle)
4113761393303015/102844034832575377634685573909834406561420991602098741459288064)
(* t_1 (* 1/90 (* (fabs angle) (* PI t_0))))
(* (* t_1 t_0) (sin (* (* (fabs angle) PI) 1/90)))))))double code(double a, double b, double angle) {
double t_0 = a + fabs(b);
double t_1 = fabs(b) - a;
double tmp;
if (fabs(angle) <= 4e-47) {
tmp = t_1 * (0.011111111111111112 * (fabs(angle) * (((double) M_PI) * t_0)));
} else {
tmp = (t_1 * t_0) * 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 = a + Math.abs(b);
double t_1 = Math.abs(b) - a;
double tmp;
if (Math.abs(angle) <= 4e-47) {
tmp = t_1 * (0.011111111111111112 * (Math.abs(angle) * (Math.PI * t_0)));
} else {
tmp = (t_1 * t_0) * Math.sin(((Math.abs(angle) * Math.PI) * 0.011111111111111112));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = a + math.fabs(b) t_1 = math.fabs(b) - a tmp = 0 if math.fabs(angle) <= 4e-47: tmp = t_1 * (0.011111111111111112 * (math.fabs(angle) * (math.pi * t_0))) else: tmp = (t_1 * t_0) * math.sin(((math.fabs(angle) * math.pi) * 0.011111111111111112)) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(a + abs(b)) t_1 = Float64(abs(b) - a) tmp = 0.0 if (abs(angle) <= 4e-47) tmp = Float64(t_1 * Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * t_0)))); else tmp = Float64(Float64(t_1 * t_0) * 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 = a + abs(b); t_1 = abs(b) - a; tmp = 0.0; if (abs(angle) <= 4e-47) tmp = t_1 * (0.011111111111111112 * (abs(angle) * (pi * t_0))); else tmp = (t_1 * t_0) * 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[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 4113761393303015/102844034832575377634685573909834406561420991602098741459288064], N[(t$95$1 * N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * t$95$0), $MachinePrecision] * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := a + \left|b\right|\\
t_1 := \left|b\right| - a\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq \frac{4113761393303015}{102844034832575377634685573909834406561420991602098741459288064}:\\
\;\;\;\;t\_1 \cdot \left(\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot t\_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 \cdot t\_0\right) \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot \frac{1}{90}\right)\\
\end{array}
\end{array}
if angle < 3.9999999999999999e-47Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-+.f6462.6%
Applied rewrites62.6%
if 3.9999999999999999e-47 < angle Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
(FPCore (a b angle) :precision binary64 (134-z0z1z2z3z4 (sin (* (* angle PI) 1/90)) b b a a))
\mathsf{134\_z0z1z2z3z4}\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right), b, b, a, a\right)
Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
(FPCore (a b angle) :precision binary64 (* (+ a b) (* (- b a) (sin (* (* angle PI) 1/90)))))
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] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right)
Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ a (fabs b))) (t_1 (- (fabs b) a)))
(*
(copysign 1 angle)
(if (<=
(fabs angle)
3946757204148067/127314748520905380391777855525586135065716774604121015664758778084648831235208544136462336)
(* t_1 (* 1/90 (* (fabs angle) (* PI t_0))))
(* (* t_1 t_0) (sin (* (* 1/90 PI) (fabs angle))))))))double code(double a, double b, double angle) {
double t_0 = a + fabs(b);
double t_1 = fabs(b) - a;
double tmp;
if (fabs(angle) <= 3.1e-74) {
tmp = t_1 * (0.011111111111111112 * (fabs(angle) * (((double) M_PI) * t_0)));
} else {
tmp = (t_1 * t_0) * sin(((0.011111111111111112 * ((double) M_PI)) * fabs(angle)));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = a + Math.abs(b);
double t_1 = Math.abs(b) - a;
double tmp;
if (Math.abs(angle) <= 3.1e-74) {
tmp = t_1 * (0.011111111111111112 * (Math.abs(angle) * (Math.PI * t_0)));
} else {
tmp = (t_1 * t_0) * Math.sin(((0.011111111111111112 * Math.PI) * Math.abs(angle)));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = a + math.fabs(b) t_1 = math.fabs(b) - a tmp = 0 if math.fabs(angle) <= 3.1e-74: tmp = t_1 * (0.011111111111111112 * (math.fabs(angle) * (math.pi * t_0))) else: tmp = (t_1 * t_0) * math.sin(((0.011111111111111112 * math.pi) * math.fabs(angle))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(a + abs(b)) t_1 = Float64(abs(b) - a) tmp = 0.0 if (abs(angle) <= 3.1e-74) tmp = Float64(t_1 * Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * t_0)))); else tmp = Float64(Float64(t_1 * t_0) * sin(Float64(Float64(0.011111111111111112 * pi) * abs(angle)))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = a + abs(b); t_1 = abs(b) - a; tmp = 0.0; if (abs(angle) <= 3.1e-74) tmp = t_1 * (0.011111111111111112 * (abs(angle) * (pi * t_0))); else tmp = (t_1 * t_0) * sin(((0.011111111111111112 * pi) * abs(angle))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 3946757204148067/127314748520905380391777855525586135065716774604121015664758778084648831235208544136462336], N[(t$95$1 * N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * t$95$0), $MachinePrecision] * N[Sin[N[(N[(1/90 * Pi), $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := a + \left|b\right|\\
t_1 := \left|b\right| - a\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq \frac{3946757204148067}{127314748520905380391777855525586135065716774604121015664758778084648831235208544136462336}:\\
\;\;\;\;t\_1 \cdot \left(\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot t\_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 \cdot t\_0\right) \cdot \sin \left(\left(\frac{1}{90} \cdot \pi\right) \cdot \left|angle\right|\right)\\
\end{array}
\end{array}
if angle < 3.1000000000000002e-74Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-+.f6462.6%
Applied rewrites62.6%
if 3.1000000000000002e-74 < angle Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6457.9%
Applied rewrites57.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) (fabs a))) (t_1 (sin (* 1/90 (* angle PI)))))
(if (<=
(* 2 (- (pow (fabs b) 2) (pow (fabs a) 2)))
-8254602048994769/16509204097989538948510618278641143953713978938628797566498772157083559454897651858575539246489287121708574843539285271215073361234458923039079343076966861778387083874968908880272859927388326282907007278381599637629625884148486304338699903086469889890298080653054312448)
(* t_0 (* (fabs a) t_1))
(* t_0 (* (fabs b) t_1)))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - fabs(a);
double t_1 = sin((0.011111111111111112 * (angle * ((double) M_PI))));
double tmp;
if ((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) <= -5e-253) {
tmp = t_0 * (fabs(a) * t_1);
} else {
tmp = t_0 * (fabs(b) * t_1);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(b) - Math.abs(a);
double t_1 = Math.sin((0.011111111111111112 * (angle * Math.PI)));
double tmp;
if ((2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0))) <= -5e-253) {
tmp = t_0 * (Math.abs(a) * t_1);
} else {
tmp = t_0 * (Math.abs(b) * t_1);
}
return tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - math.fabs(a) t_1 = math.sin((0.011111111111111112 * (angle * math.pi))) tmp = 0 if (2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0))) <= -5e-253: tmp = t_0 * (math.fabs(a) * t_1) else: tmp = t_0 * (math.fabs(b) * t_1) return tmp
function code(a, b, angle) t_0 = Float64(abs(b) - abs(a)) t_1 = sin(Float64(0.011111111111111112 * Float64(angle * pi))) tmp = 0.0 if (Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= -5e-253) tmp = Float64(t_0 * Float64(abs(a) * t_1)); else tmp = Float64(t_0 * Float64(abs(b) * t_1)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - abs(a); t_1 = sin((0.011111111111111112 * (angle * pi))); tmp = 0.0; if ((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= -5e-253) tmp = t_0 * (abs(a) * t_1); else tmp = t_0 * (abs(b) * t_1); end tmp_2 = 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[Sin[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(2 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -8254602048994769/16509204097989538948510618278641143953713978938628797566498772157083559454897651858575539246489287121708574843539285271215073361234458923039079343076966861778387083874968908880272859927388326282907007278381599637629625884148486304338699903086469889890298080653054312448], N[(t$95$0 * N[(N[Abs[a], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Abs[b], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left|b\right| - \left|a\right|\\
t_1 := \sin \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)\\
\mathbf{if}\;2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right) \leq \frac{-8254602048994769}{16509204097989538948510618278641143953713978938628797566498772157083559454897651858575539246489287121708574843539285271215073361234458923039079343076966861778387083874968908880272859927388326282907007278381599637629625884148486304338699903086469889890298080653054312448}:\\
\;\;\;\;t\_0 \cdot \left(\left|a\right| \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\left|b\right| \cdot t\_1\right)\\
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.9999999999999997e-253Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.6%
Applied rewrites42.6%
if -4.9999999999999997e-253 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in a around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.0%
Applied rewrites42.0%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* 2 (- (pow (fabs b) 2) (pow a 2))))
(t_1 (+ a (fabs b)))
(t_2 (- (fabs b) a)))
(if (<=
t_0
-8254602048994769/16509204097989538948510618278641143953713978938628797566498772157083559454897651858575539246489287121708574843539285271215073361234458923039079343076966861778387083874968908880272859927388326282907007278381599637629625884148486304338699903086469889890298080653054312448)
(* t_2 (* a (sin (* 1/90 (* angle PI)))))
(if (<=
t_0
49999999999999996962677625276823109300201436100586624765953857856616022815066169514216546287202538742184280590280810862893585968713180152651178994204334413874936507208410055205338551265812204529218599012742757995383198412754109163297745561348039749026730174593312862032038021904229799310374521740690718720)
(* (* (fabs b) t_1) (sin (* (* angle PI) 1/90)))
(* t_2 (* 1/90 (* angle (* PI t_1))))))))double code(double a, double b, double angle) {
double t_0 = 2.0 * (pow(fabs(b), 2.0) - pow(a, 2.0));
double t_1 = a + fabs(b);
double t_2 = fabs(b) - a;
double tmp;
if (t_0 <= -5e-253) {
tmp = t_2 * (a * sin((0.011111111111111112 * (angle * ((double) M_PI)))));
} else if (t_0 <= 5e+304) {
tmp = (fabs(b) * t_1) * sin(((angle * ((double) M_PI)) * 0.011111111111111112));
} else {
tmp = t_2 * (0.011111111111111112 * (angle * (((double) M_PI) * t_1)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(a, 2.0));
double t_1 = a + Math.abs(b);
double t_2 = Math.abs(b) - a;
double tmp;
if (t_0 <= -5e-253) {
tmp = t_2 * (a * Math.sin((0.011111111111111112 * (angle * Math.PI))));
} else if (t_0 <= 5e+304) {
tmp = (Math.abs(b) * t_1) * Math.sin(((angle * Math.PI) * 0.011111111111111112));
} else {
tmp = t_2 * (0.011111111111111112 * (angle * (Math.PI * t_1)));
}
return tmp;
}
def code(a, b, angle): t_0 = 2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(a, 2.0)) t_1 = a + math.fabs(b) t_2 = math.fabs(b) - a tmp = 0 if t_0 <= -5e-253: tmp = t_2 * (a * math.sin((0.011111111111111112 * (angle * math.pi)))) elif t_0 <= 5e+304: tmp = (math.fabs(b) * t_1) * math.sin(((angle * math.pi) * 0.011111111111111112)) else: tmp = t_2 * (0.011111111111111112 * (angle * (math.pi * t_1))) return tmp
function code(a, b, angle) t_0 = Float64(2.0 * Float64((abs(b) ^ 2.0) - (a ^ 2.0))) t_1 = Float64(a + abs(b)) t_2 = Float64(abs(b) - a) tmp = 0.0 if (t_0 <= -5e-253) tmp = Float64(t_2 * Float64(a * sin(Float64(0.011111111111111112 * Float64(angle * pi))))); elseif (t_0 <= 5e+304) tmp = Float64(Float64(abs(b) * t_1) * sin(Float64(Float64(angle * pi) * 0.011111111111111112))); else tmp = Float64(t_2 * Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_1)))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = 2.0 * ((abs(b) ^ 2.0) - (a ^ 2.0)); t_1 = a + abs(b); t_2 = abs(b) - a; tmp = 0.0; if (t_0 <= -5e-253) tmp = t_2 * (a * sin((0.011111111111111112 * (angle * pi)))); elseif (t_0 <= 5e+304) tmp = (abs(b) * t_1) * sin(((angle * pi) * 0.011111111111111112)); else tmp = t_2 * (0.011111111111111112 * (angle * (pi * t_1))); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(2 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[a, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]}, If[LessEqual[t$95$0, -8254602048994769/16509204097989538948510618278641143953713978938628797566498772157083559454897651858575539246489287121708574843539285271215073361234458923039079343076966861778387083874968908880272859927388326282907007278381599637629625884148486304338699903086469889890298080653054312448], N[(t$95$2 * N[(a * N[Sin[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 49999999999999996962677625276823109300201436100586624765953857856616022815066169514216546287202538742184280590280810862893585968713180152651178994204334413874936507208410055205338551265812204529218599012742757995383198412754109163297745561348039749026730174593312862032038021904229799310374521740690718720], N[(N[(N[Abs[b], $MachinePrecision] * t$95$1), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(1/90 * N[(angle * N[(Pi * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_0 := 2 \cdot \left({\left(\left|b\right|\right)}^{2} - {a}^{2}\right)\\
t_1 := a + \left|b\right|\\
t_2 := \left|b\right| - a\\
\mathbf{if}\;t\_0 \leq \frac{-8254602048994769}{16509204097989538948510618278641143953713978938628797566498772157083559454897651858575539246489287121708574843539285271215073361234458923039079343076966861778387083874968908880272859927388326282907007278381599637629625884148486304338699903086469889890298080653054312448}:\\
\;\;\;\;t\_2 \cdot \left(a \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)\right)\\
\mathbf{elif}\;t\_0 \leq 49999999999999996962677625276823109300201436100586624765953857856616022815066169514216546287202538742184280590280810862893585968713180152651178994204334413874936507208410055205338551265812204529218599012742757995383198412754109163297745561348039749026730174593312862032038021904229799310374521740690718720:\\
\;\;\;\;\left(\left|b\right| \cdot t\_1\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot t\_1\right)\right)\right)\\
\end{array}
if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.9999999999999997e-253Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.6%
Applied rewrites42.6%
if -4.9999999999999997e-253 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 4.9999999999999997e304Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in a around 0
Applied rewrites37.6%
if 4.9999999999999997e304 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-+.f6462.6%
Applied rewrites62.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) (fabs b))) (t_1 (- (fabs b) (fabs a))))
(*
(copysign 1 angle)
(if (<= (fabs angle) 33000)
(* t_1 (* 1/90 (* (fabs angle) (* PI t_0))))
(if (<=
(fabs angle)
450000000000000016958053089881796353851548744843094964733530545522697246262216880657861102563284036476374305723951859506724049072546807429311473890536442725603127680570225934753847055352537767547108754807894734836540518200341427621717685623513184497194228104494423834156650142359422500864)
(*
1/90
(* (fabs angle) (* PI (* (/ (* t_0 t_1) t_1) (fabs b)))))
(* 1/90 (* (fabs angle) (* PI (* t_0 (* -1 (fabs a)))))))))))double code(double a, double b, double angle) {
double t_0 = fabs(a) + fabs(b);
double t_1 = fabs(b) - fabs(a);
double tmp;
if (fabs(angle) <= 33000.0) {
tmp = t_1 * (0.011111111111111112 * (fabs(angle) * (((double) M_PI) * t_0)));
} else if (fabs(angle) <= 4.5e+287) {
tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (((t_0 * t_1) / t_1) * fabs(b))));
} else {
tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (t_0 * (-1.0 * fabs(a)))));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(a) + Math.abs(b);
double t_1 = Math.abs(b) - Math.abs(a);
double tmp;
if (Math.abs(angle) <= 33000.0) {
tmp = t_1 * (0.011111111111111112 * (Math.abs(angle) * (Math.PI * t_0)));
} else if (Math.abs(angle) <= 4.5e+287) {
tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (((t_0 * t_1) / t_1) * Math.abs(b))));
} else {
tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (t_0 * (-1.0 * Math.abs(a)))));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(a) + math.fabs(b) t_1 = math.fabs(b) - math.fabs(a) tmp = 0 if math.fabs(angle) <= 33000.0: tmp = t_1 * (0.011111111111111112 * (math.fabs(angle) * (math.pi * t_0))) elif math.fabs(angle) <= 4.5e+287: tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (((t_0 * t_1) / t_1) * math.fabs(b)))) else: tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (t_0 * (-1.0 * math.fabs(a))))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(a) + abs(b)) t_1 = Float64(abs(b) - abs(a)) tmp = 0.0 if (abs(angle) <= 33000.0) tmp = Float64(t_1 * Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * t_0)))); elseif (abs(angle) <= 4.5e+287) tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(Float64(Float64(t_0 * t_1) / t_1) * abs(b))))); else tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(t_0 * Float64(-1.0 * abs(a)))))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(a) + abs(b); t_1 = abs(b) - abs(a); tmp = 0.0; if (abs(angle) <= 33000.0) tmp = t_1 * (0.011111111111111112 * (abs(angle) * (pi * t_0))); elseif (abs(angle) <= 4.5e+287) tmp = 0.011111111111111112 * (abs(angle) * (pi * (((t_0 * t_1) / t_1) * abs(b)))); else tmp = 0.011111111111111112 * (abs(angle) * (pi * (t_0 * (-1.0 * abs(a))))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 33000], N[(t$95$1 * N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 450000000000000016958053089881796353851548744843094964733530545522697246262216880657861102563284036476374305723951859506724049072546807429311473890536442725603127680570225934753847055352537767547108754807894734836540518200341427621717685623513184497194228104494423834156650142359422500864], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(N[(N[(t$95$0 * t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(t$95$0 * N[(-1 * N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|a\right| + \left|b\right|\\
t_1 := \left|b\right| - \left|a\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 33000:\\
\;\;\;\;t\_1 \cdot \left(\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot t\_0\right)\right)\right)\\
\mathbf{elif}\;\left|angle\right| \leq 450000000000000016958053089881796353851548744843094964733530545522697246262216880657861102563284036476374305723951859506724049072546807429311473890536442725603127680570225934753847055352537767547108754807894734836540518200341427621717685623513184497194228104494423834156650142359422500864:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\frac{t\_0 \cdot t\_1}{t\_1} \cdot \left|b\right|\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(t\_0 \cdot \left(-1 \cdot \left|a\right|\right)\right)\right)\right)\\
\end{array}
\end{array}
if angle < 33000Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-+.f6462.6%
Applied rewrites62.6%
if 33000 < angle < 4.5000000000000002e287Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.2%
lift-+.f64N/A
+-commutativeN/A
flip-+N/A
lower-unsound--.f64N/A
lower-unsound-/.f64N/A
lower-unsound-*.f32N/A
lower-*.f32N/A
sqr-neg-revN/A
lower-*.f32N/A
lower-unsound-*.f32N/A
lower-unsound-*.f32N/A
lower-*.f32N/A
unpow2N/A
lift-pow.f64N/A
lower-unsound-*.f32N/A
lower-*.f32N/A
sqr-neg-revN/A
unpow2N/A
lift-pow.f64N/A
lower-unsound--.f3229.3%
lower--.f32N/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
lower-*.f6441.1%
Applied rewrites41.1%
if 4.5000000000000002e287 < angle Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around inf
lower-*.f6437.3%
Applied rewrites37.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) (fabs b))))
(*
(copysign 1 angle)
(if (<= (fabs angle) 35000)
(* (- (fabs b) (fabs a)) (* 1/90 (* (fabs angle) (* PI t_0))))
(if (<=
(fabs angle)
450000000000000016958053089881796353851548744843094964733530545522697246262216880657861102563284036476374305723951859506724049072546807429311473890536442725603127680570225934753847055352537767547108754807894734836540518200341427621717685623513184497194228104494423834156650142359422500864)
(*
1/90
(*
(fabs angle)
(*
PI
(* (* (+ 1 (/ (fabs a) (fabs b))) (fabs b)) (fabs b)))))
(* 1/90 (* (fabs angle) (* PI (* t_0 (* -1 (fabs a)))))))))))double code(double a, double b, double angle) {
double t_0 = fabs(a) + fabs(b);
double tmp;
if (fabs(angle) <= 35000.0) {
tmp = (fabs(b) - fabs(a)) * (0.011111111111111112 * (fabs(angle) * (((double) M_PI) * t_0)));
} else if (fabs(angle) <= 4.5e+287) {
tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (((1.0 + (fabs(a) / fabs(b))) * fabs(b)) * fabs(b))));
} else {
tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (t_0 * (-1.0 * fabs(a)))));
}
return copysign(1.0, angle) * 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(angle) <= 35000.0) {
tmp = (Math.abs(b) - Math.abs(a)) * (0.011111111111111112 * (Math.abs(angle) * (Math.PI * t_0)));
} else if (Math.abs(angle) <= 4.5e+287) {
tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (((1.0 + (Math.abs(a) / Math.abs(b))) * Math.abs(b)) * Math.abs(b))));
} else {
tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (t_0 * (-1.0 * Math.abs(a)))));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(a) + math.fabs(b) tmp = 0 if math.fabs(angle) <= 35000.0: tmp = (math.fabs(b) - math.fabs(a)) * (0.011111111111111112 * (math.fabs(angle) * (math.pi * t_0))) elif math.fabs(angle) <= 4.5e+287: tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (((1.0 + (math.fabs(a) / math.fabs(b))) * math.fabs(b)) * math.fabs(b)))) else: tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (t_0 * (-1.0 * math.fabs(a))))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(a) + abs(b)) tmp = 0.0 if (abs(angle) <= 35000.0) tmp = Float64(Float64(abs(b) - abs(a)) * Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * t_0)))); elseif (abs(angle) <= 4.5e+287) tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(Float64(Float64(1.0 + Float64(abs(a) / abs(b))) * abs(b)) * abs(b))))); else tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(t_0 * Float64(-1.0 * abs(a)))))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(a) + abs(b); tmp = 0.0; if (abs(angle) <= 35000.0) tmp = (abs(b) - abs(a)) * (0.011111111111111112 * (abs(angle) * (pi * t_0))); elseif (abs(angle) <= 4.5e+287) tmp = 0.011111111111111112 * (abs(angle) * (pi * (((1.0 + (abs(a) / abs(b))) * abs(b)) * abs(b)))); else tmp = 0.011111111111111112 * (abs(angle) * (pi * (t_0 * (-1.0 * abs(a))))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 35000], N[(N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 450000000000000016958053089881796353851548744843094964733530545522697246262216880657861102563284036476374305723951859506724049072546807429311473890536442725603127680570225934753847055352537767547108754807894734836540518200341427621717685623513184497194228104494423834156650142359422500864], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(N[(N[(1 + N[(N[Abs[a], $MachinePrecision] / N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(t$95$0 * N[(-1 * N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \left|a\right| + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 35000:\\
\;\;\;\;\left(\left|b\right| - \left|a\right|\right) \cdot \left(\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot t\_0\right)\right)\right)\\
\mathbf{elif}\;\left|angle\right| \leq 450000000000000016958053089881796353851548744843094964733530545522697246262216880657861102563284036476374305723951859506724049072546807429311473890536442725603127680570225934753847055352537767547108754807894734836540518200341427621717685623513184497194228104494423834156650142359422500864:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\left(\left(1 + \frac{\left|a\right|}{\left|b\right|}\right) \cdot \left|b\right|\right) \cdot \left|b\right|\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(t\_0 \cdot \left(-1 \cdot \left|a\right|\right)\right)\right)\right)\\
\end{array}
\end{array}
if angle < 35000Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-+.f6462.6%
Applied rewrites62.6%
if 35000 < angle < 4.5000000000000002e287Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.2%
lift-+.f64N/A
+-commutativeN/A
sum-to-multN/A
lower-unsound-*.f64N/A
lower-unsound-+.f64N/A
lower-unsound-/.f6440.2%
Applied rewrites40.2%
if 4.5000000000000002e287 < angle Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around inf
lower-*.f6437.3%
Applied rewrites37.3%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) (fabs b))))
(*
(copysign 1 angle)
(if (<=
(fabs angle)
44999999999999997619501552954440605329731224537770508792680074270517912479690686752281910390554624)
(* (- (fabs b) (fabs a)) (* 1/90 (* (fabs angle) (* PI t_0))))
(if (<=
(fabs angle)
450000000000000016958053089881796353851548744843094964733530545522697246262216880657861102563284036476374305723951859506724049072546807429311473890536442725603127680570225934753847055352537767547108754807894734836540518200341427621717685623513184497194228104494423834156650142359422500864)
(* 1/90 (* (* (* (fabs angle) PI) t_0) (fabs b)))
(* 1/90 (* (fabs angle) (* PI (* t_0 (* -1 (fabs a)))))))))))double code(double a, double b, double angle) {
double t_0 = fabs(a) + fabs(b);
double tmp;
if (fabs(angle) <= 4.5e+97) {
tmp = (fabs(b) - fabs(a)) * (0.011111111111111112 * (fabs(angle) * (((double) M_PI) * t_0)));
} else if (fabs(angle) <= 4.5e+287) {
tmp = 0.011111111111111112 * (((fabs(angle) * ((double) M_PI)) * t_0) * fabs(b));
} else {
tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (t_0 * (-1.0 * fabs(a)))));
}
return copysign(1.0, angle) * 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(angle) <= 4.5e+97) {
tmp = (Math.abs(b) - Math.abs(a)) * (0.011111111111111112 * (Math.abs(angle) * (Math.PI * t_0)));
} else if (Math.abs(angle) <= 4.5e+287) {
tmp = 0.011111111111111112 * (((Math.abs(angle) * Math.PI) * t_0) * Math.abs(b));
} else {
tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (t_0 * (-1.0 * Math.abs(a)))));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(a) + math.fabs(b) tmp = 0 if math.fabs(angle) <= 4.5e+97: tmp = (math.fabs(b) - math.fabs(a)) * (0.011111111111111112 * (math.fabs(angle) * (math.pi * t_0))) elif math.fabs(angle) <= 4.5e+287: tmp = 0.011111111111111112 * (((math.fabs(angle) * math.pi) * t_0) * math.fabs(b)) else: tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (t_0 * (-1.0 * math.fabs(a))))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(a) + abs(b)) tmp = 0.0 if (abs(angle) <= 4.5e+97) tmp = Float64(Float64(abs(b) - abs(a)) * Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * t_0)))); elseif (abs(angle) <= 4.5e+287) tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(abs(angle) * pi) * t_0) * abs(b))); else tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(t_0 * Float64(-1.0 * abs(a)))))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(a) + abs(b); tmp = 0.0; if (abs(angle) <= 4.5e+97) tmp = (abs(b) - abs(a)) * (0.011111111111111112 * (abs(angle) * (pi * t_0))); elseif (abs(angle) <= 4.5e+287) tmp = 0.011111111111111112 * (((abs(angle) * pi) * t_0) * abs(b)); else tmp = 0.011111111111111112 * (abs(angle) * (pi * (t_0 * (-1.0 * abs(a))))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 44999999999999997619501552954440605329731224537770508792680074270517912479690686752281910390554624], N[(N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 450000000000000016958053089881796353851548744843094964733530545522697246262216880657861102563284036476374305723951859506724049072546807429311473890536442725603127680570225934753847055352537767547108754807894734836540518200341427621717685623513184497194228104494423834156650142359422500864], N[(1/90 * N[(N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(t$95$0 * N[(-1 * N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \left|a\right| + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 44999999999999997619501552954440605329731224537770508792680074270517912479690686752281910390554624:\\
\;\;\;\;\left(\left|b\right| - \left|a\right|\right) \cdot \left(\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot t\_0\right)\right)\right)\\
\mathbf{elif}\;\left|angle\right| \leq 450000000000000016958053089881796353851548744843094964733530545522697246262216880657861102563284036476374305723951859506724049072546807429311473890536442725603127680570225934753847055352537767547108754807894734836540518200341427621717685623513184497194228104494423834156650142359422500864:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\left|angle\right| \cdot \pi\right) \cdot t\_0\right) \cdot \left|b\right|\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(t\_0 \cdot \left(-1 \cdot \left|a\right|\right)\right)\right)\right)\\
\end{array}
\end{array}
if angle < 4.4999999999999998e97Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-+.f6462.6%
Applied rewrites62.6%
if 4.4999999999999998e97 < angle < 4.5000000000000002e287Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f6441.2%
Applied rewrites41.2%
if 4.5000000000000002e287 < angle Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around inf
lower-*.f6437.3%
Applied rewrites37.3%
(FPCore (a b angle) :precision binary64 (* (- (fabs b) a) (* 1/90 (* angle (* PI (+ a (fabs b)))))))
double code(double a, double b, double angle) {
return (fabs(b) - a) * (0.011111111111111112 * (angle * (((double) M_PI) * (a + fabs(b)))));
}
public static double code(double a, double b, double angle) {
return (Math.abs(b) - a) * (0.011111111111111112 * (angle * (Math.PI * (a + Math.abs(b)))));
}
def code(a, b, angle): return (math.fabs(b) - a) * (0.011111111111111112 * (angle * (math.pi * (a + math.fabs(b)))))
function code(a, b, angle) return Float64(Float64(abs(b) - a) * Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(a + abs(b)))))) end
function tmp = code(a, b, angle) tmp = (abs(b) - a) * (0.011111111111111112 * (angle * (pi * (a + abs(b))))); end
code[a_, b_, angle_] := N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * N[(1/90 * N[(angle * N[(Pi * N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left|b\right| - a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(a + \left|b\right|\right)\right)\right)\right)
Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites67.8%
lift-134-z0z1z2z3z4N/A
*-commutativeN/A
difference-of-squaresN/A
+-commutativeN/A
lift-+.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.8%
Applied rewrites67.8%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-+.f6462.6%
Applied rewrites62.6%
(FPCore (a b angle) :precision binary64 (* 1/90 (* (* PI (+ a (fabs b))) (* (- (fabs b) a) angle))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * ((((double) M_PI) * (a + fabs(b))) * ((fabs(b) - a) * angle));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * ((Math.PI * (a + Math.abs(b))) * ((Math.abs(b) - a) * angle));
}
def code(a, b, angle): return 0.011111111111111112 * ((math.pi * (a + math.fabs(b))) * ((math.fabs(b) - a) * angle))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(pi * Float64(a + abs(b))) * Float64(Float64(abs(b) - a) * angle))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * ((pi * (a + abs(b))) * ((abs(b) - a) * angle)); end
code[a_, b_, angle_] := N[(1/90 * N[(N[(Pi * N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{1}{90} \cdot \left(\left(\pi \cdot \left(a + \left|b\right|\right)\right) \cdot \left(\left(\left|b\right| - a\right) \cdot angle\right)\right)
Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.5%
Applied rewrites62.5%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) (fabs b))))
(if (<=
(fabs b)
920000000000000012194172518790057045799306659821299225420975556855664091087607883247395862037184893378553456937101100189413504230300998018716177162909772320919725008294726605769539584)
(* 1/90 (* angle (* PI (* t_0 (- (fabs b) (fabs a))))))
(* (* (* angle 1/90) (* PI t_0)) (fabs b)))))double code(double a, double b, double angle) {
double t_0 = fabs(a) + fabs(b);
double tmp;
if (fabs(b) <= 9.2e+182) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (t_0 * (fabs(b) - fabs(a)))));
} else {
tmp = ((angle * 0.011111111111111112) * (((double) M_PI) * t_0)) * fabs(b);
}
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(b) <= 9.2e+182) {
tmp = 0.011111111111111112 * (angle * (Math.PI * (t_0 * (Math.abs(b) - Math.abs(a)))));
} else {
tmp = ((angle * 0.011111111111111112) * (Math.PI * t_0)) * Math.abs(b);
}
return tmp;
}
def code(a, b, angle): t_0 = math.fabs(a) + math.fabs(b) tmp = 0 if math.fabs(b) <= 9.2e+182: tmp = 0.011111111111111112 * (angle * (math.pi * (t_0 * (math.fabs(b) - math.fabs(a))))) else: tmp = ((angle * 0.011111111111111112) * (math.pi * t_0)) * math.fabs(b) return tmp
function code(a, b, angle) t_0 = Float64(abs(a) + abs(b)) tmp = 0.0 if (abs(b) <= 9.2e+182) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(t_0 * Float64(abs(b) - abs(a)))))); else tmp = Float64(Float64(Float64(angle * 0.011111111111111112) * Float64(pi * t_0)) * abs(b)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = abs(a) + abs(b); tmp = 0.0; if (abs(b) <= 9.2e+182) tmp = 0.011111111111111112 * (angle * (pi * (t_0 * (abs(b) - abs(a))))); else tmp = ((angle * 0.011111111111111112) * (pi * t_0)) * abs(b); 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[b], $MachinePrecision], 920000000000000012194172518790057045799306659821299225420975556855664091087607883247395862037184893378553456937101100189413504230300998018716177162909772320919725008294726605769539584], N[(1/90 * N[(angle * N[(Pi * N[(t$95$0 * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(angle * 1/90), $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|a\right| + \left|b\right|\\
\mathbf{if}\;\left|b\right| \leq 920000000000000012194172518790057045799306659821299225420975556855664091087607883247395862037184893378553456937101100189413504230300998018716177162909772320919725008294726605769539584:\\
\;\;\;\;\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(t\_0 \cdot \left(\left|b\right| - \left|a\right|\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(angle \cdot \frac{1}{90}\right) \cdot \left(\pi \cdot t\_0\right)\right) \cdot \left|b\right|\\
\end{array}
if b < 9.2000000000000001e182Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
if 9.2000000000000001e182 < b Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6441.3%
Applied rewrites41.3%
(FPCore (a b angle) :precision binary64 (* (* (* angle (* PI (+ (fabs a) (fabs b)))) (fabs b)) 1/90))
double code(double a, double b, double angle) {
return ((angle * (((double) M_PI) * (fabs(a) + fabs(b)))) * fabs(b)) * 0.011111111111111112;
}
public static double code(double a, double b, double angle) {
return ((angle * (Math.PI * (Math.abs(a) + Math.abs(b)))) * Math.abs(b)) * 0.011111111111111112;
}
def code(a, b, angle): return ((angle * (math.pi * (math.fabs(a) + math.fabs(b)))) * math.fabs(b)) * 0.011111111111111112
function code(a, b, angle) return Float64(Float64(Float64(angle * Float64(pi * Float64(abs(a) + abs(b)))) * abs(b)) * 0.011111111111111112) end
function tmp = code(a, b, angle) tmp = ((angle * (pi * (abs(a) + abs(b)))) * abs(b)) * 0.011111111111111112; end
code[a_, b_, angle_] := N[(N[(N[(angle * N[(Pi * N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision]
\left(\left(angle \cdot \left(\pi \cdot \left(\left|a\right| + \left|b\right|\right)\right)\right) \cdot \left|b\right|\right) \cdot \frac{1}{90}
Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6437.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6441.2%
Applied rewrites41.2%
(FPCore (a b angle) :precision binary64 (* 1/90 (* (* (* angle PI) (+ (fabs a) (fabs b))) (fabs b))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (((angle * ((double) M_PI)) * (fabs(a) + fabs(b))) * fabs(b));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (((angle * Math.PI) * (Math.abs(a) + Math.abs(b))) * Math.abs(b));
}
def code(a, b, angle): return 0.011111111111111112 * (((angle * math.pi) * (math.fabs(a) + math.fabs(b))) * math.fabs(b))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(Float64(angle * pi) * Float64(abs(a) + abs(b))) * abs(b))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (((angle * pi) * (abs(a) + abs(b))) * abs(b)); end
code[a_, b_, angle_] := N[(1/90 * N[(N[(N[(angle * Pi), $MachinePrecision] * N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{1}{90} \cdot \left(\left(\left(angle \cdot \pi\right) \cdot \left(\left|a\right| + \left|b\right|\right)\right) \cdot \left|b\right|\right)
Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f6441.2%
Applied rewrites41.2%
(FPCore (a b angle) :precision binary64 (* 1/90 (* (* PI (+ a (fabs b))) (* (fabs b) angle))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * ((((double) M_PI) * (a + fabs(b))) * (fabs(b) * angle));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * ((Math.PI * (a + Math.abs(b))) * (Math.abs(b) * angle));
}
def code(a, b, angle): return 0.011111111111111112 * ((math.pi * (a + math.fabs(b))) * (math.fabs(b) * angle))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(pi * Float64(a + abs(b))) * Float64(abs(b) * angle))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * ((pi * (a + abs(b))) * (abs(b) * angle)); end
code[a_, b_, angle_] := N[(1/90 * N[(N[(Pi * N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{1}{90} \cdot \left(\left(\pi \cdot \left(a + \left|b\right|\right)\right) \cdot \left(\left|b\right| \cdot angle\right)\right)
Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6440.0%
Applied rewrites40.0%
(FPCore (a b angle) :precision binary64 (* 1/90 (* (* angle (* (fabs b) (+ a (fabs b)))) PI)))
double code(double a, double b, double angle) {
return 0.011111111111111112 * ((angle * (fabs(b) * (a + fabs(b)))) * ((double) M_PI));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * ((angle * (Math.abs(b) * (a + Math.abs(b)))) * Math.PI);
}
def code(a, b, angle): return 0.011111111111111112 * ((angle * (math.fabs(b) * (a + math.fabs(b)))) * math.pi)
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(Float64(angle * Float64(abs(b) * Float64(a + abs(b)))) * pi)) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * ((angle * (abs(b) * (a + abs(b)))) * pi); end
code[a_, b_, angle_] := N[(1/90 * N[(N[(angle * N[(N[Abs[b], $MachinePrecision] * N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]
\frac{1}{90} \cdot \left(\left(angle \cdot \left(\left|b\right| \cdot \left(a + \left|b\right|\right)\right)\right) \cdot \pi\right)
Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6437.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6437.2%
Applied rewrites37.2%
(FPCore (a b angle) :precision binary64 (* 1/90 (* angle (* PI (* (+ a (fabs b)) (fabs b))))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (((double) M_PI) * ((a + fabs(b)) * fabs(b))));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (Math.PI * ((a + Math.abs(b)) * Math.abs(b))));
}
def code(a, b, angle): return 0.011111111111111112 * (angle * (math.pi * ((a + math.fabs(b)) * math.fabs(b))))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(a + abs(b)) * abs(b))))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (angle * (pi * ((a + abs(b)) * abs(b)))); end
code[a_, b_, angle_] := N[(1/90 * N[(angle * N[(Pi * N[(N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + \left|b\right|\right) \cdot \left|b\right|\right)\right)\right)
Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites57.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower--.f6454.2%
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites37.2%
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2 (- (pow b 2) (pow a 2))) (sin (* PI (/ angle 180)))) (cos (* PI (/ angle 180)))))