
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\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}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a b angle) :precision binary64 (let* ((t_0 (* PI (/ angle 180.0)))) (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (angle / 180.0);
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
}
public static double code(double a, double b, double angle) {
double t_0 = Math.PI * (angle / 180.0);
return ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
}
def code(a, b, angle): t_0 = math.pi * (angle / 180.0) return ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
function code(a, b, angle) t_0 = Float64(pi * Float64(angle / 180.0)) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) end
function tmp = code(a, b, angle) t_0 = pi * (angle / 180.0); tmp = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0); end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\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}
\end{array}
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle_m)))
(t_1 (* 0.005555555555555556 (* angle_m PI))))
(*
angle_s
(if (<= b_m 1.62e-74)
(* 2.0 (* (* (* (sin t_0) (+ a_m b_m)) (- b_m a_m)) (cos t_1)))
(if (<= b_m 1.25e+185)
(*
2.0
(*
(cos (pow (cbrt t_0) 3.0))
(* (- b_m a_m) (* (sin t_1) (+ a_m b_m)))))
(if (<= b_m 1.16e+197)
(* 2.0 (* (- b_m a_m) (* b_m (sin (expm1 (log1p t_0))))))
(if (<= b_m 4.4e+237)
(*
(+ a_m b_m)
(*
(- b_m a_m)
(sin (* (* angle_m (cbrt (pow PI 3.0))) 0.011111111111111112))))
(*
2.0
(*
b_m
(*
(- b_m a_m)
(sin (* angle_m (* 0.005555555555555556 PI)))))))))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle_m);
double t_1 = 0.005555555555555556 * (angle_m * ((double) M_PI));
double tmp;
if (b_m <= 1.62e-74) {
tmp = 2.0 * (((sin(t_0) * (a_m + b_m)) * (b_m - a_m)) * cos(t_1));
} else if (b_m <= 1.25e+185) {
tmp = 2.0 * (cos(pow(cbrt(t_0), 3.0)) * ((b_m - a_m) * (sin(t_1) * (a_m + b_m))));
} else if (b_m <= 1.16e+197) {
tmp = 2.0 * ((b_m - a_m) * (b_m * sin(expm1(log1p(t_0)))));
} else if (b_m <= 4.4e+237) {
tmp = (a_m + b_m) * ((b_m - a_m) * sin(((angle_m * cbrt(pow(((double) M_PI), 3.0))) * 0.011111111111111112)));
} else {
tmp = 2.0 * (b_m * ((b_m - a_m) * sin((angle_m * (0.005555555555555556 * ((double) M_PI))))));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double t_0 = Math.PI * (0.005555555555555556 * angle_m);
double t_1 = 0.005555555555555556 * (angle_m * Math.PI);
double tmp;
if (b_m <= 1.62e-74) {
tmp = 2.0 * (((Math.sin(t_0) * (a_m + b_m)) * (b_m - a_m)) * Math.cos(t_1));
} else if (b_m <= 1.25e+185) {
tmp = 2.0 * (Math.cos(Math.pow(Math.cbrt(t_0), 3.0)) * ((b_m - a_m) * (Math.sin(t_1) * (a_m + b_m))));
} else if (b_m <= 1.16e+197) {
tmp = 2.0 * ((b_m - a_m) * (b_m * Math.sin(Math.expm1(Math.log1p(t_0)))));
} else if (b_m <= 4.4e+237) {
tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin(((angle_m * Math.cbrt(Math.pow(Math.PI, 3.0))) * 0.011111111111111112)));
} else {
tmp = 2.0 * (b_m * ((b_m - a_m) * Math.sin((angle_m * (0.005555555555555556 * Math.PI)))));
}
return angle_s * tmp;
}
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) t_0 = Float64(pi * Float64(0.005555555555555556 * angle_m)) t_1 = Float64(0.005555555555555556 * Float64(angle_m * pi)) tmp = 0.0 if (b_m <= 1.62e-74) tmp = Float64(2.0 * Float64(Float64(Float64(sin(t_0) * Float64(a_m + b_m)) * Float64(b_m - a_m)) * cos(t_1))); elseif (b_m <= 1.25e+185) tmp = Float64(2.0 * Float64(cos((cbrt(t_0) ^ 3.0)) * Float64(Float64(b_m - a_m) * Float64(sin(t_1) * Float64(a_m + b_m))))); elseif (b_m <= 1.16e+197) tmp = Float64(2.0 * Float64(Float64(b_m - a_m) * Float64(b_m * sin(expm1(log1p(t_0)))))); elseif (b_m <= 4.4e+237) tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(Float64(angle_m * cbrt((pi ^ 3.0))) * 0.011111111111111112)))); else tmp = Float64(2.0 * Float64(b_m * Float64(Float64(b_m - a_m) * sin(Float64(angle_m * Float64(0.005555555555555556 * pi)))))); end return Float64(angle_s * tmp) end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 1.62e-74], N[(2.0 * N[(N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.25e+185], N[(2.0 * N[(N[Cos[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.16e+197], N[(2.0 * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m * N[Sin[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 4.4e+237], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 1.62 \cdot 10^{-74}:\\
\;\;\;\;2 \cdot \left(\left(\left(\sin t\_0 \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \cos t\_1\right)\\
\mathbf{elif}\;b\_m \leq 1.25 \cdot 10^{+185}:\\
\;\;\;\;2 \cdot \left(\cos \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\sin t\_1 \cdot \left(a\_m + b\_m\right)\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 1.16 \cdot 10^{+197}:\\
\;\;\;\;2 \cdot \left(\left(b\_m - a\_m\right) \cdot \left(b\_m \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 4.4 \cdot 10^{+237}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\left(angle\_m \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\\
\end{array}
\end{array}
\end{array}
if b < 1.62000000000000007e-74Initial program 62.1%
associate-*l*62.1%
*-commutative62.1%
associate-*l*62.1%
Simplified62.1%
unpow262.1%
unpow262.1%
difference-of-squares64.3%
Applied egg-rr64.3%
add-cube-cbrt63.0%
pow263.0%
Applied egg-rr63.0%
Taylor expanded in angle around inf 63.6%
associate-*r*62.9%
associate-*r*69.0%
associate-*r*68.4%
Simplified68.4%
Taylor expanded in angle around inf 68.5%
if 1.62000000000000007e-74 < b < 1.24999999999999997e185Initial program 50.8%
associate-*l*50.8%
*-commutative50.8%
associate-*l*50.8%
Simplified50.8%
unpow250.8%
unpow250.8%
difference-of-squares53.3%
Applied egg-rr53.3%
add-cube-cbrt49.4%
pow249.4%
Applied egg-rr49.4%
Taylor expanded in angle around inf 51.3%
associate-*r*50.8%
associate-*r*59.7%
associate-*r*59.7%
Simplified59.7%
*-commutative59.7%
*-commutative59.7%
add-cube-cbrt62.9%
pow365.3%
Applied egg-rr65.3%
Taylor expanded in angle around inf 65.3%
if 1.24999999999999997e185 < b < 1.16e197Initial program 51.5%
associate-*l*51.5%
*-commutative51.5%
associate-*l*51.5%
Simplified51.5%
unpow251.5%
unpow251.5%
difference-of-squares51.5%
Applied egg-rr51.5%
add-cube-cbrt76.5%
pow276.5%
Applied egg-rr76.5%
Taylor expanded in angle around inf 51.5%
associate-*r*51.5%
associate-*r*75.0%
associate-*r*74.6%
Simplified74.6%
Taylor expanded in angle around 0 99.6%
Taylor expanded in a around 0 100.0%
associate-*r*99.6%
Simplified99.6%
*-commutative99.6%
*-commutative99.6%
expm1-log1p-u74.6%
expm1-undefine25.9%
Applied egg-rr25.9%
expm1-define74.6%
Simplified74.6%
if 1.16e197 < b < 4.4e237Initial program 11.1%
associate-*l*11.1%
*-commutative11.1%
associate-*l*11.1%
Simplified11.1%
unpow211.1%
unpow211.1%
difference-of-squares38.3%
Applied egg-rr38.3%
add-exp-log18.2%
2-sin18.2%
div-inv27.3%
metadata-eval27.3%
Applied egg-rr27.3%
rem-exp-log47.4%
associate-*l*81.7%
+-commutative81.7%
count-281.7%
add-cube-cbrt81.3%
unpow281.3%
metadata-eval81.3%
div-inv81.3%
metadata-eval81.3%
div-inv81.3%
Applied egg-rr81.7%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr99.6%
if 4.4e237 < b Initial program 39.8%
associate-*l*39.8%
*-commutative39.8%
associate-*l*39.8%
Simplified39.8%
unpow239.8%
unpow239.8%
difference-of-squares62.0%
Applied egg-rr62.0%
add-cube-cbrt50.9%
pow250.9%
Applied egg-rr50.9%
Taylor expanded in angle around inf 62.0%
associate-*r*67.6%
associate-*r*77.8%
associate-*r*72.2%
Simplified72.2%
Taylor expanded in angle around 0 83.3%
Taylor expanded in a around 0 83.3%
associate-*r*77.8%
Simplified77.8%
Taylor expanded in b around 0 83.3%
associate-*r*83.3%
neg-mul-183.3%
distribute-rgt-out83.3%
*-commutative83.3%
associate-*r*77.8%
+-commutative77.8%
sub-neg77.8%
Simplified77.8%
Final simplification70.1%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(let* ((t_0 (sin (* 0.005555555555555556 (* angle_m PI))))
(t_1 (cbrt (* angle_m (* 0.005555555555555556 PI))))
(t_2 (* PI (* 0.005555555555555556 angle_m)))
(t_3 (* (* (sin t_2) (+ a_m b_m)) (- b_m a_m))))
(*
angle_s
(if (<= (pow a_m 2.0) 2e-186)
(*
(fma b_m (* 2.0 (* b_m t_0)) (* -2.0 (* (pow a_m 2.0) t_0)))
(sqrt (pow (cos t_2) 2.0)))
(if (<= (pow a_m 2.0) 1e+252)
(* 2.0 (* (cos (* (cbrt t_1) (pow (cbrt (pow t_1 2.0)) 4.0))) t_3))
(*
2.0
(*
t_3
(cos
(*
(pow t_2 0.16666666666666666)
(*
(*
(pow (* angle_m PI) 0.16666666666666666)
(pow 0.005555555555555556 0.16666666666666666))
(pow (cbrt t_2) 2.0)))))))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double t_0 = sin((0.005555555555555556 * (angle_m * ((double) M_PI))));
double t_1 = cbrt((angle_m * (0.005555555555555556 * ((double) M_PI))));
double t_2 = ((double) M_PI) * (0.005555555555555556 * angle_m);
double t_3 = (sin(t_2) * (a_m + b_m)) * (b_m - a_m);
double tmp;
if (pow(a_m, 2.0) <= 2e-186) {
tmp = fma(b_m, (2.0 * (b_m * t_0)), (-2.0 * (pow(a_m, 2.0) * t_0))) * sqrt(pow(cos(t_2), 2.0));
} else if (pow(a_m, 2.0) <= 1e+252) {
tmp = 2.0 * (cos((cbrt(t_1) * pow(cbrt(pow(t_1, 2.0)), 4.0))) * t_3);
} else {
tmp = 2.0 * (t_3 * cos((pow(t_2, 0.16666666666666666) * ((pow((angle_m * ((double) M_PI)), 0.16666666666666666) * pow(0.005555555555555556, 0.16666666666666666)) * pow(cbrt(t_2), 2.0)))));
}
return angle_s * tmp;
}
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) t_0 = sin(Float64(0.005555555555555556 * Float64(angle_m * pi))) t_1 = cbrt(Float64(angle_m * Float64(0.005555555555555556 * pi))) t_2 = Float64(pi * Float64(0.005555555555555556 * angle_m)) t_3 = Float64(Float64(sin(t_2) * Float64(a_m + b_m)) * Float64(b_m - a_m)) tmp = 0.0 if ((a_m ^ 2.0) <= 2e-186) tmp = Float64(fma(b_m, Float64(2.0 * Float64(b_m * t_0)), Float64(-2.0 * Float64((a_m ^ 2.0) * t_0))) * sqrt((cos(t_2) ^ 2.0))); elseif ((a_m ^ 2.0) <= 1e+252) tmp = Float64(2.0 * Float64(cos(Float64(cbrt(t_1) * (cbrt((t_1 ^ 2.0)) ^ 4.0))) * t_3)); else tmp = Float64(2.0 * Float64(t_3 * cos(Float64((t_2 ^ 0.16666666666666666) * Float64(Float64((Float64(angle_m * pi) ^ 0.16666666666666666) * (0.005555555555555556 ^ 0.16666666666666666)) * (cbrt(t_2) ^ 2.0)))))); end return Float64(angle_s * tmp) end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Sin[t$95$2], $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 2e-186], N[(N[(b$95$m * N[(2.0 * N[(b$95$m * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(N[Power[a$95$m, 2.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[N[Cos[t$95$2], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 1e+252], N[(2.0 * N[(N[Cos[N[(N[Power[t$95$1, 1/3], $MachinePrecision] * N[Power[N[Power[N[Power[t$95$1, 2.0], $MachinePrecision], 1/3], $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$3 * N[Cos[N[(N[Power[t$95$2, 0.16666666666666666], $MachinePrecision] * N[(N[(N[Power[N[(angle$95$m * Pi), $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Power[0.005555555555555556, 0.16666666666666666], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\\
t_1 := \sqrt[3]{angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)}\\
t_2 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
t_3 := \left(\sin t\_2 \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a\_m}^{2} \leq 2 \cdot 10^{-186}:\\
\;\;\;\;\mathsf{fma}\left(b\_m, 2 \cdot \left(b\_m \cdot t\_0\right), -2 \cdot \left({a\_m}^{2} \cdot t\_0\right)\right) \cdot \sqrt{{\cos t\_2}^{2}}\\
\mathbf{elif}\;{a\_m}^{2} \leq 10^{+252}:\\
\;\;\;\;2 \cdot \left(\cos \left(\sqrt[3]{t\_1} \cdot {\left(\sqrt[3]{{t\_1}^{2}}\right)}^{4}\right) \cdot t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_3 \cdot \cos \left({t\_2}^{0.16666666666666666} \cdot \left(\left({\left(angle\_m \cdot \pi\right)}^{0.16666666666666666} \cdot {0.005555555555555556}^{0.16666666666666666}\right) \cdot {\left(\sqrt[3]{t\_2}\right)}^{2}\right)\right)\right)\\
\end{array}
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 1.9999999999999998e-186Initial program 64.7%
unpow264.7%
unpow264.7%
difference-of-squares64.7%
Applied egg-rr64.7%
Taylor expanded in b around 0 70.8%
+-commutative70.8%
fma-define70.8%
Simplified70.8%
add-sqr-sqrt62.8%
sqrt-unprod74.6%
pow274.6%
div-inv74.6%
metadata-eval74.6%
Applied egg-rr74.6%
if 1.9999999999999998e-186 < (pow.f64 a #s(literal 2 binary64)) < 1.0000000000000001e252Initial program 55.8%
associate-*l*55.8%
*-commutative55.8%
associate-*l*55.8%
Simplified55.8%
unpow255.8%
unpow255.8%
difference-of-squares55.8%
Applied egg-rr55.8%
add-cube-cbrt54.9%
pow254.9%
Applied egg-rr54.9%
Taylor expanded in angle around inf 56.6%
associate-*r*54.9%
associate-*r*58.4%
associate-*r*58.3%
Simplified58.3%
*-commutative58.3%
*-commutative58.3%
add-cube-cbrt57.1%
pow359.4%
Applied egg-rr59.4%
unpow357.1%
add-cube-cbrt58.0%
associate-*r*58.9%
pow258.9%
cbrt-unprod59.8%
pow259.8%
Applied egg-rr59.8%
*-commutative59.8%
associate-*r*59.7%
*-commutative59.7%
associate-*r*59.7%
rem-cube-cbrt59.4%
pow-plus60.2%
associate-*r*60.9%
*-commutative60.9%
associate-*r*61.3%
metadata-eval61.3%
Simplified61.3%
if 1.0000000000000001e252 < (pow.f64 a #s(literal 2 binary64)) Initial program 44.9%
associate-*l*44.9%
*-commutative44.9%
associate-*l*44.9%
Simplified44.9%
unpow244.9%
unpow244.9%
difference-of-squares61.5%
Applied egg-rr61.5%
add-cube-cbrt57.2%
pow257.2%
Applied egg-rr57.2%
Taylor expanded in angle around inf 61.4%
associate-*r*61.7%
associate-*r*76.9%
associate-*r*72.8%
Simplified72.8%
*-commutative72.8%
*-commutative72.8%
add-cube-cbrt81.0%
pow379.7%
Applied egg-rr79.7%
cube-mult81.0%
add-sqr-sqrt39.7%
associate-*l*39.7%
pow1/335.6%
sqrt-pow137.0%
metadata-eval37.0%
pow1/337.2%
sqrt-pow135.9%
metadata-eval35.9%
pow235.9%
Applied egg-rr35.9%
associate-*r*37.2%
*-commutative37.2%
unpow-prod-down38.6%
*-commutative38.6%
Applied egg-rr38.6%
Final simplification60.2%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= b_m 1.2e+198)
(*
(+ a_m b_m)
(*
(- b_m a_m)
(sin
(*
0.011111111111111112
(* angle_m (* (cbrt PI) (pow (cbrt PI) 2.0)))))))
(if (<= b_m 8.5e+246)
(*
(+ a_m b_m)
(*
(- b_m a_m)
(sin (* (* angle_m (cbrt (pow PI 3.0))) 0.011111111111111112))))
(*
2.0
(*
b_m
(* (- b_m a_m) (sin (* angle_m (* 0.005555555555555556 PI))))))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (b_m <= 1.2e+198) {
tmp = (a_m + b_m) * ((b_m - a_m) * sin((0.011111111111111112 * (angle_m * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))))));
} else if (b_m <= 8.5e+246) {
tmp = (a_m + b_m) * ((b_m - a_m) * sin(((angle_m * cbrt(pow(((double) M_PI), 3.0))) * 0.011111111111111112)));
} else {
tmp = 2.0 * (b_m * ((b_m - a_m) * sin((angle_m * (0.005555555555555556 * ((double) M_PI))))));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (b_m <= 1.2e+198) {
tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin((0.011111111111111112 * (angle_m * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0))))));
} else if (b_m <= 8.5e+246) {
tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin(((angle_m * Math.cbrt(Math.pow(Math.PI, 3.0))) * 0.011111111111111112)));
} else {
tmp = 2.0 * (b_m * ((b_m - a_m) * Math.sin((angle_m * (0.005555555555555556 * Math.PI)))));
}
return angle_s * tmp;
}
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if (b_m <= 1.2e+198) tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(0.011111111111111112 * Float64(angle_m * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))))); elseif (b_m <= 8.5e+246) tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(Float64(angle_m * cbrt((pi ^ 3.0))) * 0.011111111111111112)))); else tmp = Float64(2.0 * Float64(b_m * Float64(Float64(b_m - a_m) * sin(Float64(angle_m * Float64(0.005555555555555556 * pi)))))); end return Float64(angle_s * tmp) end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b$95$m, 1.2e+198], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle$95$m * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 8.5e+246], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 1.2 \cdot 10^{+198}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 8.5 \cdot 10^{+246}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\left(angle\_m \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\\
\end{array}
\end{array}
if b < 1.2000000000000001e198Initial program 59.8%
associate-*l*59.8%
*-commutative59.8%
associate-*l*59.8%
Simplified59.8%
unpow259.8%
unpow259.8%
difference-of-squares62.0%
Applied egg-rr62.0%
add-exp-log35.6%
2-sin35.6%
div-inv34.9%
metadata-eval34.9%
Applied egg-rr34.9%
rem-exp-log60.0%
associate-*l*66.9%
+-commutative66.9%
count-266.9%
add-cube-cbrt66.1%
unpow266.1%
metadata-eval66.1%
div-inv67.4%
metadata-eval67.4%
div-inv67.0%
Applied egg-rr68.0%
add-cube-cbrt60.7%
pow260.7%
Applied egg-rr69.0%
if 1.2000000000000001e198 < b < 8.49999999999999952e246Initial program 10.1%
associate-*l*10.1%
*-commutative10.1%
associate-*l*10.1%
Simplified10.1%
unpow210.1%
unpow210.1%
difference-of-squares35.1%
Applied egg-rr35.1%
add-exp-log16.7%
2-sin16.7%
div-inv25.0%
metadata-eval25.0%
Applied egg-rr25.0%
rem-exp-log43.5%
associate-*l*74.9%
+-commutative74.9%
count-274.9%
add-cube-cbrt74.5%
unpow274.5%
metadata-eval74.5%
div-inv74.5%
metadata-eval74.5%
div-inv74.5%
Applied egg-rr74.9%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr99.6%
if 8.49999999999999952e246 < b Initial program 42.1%
associate-*l*42.1%
*-commutative42.1%
associate-*l*42.1%
Simplified42.1%
unpow242.1%
unpow242.1%
difference-of-squares65.7%
Applied egg-rr65.7%
add-cube-cbrt53.9%
pow253.9%
Applied egg-rr53.9%
Taylor expanded in angle around inf 65.7%
associate-*r*65.7%
associate-*r*76.5%
associate-*r*76.5%
Simplified76.5%
Taylor expanded in angle around 0 88.2%
Taylor expanded in a around 0 82.4%
associate-*r*82.4%
Simplified82.4%
Taylor expanded in b around 0 82.4%
associate-*r*82.4%
neg-mul-182.4%
distribute-rgt-out82.4%
*-commutative82.4%
associate-*r*82.4%
+-commutative82.4%
sub-neg82.4%
Simplified82.4%
Final simplification71.3%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(let* ((t_0 (sin (* (* angle_m PI) 0.011111111111111112))))
(*
angle_s
(if (<= (pow b_m 2.0) 2e-260)
(* (* a_m t_0) (- (- b_m) a_m))
(if (<= (pow b_m 2.0) 5e+128)
(* t_0 (* (+ a_m b_m) (- b_m a_m)))
(*
(+ a_m b_m)
(* angle_m (* (- b_m a_m) (* PI 0.011111111111111112)))))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double t_0 = sin(((angle_m * ((double) M_PI)) * 0.011111111111111112));
double tmp;
if (pow(b_m, 2.0) <= 2e-260) {
tmp = (a_m * t_0) * (-b_m - a_m);
} else if (pow(b_m, 2.0) <= 5e+128) {
tmp = t_0 * ((a_m + b_m) * (b_m - a_m));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (((double) M_PI) * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double t_0 = Math.sin(((angle_m * Math.PI) * 0.011111111111111112));
double tmp;
if (Math.pow(b_m, 2.0) <= 2e-260) {
tmp = (a_m * t_0) * (-b_m - a_m);
} else if (Math.pow(b_m, 2.0) <= 5e+128) {
tmp = t_0 * ((a_m + b_m) * (b_m - a_m));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (Math.PI * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): t_0 = math.sin(((angle_m * math.pi) * 0.011111111111111112)) tmp = 0 if math.pow(b_m, 2.0) <= 2e-260: tmp = (a_m * t_0) * (-b_m - a_m) elif math.pow(b_m, 2.0) <= 5e+128: tmp = t_0 * ((a_m + b_m) * (b_m - a_m)) else: tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (math.pi * 0.011111111111111112))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) t_0 = sin(Float64(Float64(angle_m * pi) * 0.011111111111111112)) tmp = 0.0 if ((b_m ^ 2.0) <= 2e-260) tmp = Float64(Float64(a_m * t_0) * Float64(Float64(-b_m) - a_m)); elseif ((b_m ^ 2.0) <= 5e+128) tmp = Float64(t_0 * Float64(Float64(a_m + b_m) * Float64(b_m - a_m))); else tmp = Float64(Float64(a_m + b_m) * Float64(angle_m * Float64(Float64(b_m - a_m) * Float64(pi * 0.011111111111111112)))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) t_0 = sin(((angle_m * pi) * 0.011111111111111112)); tmp = 0.0; if ((b_m ^ 2.0) <= 2e-260) tmp = (a_m * t_0) * (-b_m - a_m); elseif ((b_m ^ 2.0) <= 5e+128) tmp = t_0 * ((a_m + b_m) * (b_m - a_m)); else tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (pi * 0.011111111111111112))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 2e-260], N[(N[(a$95$m * t$95$0), $MachinePrecision] * N[((-b$95$m) - a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 5e+128], N[(t$95$0 * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{-260}:\\
\;\;\;\;\left(a\_m \cdot t\_0\right) \cdot \left(\left(-b\_m\right) - a\_m\right)\\
\mathbf{elif}\;{b\_m}^{2} \leq 5 \cdot 10^{+128}:\\
\;\;\;\;t\_0 \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 1.99999999999999992e-260Initial program 74.0%
associate-*l*74.0%
*-commutative74.0%
associate-*l*74.0%
Simplified74.0%
unpow274.0%
unpow274.0%
difference-of-squares74.0%
Applied egg-rr74.0%
add-exp-log52.8%
2-sin52.8%
div-inv52.0%
metadata-eval52.0%
Applied egg-rr52.0%
rem-exp-log72.9%
associate-*l*79.2%
+-commutative79.2%
count-279.2%
add-cube-cbrt79.8%
unpow279.8%
metadata-eval79.8%
div-inv79.7%
metadata-eval79.7%
div-inv78.3%
Applied egg-rr81.1%
Taylor expanded in b around 0 80.2%
mul-1-neg80.2%
*-commutative80.2%
distribute-rgt-neg-in80.2%
Simplified80.2%
if 1.99999999999999992e-260 < (pow.f64 b #s(literal 2 binary64)) < 5e128Initial program 53.5%
associate-*l*53.5%
*-commutative53.5%
associate-*l*53.5%
Simplified53.5%
unpow253.5%
unpow253.5%
difference-of-squares53.6%
Applied egg-rr53.6%
add-exp-log29.8%
2-sin29.8%
div-inv30.1%
metadata-eval30.1%
Applied egg-rr30.1%
rem-exp-log52.5%
difference-of-squares52.5%
pow252.5%
unpow252.5%
count-252.5%
add-cube-cbrt51.2%
unpow251.2%
metadata-eval51.2%
div-inv50.9%
metadata-eval50.9%
div-inv51.1%
Applied egg-rr52.6%
unpow253.5%
unpow253.5%
difference-of-squares53.6%
Applied egg-rr52.6%
if 5e128 < (pow.f64 b #s(literal 2 binary64)) Initial program 46.0%
associate-*l*46.0%
*-commutative46.0%
associate-*l*46.0%
Simplified46.0%
unpow246.0%
unpow246.0%
difference-of-squares57.6%
Applied egg-rr57.6%
add-exp-log26.7%
2-sin26.7%
div-inv26.7%
metadata-eval26.7%
Applied egg-rr26.7%
rem-exp-log55.7%
associate-*l*69.1%
+-commutative69.1%
count-269.1%
add-cube-cbrt66.8%
unpow266.8%
metadata-eval66.8%
div-inv70.0%
metadata-eval70.0%
div-inv69.9%
Applied egg-rr70.1%
expm1-log1p-u70.1%
expm1-undefine24.4%
associate-*l*22.6%
Applied egg-rr22.6%
Taylor expanded in angle around 0 74.4%
*-commutative74.4%
associate-*r*74.5%
*-commutative74.5%
associate-*l*74.5%
Simplified74.5%
Final simplification69.4%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= b_m 6.7e+193)
(*
(+ a_m b_m)
(* (- b_m a_m) (sin (* (* angle_m PI) 0.011111111111111112))))
(if (<= b_m 1e+247)
(*
2.0
(*
(- b_m a_m)
(*
b_m
(sin (* (* 0.005555555555555556 angle_m) (cbrt (pow PI 3.0)))))))
(*
2.0
(*
b_m
(* (- b_m a_m) (sin (* angle_m (* 0.005555555555555556 PI))))))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (b_m <= 6.7e+193) {
tmp = (a_m + b_m) * ((b_m - a_m) * sin(((angle_m * ((double) M_PI)) * 0.011111111111111112)));
} else if (b_m <= 1e+247) {
tmp = 2.0 * ((b_m - a_m) * (b_m * sin(((0.005555555555555556 * angle_m) * cbrt(pow(((double) M_PI), 3.0))))));
} else {
tmp = 2.0 * (b_m * ((b_m - a_m) * sin((angle_m * (0.005555555555555556 * ((double) M_PI))))));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (b_m <= 6.7e+193) {
tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin(((angle_m * Math.PI) * 0.011111111111111112)));
} else if (b_m <= 1e+247) {
tmp = 2.0 * ((b_m - a_m) * (b_m * Math.sin(((0.005555555555555556 * angle_m) * Math.cbrt(Math.pow(Math.PI, 3.0))))));
} else {
tmp = 2.0 * (b_m * ((b_m - a_m) * Math.sin((angle_m * (0.005555555555555556 * Math.PI)))));
}
return angle_s * tmp;
}
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if (b_m <= 6.7e+193) tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(Float64(angle_m * pi) * 0.011111111111111112)))); elseif (b_m <= 1e+247) tmp = Float64(2.0 * Float64(Float64(b_m - a_m) * Float64(b_m * sin(Float64(Float64(0.005555555555555556 * angle_m) * cbrt((pi ^ 3.0))))))); else tmp = Float64(2.0 * Float64(b_m * Float64(Float64(b_m - a_m) * sin(Float64(angle_m * Float64(0.005555555555555556 * pi)))))); end return Float64(angle_s * tmp) end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b$95$m, 6.7e+193], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1e+247], N[(2.0 * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 6.7 \cdot 10^{+193}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{elif}\;b\_m \leq 10^{+247}:\\
\;\;\;\;2 \cdot \left(\left(b\_m - a\_m\right) \cdot \left(b\_m \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\\
\end{array}
\end{array}
if b < 6.7000000000000003e193Initial program 59.6%
associate-*l*59.6%
*-commutative59.6%
associate-*l*59.6%
Simplified59.6%
unpow259.6%
unpow259.6%
difference-of-squares61.9%
Applied egg-rr61.9%
add-exp-log35.7%
2-sin35.7%
div-inv35.1%
metadata-eval35.1%
Applied egg-rr35.1%
rem-exp-log59.8%
associate-*l*66.8%
+-commutative66.8%
count-266.8%
add-cube-cbrt65.9%
unpow265.9%
metadata-eval65.9%
div-inv67.2%
metadata-eval67.2%
div-inv66.8%
Applied egg-rr67.9%
if 6.7000000000000003e193 < b < 9.99999999999999952e246Initial program 17.1%
associate-*l*17.1%
*-commutative17.1%
associate-*l*17.1%
Simplified17.1%
unpow217.1%
unpow217.1%
difference-of-squares40.1%
Applied egg-rr40.1%
add-cube-cbrt47.8%
pow247.8%
Applied egg-rr47.8%
Taylor expanded in angle around inf 47.8%
associate-*r*55.5%
associate-*r*84.5%
associate-*r*76.8%
Simplified76.8%
Taylor expanded in angle around 0 76.8%
Taylor expanded in a around 0 76.8%
associate-*r*69.1%
Simplified69.1%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr84.4%
if 9.99999999999999952e246 < b Initial program 42.1%
associate-*l*42.1%
*-commutative42.1%
associate-*l*42.1%
Simplified42.1%
unpow242.1%
unpow242.1%
difference-of-squares65.7%
Applied egg-rr65.7%
add-cube-cbrt53.9%
pow253.9%
Applied egg-rr53.9%
Taylor expanded in angle around inf 65.7%
associate-*r*65.7%
associate-*r*76.5%
associate-*r*76.5%
Simplified76.5%
Taylor expanded in angle around 0 88.2%
Taylor expanded in a around 0 82.4%
associate-*r*82.4%
Simplified82.4%
Taylor expanded in b around 0 82.4%
associate-*r*82.4%
neg-mul-182.4%
distribute-rgt-out82.4%
*-commutative82.4%
associate-*r*82.4%
+-commutative82.4%
sub-neg82.4%
Simplified82.4%
Final simplification69.7%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle_m))))
(*
angle_s
(if (<= b_m 6e+84)
(*
2.0
(*
(* (* (sin t_0) (+ a_m b_m)) (- b_m a_m))
(cos (* 0.005555555555555556 (* angle_m PI)))))
(if (<= b_m 1.45e+264)
(* 2.0 (* (- b_m a_m) (* t_0 (+ a_m b_m))))
(*
2.0
(*
b_m
(* (- b_m a_m) (sin (* angle_m (* 0.005555555555555556 PI)))))))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle_m);
double tmp;
if (b_m <= 6e+84) {
tmp = 2.0 * (((sin(t_0) * (a_m + b_m)) * (b_m - a_m)) * cos((0.005555555555555556 * (angle_m * ((double) M_PI)))));
} else if (b_m <= 1.45e+264) {
tmp = 2.0 * ((b_m - a_m) * (t_0 * (a_m + b_m)));
} else {
tmp = 2.0 * (b_m * ((b_m - a_m) * sin((angle_m * (0.005555555555555556 * ((double) M_PI))))));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double t_0 = Math.PI * (0.005555555555555556 * angle_m);
double tmp;
if (b_m <= 6e+84) {
tmp = 2.0 * (((Math.sin(t_0) * (a_m + b_m)) * (b_m - a_m)) * Math.cos((0.005555555555555556 * (angle_m * Math.PI))));
} else if (b_m <= 1.45e+264) {
tmp = 2.0 * ((b_m - a_m) * (t_0 * (a_m + b_m)));
} else {
tmp = 2.0 * (b_m * ((b_m - a_m) * Math.sin((angle_m * (0.005555555555555556 * Math.PI)))));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): t_0 = math.pi * (0.005555555555555556 * angle_m) tmp = 0 if b_m <= 6e+84: tmp = 2.0 * (((math.sin(t_0) * (a_m + b_m)) * (b_m - a_m)) * math.cos((0.005555555555555556 * (angle_m * math.pi)))) elif b_m <= 1.45e+264: tmp = 2.0 * ((b_m - a_m) * (t_0 * (a_m + b_m))) else: tmp = 2.0 * (b_m * ((b_m - a_m) * math.sin((angle_m * (0.005555555555555556 * math.pi))))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) t_0 = Float64(pi * Float64(0.005555555555555556 * angle_m)) tmp = 0.0 if (b_m <= 6e+84) tmp = Float64(2.0 * Float64(Float64(Float64(sin(t_0) * Float64(a_m + b_m)) * Float64(b_m - a_m)) * cos(Float64(0.005555555555555556 * Float64(angle_m * pi))))); elseif (b_m <= 1.45e+264) tmp = Float64(2.0 * Float64(Float64(b_m - a_m) * Float64(t_0 * Float64(a_m + b_m)))); else tmp = Float64(2.0 * Float64(b_m * Float64(Float64(b_m - a_m) * sin(Float64(angle_m * Float64(0.005555555555555556 * pi)))))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) t_0 = pi * (0.005555555555555556 * angle_m); tmp = 0.0; if (b_m <= 6e+84) tmp = 2.0 * (((sin(t_0) * (a_m + b_m)) * (b_m - a_m)) * cos((0.005555555555555556 * (angle_m * pi)))); elseif (b_m <= 1.45e+264) tmp = 2.0 * ((b_m - a_m) * (t_0 * (a_m + b_m))); else tmp = 2.0 * (b_m * ((b_m - a_m) * sin((angle_m * (0.005555555555555556 * pi))))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 6e+84], N[(2.0 * N[(N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.45e+264], N[(2.0 * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(t$95$0 * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(b$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 6 \cdot 10^{+84}:\\
\;\;\;\;2 \cdot \left(\left(\left(\sin t\_0 \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\\
\mathbf{elif}\;b\_m \leq 1.45 \cdot 10^{+264}:\\
\;\;\;\;2 \cdot \left(\left(b\_m - a\_m\right) \cdot \left(t\_0 \cdot \left(a\_m + b\_m\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(b\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\\
\end{array}
\end{array}
\end{array}
if b < 5.99999999999999992e84Initial program 61.2%
associate-*l*61.2%
*-commutative61.2%
associate-*l*61.2%
Simplified61.2%
unpow261.2%
unpow261.2%
difference-of-squares63.1%
Applied egg-rr63.1%
add-cube-cbrt61.0%
pow261.0%
Applied egg-rr61.0%
Taylor expanded in angle around inf 62.1%
associate-*r*61.4%
associate-*r*67.6%
associate-*r*67.1%
Simplified67.1%
Taylor expanded in angle around inf 67.2%
if 5.99999999999999992e84 < b < 1.4499999999999999e264Initial program 33.7%
associate-*l*33.7%
*-commutative33.7%
associate-*l*33.7%
Simplified33.7%
unpow233.7%
unpow233.7%
difference-of-squares48.1%
Applied egg-rr48.1%
add-cube-cbrt54.5%
pow254.5%
Applied egg-rr54.5%
Taylor expanded in angle around inf 50.9%
associate-*r*53.7%
associate-*r*75.2%
associate-*r*72.4%
Simplified72.4%
Taylor expanded in angle around 0 74.7%
Taylor expanded in angle around 0 80.3%
associate-*r*80.4%
*-commutative80.4%
*-commutative80.4%
Simplified80.4%
if 1.4499999999999999e264 < b Initial program 39.3%
associate-*l*39.3%
*-commutative39.3%
associate-*l*39.3%
Simplified39.3%
unpow239.3%
unpow239.3%
difference-of-squares62.3%
Applied egg-rr62.3%
add-cube-cbrt47.0%
pow247.0%
Applied egg-rr47.0%
Taylor expanded in angle around inf 62.3%
associate-*r*62.3%
associate-*r*69.4%
associate-*r*69.4%
Simplified69.4%
Taylor expanded in angle around 0 84.7%
Taylor expanded in a around 0 84.7%
associate-*r*84.7%
Simplified84.7%
Taylor expanded in b around 0 84.7%
associate-*r*84.7%
neg-mul-184.7%
distribute-rgt-out84.7%
*-commutative84.7%
associate-*r*84.7%
+-commutative84.7%
sub-neg84.7%
Simplified84.7%
Final simplification69.9%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= (pow b_m 2.0) 5e+128)
(*
(+ a_m b_m)
(* (- b_m a_m) (sin (* (* angle_m PI) 0.011111111111111112))))
(* (+ a_m b_m) (* angle_m (* (- b_m a_m) (* PI 0.011111111111111112)))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (pow(b_m, 2.0) <= 5e+128) {
tmp = (a_m + b_m) * ((b_m - a_m) * sin(((angle_m * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (((double) M_PI) * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (Math.pow(b_m, 2.0) <= 5e+128) {
tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin(((angle_m * Math.PI) * 0.011111111111111112)));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (Math.PI * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): tmp = 0 if math.pow(b_m, 2.0) <= 5e+128: tmp = (a_m + b_m) * ((b_m - a_m) * math.sin(((angle_m * math.pi) * 0.011111111111111112))) else: tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (math.pi * 0.011111111111111112))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if ((b_m ^ 2.0) <= 5e+128) tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(Float64(angle_m * pi) * 0.011111111111111112)))); else tmp = Float64(Float64(a_m + b_m) * Float64(angle_m * Float64(Float64(b_m - a_m) * Float64(pi * 0.011111111111111112)))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) tmp = 0.0; if ((b_m ^ 2.0) <= 5e+128) tmp = (a_m + b_m) * ((b_m - a_m) * sin(((angle_m * pi) * 0.011111111111111112))); else tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (pi * 0.011111111111111112))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 5e+128], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b\_m}^{2} \leq 5 \cdot 10^{+128}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 5e128Initial program 63.4%
associate-*l*63.4%
*-commutative63.4%
associate-*l*63.4%
Simplified63.4%
unpow263.4%
unpow263.4%
difference-of-squares63.4%
Applied egg-rr63.4%
add-exp-log40.9%
2-sin40.9%
div-inv40.6%
metadata-eval40.6%
Applied egg-rr40.6%
rem-exp-log62.3%
associate-*l*67.1%
+-commutative67.1%
count-267.1%
add-cube-cbrt66.7%
unpow266.7%
metadata-eval66.7%
div-inv66.5%
metadata-eval66.5%
div-inv66.0%
Applied egg-rr68.1%
if 5e128 < (pow.f64 b #s(literal 2 binary64)) Initial program 46.0%
associate-*l*46.0%
*-commutative46.0%
associate-*l*46.0%
Simplified46.0%
unpow246.0%
unpow246.0%
difference-of-squares57.6%
Applied egg-rr57.6%
add-exp-log26.7%
2-sin26.7%
div-inv26.7%
metadata-eval26.7%
Applied egg-rr26.7%
rem-exp-log55.7%
associate-*l*69.1%
+-commutative69.1%
count-269.1%
add-cube-cbrt66.8%
unpow266.8%
metadata-eval66.8%
div-inv70.0%
metadata-eval70.0%
div-inv69.9%
Applied egg-rr70.1%
expm1-log1p-u70.1%
expm1-undefine24.4%
associate-*l*22.6%
Applied egg-rr22.6%
Taylor expanded in angle around 0 74.4%
*-commutative74.4%
associate-*r*74.5%
*-commutative74.5%
associate-*l*74.5%
Simplified74.5%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= (pow b_m 2.0) 0.0)
(* (* a_m (sin (* (* angle_m PI) 0.011111111111111112))) (- (- b_m) a_m))
(* (+ a_m b_m) (* angle_m (* (- b_m a_m) (* PI 0.011111111111111112)))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (pow(b_m, 2.0) <= 0.0) {
tmp = (a_m * sin(((angle_m * ((double) M_PI)) * 0.011111111111111112))) * (-b_m - a_m);
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (((double) M_PI) * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (Math.pow(b_m, 2.0) <= 0.0) {
tmp = (a_m * Math.sin(((angle_m * Math.PI) * 0.011111111111111112))) * (-b_m - a_m);
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (Math.PI * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): tmp = 0 if math.pow(b_m, 2.0) <= 0.0: tmp = (a_m * math.sin(((angle_m * math.pi) * 0.011111111111111112))) * (-b_m - a_m) else: tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (math.pi * 0.011111111111111112))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if ((b_m ^ 2.0) <= 0.0) tmp = Float64(Float64(a_m * sin(Float64(Float64(angle_m * pi) * 0.011111111111111112))) * Float64(Float64(-b_m) - a_m)); else tmp = Float64(Float64(a_m + b_m) * Float64(angle_m * Float64(Float64(b_m - a_m) * Float64(pi * 0.011111111111111112)))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) tmp = 0.0; if ((b_m ^ 2.0) <= 0.0) tmp = (a_m * sin(((angle_m * pi) * 0.011111111111111112))) * (-b_m - a_m); else tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (pi * 0.011111111111111112))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 0.0], N[(N[(a$95$m * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[((-b$95$m) - a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b\_m}^{2} \leq 0:\\
\;\;\;\;\left(a\_m \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\right) \cdot \left(\left(-b\_m\right) - a\_m\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 b #s(literal 2 binary64)) < 0.0Initial program 73.3%
associate-*l*73.3%
*-commutative73.3%
associate-*l*73.3%
Simplified73.3%
unpow273.3%
unpow273.3%
difference-of-squares73.3%
Applied egg-rr73.3%
add-exp-log51.7%
2-sin51.7%
div-inv50.6%
metadata-eval50.6%
Applied egg-rr50.6%
rem-exp-log72.1%
associate-*l*78.2%
+-commutative78.2%
count-278.2%
add-cube-cbrt79.2%
unpow279.2%
metadata-eval79.2%
div-inv78.9%
metadata-eval78.9%
div-inv77.2%
Applied egg-rr80.6%
Taylor expanded in b around 0 80.6%
mul-1-neg80.6%
*-commutative80.6%
distribute-rgt-neg-in80.6%
Simplified80.6%
if 0.0 < (pow.f64 b #s(literal 2 binary64)) Initial program 51.0%
associate-*l*51.0%
*-commutative51.0%
associate-*l*51.0%
Simplified51.0%
unpow251.0%
unpow251.0%
difference-of-squares57.2%
Applied egg-rr57.2%
add-exp-log29.9%
2-sin29.9%
div-inv30.0%
metadata-eval30.0%
Applied egg-rr30.0%
rem-exp-log55.7%
associate-*l*64.7%
+-commutative64.7%
count-264.7%
add-cube-cbrt62.9%
unpow262.9%
metadata-eval62.9%
div-inv64.5%
metadata-eval64.5%
div-inv64.5%
Applied egg-rr65.2%
expm1-log1p-u65.2%
expm1-undefine27.1%
associate-*l*25.5%
Applied egg-rr25.5%
Taylor expanded in angle around 0 63.7%
*-commutative63.7%
associate-*r*63.7%
*-commutative63.7%
associate-*l*63.8%
Simplified63.8%
Final simplification67.8%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= (pow a_m 2.0) 0.0)
(* (+ a_m b_m) (* b_m (sin (* PI (* angle_m 0.011111111111111112)))))
(* (+ a_m b_m) (* angle_m (* (- b_m a_m) (* PI 0.011111111111111112)))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (pow(a_m, 2.0) <= 0.0) {
tmp = (a_m + b_m) * (b_m * sin((((double) M_PI) * (angle_m * 0.011111111111111112))));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (((double) M_PI) * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (Math.pow(a_m, 2.0) <= 0.0) {
tmp = (a_m + b_m) * (b_m * Math.sin((Math.PI * (angle_m * 0.011111111111111112))));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (Math.PI * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): tmp = 0 if math.pow(a_m, 2.0) <= 0.0: tmp = (a_m + b_m) * (b_m * math.sin((math.pi * (angle_m * 0.011111111111111112)))) else: tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (math.pi * 0.011111111111111112))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if ((a_m ^ 2.0) <= 0.0) tmp = Float64(Float64(a_m + b_m) * Float64(b_m * sin(Float64(pi * Float64(angle_m * 0.011111111111111112))))); else tmp = Float64(Float64(a_m + b_m) * Float64(angle_m * Float64(Float64(b_m - a_m) * Float64(pi * 0.011111111111111112)))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) tmp = 0.0; if ((a_m ^ 2.0) <= 0.0) tmp = (a_m + b_m) * (b_m * sin((pi * (angle_m * 0.011111111111111112)))); else tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (pi * 0.011111111111111112))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 0.0], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a\_m}^{2} \leq 0:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(b\_m \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 0.0Initial program 71.1%
associate-*l*71.1%
*-commutative71.1%
associate-*l*71.1%
Simplified71.1%
unpow271.1%
unpow271.1%
difference-of-squares71.1%
Applied egg-rr71.1%
add-exp-log48.9%
2-sin48.9%
div-inv50.3%
metadata-eval50.3%
Applied egg-rr50.3%
rem-exp-log70.9%
associate-*l*78.7%
+-commutative78.7%
count-278.7%
add-cube-cbrt74.5%
unpow274.5%
metadata-eval74.5%
div-inv77.4%
metadata-eval77.4%
div-inv77.3%
Applied egg-rr76.2%
add-cbrt-cube69.8%
pow1/359.8%
pow359.8%
*-commutative59.8%
associate-*l*59.5%
sub-neg59.5%
add-sqr-sqrt26.3%
sqrt-unprod59.5%
sqr-neg59.5%
sqrt-prod33.2%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
Taylor expanded in b around inf 76.2%
associate-*r*78.7%
*-commutative78.7%
*-commutative78.7%
Simplified78.7%
if 0.0 < (pow.f64 a #s(literal 2 binary64)) Initial program 50.4%
associate-*l*50.4%
*-commutative50.4%
associate-*l*50.4%
Simplified50.4%
unpow250.4%
unpow250.4%
difference-of-squares57.0%
Applied egg-rr57.0%
add-exp-log29.6%
2-sin29.6%
div-inv28.8%
metadata-eval28.8%
Applied egg-rr28.8%
rem-exp-log55.1%
associate-*l*63.6%
+-commutative63.6%
count-263.6%
add-cube-cbrt63.7%
unpow263.7%
metadata-eval63.7%
div-inv64.2%
metadata-eval64.2%
div-inv63.7%
Applied egg-rr66.0%
expm1-log1p-u66.0%
expm1-undefine26.5%
associate-*l*24.6%
Applied egg-rr24.6%
Taylor expanded in angle around 0 61.5%
*-commutative61.5%
associate-*r*61.5%
*-commutative61.5%
associate-*l*61.6%
Simplified61.6%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= (pow a_m 2.0) 4e-310)
(* (+ a_m b_m) (* b_m (sin (* angle_m (* PI 0.011111111111111112)))))
(* (+ a_m b_m) (* angle_m (* (- b_m a_m) (* PI 0.011111111111111112)))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (pow(a_m, 2.0) <= 4e-310) {
tmp = (a_m + b_m) * (b_m * sin((angle_m * (((double) M_PI) * 0.011111111111111112))));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (((double) M_PI) * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (Math.pow(a_m, 2.0) <= 4e-310) {
tmp = (a_m + b_m) * (b_m * Math.sin((angle_m * (Math.PI * 0.011111111111111112))));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (Math.PI * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): tmp = 0 if math.pow(a_m, 2.0) <= 4e-310: tmp = (a_m + b_m) * (b_m * math.sin((angle_m * (math.pi * 0.011111111111111112)))) else: tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (math.pi * 0.011111111111111112))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if ((a_m ^ 2.0) <= 4e-310) tmp = Float64(Float64(a_m + b_m) * Float64(b_m * sin(Float64(angle_m * Float64(pi * 0.011111111111111112))))); else tmp = Float64(Float64(a_m + b_m) * Float64(angle_m * Float64(Float64(b_m - a_m) * Float64(pi * 0.011111111111111112)))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) tmp = 0.0; if ((a_m ^ 2.0) <= 4e-310) tmp = (a_m + b_m) * (b_m * sin((angle_m * (pi * 0.011111111111111112)))); else tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (pi * 0.011111111111111112))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 4e-310], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m * N[Sin[N[(angle$95$m * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a\_m}^{2} \leq 4 \cdot 10^{-310}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(b\_m \cdot \sin \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if (pow.f64 a #s(literal 2 binary64)) < 3.999999999999988e-310Initial program 71.7%
associate-*l*71.7%
*-commutative71.7%
associate-*l*71.7%
Simplified71.7%
unpow271.7%
unpow271.7%
difference-of-squares71.7%
Applied egg-rr71.7%
add-exp-log48.5%
2-sin48.5%
div-inv49.9%
metadata-eval49.9%
Applied egg-rr49.9%
rem-exp-log71.6%
associate-*l*78.8%
+-commutative78.8%
count-278.8%
add-cube-cbrt74.9%
unpow274.9%
metadata-eval74.9%
div-inv77.6%
metadata-eval77.6%
div-inv77.6%
Applied egg-rr76.5%
expm1-log1p-u76.5%
expm1-undefine47.9%
associate-*l*46.4%
Applied egg-rr46.4%
Taylor expanded in b around inf 76.6%
*-commutative76.6%
associate-*r*75.0%
Simplified75.0%
if 3.999999999999988e-310 < (pow.f64 a #s(literal 2 binary64)) Initial program 49.5%
associate-*l*49.5%
*-commutative49.5%
associate-*l*49.5%
Simplified49.5%
unpow249.5%
unpow249.5%
difference-of-squares56.3%
Applied egg-rr56.3%
add-exp-log29.2%
2-sin29.2%
div-inv28.4%
metadata-eval28.4%
Applied egg-rr28.4%
rem-exp-log54.3%
associate-*l*63.1%
+-commutative63.1%
count-263.1%
add-cube-cbrt63.2%
unpow263.2%
metadata-eval63.2%
div-inv63.7%
metadata-eval63.7%
div-inv63.2%
Applied egg-rr65.6%
expm1-log1p-u65.6%
expm1-undefine26.1%
associate-*l*24.1%
Applied egg-rr24.1%
Taylor expanded in angle around 0 61.5%
*-commutative61.5%
associate-*r*61.5%
*-commutative61.5%
associate-*l*61.6%
Simplified61.6%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= b_m 9e+50)
(*
(+ a_m b_m)
(* (- b_m a_m) (sin (* (* angle_m PI) 0.011111111111111112))))
(*
2.0
(*
(* (sin (* PI (* 0.005555555555555556 angle_m))) (+ a_m b_m))
(- b_m a_m))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (b_m <= 9e+50) {
tmp = (a_m + b_m) * ((b_m - a_m) * sin(((angle_m * ((double) M_PI)) * 0.011111111111111112)));
} else {
tmp = 2.0 * ((sin((((double) M_PI) * (0.005555555555555556 * angle_m))) * (a_m + b_m)) * (b_m - a_m));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (b_m <= 9e+50) {
tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin(((angle_m * Math.PI) * 0.011111111111111112)));
} else {
tmp = 2.0 * ((Math.sin((Math.PI * (0.005555555555555556 * angle_m))) * (a_m + b_m)) * (b_m - a_m));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): tmp = 0 if b_m <= 9e+50: tmp = (a_m + b_m) * ((b_m - a_m) * math.sin(((angle_m * math.pi) * 0.011111111111111112))) else: tmp = 2.0 * ((math.sin((math.pi * (0.005555555555555556 * angle_m))) * (a_m + b_m)) * (b_m - a_m)) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if (b_m <= 9e+50) tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(Float64(angle_m * pi) * 0.011111111111111112)))); else tmp = Float64(2.0 * Float64(Float64(sin(Float64(pi * Float64(0.005555555555555556 * angle_m))) * Float64(a_m + b_m)) * Float64(b_m - a_m))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) tmp = 0.0; if (b_m <= 9e+50) tmp = (a_m + b_m) * ((b_m - a_m) * sin(((angle_m * pi) * 0.011111111111111112))); else tmp = 2.0 * ((sin((pi * (0.005555555555555556 * angle_m))) * (a_m + b_m)) * (b_m - a_m)); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b$95$m, 9e+50], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 9 \cdot 10^{+50}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\
\end{array}
\end{array}
if b < 9.00000000000000027e50Initial program 61.3%
associate-*l*61.3%
*-commutative61.3%
associate-*l*61.3%
Simplified61.3%
unpow261.3%
unpow261.3%
difference-of-squares63.4%
Applied egg-rr63.4%
add-exp-log36.3%
2-sin36.3%
div-inv35.6%
metadata-eval35.6%
Applied egg-rr35.6%
rem-exp-log61.0%
associate-*l*67.0%
+-commutative67.0%
count-267.0%
add-cube-cbrt65.1%
unpow265.1%
metadata-eval65.1%
div-inv66.6%
metadata-eval66.6%
div-inv66.1%
Applied egg-rr68.2%
if 9.00000000000000027e50 < b Initial program 37.4%
associate-*l*37.4%
*-commutative37.4%
associate-*l*37.4%
Simplified37.4%
unpow237.4%
unpow237.4%
difference-of-squares52.3%
Applied egg-rr52.3%
add-cube-cbrt52.6%
pow252.6%
Applied egg-rr52.6%
Taylor expanded in angle around inf 54.1%
associate-*r*56.0%
associate-*r*73.2%
associate-*r*71.4%
Simplified71.4%
Taylor expanded in angle around 0 76.5%
Final simplification70.0%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= b_m 8.8e-148)
(* (+ a_m b_m) (* a_m (- (sin (* angle_m (* PI 0.011111111111111112))))))
(* (+ a_m b_m) (* angle_m (* (- b_m a_m) (* PI 0.011111111111111112)))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (b_m <= 8.8e-148) {
tmp = (a_m + b_m) * (a_m * -sin((angle_m * (((double) M_PI) * 0.011111111111111112))));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (((double) M_PI) * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (b_m <= 8.8e-148) {
tmp = (a_m + b_m) * (a_m * -Math.sin((angle_m * (Math.PI * 0.011111111111111112))));
} else {
tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (Math.PI * 0.011111111111111112)));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): tmp = 0 if b_m <= 8.8e-148: tmp = (a_m + b_m) * (a_m * -math.sin((angle_m * (math.pi * 0.011111111111111112)))) else: tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (math.pi * 0.011111111111111112))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if (b_m <= 8.8e-148) tmp = Float64(Float64(a_m + b_m) * Float64(a_m * Float64(-sin(Float64(angle_m * Float64(pi * 0.011111111111111112)))))); else tmp = Float64(Float64(a_m + b_m) * Float64(angle_m * Float64(Float64(b_m - a_m) * Float64(pi * 0.011111111111111112)))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) tmp = 0.0; if (b_m <= 8.8e-148) tmp = (a_m + b_m) * (a_m * -sin((angle_m * (pi * 0.011111111111111112)))); else tmp = (a_m + b_m) * (angle_m * ((b_m - a_m) * (pi * 0.011111111111111112))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b$95$m, 8.8e-148], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(a$95$m * (-N[Sin[N[(angle$95$m * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 8.8 \cdot 10^{-148}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(a\_m \cdot \left(-\sin \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
\end{array}
\end{array}
if b < 8.80000000000000068e-148Initial program 62.7%
associate-*l*62.7%
*-commutative62.7%
associate-*l*62.7%
Simplified62.7%
unpow262.7%
unpow262.7%
difference-of-squares65.1%
Applied egg-rr65.1%
add-exp-log36.7%
2-sin36.7%
div-inv35.8%
metadata-eval35.8%
Applied egg-rr35.8%
rem-exp-log62.9%
associate-*l*69.5%
+-commutative69.5%
count-269.5%
add-cube-cbrt67.5%
unpow267.5%
metadata-eval67.5%
div-inv69.4%
metadata-eval69.4%
div-inv68.8%
Applied egg-rr70.9%
expm1-log1p-u70.9%
expm1-undefine37.4%
associate-*l*35.9%
Applied egg-rr35.9%
Taylor expanded in b around 0 49.2%
associate-*r*49.2%
neg-mul-149.2%
*-commutative49.2%
associate-*r*48.4%
Simplified48.4%
if 8.80000000000000068e-148 < b Initial program 44.4%
associate-*l*44.4%
*-commutative44.4%
associate-*l*44.4%
Simplified44.4%
unpow244.4%
unpow244.4%
difference-of-squares53.4%
Applied egg-rr53.4%
add-exp-log32.1%
2-sin32.1%
div-inv33.2%
metadata-eval33.2%
Applied egg-rr33.2%
rem-exp-log53.3%
associate-*l*64.9%
+-commutative64.9%
count-264.9%
add-cube-cbrt65.5%
unpow265.5%
metadata-eval65.5%
div-inv65.2%
metadata-eval65.2%
div-inv65.2%
Applied egg-rr65.2%
expm1-log1p-u65.2%
expm1-undefine24.1%
associate-*l*21.5%
Applied egg-rr21.5%
Taylor expanded in angle around 0 65.8%
*-commutative65.8%
associate-*r*65.8%
*-commutative65.8%
associate-*l*65.8%
Simplified65.8%
Final simplification54.5%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= a_m 5.5e+86)
(* 0.011111111111111112 (* angle_m (* (+ a_m b_m) (* b_m PI))))
(* 0.011111111111111112 (* (* angle_m PI) (* a_m (+ a_m b_m)))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (a_m <= 5.5e+86) {
tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (b_m * ((double) M_PI))));
} else {
tmp = 0.011111111111111112 * ((angle_m * ((double) M_PI)) * (a_m * (a_m + b_m)));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (a_m <= 5.5e+86) {
tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (b_m * Math.PI)));
} else {
tmp = 0.011111111111111112 * ((angle_m * Math.PI) * (a_m * (a_m + b_m)));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): tmp = 0 if a_m <= 5.5e+86: tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (b_m * math.pi))) else: tmp = 0.011111111111111112 * ((angle_m * math.pi) * (a_m * (a_m + b_m))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if (a_m <= 5.5e+86) tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(a_m + b_m) * Float64(b_m * pi)))); else tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * pi) * Float64(a_m * Float64(a_m + b_m)))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) tmp = 0.0; if (a_m <= 5.5e+86) tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (b_m * pi))); else tmp = 0.011111111111111112 * ((angle_m * pi) * (a_m * (a_m + b_m))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a$95$m, 5.5e+86], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(a$95$m * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 5.5 \cdot 10^{+86}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(a\_m \cdot \left(a\_m + b\_m\right)\right)\right)\\
\end{array}
\end{array}
if a < 5.5000000000000002e86Initial program 59.8%
associate-*l*59.8%
*-commutative59.8%
associate-*l*59.8%
Simplified59.8%
unpow259.8%
unpow259.8%
difference-of-squares63.2%
Applied egg-rr63.2%
Taylor expanded in angle around 0 58.0%
associate-*r*58.0%
sub-neg58.0%
distribute-lft-in56.1%
Applied egg-rr56.1%
distribute-lft-out58.0%
+-commutative58.0%
add-sqr-sqrt32.5%
sqrt-unprod53.3%
sqr-neg53.3%
sqrt-prod21.7%
add-sqr-sqrt48.9%
Applied egg-rr48.9%
Taylor expanded in b around inf 48.9%
*-commutative48.9%
Simplified48.9%
if 5.5000000000000002e86 < a Initial program 41.9%
associate-*l*41.9%
*-commutative41.9%
associate-*l*41.9%
Simplified41.9%
unpow241.9%
unpow241.9%
difference-of-squares52.0%
Applied egg-rr52.0%
Taylor expanded in angle around 0 55.4%
associate-*r*55.4%
sub-neg55.4%
distribute-lft-in46.9%
Applied egg-rr46.9%
distribute-lft-out55.4%
+-commutative55.4%
add-sqr-sqrt0.0%
sqrt-unprod18.9%
sqr-neg18.9%
sqrt-prod20.9%
add-sqr-sqrt20.9%
Applied egg-rr20.9%
Taylor expanded in b around 0 16.9%
*-commutative16.9%
Simplified16.9%
Taylor expanded in angle around 0 16.9%
associate-*r*16.9%
distribute-rgt-in12.9%
distribute-rgt-out10.8%
associate-*r*10.8%
associate-*r*8.7%
distribute-rgt-out16.9%
distribute-lft-out8.7%
associate-*l*8.7%
unpow28.7%
associate-*l*10.9%
*-commutative10.9%
distribute-lft-out12.9%
unpow212.9%
distribute-rgt-in16.9%
Simplified16.9%
Final simplification42.7%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= a_m 2.7e+87)
(* 0.011111111111111112 (* angle_m (* (+ a_m b_m) (* b_m PI))))
(* 0.011111111111111112 (* angle_m (* (+ a_m b_m) (* a_m PI)))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (a_m <= 2.7e+87) {
tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (b_m * ((double) M_PI))));
} else {
tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (a_m * ((double) M_PI))));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (a_m <= 2.7e+87) {
tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (b_m * Math.PI)));
} else {
tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (a_m * Math.PI)));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): tmp = 0 if a_m <= 2.7e+87: tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (b_m * math.pi))) else: tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (a_m * math.pi))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if (a_m <= 2.7e+87) tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(a_m + b_m) * Float64(b_m * pi)))); else tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(a_m + b_m) * Float64(a_m * pi)))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) tmp = 0.0; if (a_m <= 2.7e+87) tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (b_m * pi))); else tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (a_m * pi))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a$95$m, 2.7e+87], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 2.7 \cdot 10^{+87}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(a\_m + b\_m\right) \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.70000000000000007e87Initial program 59.8%
associate-*l*59.8%
*-commutative59.8%
associate-*l*59.8%
Simplified59.8%
unpow259.8%
unpow259.8%
difference-of-squares63.2%
Applied egg-rr63.2%
Taylor expanded in angle around 0 58.0%
associate-*r*58.0%
sub-neg58.0%
distribute-lft-in56.1%
Applied egg-rr56.1%
distribute-lft-out58.0%
+-commutative58.0%
add-sqr-sqrt32.5%
sqrt-unprod53.3%
sqr-neg53.3%
sqrt-prod21.7%
add-sqr-sqrt48.9%
Applied egg-rr48.9%
Taylor expanded in b around inf 48.9%
*-commutative48.9%
Simplified48.9%
if 2.70000000000000007e87 < a Initial program 41.9%
associate-*l*41.9%
*-commutative41.9%
associate-*l*41.9%
Simplified41.9%
unpow241.9%
unpow241.9%
difference-of-squares52.0%
Applied egg-rr52.0%
Taylor expanded in angle around 0 55.4%
associate-*r*55.4%
sub-neg55.4%
distribute-lft-in46.9%
Applied egg-rr46.9%
distribute-lft-out55.4%
+-commutative55.4%
add-sqr-sqrt0.0%
sqrt-unprod18.9%
sqr-neg18.9%
sqrt-prod20.9%
add-sqr-sqrt20.9%
Applied egg-rr20.9%
Taylor expanded in b around 0 16.9%
*-commutative16.9%
Simplified16.9%
Final simplification42.7%
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
:precision binary64
(*
angle_s
(if (<= a_m 2.7e-58)
(* 0.011111111111111112 (* a_m (* angle_m (* b_m PI))))
(* 0.011111111111111112 (* angle_m (* (+ a_m b_m) (* a_m PI)))))))a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (a_m <= 2.7e-58) {
tmp = 0.011111111111111112 * (a_m * (angle_m * (b_m * ((double) M_PI))));
} else {
tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (a_m * ((double) M_PI))));
}
return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
double tmp;
if (a_m <= 2.7e-58) {
tmp = 0.011111111111111112 * (a_m * (angle_m * (b_m * Math.PI)));
} else {
tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (a_m * Math.PI)));
}
return angle_s * tmp;
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): tmp = 0 if a_m <= 2.7e-58: tmp = 0.011111111111111112 * (a_m * (angle_m * (b_m * math.pi))) else: tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (a_m * math.pi))) return angle_s * tmp
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) tmp = 0.0 if (a_m <= 2.7e-58) tmp = Float64(0.011111111111111112 * Float64(a_m * Float64(angle_m * Float64(b_m * pi)))); else tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(a_m + b_m) * Float64(a_m * pi)))); end return Float64(angle_s * tmp) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp_2 = code(angle_s, a_m, b_m, angle_m) tmp = 0.0; if (a_m <= 2.7e-58) tmp = 0.011111111111111112 * (a_m * (angle_m * (b_m * pi))); else tmp = 0.011111111111111112 * (angle_m * ((a_m + b_m) * (a_m * pi))); end tmp_2 = angle_s * tmp; end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a$95$m, 2.7e-58], N[(0.011111111111111112 * N[(a$95$m * N[(angle$95$m * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(a$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 2.7 \cdot 10^{-58}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a\_m \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(a\_m + b\_m\right) \cdot \left(a\_m \cdot \pi\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.6999999999999999e-58Initial program 59.9%
associate-*l*59.9%
*-commutative59.9%
associate-*l*59.9%
Simplified59.9%
unpow259.9%
unpow259.9%
difference-of-squares63.8%
Applied egg-rr63.8%
Taylor expanded in angle around 0 58.6%
associate-*r*58.6%
sub-neg58.6%
distribute-lft-in56.4%
Applied egg-rr56.4%
distribute-lft-out58.6%
+-commutative58.6%
add-sqr-sqrt37.0%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-prod21.5%
add-sqr-sqrt52.5%
Applied egg-rr52.5%
Taylor expanded in b around 0 28.0%
*-commutative28.0%
Simplified28.0%
Taylor expanded in a around 0 27.1%
*-commutative27.1%
*-commutative27.1%
Simplified27.1%
if 2.6999999999999999e-58 < a Initial program 47.7%
associate-*l*47.7%
*-commutative47.7%
associate-*l*47.7%
Simplified47.7%
unpow247.7%
unpow247.7%
difference-of-squares54.4%
Applied egg-rr54.5%
Taylor expanded in angle around 0 54.9%
associate-*r*55.0%
sub-neg55.0%
distribute-lft-in49.4%
Applied egg-rr49.4%
distribute-lft-out55.0%
+-commutative55.0%
add-sqr-sqrt0.0%
sqrt-unprod20.3%
sqr-neg20.3%
sqrt-prod21.6%
add-sqr-sqrt21.6%
Applied egg-rr21.6%
Taylor expanded in b around 0 13.5%
*-commutative13.5%
Simplified13.5%
Final simplification23.1%
a_m = (fabs.f64 a) b_m = (fabs.f64 b) angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a_m b_m angle_m) :precision binary64 (* angle_s (* (+ a_m b_m) (* angle_m (* (- b_m a_m) (* PI 0.011111111111111112))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * ((a_m + b_m) * (angle_m * ((b_m - a_m) * (((double) M_PI) * 0.011111111111111112))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * ((a_m + b_m) * (angle_m * ((b_m - a_m) * (Math.PI * 0.011111111111111112))));
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): return angle_s * ((a_m + b_m) * (angle_m * ((b_m - a_m) * (math.pi * 0.011111111111111112))))
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) return Float64(angle_s * Float64(Float64(a_m + b_m) * Float64(angle_m * Float64(Float64(b_m - a_m) * Float64(pi * 0.011111111111111112))))) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a_m, b_m, angle_m) tmp = angle_s * ((a_m + b_m) * (angle_m * ((b_m - a_m) * (pi * 0.011111111111111112)))); end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)
\end{array}
Initial program 56.3%
associate-*l*56.3%
*-commutative56.3%
associate-*l*56.3%
Simplified56.3%
unpow256.3%
unpow256.3%
difference-of-squares61.0%
Applied egg-rr61.0%
add-exp-log35.1%
2-sin35.1%
div-inv34.9%
metadata-eval34.9%
Applied egg-rr34.9%
rem-exp-log59.6%
associate-*l*67.9%
+-commutative67.9%
count-267.9%
add-cube-cbrt66.8%
unpow266.8%
metadata-eval66.8%
div-inv67.9%
metadata-eval67.9%
div-inv67.6%
Applied egg-rr68.9%
expm1-log1p-u68.9%
expm1-undefine32.7%
associate-*l*30.9%
Applied egg-rr30.9%
Taylor expanded in angle around 0 64.0%
*-commutative64.0%
associate-*r*64.0%
*-commutative64.0%
associate-*l*64.1%
Simplified64.1%
a_m = (fabs.f64 a) b_m = (fabs.f64 b) angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a_m b_m angle_m) :precision binary64 (* angle_s (* (+ a_m b_m) (* 0.011111111111111112 (* angle_m (* PI (- b_m a_m)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * ((a_m + b_m) * (0.011111111111111112 * (angle_m * (((double) M_PI) * (b_m - a_m)))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * ((a_m + b_m) * (0.011111111111111112 * (angle_m * (Math.PI * (b_m - a_m)))));
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): return angle_s * ((a_m + b_m) * (0.011111111111111112 * (angle_m * (math.pi * (b_m - a_m)))))
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) return Float64(angle_s * Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(b_m - a_m)))))) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a_m, b_m, angle_m) tmp = angle_s * ((a_m + b_m) * (0.011111111111111112 * (angle_m * (pi * (b_m - a_m))))); end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b\_m - a\_m\right)\right)\right)\right)\right)
\end{array}
Initial program 56.3%
associate-*l*56.3%
*-commutative56.3%
associate-*l*56.3%
Simplified56.3%
unpow256.3%
unpow256.3%
difference-of-squares61.0%
Applied egg-rr61.0%
add-exp-log35.1%
2-sin35.1%
div-inv34.9%
metadata-eval34.9%
Applied egg-rr34.9%
rem-exp-log59.6%
associate-*l*67.9%
+-commutative67.9%
count-267.9%
add-cube-cbrt66.8%
unpow266.8%
metadata-eval66.8%
div-inv67.9%
metadata-eval67.9%
div-inv67.6%
Applied egg-rr68.9%
Taylor expanded in angle around 0 64.0%
a_m = (fabs.f64 a) b_m = (fabs.f64 b) angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a_m b_m angle_m) :precision binary64 (* angle_s (* 0.011111111111111112 (* angle_m (* PI (* (+ a_m b_m) (- b_m a_m)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * (0.011111111111111112 * (angle_m * (((double) M_PI) * ((a_m + b_m) * (b_m - a_m)))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * (0.011111111111111112 * (angle_m * (Math.PI * ((a_m + b_m) * (b_m - a_m)))));
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): return angle_s * (0.011111111111111112 * (angle_m * (math.pi * ((a_m + b_m) * (b_m - a_m)))))
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) return Float64(angle_s * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(a_m + b_m) * Float64(b_m - a_m)))))) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a_m, b_m, angle_m) tmp = angle_s * (0.011111111111111112 * (angle_m * (pi * ((a_m + b_m) * (b_m - a_m))))); end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\right)
\end{array}
Initial program 56.3%
associate-*l*56.3%
*-commutative56.3%
associate-*l*56.3%
Simplified56.3%
unpow256.3%
unpow256.3%
difference-of-squares61.0%
Applied egg-rr61.0%
Taylor expanded in angle around 0 57.5%
a_m = (fabs.f64 a) b_m = (fabs.f64 b) angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a_m b_m angle_m) :precision binary64 (* angle_s (* 0.011111111111111112 (* a_m (* angle_m (* b_m PI))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * (0.011111111111111112 * (a_m * (angle_m * (b_m * ((double) M_PI)))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * (0.011111111111111112 * (a_m * (angle_m * (b_m * Math.PI))));
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): return angle_s * (0.011111111111111112 * (a_m * (angle_m * (b_m * math.pi))))
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) return Float64(angle_s * Float64(0.011111111111111112 * Float64(a_m * Float64(angle_m * Float64(b_m * pi))))) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a_m, b_m, angle_m) tmp = angle_s * (0.011111111111111112 * (a_m * (angle_m * (b_m * pi)))); end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(a$95$m * N[(angle$95$m * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\right)
\end{array}
Initial program 56.3%
associate-*l*56.3%
*-commutative56.3%
associate-*l*56.3%
Simplified56.3%
unpow256.3%
unpow256.3%
difference-of-squares61.0%
Applied egg-rr61.0%
Taylor expanded in angle around 0 57.5%
associate-*r*57.5%
sub-neg57.5%
distribute-lft-in54.3%
Applied egg-rr54.3%
distribute-lft-out57.5%
+-commutative57.5%
add-sqr-sqrt26.2%
sqrt-unprod46.6%
sqr-neg46.6%
sqrt-prod21.6%
add-sqr-sqrt43.4%
Applied egg-rr43.4%
Taylor expanded in b around 0 23.8%
*-commutative23.8%
Simplified23.8%
Taylor expanded in a around 0 23.1%
*-commutative23.1%
*-commutative23.1%
Simplified23.1%
Final simplification23.1%
a_m = (fabs.f64 a) b_m = (fabs.f64 b) angle\_m = (fabs.f64 angle) angle\_s = (copysign.f64 #s(literal 1 binary64) angle) (FPCore (angle_s a_m b_m angle_m) :precision binary64 (* angle_s (* PI (* b_m (* 0.011111111111111112 (* a_m angle_m))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * (((double) M_PI) * (b_m * (0.011111111111111112 * (a_m * angle_m))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
return angle_s * (Math.PI * (b_m * (0.011111111111111112 * (a_m * angle_m))));
}
a_m = math.fabs(a) b_m = math.fabs(b) angle\_m = math.fabs(angle) angle\_s = math.copysign(1.0, angle) def code(angle_s, a_m, b_m, angle_m): return angle_s * (math.pi * (b_m * (0.011111111111111112 * (a_m * angle_m))))
a_m = abs(a) b_m = abs(b) angle\_m = abs(angle) angle\_s = copysign(1.0, angle) function code(angle_s, a_m, b_m, angle_m) return Float64(angle_s * Float64(pi * Float64(b_m * Float64(0.011111111111111112 * Float64(a_m * angle_m))))) end
a_m = abs(a); b_m = abs(b); angle\_m = abs(angle); angle\_s = sign(angle) * abs(1.0); function tmp = code(angle_s, a_m, b_m, angle_m) tmp = angle_s * (pi * (b_m * (0.011111111111111112 * (a_m * angle_m)))); end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(Pi * N[(b$95$m * N[(0.011111111111111112 * N[(a$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)
\\
angle\_s \cdot \left(\pi \cdot \left(b\_m \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot angle\_m\right)\right)\right)\right)
\end{array}
Initial program 56.3%
associate-*l*56.3%
*-commutative56.3%
associate-*l*56.3%
Simplified56.3%
unpow256.3%
unpow256.3%
difference-of-squares61.0%
Applied egg-rr61.0%
Taylor expanded in angle around 0 57.5%
associate-*r*57.5%
sub-neg57.5%
distribute-lft-in54.3%
Applied egg-rr54.3%
distribute-lft-out57.5%
+-commutative57.5%
add-sqr-sqrt26.2%
sqrt-unprod46.6%
sqr-neg46.6%
sqrt-prod21.6%
add-sqr-sqrt43.4%
Applied egg-rr43.4%
Taylor expanded in b around 0 23.8%
*-commutative23.8%
Simplified23.8%
Taylor expanded in a around 0 23.1%
*-commutative23.1%
associate-*r*23.1%
Simplified23.1%
Taylor expanded in a around 0 23.1%
associate-*r*23.1%
associate-*r*23.1%
associate-*l*23.1%
*-commutative23.1%
associate-*r*22.4%
associate-*r*22.0%
*-commutative22.0%
Simplified22.0%
Final simplification22.0%
herbie shell --seed 2024107
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))