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}\;B \leq 1.314127621982934 \cdot 10^{+154}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + B \cdot B}}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - B}{B}\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 (<= B 1.314127621982934e+154)
(/
180.0
(/ PI (atan (/ (- (- C A) (sqrt (+ (pow (- A C) 2.0) (* B B)))) B))))
(/ (* 180.0 (atan (/ (- (- C A) B) B))) 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 (B <= 1.314127621982934e+154) {
tmp = 180.0 / (((double) M_PI) / atan(((C - A) - sqrt(pow((A - C), 2.0) + (B * B))) / B));
} else {
tmp = (180.0 * atan(((C - A) - B) / B)) / ((double) M_PI);
}
return tmp;
}



Bits error versus A



Bits error versus B



Bits error versus C
Results
if B < 1.31412762198293396e154Initial program 26.9
Simplified26.9
rmApplied associate-*r/_binary64_104326.9
rmApplied associate-/l*_binary64_104626.9
if 1.31412762198293396e154 < B Initial program 47.5
Simplified47.5
rmApplied associate-*r/_binary64_104347.5
Taylor expanded around 0 8.4
Final simplification24.7
herbie shell --seed 2020354
(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)))