
(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 18 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 (- b (fabs a)))
(t_1 (- (* -1/2 PI) (* -1/2 PI)))
(t_2 (+ (* (* 1/90 (fabs angle)) PI) PI))
(t_3 (+ (fabs a) b)))
(*
(copysign 1 angle)
(if (<=
(fabs angle)
109999999999999994813382992798917661634827554997553248915876435581884342024512697523016464072704)
(*
t_3
(*
t_0
(sin (* (* (* (pow PI 2/3) (fabs angle)) (cbrt PI)) 1/90))))
(/
(*
(* 2 (* (sin (/ (- t_1 t_2) 2)) (cos (/ (+ t_1 t_2) 2))))
(* (* 2 t_3) t_0))
2)))))double code(double a, double b, double angle) {
double t_0 = b - fabs(a);
double t_1 = (-0.5 * ((double) M_PI)) - (-0.5 * ((double) M_PI));
double t_2 = ((0.011111111111111112 * fabs(angle)) * ((double) M_PI)) + ((double) M_PI);
double t_3 = fabs(a) + b;
double tmp;
if (fabs(angle) <= 1.1e+95) {
tmp = t_3 * (t_0 * sin((((pow(((double) M_PI), 0.6666666666666666) * fabs(angle)) * cbrt(((double) M_PI))) * 0.011111111111111112)));
} else {
tmp = ((2.0 * (sin(((t_1 - t_2) / 2.0)) * cos(((t_1 + t_2) / 2.0)))) * ((2.0 * t_3) * t_0)) / 2.0;
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = b - Math.abs(a);
double t_1 = (-0.5 * Math.PI) - (-0.5 * Math.PI);
double t_2 = ((0.011111111111111112 * Math.abs(angle)) * Math.PI) + Math.PI;
double t_3 = Math.abs(a) + b;
double tmp;
if (Math.abs(angle) <= 1.1e+95) {
tmp = t_3 * (t_0 * Math.sin((((Math.pow(Math.PI, 0.6666666666666666) * Math.abs(angle)) * Math.cbrt(Math.PI)) * 0.011111111111111112)));
} else {
tmp = ((2.0 * (Math.sin(((t_1 - t_2) / 2.0)) * Math.cos(((t_1 + t_2) / 2.0)))) * ((2.0 * t_3) * t_0)) / 2.0;
}
return Math.copySign(1.0, angle) * tmp;
}
function code(a, b, angle) t_0 = Float64(b - abs(a)) t_1 = Float64(Float64(-0.5 * pi) - Float64(-0.5 * pi)) t_2 = Float64(Float64(Float64(0.011111111111111112 * abs(angle)) * pi) + pi) t_3 = Float64(abs(a) + b) tmp = 0.0 if (abs(angle) <= 1.1e+95) tmp = Float64(t_3 * Float64(t_0 * sin(Float64(Float64(Float64((pi ^ 0.6666666666666666) * abs(angle)) * cbrt(pi)) * 0.011111111111111112)))); else tmp = Float64(Float64(Float64(2.0 * Float64(sin(Float64(Float64(t_1 - t_2) / 2.0)) * cos(Float64(Float64(t_1 + t_2) / 2.0)))) * Float64(Float64(2.0 * t_3) * t_0)) / 2.0); end return Float64(copysign(1.0, angle) * tmp) end
code[a_, b_, angle_] := Block[{t$95$0 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1/2 * Pi), $MachinePrecision] - N[(-1/2 * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(1/90 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] + Pi), $MachinePrecision]}, Block[{t$95$3 = N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 109999999999999994813382992798917661634827554997553248915876435581884342024512697523016464072704], N[(t$95$3 * N[(t$95$0 * N[Sin[N[(N[(N[(N[Power[Pi, 2/3], $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2 * N[(N[Sin[N[(N[(t$95$1 - t$95$2), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$1 + t$95$2), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2 * t$95$3), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / 2), $MachinePrecision]]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := b - \left|a\right|\\
t_1 := \frac{-1}{2} \cdot \pi - \frac{-1}{2} \cdot \pi\\
t_2 := \left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi + \pi\\
t_3 := \left|a\right| + b\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 109999999999999994813382992798917661634827554997553248915876435581884342024512697523016464072704:\\
\;\;\;\;t\_3 \cdot \left(t\_0 \cdot \sin \left(\left(\left({\pi}^{\frac{2}{3}} \cdot \left|angle\right|\right) \cdot \sqrt[3]{\pi}\right) \cdot \frac{1}{90}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \left(\sin \left(\frac{t\_1 - t\_2}{2}\right) \cdot \cos \left(\frac{t\_1 + t\_2}{2}\right)\right)\right) \cdot \left(\left(2 \cdot t\_3\right) \cdot t\_0\right)}{2}\\
\end{array}
\end{array}
if angle < 1.0999999999999999e95Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
lift-*.f64N/A
lift-PI.f64N/A
add-cube-cbrtN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
cbrt-unprodN/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-cbrt.f64N/A
lift-PI.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-cbrt.f6468.6%
Applied rewrites68.6%
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-prodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
pow2N/A
lower-pow.f6467.7%
Applied rewrites67.7%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7%
lift-pow.f64N/A
lift-cbrt.f64N/A
pow-cbrtN/A
lower-pow.f64N/A
metadata-eval68.6%
Applied rewrites68.6%
if 1.0999999999999999e95 < angle Initial program 54.1%
Applied rewrites27.1%
Applied rewrites30.0%
Applied rewrites28.8%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- b (fabs a))) (t_1 (+ (fabs a) b)))
(*
(copysign 1 angle)
(if (<=
(fabs angle)
122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544)
(* t_1 (* t_0 (sin (* (* (fabs angle) PI) 1/90))))
(*
(*
(- (sin PI) (sin (+ (* (* 1/90 (fabs angle)) PI) PI)))
(* t_1 2))
(* t_0 1/2))))))double code(double a, double b, double angle) {
double t_0 = b - fabs(a);
double t_1 = fabs(a) + b;
double tmp;
if (fabs(angle) <= 1.22e+95) {
tmp = t_1 * (t_0 * sin(((fabs(angle) * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = ((sin(((double) M_PI)) - sin((((0.011111111111111112 * fabs(angle)) * ((double) M_PI)) + ((double) M_PI)))) * (t_1 * 2.0)) * (t_0 * 0.5);
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = b - Math.abs(a);
double t_1 = Math.abs(a) + b;
double tmp;
if (Math.abs(angle) <= 1.22e+95) {
tmp = t_1 * (t_0 * Math.sin(((Math.abs(angle) * Math.PI) * 0.011111111111111112)));
} else {
tmp = ((Math.sin(Math.PI) - Math.sin((((0.011111111111111112 * Math.abs(angle)) * Math.PI) + Math.PI))) * (t_1 * 2.0)) * (t_0 * 0.5);
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = b - math.fabs(a) t_1 = math.fabs(a) + b tmp = 0 if math.fabs(angle) <= 1.22e+95: tmp = t_1 * (t_0 * math.sin(((math.fabs(angle) * math.pi) * 0.011111111111111112))) else: tmp = ((math.sin(math.pi) - math.sin((((0.011111111111111112 * math.fabs(angle)) * math.pi) + math.pi))) * (t_1 * 2.0)) * (t_0 * 0.5) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(b - abs(a)) t_1 = Float64(abs(a) + b) tmp = 0.0 if (abs(angle) <= 1.22e+95) tmp = Float64(t_1 * Float64(t_0 * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112)))); else tmp = Float64(Float64(Float64(sin(pi) - sin(Float64(Float64(Float64(0.011111111111111112 * abs(angle)) * pi) + pi))) * Float64(t_1 * 2.0)) * Float64(t_0 * 0.5)); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = b - abs(a); t_1 = abs(a) + b; tmp = 0.0; if (abs(angle) <= 1.22e+95) tmp = t_1 * (t_0 * sin(((abs(angle) * pi) * 0.011111111111111112))); else tmp = ((sin(pi) - sin((((0.011111111111111112 * abs(angle)) * pi) + pi))) * (t_1 * 2.0)) * (t_0 * 0.5); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544], N[(t$95$1 * N[(t$95$0 * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sin[Pi], $MachinePrecision] - N[Sin[N[(N[(N[(1/90 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] + Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * 2), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * 1/2), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := b - \left|a\right|\\
t_1 := \left|a\right| + b\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544:\\
\;\;\;\;t\_1 \cdot \left(t\_0 \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot \frac{1}{90}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sin \pi - \sin \left(\left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi + \pi\right)\right) \cdot \left(t\_1 \cdot 2\right)\right) \cdot \left(t\_0 \cdot \frac{1}{2}\right)\\
\end{array}
\end{array}
if angle < 1.2200000000000001e95Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
if 1.2200000000000001e95 < angle Initial program 54.1%
Applied rewrites27.1%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Applied rewrites27.2%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- b (fabs a)))
(t_1 (+ (* (* 1/90 (fabs angle)) PI) PI))
(t_2 (+ (fabs a) b))
(t_3 (- (* -1/2 PI) (* -1/2 PI))))
(*
(copysign 1 angle)
(if (<=
(fabs angle)
122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544)
(* t_2 (* t_0 (sin (* (* (fabs angle) PI) 1/90))))
(/
(*
(* 2 (* (sin (/ (- t_3 t_1) 2)) (cos (/ (+ t_3 t_1) 2))))
(* (* 2 t_2) t_0))
2)))))double code(double a, double b, double angle) {
double t_0 = b - fabs(a);
double t_1 = ((0.011111111111111112 * fabs(angle)) * ((double) M_PI)) + ((double) M_PI);
double t_2 = fabs(a) + b;
double t_3 = (-0.5 * ((double) M_PI)) - (-0.5 * ((double) M_PI));
double tmp;
if (fabs(angle) <= 1.22e+95) {
tmp = t_2 * (t_0 * sin(((fabs(angle) * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = ((2.0 * (sin(((t_3 - t_1) / 2.0)) * cos(((t_3 + t_1) / 2.0)))) * ((2.0 * t_2) * t_0)) / 2.0;
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = b - Math.abs(a);
double t_1 = ((0.011111111111111112 * Math.abs(angle)) * Math.PI) + Math.PI;
double t_2 = Math.abs(a) + b;
double t_3 = (-0.5 * Math.PI) - (-0.5 * Math.PI);
double tmp;
if (Math.abs(angle) <= 1.22e+95) {
tmp = t_2 * (t_0 * Math.sin(((Math.abs(angle) * Math.PI) * 0.011111111111111112)));
} else {
tmp = ((2.0 * (Math.sin(((t_3 - t_1) / 2.0)) * Math.cos(((t_3 + t_1) / 2.0)))) * ((2.0 * t_2) * t_0)) / 2.0;
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = b - math.fabs(a) t_1 = ((0.011111111111111112 * math.fabs(angle)) * math.pi) + math.pi t_2 = math.fabs(a) + b t_3 = (-0.5 * math.pi) - (-0.5 * math.pi) tmp = 0 if math.fabs(angle) <= 1.22e+95: tmp = t_2 * (t_0 * math.sin(((math.fabs(angle) * math.pi) * 0.011111111111111112))) else: tmp = ((2.0 * (math.sin(((t_3 - t_1) / 2.0)) * math.cos(((t_3 + t_1) / 2.0)))) * ((2.0 * t_2) * t_0)) / 2.0 return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(b - abs(a)) t_1 = Float64(Float64(Float64(0.011111111111111112 * abs(angle)) * pi) + pi) t_2 = Float64(abs(a) + b) t_3 = Float64(Float64(-0.5 * pi) - Float64(-0.5 * pi)) tmp = 0.0 if (abs(angle) <= 1.22e+95) tmp = Float64(t_2 * Float64(t_0 * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112)))); else tmp = Float64(Float64(Float64(2.0 * Float64(sin(Float64(Float64(t_3 - t_1) / 2.0)) * cos(Float64(Float64(t_3 + t_1) / 2.0)))) * Float64(Float64(2.0 * t_2) * t_0)) / 2.0); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = b - abs(a); t_1 = ((0.011111111111111112 * abs(angle)) * pi) + pi; t_2 = abs(a) + b; t_3 = (-0.5 * pi) - (-0.5 * pi); tmp = 0.0; if (abs(angle) <= 1.22e+95) tmp = t_2 * (t_0 * sin(((abs(angle) * pi) * 0.011111111111111112))); else tmp = ((2.0 * (sin(((t_3 - t_1) / 2.0)) * cos(((t_3 + t_1) / 2.0)))) * ((2.0 * t_2) * t_0)) / 2.0; end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(1/90 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] + Pi), $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-1/2 * Pi), $MachinePrecision] - N[(-1/2 * Pi), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544], N[(t$95$2 * N[(t$95$0 * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2 * N[(N[Sin[N[(N[(t$95$3 - t$95$1), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$3 + t$95$1), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2 * t$95$2), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / 2), $MachinePrecision]]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := b - \left|a\right|\\
t_1 := \left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi + \pi\\
t_2 := \left|a\right| + b\\
t_3 := \frac{-1}{2} \cdot \pi - \frac{-1}{2} \cdot \pi\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544:\\
\;\;\;\;t\_2 \cdot \left(t\_0 \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot \frac{1}{90}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \left(\sin \left(\frac{t\_3 - t\_1}{2}\right) \cdot \cos \left(\frac{t\_3 + t\_1}{2}\right)\right)\right) \cdot \left(\left(2 \cdot t\_2\right) \cdot t\_0\right)}{2}\\
\end{array}
\end{array}
if angle < 1.2200000000000001e95Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
if 1.2200000000000001e95 < angle Initial program 54.1%
Applied rewrites27.1%
Applied rewrites30.0%
Applied rewrites28.8%
(FPCore (a b angle)
:precision binary64
(if (<=
(fabs a)
549999999999999956603258195768086461654723523156372230507658473319512693915163480152926077793794477926070024461497827820572263214299772340635469176401651039300337687939013232287576626105770303862730433435560529687113014705508278468436865391708340224)
(* (+ (fabs a) b) (* (- b (fabs a)) (sin (* (* 1/90 PI) angle))))
(*
(* -1/90 (* (pow (fabs a) 2) (* angle PI)))
(cos (/ (* angle PI) 180)))))double code(double a, double b, double angle) {
double tmp;
if (fabs(a) <= 5.5e+248) {
tmp = (fabs(a) + b) * ((b - fabs(a)) * sin(((0.011111111111111112 * ((double) M_PI)) * angle)));
} else {
tmp = (-0.011111111111111112 * (pow(fabs(a), 2.0) * (angle * ((double) M_PI)))) * cos(((angle * ((double) M_PI)) / 180.0));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.abs(a) <= 5.5e+248) {
tmp = (Math.abs(a) + b) * ((b - Math.abs(a)) * Math.sin(((0.011111111111111112 * Math.PI) * angle)));
} else {
tmp = (-0.011111111111111112 * (Math.pow(Math.abs(a), 2.0) * (angle * Math.PI))) * Math.cos(((angle * Math.PI) / 180.0));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(a) <= 5.5e+248: tmp = (math.fabs(a) + b) * ((b - math.fabs(a)) * math.sin(((0.011111111111111112 * math.pi) * angle))) else: tmp = (-0.011111111111111112 * (math.pow(math.fabs(a), 2.0) * (angle * math.pi))) * math.cos(((angle * math.pi) / 180.0)) return tmp
function code(a, b, angle) tmp = 0.0 if (abs(a) <= 5.5e+248) tmp = Float64(Float64(abs(a) + b) * Float64(Float64(b - abs(a)) * sin(Float64(Float64(0.011111111111111112 * pi) * angle)))); else tmp = Float64(Float64(-0.011111111111111112 * Float64((abs(a) ^ 2.0) * Float64(angle * pi))) * cos(Float64(Float64(angle * pi) / 180.0))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(a) <= 5.5e+248) tmp = (abs(a) + b) * ((b - abs(a)) * sin(((0.011111111111111112 * pi) * angle))); else tmp = (-0.011111111111111112 * ((abs(a) ^ 2.0) * (angle * pi))) * cos(((angle * pi) / 180.0)); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[Abs[a], $MachinePrecision], 549999999999999956603258195768086461654723523156372230507658473319512693915163480152926077793794477926070024461497827820572263214299772340635469176401651039300337687939013232287576626105770303862730433435560529687113014705508278468436865391708340224], N[(N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision] * N[(N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(1/90 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1/90 * N[(N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle * Pi), $MachinePrecision] / 180), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 549999999999999956603258195768086461654723523156372230507658473319512693915163480152926077793794477926070024461497827820572263214299772340635469176401651039300337687939013232287576626105770303862730433435560529687113014705508278468436865391708340224:\\
\;\;\;\;\left(\left|a\right| + b\right) \cdot \left(\left(b - \left|a\right|\right) \cdot \sin \left(\left(\frac{1}{90} \cdot \pi\right) \cdot angle\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{-1}{90} \cdot \left({\left(\left|a\right|\right)}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\\
\end{array}
if a < 5.4999999999999996e248Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.7%
Applied rewrites68.7%
if 5.4999999999999996e248 < a Initial program 54.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
Taylor expanded in angle around 0
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-*.f64N/A
lower-PI.f6434.9%
Applied rewrites34.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
*-commutativeN/A
lift-*.f64N/A
lower-/.f6435.1%
Applied rewrites35.1%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) b)) (t_1 (- b (fabs a))))
(if (<=
(fabs a)
294999999999999979715892151964708824211181979871733743190477131889411011138639576703702293249515424096579239073331843163821161847545577565121560611077028454405154333307039309919961205010578929076059141599838785369121243529216)
(* t_0 (* t_1 (sin (* (* 1/90 PI) angle))))
(* 1/90 (* (* (* angle PI) t_1) t_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) <= 2.95e+224) {
tmp = t_0 * (t_1 * sin(((0.011111111111111112 * ((double) M_PI)) * angle)));
} else {
tmp = 0.011111111111111112 * (((angle * ((double) M_PI)) * t_1) * t_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) <= 2.95e+224) {
tmp = t_0 * (t_1 * Math.sin(((0.011111111111111112 * Math.PI) * angle)));
} else {
tmp = 0.011111111111111112 * (((angle * Math.PI) * t_1) * t_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) <= 2.95e+224: tmp = t_0 * (t_1 * math.sin(((0.011111111111111112 * math.pi) * angle))) else: tmp = 0.011111111111111112 * (((angle * math.pi) * t_1) * t_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) <= 2.95e+224) tmp = Float64(t_0 * Float64(t_1 * sin(Float64(Float64(0.011111111111111112 * pi) * angle)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(angle * pi) * t_1) * t_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) <= 2.95e+224) tmp = t_0 * (t_1 * sin(((0.011111111111111112 * pi) * angle))); else tmp = 0.011111111111111112 * (((angle * pi) * t_1) * t_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], 294999999999999979715892151964708824211181979871733743190477131889411011138639576703702293249515424096579239073331843163821161847545577565121560611077028454405154333307039309919961205010578929076059141599838785369121243529216], N[(t$95$0 * N[(t$95$1 * N[Sin[N[(N[(1/90 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[(N[(angle * Pi), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left|a\right| + b\\
t_1 := b - \left|a\right|\\
\mathbf{if}\;\left|a\right| \leq 294999999999999979715892151964708824211181979871733743190477131889411011138639576703702293249515424096579239073331843163821161847545577565121560611077028454405154333307039309919961205010578929076059141599838785369121243529216:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \sin \left(\left(\frac{1}{90} \cdot \pi\right) \cdot angle\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left(angle \cdot \pi\right) \cdot t\_1\right) \cdot t\_0\right)\\
\end{array}
if a < 2.9499999999999998e224Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.7%
Applied rewrites68.7%
if 2.9499999999999998e224 < a Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.9%
Applied rewrites62.9%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (sin (* 1/90 (* angle PI)))))
(if (<=
(* 2 (- (pow (fabs b) 2) (pow (fabs a) 2)))
7435084542388915/37175422711944576569951562453747514003281505041484861476394296482898516429010109338629207862403908764744968094754824326261364631138622642694770764527559865644574271011186496848567160245857443421755979894558785930151693717671947002203927473508716452075301127636353597820594133720367104)
(* -1 (* (* t_0 (fabs a)) (fabs a)))
(* (+ (fabs a) (fabs b)) (* (fabs b) t_0)))))double code(double a, double b, double angle) {
double t_0 = sin((0.011111111111111112 * (angle * ((double) M_PI))));
double tmp;
if ((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) <= 2e-268) {
tmp = -1.0 * ((t_0 * fabs(a)) * fabs(a));
} else {
tmp = (fabs(a) + fabs(b)) * (fabs(b) * t_0);
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = 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))) <= 2e-268) {
tmp = -1.0 * ((t_0 * Math.abs(a)) * Math.abs(a));
} else {
tmp = (Math.abs(a) + Math.abs(b)) * (Math.abs(b) * t_0);
}
return tmp;
}
def code(a, b, angle): t_0 = 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))) <= 2e-268: tmp = -1.0 * ((t_0 * math.fabs(a)) * math.fabs(a)) else: tmp = (math.fabs(a) + math.fabs(b)) * (math.fabs(b) * t_0) return tmp
function code(a, b, angle) t_0 = sin(Float64(0.011111111111111112 * Float64(angle * pi))) tmp = 0.0 if (Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= 2e-268) tmp = Float64(-1.0 * Float64(Float64(t_0 * abs(a)) * abs(a))); else tmp = Float64(Float64(abs(a) + abs(b)) * Float64(abs(b) * t_0)); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = sin((0.011111111111111112 * (angle * pi))); tmp = 0.0; if ((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= 2e-268) tmp = -1.0 * ((t_0 * abs(a)) * abs(a)); else tmp = (abs(a) + abs(b)) * (abs(b) * t_0); end tmp_2 = tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = 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], 7435084542388915/37175422711944576569951562453747514003281505041484861476394296482898516429010109338629207862403908764744968094754824326261364631138622642694770764527559865644574271011186496848567160245857443421755979894558785930151693717671947002203927473508716452075301127636353597820594133720367104], N[(-1 * N[(N[(t$95$0 * N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \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{7435084542388915}{37175422711944576569951562453747514003281505041484861476394296482898516429010109338629207862403908764744968094754824326261364631138622642694770764527559865644574271011186496848567160245857443421755979894558785930151693717671947002203927473508716452075301127636353597820594133720367104}:\\
\;\;\;\;-1 \cdot \left(\left(t\_0 \cdot \left|a\right|\right) \cdot \left|a\right|\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left|a\right| + \left|b\right|\right) \cdot \left(\left|b\right| \cdot t\_0\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.9999999999999999e-268Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6441.2%
Applied rewrites41.2%
if 1.9999999999999999e-268 < (*.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
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
Taylor expanded in a around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.6%
Applied rewrites42.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) (fabs b))))
(if (<=
(* 2 (- (pow (fabs b) 2) (pow (fabs a) 2)))
-1129605583483287/22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296)
(* 1/90 (* (* (* angle PI) (- (fabs b) (fabs a))) t_0))
(* t_0 (* (fabs b) (sin (* 1/90 (* angle PI))))))))double code(double a, double b, double angle) {
double t_0 = fabs(a) + fabs(b);
double tmp;
if ((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) <= -5e-206) {
tmp = 0.011111111111111112 * (((angle * ((double) M_PI)) * (fabs(b) - fabs(a))) * t_0);
} else {
tmp = t_0 * (fabs(b) * sin((0.011111111111111112 * (angle * ((double) M_PI)))));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(a) + Math.abs(b);
double tmp;
if ((2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0))) <= -5e-206) {
tmp = 0.011111111111111112 * (((angle * Math.PI) * (Math.abs(b) - Math.abs(a))) * t_0);
} else {
tmp = t_0 * (Math.abs(b) * Math.sin((0.011111111111111112 * (angle * Math.PI))));
}
return tmp;
}
def code(a, b, angle): t_0 = math.fabs(a) + math.fabs(b) tmp = 0 if (2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0))) <= -5e-206: tmp = 0.011111111111111112 * (((angle * math.pi) * (math.fabs(b) - math.fabs(a))) * t_0) else: tmp = t_0 * (math.fabs(b) * math.sin((0.011111111111111112 * (angle * math.pi)))) return tmp
function code(a, b, angle) t_0 = Float64(abs(a) + abs(b)) tmp = 0.0 if (Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= -5e-206) tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(angle * pi) * Float64(abs(b) - abs(a))) * t_0)); else tmp = Float64(t_0 * Float64(abs(b) * sin(Float64(0.011111111111111112 * Float64(angle * pi))))); end return tmp end
function tmp_2 = code(a, b, angle) t_0 = abs(a) + abs(b); tmp = 0.0; if ((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) <= -5e-206) tmp = 0.011111111111111112 * (((angle * pi) * (abs(b) - abs(a))) * t_0); else tmp = t_0 * (abs(b) * sin((0.011111111111111112 * (angle * pi)))); 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[(2 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1129605583483287/22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296], N[(1/90 * N[(N[(N[(angle * Pi), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Abs[b], $MachinePrecision] * N[Sin[N[(1/90 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|a\right| + \left|b\right|\\
\mathbf{if}\;2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right) \leq \frac{-1129605583483287}{22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left(angle \cdot \pi\right) \cdot \left(\left|b\right| - \left|a\right|\right)\right) \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\left|b\right| \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \pi\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)))) < -5e-206Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.9%
Applied rewrites62.9%
if -5e-206 < (*.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
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
Taylor expanded in a around 0
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6442.6%
Applied rewrites42.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) (fabs b))))
(*
(copysign 1 angle)
(if (<= (fabs angle) 5072854620270127/9223372036854775808)
(* (* (* (fabs angle) (* t_0 PI)) (- (fabs b) (fabs a))) 1/90)
(if (<=
(fabs angle)
4000000000000000193386768462214636230113579383562057023488)
(*
(* (- (fabs a)) (fabs a))
(sin (* 1/90 (* (fabs angle) PI))))
(* 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) <= 0.00055) {
tmp = ((fabs(angle) * (t_0 * ((double) M_PI))) * (fabs(b) - fabs(a))) * 0.011111111111111112;
} else if (fabs(angle) <= 4e+57) {
tmp = (-fabs(a) * fabs(a)) * sin((0.011111111111111112 * (fabs(angle) * ((double) M_PI))));
} 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) <= 0.00055) {
tmp = ((Math.abs(angle) * (t_0 * Math.PI)) * (Math.abs(b) - Math.abs(a))) * 0.011111111111111112;
} else if (Math.abs(angle) <= 4e+57) {
tmp = (-Math.abs(a) * Math.abs(a)) * Math.sin((0.011111111111111112 * (Math.abs(angle) * Math.PI)));
} 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) <= 0.00055: tmp = ((math.fabs(angle) * (t_0 * math.pi)) * (math.fabs(b) - math.fabs(a))) * 0.011111111111111112 elif math.fabs(angle) <= 4e+57: tmp = (-math.fabs(a) * math.fabs(a)) * math.sin((0.011111111111111112 * (math.fabs(angle) * math.pi))) 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) <= 0.00055) tmp = Float64(Float64(Float64(abs(angle) * Float64(t_0 * pi)) * Float64(abs(b) - abs(a))) * 0.011111111111111112); elseif (abs(angle) <= 4e+57) tmp = Float64(Float64(Float64(-abs(a)) * abs(a)) * sin(Float64(0.011111111111111112 * Float64(abs(angle) * pi)))); 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) <= 0.00055) tmp = ((abs(angle) * (t_0 * pi)) * (abs(b) - abs(a))) * 0.011111111111111112; elseif (abs(angle) <= 4e+57) tmp = (-abs(a) * abs(a)) * sin((0.011111111111111112 * (abs(angle) * pi))); 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], 5072854620270127/9223372036854775808], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(t$95$0 * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 4000000000000000193386768462214636230113579383562057023488], N[(N[((-N[Abs[a], $MachinePrecision]) * N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * Pi), $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 \frac{5072854620270127}{9223372036854775808}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(t\_0 \cdot \pi\right)\right) \cdot \left(\left|b\right| - \left|a\right|\right)\right) \cdot \frac{1}{90}\\
\mathbf{elif}\;\left|angle\right| \leq 4000000000000000193386768462214636230113579383562057023488:\\
\;\;\;\;\left(\left(-\left|a\right|\right) \cdot \left|a\right|\right) \cdot \sin \left(\frac{1}{90} \cdot \left(\left|angle\right| \cdot \pi\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 < 5.5000000000000003e-4Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lower-*.f6454.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.9%
Applied rewrites62.9%
if 5.5000000000000003e-4 < angle < 4.0000000000000002e57Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-PI.f6435.9%
Applied rewrites35.9%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lift-pow.f64N/A
unpow2N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6435.9%
Applied rewrites35.9%
if 4.0000000000000002e57 < angle Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.0%
Applied rewrites37.0%
(FPCore (a b angle)
:precision binary64
(if (<=
(* 2 (- (pow b 2) (pow a 2)))
-1129605583483287/22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296)
(* 1/90 (* (* (* angle PI) (- b a)) (+ a b)))
(* b (* (- b a) (sin (* (* angle PI) 1/90))))))double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e-206) {
tmp = 0.011111111111111112 * (((angle * ((double) M_PI)) * (b - a)) * (a + b));
} else {
tmp = b * ((b - a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
}
return tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e-206) {
tmp = 0.011111111111111112 * (((angle * Math.PI) * (b - a)) * (a + b));
} else {
tmp = b * ((b - a) * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
}
return tmp;
}
def code(a, b, angle): tmp = 0 if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e-206: tmp = 0.011111111111111112 * (((angle * math.pi) * (b - a)) * (a + b)) else: tmp = b * ((b - a) * math.sin(((angle * math.pi) * 0.011111111111111112))) return tmp
function code(a, b, angle) tmp = 0.0 if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e-206) tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(angle * pi) * Float64(b - a)) * Float64(a + b))); else tmp = Float64(b * Float64(Float64(b - a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112)))); end return tmp end
function tmp_2 = code(a, b, angle) tmp = 0.0; if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e-206) tmp = 0.011111111111111112 * (((angle * pi) * (b - a)) * (a + b)); else tmp = b * ((b - a) * sin(((angle * pi) * 0.011111111111111112))); end tmp_2 = tmp; end
code[a_, b_, angle_] := If[LessEqual[N[(2 * N[(N[Power[b, 2], $MachinePrecision] - N[Power[a, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1129605583483287/22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296], N[(1/90 * N[(N[(N[(angle * Pi), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq \frac{-1129605583483287}{22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\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)))) < -5e-206Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.9%
Applied rewrites62.9%
if -5e-206 < (*.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
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.9%
Taylor expanded in a around 0
Applied rewrites42.6%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (+ (fabs a) (fabs b))))
(*
(copysign 1 angle)
(if (<= (fabs angle) 5718490662849961/9223372036854775808)
(* (* (* (fabs angle) (* t_0 PI)) (- (fabs b) (fabs a))) 1/90)
(* 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) <= 0.00062) {
tmp = ((fabs(angle) * (t_0 * ((double) M_PI))) * (fabs(b) - fabs(a))) * 0.011111111111111112;
} 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) <= 0.00062) {
tmp = ((Math.abs(angle) * (t_0 * Math.PI)) * (Math.abs(b) - Math.abs(a))) * 0.011111111111111112;
} 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) <= 0.00062: tmp = ((math.fabs(angle) * (t_0 * math.pi)) * (math.fabs(b) - math.fabs(a))) * 0.011111111111111112 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) <= 0.00062) tmp = Float64(Float64(Float64(abs(angle) * Float64(t_0 * pi)) * Float64(abs(b) - abs(a))) * 0.011111111111111112); 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) <= 0.00062) tmp = ((abs(angle) * (t_0 * pi)) * (abs(b) - abs(a))) * 0.011111111111111112; 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], 5718490662849961/9223372036854775808], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(t$95$0 * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1/90), $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 \frac{5718490662849961}{9223372036854775808}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(t\_0 \cdot \pi\right)\right) \cdot \left(\left|b\right| - \left|a\right|\right)\right) \cdot \frac{1}{90}\\
\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 < 6.2e-4Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lower-*.f6454.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.9%
Applied rewrites62.9%
if 6.2e-4 < angle Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.0%
Applied rewrites37.0%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1 angle)
(if (<=
(fabs angle)
4789048565205903/95780971304118053647396689196894323976171195136475136)
(* (* (* (fabs angle) (* (+ a b) PI)) (- b a)) 1/90)
(* (* (fabs angle) PI) (* (* (- b a) (+ a b)) 1/90)))))double code(double a, double b, double angle) {
double tmp;
if (fabs(angle) <= 5e-38) {
tmp = ((fabs(angle) * ((a + b) * ((double) M_PI))) * (b - a)) * 0.011111111111111112;
} else {
tmp = (fabs(angle) * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.abs(angle) <= 5e-38) {
tmp = ((Math.abs(angle) * ((a + b) * Math.PI)) * (b - a)) * 0.011111111111111112;
} else {
tmp = (Math.abs(angle) * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(angle) <= 5e-38: tmp = ((math.fabs(angle) * ((a + b) * math.pi)) * (b - a)) * 0.011111111111111112 else: tmp = (math.fabs(angle) * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) tmp = 0.0 if (abs(angle) <= 5e-38) tmp = Float64(Float64(Float64(abs(angle) * Float64(Float64(a + b) * pi)) * Float64(b - a)) * 0.011111111111111112); else tmp = Float64(Float64(abs(angle) * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112)); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(angle) <= 5e-38) tmp = ((abs(angle) * ((a + b) * pi)) * (b - a)) * 0.011111111111111112; else tmp = (abs(angle) * pi) * (((b - a) * (a + b)) * 0.011111111111111112); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 4789048565205903/95780971304118053647396689196894323976171195136475136], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision], N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq \frac{4789048565205903}{95780971304118053647396689196894323976171195136475136}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(\left(a + b\right) \cdot \pi\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\\
\mathbf{else}:\\
\;\;\;\;\left(\left|angle\right| \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \frac{1}{90}\right)\\
\end{array}
if angle < 5.0000000000000003e-38Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lower-*.f6454.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.9%
Applied rewrites62.9%
if 5.0000000000000003e-38 < angle Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
difference-of-squares-revN/A
unpow2N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites54.2%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1 angle)
(if (<=
(fabs angle)
1461501637330903/1461501637330902918203684832716283019655932542976)
(* 1/90 (* (* (* (fabs angle) PI) (- b a)) (+ a b)))
(* (* (* 1/90 (fabs angle)) PI) (* (- b a) (+ a b))))))double code(double a, double b, double angle) {
double tmp;
if (fabs(angle) <= 1e-33) {
tmp = 0.011111111111111112 * (((fabs(angle) * ((double) M_PI)) * (b - a)) * (a + b));
} else {
tmp = ((0.011111111111111112 * fabs(angle)) * ((double) M_PI)) * ((b - a) * (a + b));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.abs(angle) <= 1e-33) {
tmp = 0.011111111111111112 * (((Math.abs(angle) * Math.PI) * (b - a)) * (a + b));
} else {
tmp = ((0.011111111111111112 * Math.abs(angle)) * Math.PI) * ((b - a) * (a + b));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(angle) <= 1e-33: tmp = 0.011111111111111112 * (((math.fabs(angle) * math.pi) * (b - a)) * (a + b)) else: tmp = ((0.011111111111111112 * math.fabs(angle)) * math.pi) * ((b - a) * (a + b)) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) tmp = 0.0 if (abs(angle) <= 1e-33) tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(abs(angle) * pi) * Float64(b - a)) * Float64(a + b))); else tmp = Float64(Float64(Float64(0.011111111111111112 * abs(angle)) * pi) * Float64(Float64(b - a) * Float64(a + b))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(angle) <= 1e-33) tmp = 0.011111111111111112 * (((abs(angle) * pi) * (b - a)) * (a + b)); else tmp = ((0.011111111111111112 * abs(angle)) * pi) * ((b - a) * (a + b)); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 1461501637330903/1461501637330902918203684832716283019655932542976], N[(1/90 * N[(N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1/90 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq \frac{1461501637330903}{1461501637330902918203684832716283019655932542976}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\left|angle\right| \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\\
\end{array}
if angle < 1.0000000000000001e-33Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.9%
Applied rewrites62.9%
if 1.0000000000000001e-33 < angle Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
difference-of-squares-revN/A
unpow2N/A
unpow2N/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
Applied rewrites54.2%
(FPCore (a b angle)
:precision binary64
(*
(copysign 1 angle)
(if (<=
(fabs angle)
1461501637330903/1461501637330902918203684832716283019655932542976)
(* 1/90 (* (* (* (fabs angle) PI) (- b a)) (+ a b)))
(* 1/90 (* (fabs angle) (* PI (* (+ a b) (- b a))))))))double code(double a, double b, double angle) {
double tmp;
if (fabs(angle) <= 1e-33) {
tmp = 0.011111111111111112 * (((fabs(angle) * ((double) M_PI)) * (b - a)) * (a + b));
} else {
tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * ((a + b) * (b - a))));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double tmp;
if (Math.abs(angle) <= 1e-33) {
tmp = 0.011111111111111112 * (((Math.abs(angle) * Math.PI) * (b - a)) * (a + b));
} else {
tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * ((a + b) * (b - a))));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): tmp = 0 if math.fabs(angle) <= 1e-33: tmp = 0.011111111111111112 * (((math.fabs(angle) * math.pi) * (b - a)) * (a + b)) else: tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * ((a + b) * (b - a)))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) tmp = 0.0 if (abs(angle) <= 1e-33) tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(abs(angle) * pi) * Float64(b - a)) * Float64(a + b))); else tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(Float64(a + b) * Float64(b - a))))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) tmp = 0.0; if (abs(angle) <= 1e-33) tmp = 0.011111111111111112 * (((abs(angle) * pi) * (b - a)) * (a + b)); else tmp = 0.011111111111111112 * (abs(angle) * (pi * ((a + b) * (b - a)))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 1461501637330903/1461501637330902918203684832716283019655932542976], N[(1/90 * N[(N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq \frac{1461501637330903}{1461501637330902918203684832716283019655932542976}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\left|angle\right| \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\
\end{array}
if angle < 1.0000000000000001e-33Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.9%
Applied rewrites62.9%
if 1.0000000000000001e-33 < angle Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) (fabs a))))
(if (<=
(* 2 (- (pow (fabs b) 2) (pow (fabs a) 2)))
6490371073168535/1298074214633706907132624082305024)
(* 1/90 (* angle (* PI (* (+ (fabs a) (fabs b)) t_0))))
(* 1/90 (* (* (fabs b) PI) (* t_0 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))) <= 5e-18) {
tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((fabs(a) + fabs(b)) * t_0)));
} else {
tmp = 0.011111111111111112 * ((fabs(b) * ((double) M_PI)) * (t_0 * 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))) <= 5e-18) {
tmp = 0.011111111111111112 * (angle * (Math.PI * ((Math.abs(a) + Math.abs(b)) * t_0)));
} else {
tmp = 0.011111111111111112 * ((Math.abs(b) * Math.PI) * (t_0 * 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))) <= 5e-18: tmp = 0.011111111111111112 * (angle * (math.pi * ((math.fabs(a) + math.fabs(b)) * t_0))) else: tmp = 0.011111111111111112 * ((math.fabs(b) * math.pi) * (t_0 * 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))) <= 5e-18) tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(abs(a) + abs(b)) * t_0)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(abs(b) * pi) * Float64(t_0 * 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))) <= 5e-18) tmp = 0.011111111111111112 * (angle * (pi * ((abs(a) + abs(b)) * t_0))); else tmp = 0.011111111111111112 * ((abs(b) * pi) * (t_0 * 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 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 6490371073168535/1298074214633706907132624082305024], N[(1/90 * N[(angle * N[(Pi * N[(N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[(N[Abs[b], $MachinePrecision] * Pi), $MachinePrecision] * N[(t$95$0 * angle), $MachinePrecision]), $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 \frac{6490371073168535}{1298074214633706907132624082305024}:\\
\;\;\;\;\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\left|a\right| + \left|b\right|\right) \cdot t\_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot angle\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)))) < 5.0000000000000004e-18Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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 5.0000000000000004e-18 < (*.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
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.7%
Applied rewrites41.7%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) (fabs a))) (t_1 (* PI (/ (fabs angle) 180))))
(*
(copysign 1 angle)
(if (<=
(*
(* (* 2 (- (pow (fabs b) 2) (pow (fabs a) 2))) (sin t_1))
(cos t_1))
49999999999999996681683364986231121055509847158923091289463001947809936825071710129649256226662527266508888537465191395528952846213699856588865536)
(* (* 1/90 (* (* PI t_0) (fabs b))) (fabs angle))
(* 1/90 (* (* (fabs b) PI) (* t_0 (fabs angle))))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - fabs(a);
double t_1 = ((double) M_PI) * (fabs(angle) / 180.0);
double tmp;
if ((((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) * sin(t_1)) * cos(t_1)) <= 5e+145) {
tmp = (0.011111111111111112 * ((((double) M_PI) * t_0) * fabs(b))) * fabs(angle);
} else {
tmp = 0.011111111111111112 * ((fabs(b) * ((double) M_PI)) * (t_0 * fabs(angle)));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(b) - Math.abs(a);
double t_1 = Math.PI * (Math.abs(angle) / 180.0);
double tmp;
if ((((2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0))) * Math.sin(t_1)) * Math.cos(t_1)) <= 5e+145) {
tmp = (0.011111111111111112 * ((Math.PI * t_0) * Math.abs(b))) * Math.abs(angle);
} else {
tmp = 0.011111111111111112 * ((Math.abs(b) * Math.PI) * (t_0 * Math.abs(angle)));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - math.fabs(a) t_1 = math.pi * (math.fabs(angle) / 180.0) tmp = 0 if (((2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0))) * math.sin(t_1)) * math.cos(t_1)) <= 5e+145: tmp = (0.011111111111111112 * ((math.pi * t_0) * math.fabs(b))) * math.fabs(angle) else: tmp = 0.011111111111111112 * ((math.fabs(b) * math.pi) * (t_0 * math.fabs(angle))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - abs(a)) t_1 = Float64(pi * Float64(abs(angle) / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 5e+145) tmp = Float64(Float64(0.011111111111111112 * Float64(Float64(pi * t_0) * abs(b))) * abs(angle)); else tmp = Float64(0.011111111111111112 * Float64(Float64(abs(b) * pi) * Float64(t_0 * abs(angle)))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - abs(a); t_1 = pi * (abs(angle) / 180.0); tmp = 0.0; if ((((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 5e+145) tmp = (0.011111111111111112 * ((pi * t_0) * abs(b))) * abs(angle); else tmp = 0.011111111111111112 * ((abs(b) * pi) * (t_0 * abs(angle))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[(N[(2 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 49999999999999996681683364986231121055509847158923091289463001947809936825071710129649256226662527266508888537465191395528952846213699856588865536], N[(N[(1/90 * N[(N[(Pi * t$95$0), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[(N[Abs[b], $MachinePrecision] * Pi), $MachinePrecision] * N[(t$95$0 * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|b\right| - \left|a\right|\\
t_1 := \pi \cdot \frac{\left|angle\right|}{180}\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq 49999999999999996681683364986231121055509847158923091289463001947809936825071710129649256226662527266508888537465191395528952846213699856588865536:\\
\;\;\;\;\left(\frac{1}{90} \cdot \left(\left(\pi \cdot t\_0\right) \cdot \left|b\right|\right)\right) \cdot \left|angle\right|\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot \left|angle\right|\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 4.9999999999999997e145Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6437.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6437.7%
Applied rewrites37.7%
if 4.9999999999999997e145 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.7%
Applied rewrites41.7%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) (fabs a))) (t_1 (* PI (/ (fabs angle) 180))))
(*
(copysign 1 angle)
(if (<=
(*
(* (* 2 (- (pow (fabs b) 2) (pow (fabs a) 2))) (sin t_1))
(cos t_1))
6518515124270355/32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016)
(* 1/90 (* (* (* PI t_0) (fabs b)) (fabs angle)))
(* 1/90 (* (* (fabs b) PI) (* t_0 (fabs angle))))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - fabs(a);
double t_1 = ((double) M_PI) * (fabs(angle) / 180.0);
double tmp;
if ((((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76) {
tmp = 0.011111111111111112 * (((((double) M_PI) * t_0) * fabs(b)) * fabs(angle));
} else {
tmp = 0.011111111111111112 * ((fabs(b) * ((double) M_PI)) * (t_0 * fabs(angle)));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(b) - Math.abs(a);
double t_1 = Math.PI * (Math.abs(angle) / 180.0);
double tmp;
if ((((2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0))) * Math.sin(t_1)) * Math.cos(t_1)) <= 2e-76) {
tmp = 0.011111111111111112 * (((Math.PI * t_0) * Math.abs(b)) * Math.abs(angle));
} else {
tmp = 0.011111111111111112 * ((Math.abs(b) * Math.PI) * (t_0 * Math.abs(angle)));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - math.fabs(a) t_1 = math.pi * (math.fabs(angle) / 180.0) tmp = 0 if (((2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0))) * math.sin(t_1)) * math.cos(t_1)) <= 2e-76: tmp = 0.011111111111111112 * (((math.pi * t_0) * math.fabs(b)) * math.fabs(angle)) else: tmp = 0.011111111111111112 * ((math.fabs(b) * math.pi) * (t_0 * math.fabs(angle))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - abs(a)) t_1 = Float64(pi * Float64(abs(angle) / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76) tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(pi * t_0) * abs(b)) * abs(angle))); else tmp = Float64(0.011111111111111112 * Float64(Float64(abs(b) * pi) * Float64(t_0 * abs(angle)))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - abs(a); t_1 = pi * (abs(angle) / 180.0); tmp = 0.0; if ((((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76) tmp = 0.011111111111111112 * (((pi * t_0) * abs(b)) * abs(angle)); else tmp = 0.011111111111111112 * ((abs(b) * pi) * (t_0 * abs(angle))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[(N[(2 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 6518515124270355/32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016], N[(1/90 * N[(N[(N[(Pi * t$95$0), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[(N[Abs[b], $MachinePrecision] * Pi), $MachinePrecision] * N[(t$95$0 * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|b\right| - \left|a\right|\\
t_1 := \pi \cdot \frac{\left|angle\right|}{180}\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq \frac{6518515124270355}{32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\pi \cdot t\_0\right) \cdot \left|b\right|\right) \cdot \left|angle\right|\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot \left|angle\right|\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1.9999999999999999e-76Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.7%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6437.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6437.7%
Applied rewrites37.7%
if 1.9999999999999999e-76 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.7%
Applied rewrites41.7%
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (- (fabs b) (fabs a))) (t_1 (* PI (/ (fabs angle) 180))))
(*
(copysign 1 angle)
(if (<=
(*
(* (* 2 (- (pow (fabs b) 2) (pow (fabs a) 2))) (sin t_1))
(cos t_1))
6518515124270355/32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016)
(* 1/90 (* (fabs angle) (* PI (* (fabs b) t_0))))
(* 1/90 (* (* (fabs b) PI) (* t_0 (fabs angle))))))))double code(double a, double b, double angle) {
double t_0 = fabs(b) - fabs(a);
double t_1 = ((double) M_PI) * (fabs(angle) / 180.0);
double tmp;
if ((((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76) {
tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (fabs(b) * t_0)));
} else {
tmp = 0.011111111111111112 * ((fabs(b) * ((double) M_PI)) * (t_0 * fabs(angle)));
}
return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
double t_0 = Math.abs(b) - Math.abs(a);
double t_1 = Math.PI * (Math.abs(angle) / 180.0);
double tmp;
if ((((2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0))) * Math.sin(t_1)) * Math.cos(t_1)) <= 2e-76) {
tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (Math.abs(b) * t_0)));
} else {
tmp = 0.011111111111111112 * ((Math.abs(b) * Math.PI) * (t_0 * Math.abs(angle)));
}
return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle): t_0 = math.fabs(b) - math.fabs(a) t_1 = math.pi * (math.fabs(angle) / 180.0) tmp = 0 if (((2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0))) * math.sin(t_1)) * math.cos(t_1)) <= 2e-76: tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (math.fabs(b) * t_0))) else: tmp = 0.011111111111111112 * ((math.fabs(b) * math.pi) * (t_0 * math.fabs(angle))) return math.copysign(1.0, angle) * tmp
function code(a, b, angle) t_0 = Float64(abs(b) - abs(a)) t_1 = Float64(pi * Float64(abs(angle) / 180.0)) tmp = 0.0 if (Float64(Float64(Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76) tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(abs(b) * t_0)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(abs(b) * pi) * Float64(t_0 * abs(angle)))); end return Float64(copysign(1.0, angle) * tmp) end
function tmp_2 = code(a, b, angle) t_0 = abs(b) - abs(a); t_1 = pi * (abs(angle) / 180.0); tmp = 0.0; if ((((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76) tmp = 0.011111111111111112 * (abs(angle) * (pi * (abs(b) * t_0))); else tmp = 0.011111111111111112 * ((abs(b) * pi) * (t_0 * abs(angle))); end tmp_2 = (sign(angle) * abs(1.0)) * tmp; end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[(N[(2 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 6518515124270355/32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(N[Abs[b], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[(N[Abs[b], $MachinePrecision] * Pi), $MachinePrecision] * N[(t$95$0 * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|b\right| - \left|a\right|\\
t_1 := \pi \cdot \frac{\left|angle\right|}{180}\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq \frac{6518515124270355}{32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\left|b\right| \cdot t\_0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot \left|angle\right|\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1.9999999999999999e-76Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.7%
if 1.9999999999999999e-76 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.7%
Applied rewrites41.7%
(FPCore (a b angle) :precision binary64 (* 1/90 (* angle (* PI (* (fabs b) (- (fabs b) (fabs a)))))))
double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (((double) M_PI) * (fabs(b) * (fabs(b) - fabs(a)))));
}
public static double code(double a, double b, double angle) {
return 0.011111111111111112 * (angle * (Math.PI * (Math.abs(b) * (Math.abs(b) - Math.abs(a)))));
}
def code(a, b, angle): return 0.011111111111111112 * (angle * (math.pi * (math.fabs(b) * (math.fabs(b) - math.fabs(a)))))
function code(a, b, angle) return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(abs(b) * Float64(abs(b) - abs(a)))))) end
function tmp = code(a, b, angle) tmp = 0.011111111111111112 * (angle * (pi * (abs(b) * (abs(b) - abs(a))))); end
code[a_, b_, angle_] := N[(1/90 * N[(angle * N[(Pi * N[(N[Abs[b], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left|b\right| \cdot \left(\left|b\right| - \left|a\right|\right)\right)\right)\right)
Initial program 54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/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
lift-sin.f64N/A
lift-cos.f64N/A
Applied rewrites68.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.7%
herbie shell --seed 2025285 -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)))))