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



Bits error versus A



Bits error versus B



Bits error versus C
Results
if B < 4.04821618885358008e155Initial program 26.8
Simplified26.8
rmApplied associate-*r/_binary64_172526.8
if 4.04821618885358008e155 < B Initial program 47.3
Simplified47.3
rmApplied associate--l-_binary64_172147.3
rmApplied associate-*r/_binary64_172547.3
Taylor expanded around 0 7.8
Final simplification24.6
herbie shell --seed 2020349
(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)))