Math FPCore C Java Python Julia MATLAB Wolfram TeX \[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 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -4 \cdot 10^{-5}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(-1 - \left(1 + \frac{A}{B}\right)\right) + \left(\frac{C}{B} - -1\right)\right)}{\pi}\\
\mathbf{elif}\;t_0 \leq 4 \cdot 10^{-8}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C + B\right) - A\right)\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
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_0 -4e-5)
(* 180.0 (/ (atan (+ (- -1.0 (+ 1.0 (/ A B))) (- (/ C B) -1.0))) PI))
(if (<= t_0 4e-8)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (* (/ 1.0 B) (- (+ C B) A))) 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 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_0 <= -4e-5) {
tmp = 180.0 * (atan(((-1.0 - (1.0 + (A / B))) + ((C / B) - -1.0))) / ((double) M_PI));
} else if (t_0 <= 4e-8) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((1.0 / B) * ((C + B) - A))) / ((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 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if (t_0 <= -4e-5) {
tmp = 180.0 * (Math.atan(((-1.0 - (1.0 + (A / B))) + ((C / B) - -1.0))) / Math.PI);
} else if (t_0 <= 4e-8) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C + B) - A))) / 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 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0))))
tmp = 0
if t_0 <= -4e-5:
tmp = 180.0 * (math.atan(((-1.0 - (1.0 + (A / B))) + ((C / B) - -1.0))) / math.pi)
elif t_0 <= 4e-8:
tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi)
else:
tmp = 180.0 * (math.atan(((1.0 / B) * ((C + B) - A))) / 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(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))
tmp = 0.0
if (t_0 <= -4e-5)
tmp = Float64(180.0 * Float64(atan(Float64(Float64(-1.0 - Float64(1.0 + Float64(A / B))) + Float64(Float64(C / B) - -1.0))) / pi));
elseif (t_0 <= 4e-8)
tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi));
else
tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C + B) - A))) / 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 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0))));
tmp = 0.0;
if (t_0 <= -4e-5)
tmp = 180.0 * (atan(((-1.0 - (1.0 + (A / B))) + ((C / B) - -1.0))) / pi);
elseif (t_0 <= 4e-8)
tmp = 180.0 * (atan((0.5 * (B / A))) / pi);
else
tmp = 180.0 * (atan(((1.0 / B) * ((C + B) - A))) / 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[(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]}, If[LessEqual[t$95$0, -4e-5], N[(180.0 * N[(N[ArcTan[N[(N[(-1.0 - N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(C / B), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e-8], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C + B), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $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 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -4 \cdot 10^{-5}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(-1 - \left(1 + \frac{A}{B}\right)\right) + \left(\frac{C}{B} - -1\right)\right)}{\pi}\\
\mathbf{elif}\;t_0 \leq 4 \cdot 10^{-8}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C + B\right) - A\right)\right)}{\pi}\\
\end{array}
Alternatives Alternative 1 Error 31.3 Cost 14496
\[\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.4 \cdot 10^{-21}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -6 \cdot 10^{-53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq -6 \cdot 10^{-219}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 9 \cdot 10^{-206}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 1.25 \cdot 10^{-135}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 2000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 8.5 \cdot 10^{+158}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A + \left(-A\right)}{B}\right)}{\pi}\\
\end{array}
\]
Alternative 2 Error 30.4 Cost 14496
\[\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C + B\right) - A\right)\right)}{\pi}\\
\mathbf{if}\;C \leq -1.4 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq -2.25 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.3 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 1.16 \cdot 10^{-205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 4.3 \cdot 10^{-176}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 5 \cdot 10^{-137}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 14500000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.18 \cdot 10^{+157}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A + \left(-A\right)}{B}\right)}{\pi}\\
\end{array}
\]
Alternative 3 Error 23.5 Cost 14096
\[\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-\frac{A + \left(-A\right)}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C + B\right) - A\right)\right)}{\pi}\\
\mathbf{if}\;B \leq -2.3 \cdot 10^{-116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -5.2 \cdot 10^{-181}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.8 \cdot 10^{-212}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -1.68 \cdot 10^{-307}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - \left(1 + \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\]
Alternative 4 Error 26.3 Cost 13708
\[\begin{array}{l}
\mathbf{if}\;A \leq -2 \cdot 10^{+41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 8 \cdot 10^{-105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\]
Alternative 5 Error 33.9 Cost 13580
\[\begin{array}{l}
\mathbf{if}\;B \leq -170000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-308}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\]
Alternative 6 Error 33.8 Cost 13580
\[\begin{array}{l}
\mathbf{if}\;B \leq -6000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.9 \cdot 10^{-308}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\]
Alternative 7 Error 32.5 Cost 13576
\[\begin{array}{l}
\mathbf{if}\;A \leq -1 \cdot 10^{-309}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.6 \cdot 10^{-72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\]
Alternative 8 Error 25.6 Cost 13576
\[\begin{array}{l}
\mathbf{if}\;A \leq -2.8 \cdot 10^{+46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.1 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\]
Alternative 9 Error 26.0 Cost 13576
\[\begin{array}{l}
\mathbf{if}\;A \leq -9 \cdot 10^{+41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\]
Alternative 10 Error 26.1 Cost 13576
\[\begin{array}{l}
\mathbf{if}\;A \leq -8.1 \cdot 10^{+43}:\\
\;\;\;\;180 \cdot \left(\frac{1}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} - 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\]
Alternative 11 Error 33.5 Cost 13448
\[\begin{array}{l}
\mathbf{if}\;B \leq -1.7 \cdot 10^{-58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\]
Alternative 12 Error 29.9 Cost 13444
\[\begin{array}{l}
\mathbf{if}\;A \leq -9.5 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\]
Alternative 13 Error 38.3 Cost 13188
\[\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\]
Alternative 14 Error 50.5 Cost 13056
\[180 \cdot \frac{\tan^{-1} -1}{\pi}
\]