(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 -3.205797192814889e+139) (* 180.0 (/ (atan (* 0.5 (+ (/ C (/ (* A A) B)) (/ B A)))) PI)) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot B (- C A))) B))))))
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 <= -3.205797192814889e+139) {
tmp = 180.0 * (atan((0.5 * ((C / ((A * A) / B)) + (B / A)))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot(B, (C - A))) / B)));
}
return tmp;
}
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);
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.205797192814889e+139) {
tmp = 180.0 * (Math.atan((0.5 * ((C / ((A * A) / B)) + (B / A)))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)));
}
return tmp;
}
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)
def code(A, B, C): tmp = 0 if A <= -3.205797192814889e+139: tmp = 180.0 * (math.atan((0.5 * ((C / ((A * A) / B)) + (B / A)))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot(B, (C - A))) / B))) return tmp
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 code(A, B, C) tmp = 0.0 if (A <= -3.205797192814889e+139) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(C / Float64(Float64(A * A) / B)) + Float64(B / A)))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)))); end return tmp 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
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.205797192814889e+139) tmp = 180.0 * (atan((0.5 * ((C / ((A * A) / B)) + (B / A)))) / pi); else tmp = 180.0 / (pi / atan((((C - A) - hypot(B, (C - A))) / B))); end tmp_2 = tmp; 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]
code[A_, B_, C_] := If[LessEqual[A, -3.205797192814889e+139], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(C / N[(N[(A * A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] + N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
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 -3.205797192814889 \cdot 10^{+139}:\\
\;\;\;\;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}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}}\\
\end{array}



Bits error versus A



Bits error versus B



Bits error versus C
Results
if A < -3.20579719281488916e139Initial program 55.4
Simplified28.3
Taylor expanded in A around -inf 16.3
Simplified13.5
Applied *-un-lft-identity_binary6413.5
Applied associate-/r*_binary6413.5
if -3.20579719281488916e139 < A Initial program 25.4
Simplified11.4
Applied clear-num_binary6411.4
Applied un-div-inv_binary6411.4
Final simplification11.7
herbie shell --seed 2022131
(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)))