
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= A -76000000.0)
(* 180.0 (/ (atan (* 0.5 (/ B_m A))) PI))
(*
180.0
(/ (atan (* C (fma -1.0 (/ (+ 1.0 (/ A B_m)) C) (/ 1.0 B_m)))) PI)))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -76000000.0) {
tmp = 180.0 * (atan((0.5 * (B_m / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((C * fma(-1.0, ((1.0 + (A / B_m)) / C), (1.0 / B_m)))) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (A <= -76000000.0) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B_m / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(C * fma(-1.0, Float64(Float64(1.0 + Float64(A / B_m)) / C), Float64(1.0 / B_m)))) / pi)); end return Float64(B_s * tmp) end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, -76000000.0], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B$95$m / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(C * N[(-1.0 * N[(N[(1.0 + N[(A / B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision] + N[(1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;A \leq -76000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B\_m}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(C \cdot \mathsf{fma}\left(-1, \frac{1 + \frac{A}{B\_m}}{C}, \frac{1}{B\_m}\right)\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.6e7Initial program 53.2%
Taylor expanded in A around -inf
Applied rewrites26.2%
if -7.6e7 < A Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in C around inf
Applied rewrites65.9%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= A -76000000.0)
(* 180.0 (/ (atan (* 0.5 (/ B_m A))) PI))
(* 180.0 (/ (atan (- (/ C B_m) (+ 1.0 (/ A B_m)))) PI)))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -76000000.0) {
tmp = 180.0 * (atan((0.5 * (B_m / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B_m) - (1.0 + (A / B_m)))) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -76000000.0) {
tmp = 180.0 * (Math.atan((0.5 * (B_m / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B_m) - (1.0 + (A / B_m)))) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): tmp = 0 if A <= -76000000.0: tmp = 180.0 * (math.atan((0.5 * (B_m / A))) / math.pi) else: tmp = 180.0 * (math.atan(((C / B_m) - (1.0 + (A / B_m)))) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (A <= -76000000.0) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B_m / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B_m) - Float64(1.0 + Float64(A / B_m)))) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) tmp = 0.0; if (A <= -76000000.0) tmp = 180.0 * (atan((0.5 * (B_m / A))) / pi); else tmp = 180.0 * (atan(((C / B_m) - (1.0 + (A / B_m)))) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, -76000000.0], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B$95$m / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - N[(1.0 + N[(A / B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;A \leq -76000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B\_m}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m} - \left(1 + \frac{A}{B\_m}\right)\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.6e7Initial program 53.2%
Taylor expanded in A around -inf
Applied rewrites26.2%
if -7.6e7 < A Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= A -104000000.0)
(* 180.0 (/ (atan (* 0.5 (/ B_m A))) PI))
(if (<= A 1.1e+102)
(* 180.0 (/ (atan (- (/ C B_m) 1.0)) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B_m))) PI))))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -104000000.0) {
tmp = 180.0 * (atan((0.5 * (B_m / A))) / ((double) M_PI));
} else if (A <= 1.1e+102) {
tmp = 180.0 * (atan(((C / B_m) - 1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.0 * (A / B_m))) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -104000000.0) {
tmp = 180.0 * (Math.atan((0.5 * (B_m / A))) / Math.PI);
} else if (A <= 1.1e+102) {
tmp = 180.0 * (Math.atan(((C / B_m) - 1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B_m))) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): tmp = 0 if A <= -104000000.0: tmp = 180.0 * (math.atan((0.5 * (B_m / A))) / math.pi) elif A <= 1.1e+102: tmp = 180.0 * (math.atan(((C / B_m) - 1.0)) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B_m))) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (A <= -104000000.0) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B_m / A))) / pi)); elseif (A <= 1.1e+102) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B_m) - 1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B_m))) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) tmp = 0.0; if (A <= -104000000.0) tmp = 180.0 * (atan((0.5 * (B_m / A))) / pi); elseif (A <= 1.1e+102) tmp = 180.0 * (atan(((C / B_m) - 1.0)) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B_m))) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, -104000000.0], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B$95$m / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.1e+102], N[(180.0 * N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;A \leq -104000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B\_m}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B\_m}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.04e8Initial program 53.2%
Taylor expanded in A around -inf
Applied rewrites26.2%
if -1.04e8 < A < 1.10000000000000004e102Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in A around 0
Applied rewrites55.8%
if 1.10000000000000004e102 < A Initial program 53.2%
Taylor expanded in A around inf
Applied rewrites23.1%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= A -5.6e+76)
(* 180.0 (/ (atan 0.0) PI))
(if (<= A 1.1e+102)
(* 180.0 (/ (atan (- (/ C B_m) 1.0)) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B_m))) PI))))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -5.6e+76) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (A <= 1.1e+102) {
tmp = 180.0 * (atan(((C / B_m) - 1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.0 * (A / B_m))) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -5.6e+76) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (A <= 1.1e+102) {
tmp = 180.0 * (Math.atan(((C / B_m) - 1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B_m))) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): tmp = 0 if A <= -5.6e+76: tmp = 180.0 * (math.atan(0.0) / math.pi) elif A <= 1.1e+102: tmp = 180.0 * (math.atan(((C / B_m) - 1.0)) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B_m))) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (A <= -5.6e+76) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (A <= 1.1e+102) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B_m) - 1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B_m))) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) tmp = 0.0; if (A <= -5.6e+76) tmp = 180.0 * (atan(0.0) / pi); elseif (A <= 1.1e+102) tmp = 180.0 * (atan(((C / B_m) - 1.0)) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B_m))) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, -5.6e+76], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.1e+102], N[(180.0 * N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;A \leq -5.6 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;A \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B\_m}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.5999999999999997e76Initial program 53.2%
Taylor expanded in C around inf
Applied rewrites12.9%
Taylor expanded in A around 0
Applied rewrites12.9%
if -5.5999999999999997e76 < A < 1.10000000000000004e102Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in A around 0
Applied rewrites55.8%
if 1.10000000000000004e102 < A Initial program 53.2%
Taylor expanded in A around inf
Applied rewrites23.1%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= A -5.6e+76)
(* 180.0 (/ (atan 0.0) PI))
(if (<= A 1.1e+102)
(* 180.0 (/ (atan (- (/ C B_m) 1.0)) PI))
(* 180.0 (/ (atan (* -1.0 (/ A B_m))) PI))))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -5.6e+76) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (A <= 1.1e+102) {
tmp = 180.0 * (atan(((C / B_m) - 1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 * (A / B_m))) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -5.6e+76) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (A <= 1.1e+102) {
tmp = 180.0 * (Math.atan(((C / B_m) - 1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 * (A / B_m))) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): tmp = 0 if A <= -5.6e+76: tmp = 180.0 * (math.atan(0.0) / math.pi) elif A <= 1.1e+102: tmp = 180.0 * (math.atan(((C / B_m) - 1.0)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 * (A / B_m))) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (A <= -5.6e+76) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (A <= 1.1e+102) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B_m) - 1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 * Float64(A / B_m))) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) tmp = 0.0; if (A <= -5.6e+76) tmp = 180.0 * (atan(0.0) / pi); elseif (A <= 1.1e+102) tmp = 180.0 * (atan(((C / B_m) - 1.0)) / pi); else tmp = 180.0 * (atan((-1.0 * (A / B_m))) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, -5.6e+76], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.1e+102], N[(180.0 * N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 * N[(A / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;A \leq -5.6 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;A \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 \cdot \frac{A}{B\_m}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.5999999999999997e76Initial program 53.2%
Taylor expanded in C around inf
Applied rewrites12.9%
Taylor expanded in A around 0
Applied rewrites12.9%
if -5.5999999999999997e76 < A < 1.10000000000000004e102Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in A around 0
Applied rewrites55.8%
if 1.10000000000000004e102 < A Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in A around inf
Applied rewrites22.9%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= A -5.6e+76)
(* 180.0 (/ (atan 0.0) PI))
(if (<= A 1.1e+102)
(* 180.0 (/ (atan (- (/ C B_m) 1.0)) PI))
(* 180.0 (/ (atan (/ (- C A) B_m)) PI))))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -5.6e+76) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (A <= 1.1e+102) {
tmp = 180.0 * (atan(((C / B_m) - 1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - A) / B_m)) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double tmp;
if (A <= -5.6e+76) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (A <= 1.1e+102) {
tmp = 180.0 * (Math.atan(((C / B_m) - 1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - A) / B_m)) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): tmp = 0 if A <= -5.6e+76: tmp = 180.0 * (math.atan(0.0) / math.pi) elif A <= 1.1e+102: tmp = 180.0 * (math.atan(((C / B_m) - 1.0)) / math.pi) else: tmp = 180.0 * (math.atan(((C - A) / B_m)) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (A <= -5.6e+76) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (A <= 1.1e+102) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B_m) - 1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - A) / B_m)) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) tmp = 0.0; if (A <= -5.6e+76) tmp = 180.0 * (atan(0.0) / pi); elseif (A <= 1.1e+102) tmp = 180.0 * (atan(((C / B_m) - 1.0)) / pi); else tmp = 180.0 * (atan(((C - A) / B_m)) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[A, -5.6e+76], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.1e+102], N[(180.0 * N[(N[ArcTan[N[(N[(C / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - A), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;A \leq -5.6 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;A \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m} - 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B\_m}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.5999999999999997e76Initial program 53.2%
Taylor expanded in C around inf
Applied rewrites12.9%
Taylor expanded in A around 0
Applied rewrites12.9%
if -5.5999999999999997e76 < A < 1.10000000000000004e102Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in A around 0
Applied rewrites55.8%
if 1.10000000000000004e102 < A Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in B around 0
Applied rewrites34.6%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= B_m 9.5e-98)
(* 180.0 (/ (atan (/ (- C A) B_m)) PI))
(if (<= B_m 4.2e+72)
(* 180.0 (/ (atan (- C 1.0)) PI))
(* 180.0 (/ (atan -1.0) PI))))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (B_m <= 9.5e-98) {
tmp = 180.0 * (atan(((C - A) / B_m)) / ((double) M_PI));
} else if (B_m <= 4.2e+72) {
tmp = 180.0 * (atan((C - 1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double tmp;
if (B_m <= 9.5e-98) {
tmp = 180.0 * (Math.atan(((C - A) / B_m)) / Math.PI);
} else if (B_m <= 4.2e+72) {
tmp = 180.0 * (Math.atan((C - 1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): tmp = 0 if B_m <= 9.5e-98: tmp = 180.0 * (math.atan(((C - A) / B_m)) / math.pi) elif B_m <= 4.2e+72: tmp = 180.0 * (math.atan((C - 1.0)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (B_m <= 9.5e-98) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - A) / B_m)) / pi)); elseif (B_m <= 4.2e+72) tmp = Float64(180.0 * Float64(atan(Float64(C - 1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) tmp = 0.0; if (B_m <= 9.5e-98) tmp = 180.0 * (atan(((C - A) / B_m)) / pi); elseif (B_m <= 4.2e+72) tmp = 180.0 * (atan((C - 1.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[B$95$m, 9.5e-98], N[(180.0 * N[(N[ArcTan[N[(N[(C - A), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 4.2e+72], N[(180.0 * N[(N[ArcTan[N[(C - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;B\_m \leq 9.5 \cdot 10^{-98}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B\_m}\right)}{\pi}\\
\mathbf{elif}\;B\_m \leq 4.2 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(C - 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 9.5000000000000001e-98Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in B around 0
Applied rewrites34.6%
if 9.5000000000000001e-98 < B < 4.2000000000000003e72Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Applied rewrites43.4%
if 4.2000000000000003e72 < B Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites40.3%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= B_m 4.7e-296)
(* 180.0 (/ (atan (/ C B_m)) PI))
(if (<= B_m 1.15e-163)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B_m 4.2e+72)
(* 180.0 (/ (atan (- C 1.0)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (B_m <= 4.7e-296) {
tmp = 180.0 * (atan((C / B_m)) / ((double) M_PI));
} else if (B_m <= 1.15e-163) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B_m <= 4.2e+72) {
tmp = 180.0 * (atan((C - 1.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double tmp;
if (B_m <= 4.7e-296) {
tmp = 180.0 * (Math.atan((C / B_m)) / Math.PI);
} else if (B_m <= 1.15e-163) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B_m <= 4.2e+72) {
tmp = 180.0 * (Math.atan((C - 1.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): tmp = 0 if B_m <= 4.7e-296: tmp = 180.0 * (math.atan((C / B_m)) / math.pi) elif B_m <= 1.15e-163: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B_m <= 4.2e+72: tmp = 180.0 * (math.atan((C - 1.0)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (B_m <= 4.7e-296) tmp = Float64(180.0 * Float64(atan(Float64(C / B_m)) / pi)); elseif (B_m <= 1.15e-163) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B_m <= 4.2e+72) tmp = Float64(180.0 * Float64(atan(Float64(C - 1.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) tmp = 0.0; if (B_m <= 4.7e-296) tmp = 180.0 * (atan((C / B_m)) / pi); elseif (B_m <= 1.15e-163) tmp = 180.0 * (atan(0.0) / pi); elseif (B_m <= 4.2e+72) tmp = 180.0 * (atan((C - 1.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[B$95$m, 4.7e-296], N[(180.0 * N[(N[ArcTan[N[(C / B$95$m), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.15e-163], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 4.2e+72], N[(180.0 * N[(N[ArcTan[N[(C - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;B\_m \leq 4.7 \cdot 10^{-296}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B\_m}\right)}{\pi}\\
\mathbf{elif}\;B\_m \leq 1.15 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B\_m \leq 4.2 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(C - 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 4.7e-296Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in C around inf
Applied rewrites65.9%
Taylor expanded in C around inf
Applied rewrites23.0%
if 4.7e-296 < B < 1.15e-163Initial program 53.2%
Taylor expanded in C around inf
Applied rewrites12.9%
Taylor expanded in A around 0
Applied rewrites12.9%
if 1.15e-163 < B < 4.2000000000000003e72Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Applied rewrites43.4%
if 4.2000000000000003e72 < B Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites40.3%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- C 1.0)) PI))))
(*
B_s
(if (<= B_m 2.5e-295)
t_0
(if (<= B_m 1.15e-163)
(* 180.0 (/ (atan 0.0) PI))
(if (<= B_m 4.2e+72) t_0 (* 180.0 (/ (atan -1.0) PI))))))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double t_0 = 180.0 * (atan((C - 1.0)) / ((double) M_PI));
double tmp;
if (B_m <= 2.5e-295) {
tmp = t_0;
} else if (B_m <= 1.15e-163) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else if (B_m <= 4.2e+72) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double t_0 = 180.0 * (Math.atan((C - 1.0)) / Math.PI);
double tmp;
if (B_m <= 2.5e-295) {
tmp = t_0;
} else if (B_m <= 1.15e-163) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else if (B_m <= 4.2e+72) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): t_0 = 180.0 * (math.atan((C - 1.0)) / math.pi) tmp = 0 if B_m <= 2.5e-295: tmp = t_0 elif B_m <= 1.15e-163: tmp = 180.0 * (math.atan(0.0) / math.pi) elif B_m <= 4.2e+72: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) t_0 = Float64(180.0 * Float64(atan(Float64(C - 1.0)) / pi)) tmp = 0.0 if (B_m <= 2.5e-295) tmp = t_0; elseif (B_m <= 1.15e-163) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); elseif (B_m <= 4.2e+72) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) t_0 = 180.0 * (atan((C - 1.0)) / pi); tmp = 0.0; if (B_m <= 2.5e-295) tmp = t_0; elseif (B_m <= 1.15e-163) tmp = 180.0 * (atan(0.0) / pi); elseif (B_m <= 4.2e+72) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C - 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, N[(B$95$s * If[LessEqual[B$95$m, 2.5e-295], t$95$0, If[LessEqual[B$95$m, 1.15e-163], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 4.2e+72], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(C - 1\right)}{\pi}\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;B\_m \leq 2.5 \cdot 10^{-295}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B\_m \leq 1.15 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B\_m \leq 4.2 \cdot 10^{+72}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
\end{array}
if B < 2.50000000000000004e-295 or 1.15e-163 < B < 4.2000000000000003e72Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Applied rewrites43.4%
if 2.50000000000000004e-295 < B < 1.15e-163Initial program 53.2%
Taylor expanded in C around inf
Applied rewrites12.9%
Taylor expanded in A around 0
Applied rewrites12.9%
if 4.2000000000000003e72 < B Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites40.3%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= C -4300000000000.0)
(* 180.0 (/ (atan C) PI))
(if (<= C 2.6e+99)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan 0.0) PI))))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (C <= -4300000000000.0) {
tmp = 180.0 * (atan(C) / ((double) M_PI));
} else if (C <= 2.6e+99) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double tmp;
if (C <= -4300000000000.0) {
tmp = 180.0 * (Math.atan(C) / Math.PI);
} else if (C <= 2.6e+99) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): tmp = 0 if C <= -4300000000000.0: tmp = 180.0 * (math.atan(C) / math.pi) elif C <= 2.6e+99: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan(0.0) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (C <= -4300000000000.0) tmp = Float64(180.0 * Float64(atan(C) / pi)); elseif (C <= 2.6e+99) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(0.0) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) tmp = 0.0; if (C <= -4300000000000.0) tmp = 180.0 * (atan(C) / pi); elseif (C <= 2.6e+99) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan(0.0) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[C, -4300000000000.0], N[(180.0 * N[(N[ArcTan[C], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.6e+99], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;C \leq -4300000000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} C}{\pi}\\
\mathbf{elif}\;C \leq 2.6 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\end{array}
\end{array}
if C < -4.3e12Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites65.4%
Taylor expanded in C around inf
Applied rewrites65.9%
Applied rewrites20.2%
if -4.3e12 < C < 2.6e99Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites40.3%
if 2.6e99 < C Initial program 53.2%
Taylor expanded in C around inf
Applied rewrites12.9%
Taylor expanded in A around 0
Applied rewrites12.9%
B\_m = (fabs.f64 B)
B\_s = (copysign.f64 #s(literal 1 binary64) B)
(FPCore (B_s A B_m C)
:precision binary64
(*
B_s
(if (<= B_m 3.6e-163)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
double tmp;
if (B_m <= 3.6e-163) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return B_s * tmp;
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
double tmp;
if (B_m <= 3.6e-163) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return B_s * tmp;
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): tmp = 0 if B_m <= 3.6e-163: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return B_s * tmp
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) tmp = 0.0 if (B_m <= 3.6e-163) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return Float64(B_s * tmp) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp_2 = code(B_s, A, B_m, C) tmp = 0.0; if (B_m <= 3.6e-163) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = B_s * tmp; end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * If[LessEqual[B$95$m, 3.6e-163], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \begin{array}{l}
\mathbf{if}\;B\_m \leq 3.6 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 3.5999999999999998e-163Initial program 53.2%
Taylor expanded in C around inf
Applied rewrites12.9%
Taylor expanded in A around 0
Applied rewrites12.9%
if 3.5999999999999998e-163 < B Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites40.3%
B\_m = (fabs.f64 B) B\_s = (copysign.f64 #s(literal 1 binary64) B) (FPCore (B_s A B_m C) :precision binary64 (* B_s (* 180.0 (/ (atan -1.0) PI))))
B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
return B_s * (180.0 * (atan(-1.0) / ((double) M_PI)));
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
return B_s * (180.0 * (Math.atan(-1.0) / Math.PI));
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): return B_s * (180.0 * (math.atan(-1.0) / math.pi))
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) return Float64(B_s * Float64(180.0 * Float64(atan(-1.0) / pi))) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp = code(B_s, A, B_m, C) tmp = B_s * (180.0 * (atan(-1.0) / pi)); end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \left(180 \cdot \frac{\tan^{-1} -1}{\pi}\right)
\end{array}
Initial program 53.2%
Taylor expanded in B around inf
Applied rewrites40.3%
B\_m = (fabs.f64 B) B\_s = (copysign.f64 #s(literal 1 binary64) B) (FPCore (B_s A B_m C) :precision binary64 (* B_s (* 180.0 (/ (atan -2.0) PI))))
B\_m = fabs(B);
B\_s = copysign(1.0, B);
double code(double B_s, double A, double B_m, double C) {
return B_s * (180.0 * (atan(-2.0) / ((double) M_PI)));
}
B\_m = Math.abs(B);
B\_s = Math.copySign(1.0, B);
public static double code(double B_s, double A, double B_m, double C) {
return B_s * (180.0 * (Math.atan(-2.0) / Math.PI));
}
B\_m = math.fabs(B) B\_s = math.copysign(1.0, B) def code(B_s, A, B_m, C): return B_s * (180.0 * (math.atan(-2.0) / math.pi))
B\_m = abs(B) B\_s = copysign(1.0, B) function code(B_s, A, B_m, C) return Float64(B_s * Float64(180.0 * Float64(atan(-2.0) / pi))) end
B\_m = abs(B); B\_s = sign(B) * abs(1.0); function tmp = code(B_s, A, B_m, C) tmp = B_s * (180.0 * (atan(-2.0) / pi)); end
B\_m = N[Abs[B], $MachinePrecision]
B\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[B]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[B$95$s_, A_, B$95$m_, C_] := N[(B$95$s * N[(180.0 * N[(N[ArcTan[-2.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B\_m = \left|B\right|
\\
B\_s = \mathsf{copysign}\left(1, B\right)
\\
B\_s \cdot \left(180 \cdot \frac{\tan^{-1} -2}{\pi}\right)
\end{array}
Initial program 53.2%
Taylor expanded in A around inf
Applied rewrites23.1%
Applied rewrites15.1%
Applied rewrites15.1%
herbie shell --seed 2025159
(FPCore (A B C)
:name "ABCF->ab-angle angle"
:precision binary64
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))