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}\begin{array}{l}
\mathbf{if}\;C \leq 4.396494985570493 \cdot 10^{+51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\sqrt[3]{{\left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + B \cdot B}}{B}\right)}^{3}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(\left(\frac{A}{C} + 1\right) \cdot \frac{B}{C}\right) \cdot -0.5\right)}{\pi}\\
\end{array}(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)))
(FPCore (A B C)
:precision binary64
(if (<= C 4.396494985570493e+51)
(*
180.0
(/
(atan
(cbrt (pow (/ (- (- C A) (sqrt (+ (pow (- A C) 2.0) (* B B)))) B) 3.0)))
PI))
(* 180.0 (/ (atan (* (* (+ (/ A C) 1.0) (/ B C)) -0.5)) 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));
}
double code(double A, double B, double C) {
double tmp;
if (C <= 4.396494985570493e+51) {
tmp = 180.0 * (atan(cbrt(pow((((C - A) - sqrt(pow((A - C), 2.0) + (B * B))) / B), 3.0))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((A / C) + 1.0) * (B / C)) * -0.5) / ((double) M_PI));
}
return tmp;
}



Bits error versus A



Bits error versus B



Bits error versus C
Results
if C < 4.39649498557049296e51Initial program 24.5
Simplified24.5
rmApplied add-cbrt-cube_binary64_216024.5
Simplified24.5
if 4.39649498557049296e51 < C Initial program 50.8
Simplified50.8
Taylor expanded around inf 20.2
Simplified17.7
Final simplification23.1
herbie shell --seed 2020343
(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)))