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}\;A \leq -351583884.37308884:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{C}{\frac{A \cdot A}{B}} + \frac{B}{A}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(\mathsf{hypot}\left(B, C - A\right) + \sqrt[3]{A} \cdot \left(\sqrt[3]{A} \cdot \sqrt[3]{A}\right)\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 (<= A -351583884.37308884)
(* 180.0 (/ (atan (* 0.5 (+ (/ C (/ (* A A) B)) (/ B A)))) PI))
(*
180.0
(/
(atan
(/ (- C (+ (hypot B (- C A)) (* (cbrt A) (* (cbrt A) (cbrt 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 (A <= -351583884.37308884) {
tmp = 180.0 * (atan(0.5 * ((C / ((A * A) / B)) + (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((C - (hypot(B, (C - A)) + (cbrt(A) * (cbrt(A) * cbrt(A))))) / B) / ((double) M_PI));
}
return tmp;
}



Bits error versus A



Bits error versus B



Bits error versus C
Results
if A < -351583884.3730888Initial program 48.1
Simplified26.1
Taylor expanded in A around -inf 22.2
Simplified19.9
if -351583884.3730888 < A Initial program 23.4
Simplified9.7
rmApplied add-cube-cbrt_binary649.7
Applied cancel-sign-sub-inv_binary649.7
Applied associate--l+_binary649.7
Final simplification12.2
herbie shell --seed 2021212
(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)))