(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
(let* ((t_0 (* 180.0 (/ 1.0 (sqrt PI)))))
(if (<= C 1.9116610246095172e+110)
(* t_0 (/ (atan (/ (- (- C A) (hypot B (- C A))) B)) (sqrt PI)))
(* t_0 (/ (atan (* -0.5 (/ B C))) (sqrt 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 t_0 = 180.0 * (1.0 / sqrt(((double) M_PI)));
double tmp;
if (C <= 1.9116610246095172e+110) {
tmp = t_0 * (atan((((C - A) - hypot(B, (C - A))) / B)) / sqrt(((double) M_PI)));
} else {
tmp = t_0 * (atan((-0.5 * (B / C))) / sqrt(((double) M_PI)));
}
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 t_0 = 180.0 * (1.0 / Math.sqrt(Math.PI));
double tmp;
if (C <= 1.9116610246095172e+110) {
tmp = t_0 * (Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) / Math.sqrt(Math.PI));
} else {
tmp = t_0 * (Math.atan((-0.5 * (B / C))) / Math.sqrt(Math.PI));
}
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): t_0 = 180.0 * (1.0 / math.sqrt(math.pi)) tmp = 0 if C <= 1.9116610246095172e+110: tmp = t_0 * (math.atan((((C - A) - math.hypot(B, (C - A))) / B)) / math.sqrt(math.pi)) else: tmp = t_0 * (math.atan((-0.5 * (B / C))) / math.sqrt(math.pi)) 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) t_0 = Float64(180.0 * Float64(1.0 / sqrt(pi))) tmp = 0.0 if (C <= 1.9116610246095172e+110) tmp = Float64(t_0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) / sqrt(pi))); else tmp = Float64(t_0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / sqrt(pi))); 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) t_0 = 180.0 * (1.0 / sqrt(pi)); tmp = 0.0; if (C <= 1.9116610246095172e+110) tmp = t_0 * (atan((((C - A) - hypot(B, (C - A))) / B)) / sqrt(pi)); else tmp = t_0 * (atan((-0.5 * (B / C))) / sqrt(pi)); 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_] := Block[{t$95$0 = N[(180.0 * N[(1.0 / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, 1.9116610246095172e+110], N[(t$95$0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[Pi], $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}
t_0 := 180 \cdot \frac{1}{\sqrt{\pi}}\\
\mathbf{if}\;C \leq 1.9116610246095172 \cdot 10^{+110}:\\
\;\;\;\;t_0 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)}{\sqrt{\pi}}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\sqrt{\pi}}\\
\end{array}



Bits error versus A



Bits error versus B



Bits error versus C
Results
if C < 1.9116610246095172e110Initial program 24.3
Simplified11.0
Applied add-sqr-sqrt_binary6411.7
Applied *-un-lft-identity_binary6411.7
Applied times-frac_binary6411.0
Applied associate-*r*_binary6411.0
if 1.9116610246095172e110 < C Initial program 52.8
Simplified28.9
Applied add-sqr-sqrt_binary6429.1
Applied *-un-lft-identity_binary6429.1
Applied times-frac_binary6428.9
Applied associate-*r*_binary6428.9
Taylor expanded in C around inf 15.8
Final simplification11.8
herbie shell --seed 2022137
(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)))