
(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}
Sampling outcomes in binary64 precision:
Herbie found 21 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}
(FPCore (A B C) :precision binary64 (if (<= A -1.15e+114) (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI) (/ (* 180.0 (atan (/ (- (- C A) (hypot B (- A C))) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+114) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+114) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot(B, (A - C))) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e+114: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = (180.0 * math.atan((((C - A) - math.hypot(B, (A - C))) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e+114) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e+114) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e+114], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+114}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.15e114Initial program 13.7%
associate-*r/13.7%
Applied egg-rr45.0%
Taylor expanded in A around -inf 83.7%
if -1.15e114 < A Initial program 57.3%
associate-*r/57.3%
Applied egg-rr81.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.2e+36)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 7e-32)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(/ (* -180.0 (atan (/ (+ A (hypot A B)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+36) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 7e-32) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else {
tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e+36) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 7e-32) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else {
tmp = (-180.0 * Math.atan(((A + Math.hypot(A, B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.2e+36: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 7e-32: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi else: tmp = (-180.0 * math.atan(((A + math.hypot(A, B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.2e+36) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 7e-32) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(A, B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.2e+36) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 7e-32) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; else tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.2e+36], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 7e-32], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.2 \cdot 10^{+36}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7 \cdot 10^{-32}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.2e36Initial program 19.1%
associate-*r/19.2%
Applied egg-rr48.2%
Taylor expanded in A around -inf 75.4%
if -2.2e36 < A < 6.9999999999999997e-32Initial program 54.4%
associate-*r/54.4%
Applied egg-rr81.2%
Taylor expanded in A around 0 53.3%
+-commutative53.3%
unpow253.3%
unpow253.3%
hypot-define79.7%
Simplified79.7%
if 6.9999999999999997e-32 < A Initial program 69.3%
Taylor expanded in C around 0 69.3%
associate-*r/69.3%
mul-1-neg69.3%
unpow269.3%
unpow269.3%
hypot-define88.3%
Simplified88.3%
associate-*r/88.3%
distribute-frac-neg88.3%
atan-neg88.3%
Applied egg-rr88.3%
distribute-rgt-neg-out88.3%
distribute-lft-neg-in88.3%
metadata-eval88.3%
Simplified88.3%
(FPCore (A B C)
:precision binary64
(if (<= A -2.4e+36)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 5.4e-32)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ (* -180.0 (atan (/ (+ A (hypot A B)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+36) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 5.4e-32) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+36) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 5.4e-32) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = (-180.0 * Math.atan(((A + Math.hypot(A, B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.4e+36: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 5.4e-32: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = (-180.0 * math.atan(((A + math.hypot(A, B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.4e+36) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 5.4e-32) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(A, B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e+36) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 5.4e-32) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e+36], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5.4e-32], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{+36}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.4 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.39999999999999992e36Initial program 19.1%
associate-*r/19.2%
Applied egg-rr48.2%
Taylor expanded in A around -inf 75.4%
if -2.39999999999999992e36 < A < 5.39999999999999962e-32Initial program 54.4%
Taylor expanded in A around 0 53.3%
+-commutative53.3%
unpow253.3%
unpow253.3%
hypot-define79.7%
Simplified79.7%
if 5.39999999999999962e-32 < A Initial program 69.3%
Taylor expanded in C around 0 69.3%
associate-*r/69.3%
mul-1-neg69.3%
unpow269.3%
unpow269.3%
hypot-define88.3%
Simplified88.3%
associate-*r/88.3%
distribute-frac-neg88.3%
atan-neg88.3%
Applied egg-rr88.3%
distribute-rgt-neg-out88.3%
distribute-lft-neg-in88.3%
metadata-eval88.3%
Simplified88.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.75e+36)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 0.00037)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.75e+36) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 0.00037) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.75e+36) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 0.00037) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.75e+36: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 0.00037: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.75e+36) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 0.00037) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.75e+36) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 0.00037) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.75e+36], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 0.00037], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.75 \cdot 10^{+36}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 0.00037:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.7499999999999999e36Initial program 19.1%
associate-*r/19.2%
Applied egg-rr48.2%
Taylor expanded in A around -inf 75.4%
if -1.7499999999999999e36 < A < 3.6999999999999999e-4Initial program 53.7%
Taylor expanded in A around 0 52.7%
+-commutative52.7%
unpow252.7%
unpow252.7%
hypot-define80.7%
Simplified80.7%
if 3.6999999999999999e-4 < A Initial program 72.5%
Taylor expanded in B around -inf 80.6%
associate--l+80.6%
div-sub80.6%
Simplified80.6%
Taylor expanded in C around 0 80.7%
(FPCore (A B C) :precision binary64 (if (<= A -1.5e+114) (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot B (- A C))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+114) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot(B, (A - C))) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+114) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+114: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot(B, (A - C))) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+114) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+114) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = 180.0 / (pi / atan((((C - A) - hypot(B, (A - C))) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+114], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+114}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.5e114Initial program 13.7%
associate-*r/13.7%
Applied egg-rr45.0%
Taylor expanded in A around -inf 83.7%
if -1.5e114 < A Initial program 57.3%
*-commutative57.3%
associate--l-57.2%
+-commutative57.2%
unpow257.2%
unpow257.2%
hypot-undefine81.3%
div-inv81.3%
clear-num81.3%
un-div-inv81.3%
Applied egg-rr81.5%
(FPCore (A B C) :precision binary64 (if (<= A -3.5e+111) (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+111) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+111) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.5e+111: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.5e+111) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.5e+111) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.5e+111], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.5 \cdot 10^{+111}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.5000000000000002e111Initial program 13.7%
associate-*r/13.7%
Applied egg-rr45.0%
Taylor expanded in A around -inf 83.7%
if -3.5000000000000002e111 < A Initial program 57.3%
associate-*l/57.3%
*-lft-identity57.3%
+-commutative57.3%
unpow257.3%
unpow257.3%
hypot-define81.5%
Simplified81.5%
(FPCore (A B C) :precision binary64 (if (<= A -2.4e+36) (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+36) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+36) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.4e+36: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.4e+36) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e+36) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e+36], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{+36}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.39999999999999992e36Initial program 19.1%
associate-*r/19.2%
Applied egg-rr48.2%
Taylor expanded in A around -inf 75.4%
if -2.39999999999999992e36 < A Initial program 59.4%
Simplified83.7%
(FPCore (A B C) :precision binary64 (if (<= C 2.9e-18) (* 180.0 (/ (atan (/ (- (- C A) (hypot A B)) B)) PI)) (/ (* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ B C))))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.9e-18) {
tmp = 180.0 * (atan((((C - A) - hypot(A, B)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 2.9e-18) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(A, B)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * (B / C))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2.9e-18: tmp = 180.0 * (math.atan((((C - A) - math.hypot(A, B)) / B)) / math.pi) else: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * (B / C))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2.9e-18) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(A, B)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(B / C))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2.9e-18) tmp = 180.0 * (atan((((C - A) - hypot(A, B)) / B)) / pi); else tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2.9e-18], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2.9 \cdot 10^{-18}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 2.9e-18Initial program 59.1%
associate-*l/59.1%
*-lft-identity59.1%
+-commutative59.1%
unpow259.1%
unpow259.1%
hypot-define85.0%
Simplified85.0%
Taylor expanded in C around 0 58.7%
unpow258.7%
unpow258.7%
hypot-define83.9%
Simplified83.9%
if 2.9e-18 < C Initial program 25.4%
associate-*r/25.4%
Applied egg-rr49.2%
Taylor expanded in C around inf 68.5%
associate-*r/68.5%
distribute-rgt1-in68.5%
metadata-eval68.5%
mul0-lft68.5%
metadata-eval68.5%
Simplified68.5%
(FPCore (A B C)
:precision binary64
(if (<= A -4.1e-50)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (or (<= A 3.2e-191) (not (<= A 6.2e-142)))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* 180.0 (/ (atan 1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.1e-50) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if ((A <= 3.2e-191) || !(A <= 6.2e-142)) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.1e-50) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if ((A <= 3.2e-191) || !(A <= 6.2e-142)) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.1e-50: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif (A <= 3.2e-191) or not (A <= 6.2e-142): tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan(1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.1e-50) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif ((A <= 3.2e-191) || !(A <= 6.2e-142)) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.1e-50) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif ((A <= 3.2e-191) || ~((A <= 6.2e-142))) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = 180.0 * (atan(1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.1e-50], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 3.2e-191], N[Not[LessEqual[A, 6.2e-142]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.1 \cdot 10^{-50}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-191} \lor \neg \left(A \leq 6.2 \cdot 10^{-142}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\end{array}
\end{array}
if A < -4.09999999999999985e-50Initial program 26.1%
associate-*r/26.1%
Applied egg-rr51.9%
Taylor expanded in A around -inf 46.4%
Taylor expanded in B around 0 61.5%
associate-*r/61.5%
*-commutative61.5%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in B around 0 61.4%
associate-*r/61.4%
*-commutative61.4%
associate-*r/61.5%
Simplified61.5%
if -4.09999999999999985e-50 < A < 3.2000000000000003e-191 or 6.2e-142 < A Initial program 61.2%
Taylor expanded in C around 0 51.5%
associate-*r/51.5%
mul-1-neg51.5%
unpow251.5%
unpow251.5%
hypot-define72.5%
Simplified72.5%
Taylor expanded in A around 0 36.6%
associate-*r/36.6%
Simplified36.6%
Taylor expanded in B around inf 52.5%
sub-neg52.5%
metadata-eval52.5%
+-commutative52.5%
mul-1-neg52.5%
unsub-neg52.5%
Simplified52.5%
if 3.2000000000000003e-191 < A < 6.2e-142Initial program 66.0%
Taylor expanded in B around -inf 82.1%
Final simplification56.5%
(FPCore (A B C)
:precision binary64
(if (<= B 1.72e-202)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 2.5e-160)
(/ (* 180.0 (atan (+ (/ 0.0 B) (* -0.5 (/ B C))))) PI)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.72e-202) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 2.5e-160) {
tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1.72e-202) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 2.5e-160) {
tmp = (180.0 * Math.atan(((0.0 / B) + (-0.5 * (B / C))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.72e-202: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 2.5e-160: tmp = (180.0 * math.atan(((0.0 / B) + (-0.5 * (B / C))))) / math.pi else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1.72e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 2.5e-160) tmp = Float64(Float64(180.0 * atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(B / C))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1.72e-202) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 2.5e-160) tmp = (180.0 * atan(((0.0 / B) + (-0.5 * (B / C))))) / pi; else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.72e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.5e-160], N[(N[(180.0 * N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.72 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-160}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.72000000000000011e-202Initial program 57.0%
Taylor expanded in B around -inf 67.7%
associate--l+67.7%
div-sub68.4%
Simplified68.4%
if 1.72000000000000011e-202 < B < 2.49999999999999997e-160Initial program 4.9%
associate-*r/4.9%
Applied egg-rr43.6%
Taylor expanded in C around inf 56.2%
associate-*r/56.2%
distribute-rgt1-in56.2%
metadata-eval56.2%
mul0-lft56.2%
metadata-eval56.2%
Simplified56.2%
if 2.49999999999999997e-160 < B Initial program 44.9%
Taylor expanded in B around inf 67.6%
Final simplification67.6%
(FPCore (A B C)
:precision binary64
(if (<= B 1.5e-202)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 4e-160)
(/ 180.0 (/ PI (atan (+ (/ 0.0 B) (* -0.5 (/ B C))))))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.5e-202) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 4e-160) {
tmp = 180.0 / (((double) M_PI) / atan(((0.0 / B) + (-0.5 * (B / C)))));
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1.5e-202) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 4e-160) {
tmp = 180.0 / (Math.PI / Math.atan(((0.0 / B) + (-0.5 * (B / C)))));
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.5e-202: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 4e-160: tmp = 180.0 / (math.pi / math.atan(((0.0 / B) + (-0.5 * (B / C))))) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1.5e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 4e-160) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(0.0 / B) + Float64(-0.5 * Float64(B / C)))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1.5e-202) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 4e-160) tmp = 180.0 / (pi / atan(((0.0 / B) + (-0.5 * (B / C))))); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.5e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-160], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(0.0 / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.5 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-160}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0}{B} + -0.5 \cdot \frac{B}{C}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.50000000000000005e-202Initial program 57.0%
Taylor expanded in B around -inf 67.7%
associate--l+67.7%
div-sub68.4%
Simplified68.4%
if 1.50000000000000005e-202 < B < 4e-160Initial program 4.9%
*-commutative4.9%
associate--l-4.0%
+-commutative4.0%
unpow24.0%
unpow24.0%
hypot-undefine33.1%
div-inv33.1%
clear-num33.1%
un-div-inv33.1%
Applied egg-rr43.6%
Taylor expanded in C around inf 56.1%
associate-*r/56.2%
distribute-rgt1-in56.2%
metadata-eval56.2%
mul0-lft56.2%
metadata-eval56.2%
Simplified56.1%
if 4e-160 < B Initial program 44.9%
Taylor expanded in B around inf 67.6%
Final simplification67.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.95e-145)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.7e-241)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= B 4.5e-65)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e-145) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.7e-241) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (B <= 4.5e-65) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e-145) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.7e-241) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (B <= 4.5e-65) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.95e-145: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.7e-241: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif B <= 4.5e-65: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.95e-145) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.7e-241) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (B <= 4.5e-65) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.95e-145) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.7e-241) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (B <= 4.5e-65) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.95e-145], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.7e-241], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.5e-65], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.95 \cdot 10^{-145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.7 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.95000000000000015e-145Initial program 55.0%
Taylor expanded in B around -inf 51.2%
if -1.95000000000000015e-145 < B < -1.6999999999999999e-241Initial program 27.8%
associate-*r/27.8%
Applied egg-rr52.9%
Taylor expanded in A around -inf 22.2%
Taylor expanded in B around 0 49.8%
associate-*r/49.8%
*-commutative49.8%
associate-/l*50.0%
Simplified50.0%
Taylor expanded in B around 0 49.9%
associate-*r/49.9%
*-commutative49.9%
associate-*r/49.9%
Simplified49.9%
if -1.6999999999999999e-241 < B < 4.4999999999999998e-65Initial program 60.7%
Taylor expanded in B around -inf 53.8%
associate--l+53.8%
div-sub55.5%
Simplified55.5%
Taylor expanded in C around inf 50.6%
if 4.4999999999999998e-65 < B Initial program 41.9%
Taylor expanded in B around inf 56.9%
(FPCore (A B C)
:precision binary64
(if (<= B -2.9e-215)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 3.8e-67)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan (/ (+ A B) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.9e-215) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 3.8e-67) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + B) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.9e-215) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 3.8e-67) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + B) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.9e-215: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 3.8e-67: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(((A + B) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.9e-215) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 3.8e-67) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + B) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.9e-215) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 3.8e-67) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(((A + B) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.9e-215], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-67], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + B), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.9 \cdot 10^{-215}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + B}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.9000000000000001e-215Initial program 52.5%
Taylor expanded in B around -inf 69.5%
associate--l+69.5%
div-sub69.5%
Simplified69.5%
Taylor expanded in C around 0 61.8%
if -2.9000000000000001e-215 < B < 3.79999999999999988e-67Initial program 57.2%
Taylor expanded in B around -inf 50.6%
associate--l+50.6%
div-sub52.2%
Simplified52.2%
Taylor expanded in C around inf 47.5%
if 3.79999999999999988e-67 < B Initial program 41.9%
Taylor expanded in C around 0 37.2%
associate-*r/37.2%
mul-1-neg37.2%
unpow237.2%
unpow237.2%
hypot-define66.0%
Simplified66.0%
Taylor expanded in A around 0 64.4%
Final simplification59.2%
(FPCore (A B C)
:precision binary64
(if (<= B -5.3e-216)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 5.2e-67)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.3e-216) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 5.2e-67) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.3e-216) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 5.2e-67) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.3e-216: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 5.2e-67: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.3e-216) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 5.2e-67) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.3e-216) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 5.2e-67) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.3e-216], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e-67], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.3 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.29999999999999977e-216Initial program 52.5%
Taylor expanded in B around -inf 69.5%
associate--l+69.5%
div-sub69.5%
Simplified69.5%
Taylor expanded in C around 0 61.8%
if -5.29999999999999977e-216 < B < 5.1999999999999998e-67Initial program 57.2%
Taylor expanded in B around -inf 50.6%
associate--l+50.6%
div-sub52.2%
Simplified52.2%
Taylor expanded in C around inf 47.5%
if 5.1999999999999998e-67 < B Initial program 41.9%
Taylor expanded in C around 0 37.2%
associate-*r/37.2%
mul-1-neg37.2%
unpow237.2%
unpow237.2%
hypot-define66.0%
Simplified66.0%
Taylor expanded in A around 0 64.9%
associate-*r/64.9%
Simplified64.9%
Taylor expanded in B around inf 64.4%
sub-neg64.4%
metadata-eval64.4%
+-commutative64.4%
mul-1-neg64.4%
unsub-neg64.4%
Simplified64.4%
(FPCore (A B C) :precision binary64 (if (<= B 1e-254) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1e-254) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1e-254) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1e-254: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1e-254) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1e-254) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1e-254], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 9.9999999999999991e-255Initial program 55.4%
Taylor expanded in B around -inf 66.8%
associate--l+66.8%
div-sub67.5%
Simplified67.5%
if 9.9999999999999991e-255 < B Initial program 44.1%
Taylor expanded in B around inf 63.6%
Final simplification65.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.86e+53)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.8e-62)
(/ (* 180.0 (atan (/ C B))) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.86e+53) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.8e-62) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.86e+53) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.8e-62) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.86e+53: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.8e-62: tmp = (180.0 * math.atan((C / B))) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.86e+53) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.8e-62) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.86e+53) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.8e-62) tmp = (180.0 * atan((C / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.86e+53], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-62], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.86 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-62}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.85999999999999999e53Initial program 45.2%
Taylor expanded in B around -inf 66.6%
if -1.85999999999999999e53 < B < 4.79999999999999967e-62Initial program 59.1%
Taylor expanded in B around -inf 54.1%
associate--l+54.1%
div-sub55.0%
Simplified55.0%
Taylor expanded in C around inf 38.9%
associate-*r/38.9%
Applied egg-rr38.9%
if 4.79999999999999967e-62 < B Initial program 41.9%
Taylor expanded in B around inf 56.9%
(FPCore (A B C)
:precision binary64
(if (<= B -1.86e+53)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.25e-65)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.86e+53) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.25e-65) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.86e+53) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.25e-65) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.86e+53: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.25e-65: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.86e+53) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.25e-65) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.86e+53) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.25e-65) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.86e+53], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e-65], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.86 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.85999999999999999e53Initial program 45.2%
Taylor expanded in B around -inf 66.6%
if -1.85999999999999999e53 < B < 1.24999999999999996e-65Initial program 59.1%
Taylor expanded in B around -inf 54.1%
associate--l+54.1%
div-sub55.0%
Simplified55.0%
Taylor expanded in C around inf 38.9%
if 1.24999999999999996e-65 < B Initial program 41.9%
Taylor expanded in B around inf 56.9%
(FPCore (A B C)
:precision binary64
(if (<= B -5.7e-210)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.08e-104)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.7e-210) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.08e-104) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.7e-210) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.08e-104) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.7e-210: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.08e-104: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.7e-210) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.08e-104) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.7e-210) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.08e-104) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.7e-210], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.08e-104], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.7 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.08 \cdot 10^{-104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.69999999999999971e-210Initial program 52.5%
Taylor expanded in B around -inf 47.0%
if -5.69999999999999971e-210 < B < 1.07999999999999997e-104Initial program 57.1%
Taylor expanded in C around inf 30.4%
associate-*r/30.4%
mul-1-neg30.4%
distribute-rgt1-in30.4%
metadata-eval30.4%
mul0-lft30.4%
metadata-eval30.4%
Simplified30.4%
if 1.07999999999999997e-104 < B Initial program 43.2%
Taylor expanded in B around inf 54.4%
(FPCore (A B C) :precision binary64 (if (<= B 3.4e-65) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (/ (+ A B) (- B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.4e-65) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + B) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.4e-65) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + B) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.4e-65: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A + B) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.4e-65) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + B) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.4e-65) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 * (atan(((A + B) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.4e-65], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + B), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.4 \cdot 10^{-65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + B}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 3.39999999999999987e-65Initial program 54.3%
Taylor expanded in B around -inf 62.5%
associate--l+62.5%
div-sub63.1%
Simplified63.1%
if 3.39999999999999987e-65 < B Initial program 41.9%
Taylor expanded in C around 0 37.2%
associate-*r/37.2%
mul-1-neg37.2%
unpow237.2%
unpow237.2%
hypot-define66.0%
Simplified66.0%
Taylor expanded in A around 0 64.4%
Final simplification63.6%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 54.1%
Taylor expanded in B around -inf 41.3%
if -4.999999999999985e-310 < B Initial program 46.1%
Taylor expanded in B around inf 42.6%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 50.2%
Taylor expanded in B around inf 22.1%
herbie shell --seed 2024144
(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)))