
(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)))
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));
}
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);
}
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)
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 tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); 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]
\begin{array}{l}
\\
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}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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)))
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));
}
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);
}
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)
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 tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); 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]
\begin{array}{l}
\\
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}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -6.2e-9) (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e-9) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e-9) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.2e-9: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.2e-9) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.2e-9) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.2e-9], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= A -4.6e-6)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 3.5e+29)
(* 180.0 (/ (atan (* (/ 1.0 B) (- C (hypot B C)))) PI))
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e-6) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 3.5e+29) {
tmp = 180.0 * (atan(((1.0 / B) * (C - hypot(B, C)))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e-6) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 3.5e+29) {
tmp = 180.0 * (Math.atan(((1.0 / B) * (C - Math.hypot(B, C)))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.6e-6: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 3.5e+29: tmp = 180.0 * (math.atan(((1.0 / B) * (C - math.hypot(B, C)))) / math.pi) else: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.6e-6) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 3.5e+29) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(C - hypot(B, C)))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.6e-6) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 3.5e+29) tmp = 180.0 * (atan(((1.0 / B) * (C - hypot(B, C)))) / pi); else tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.6e-6], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.5e+29], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{+29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= A -7.4e-12)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 6.5e+31)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.4e-12) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 6.5e+31) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.4e-12) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 6.5e+31) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.4e-12: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 6.5e+31: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.4e-12) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 6.5e+31) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.4e-12) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 6.5e+31) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.4e-12], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e+31], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= A -1.7e-7)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 4.3e+49)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (+ (+ (/ (atan (/ (- (+ B C) A) B)) PI) -1.0) 1.0)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e-7) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 4.3e+49) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (((atan((((B + C) - A) / B)) / ((double) M_PI)) + -1.0) + 1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e-7) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 4.3e+49) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (((Math.atan((((B + C) - A) / B)) / Math.PI) + -1.0) + 1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.7e-7: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 4.3e+49: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (((math.atan((((B + C) - A) / B)) / math.pi) + -1.0) + 1.0) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.7e-7) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 4.3e+49) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(Float64(Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi) + -1.0) + 1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.7e-7) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 4.3e+49) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (((atan((((B + C) - A) / B)) / pi) + -1.0) + 1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.7e-7], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.3e+49], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[(N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.7 \cdot 10^{-7}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 4.3 \cdot 10^{+49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \left(\left(\frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi} + -1\right) + 1\right)\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= B -2.2e+56)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.55e-152)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= B -3.6e-294)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 5.5e-127)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4e+15)
(/ (* -180.0 (atan (* 0.5 (/ B A)))) (- PI))
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.2e+56) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.55e-152) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (B <= -3.6e-294) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 5.5e-127) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4e+15) {
tmp = (-180.0 * atan((0.5 * (B / A)))) / -((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.2e+56) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.55e-152) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (B <= -3.6e-294) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 5.5e-127) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4e+15) {
tmp = (-180.0 * Math.atan((0.5 * (B / A)))) / -Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.2e+56: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.55e-152: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif B <= -3.6e-294: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 5.5e-127: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4e+15: tmp = (-180.0 * math.atan((0.5 * (B / A)))) / -math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.2e+56) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.55e-152) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (B <= -3.6e-294) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 5.5e-127) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4e+15) tmp = Float64(Float64(-180.0 * atan(Float64(0.5 * Float64(B / A)))) / Float64(-pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.2e+56) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.55e-152) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (B <= -3.6e-294) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 5.5e-127) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4e+15) tmp = (-180.0 * atan((0.5 * (B / A)))) / -pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.2e+56], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.55e-152], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.6e-294], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e-127], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e+15], N[(N[(-180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / (-Pi)), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.2 \cdot 10^{+56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.55 \cdot 10^{-152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq -3.6 \cdot 10^{-294}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{-127}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{-\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))))
(if (<= B -3.4e+55)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -7e-151)
t_0
(if (<= B -1.55e-295)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 1.8e-128)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 7.5e+14) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
double tmp;
if (B <= -3.4e+55) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -7e-151) {
tmp = t_0;
} else if (B <= -1.55e-295) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 1.8e-128) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 7.5e+14) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
double tmp;
if (B <= -3.4e+55) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -7e-151) {
tmp = t_0;
} else if (B <= -1.55e-295) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 1.8e-128) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 7.5e+14) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) tmp = 0 if B <= -3.4e+55: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -7e-151: tmp = t_0 elif B <= -1.55e-295: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 1.8e-128: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 7.5e+14: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)) tmp = 0.0 if (B <= -3.4e+55) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -7e-151) tmp = t_0; elseif (B <= -1.55e-295) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 1.8e-128) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 7.5e+14) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((0.5 * B) / A)) / pi); tmp = 0.0; if (B <= -3.4e+55) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -7e-151) tmp = t_0; elseif (B <= -1.55e-295) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 1.8e-128) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 7.5e+14) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.4e+55], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7e-151], t$95$0, If[LessEqual[B, -1.55e-295], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-128], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.5e+14], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{if}\;B \leq -3.4 \cdot 10^{+55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -7 \cdot 10^{-151}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.55 \cdot 10^{-295}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{+14}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= A -2.6e-55)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (or (<= A 5.4e-80) (not (<= A 8e-43)))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))
(* 180.0 (/ (atan 1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e-55) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if ((A <= 5.4e-80) || !(A <= 8e-43)) {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e-55) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if ((A <= 5.4e-80) || !(A <= 8e-43)) {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.6e-55: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif (A <= 5.4e-80) or not (A <= 8e-43): tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.6e-55) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif ((A <= 5.4e-80) || !(A <= 8e-43)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.6e-55) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif ((A <= 5.4e-80) || ~((A <= 8e-43))) tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); else tmp = 180.0 * (atan(1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.6e-55], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 5.4e-80], N[Not[LessEqual[A, 8e-43]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.6 \cdot 10^{-55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.4 \cdot 10^{-80} \lor \neg \left(A \leq 8 \cdot 10^{-43}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= B -1.3e-276)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 9e-163)
(* 180.0 (+ (+ -1.0 (/ (atan (* 0.5 (/ B A))) PI)) 1.0))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.3e-276) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 9e-163) {
tmp = 180.0 * ((-1.0 + (atan((0.5 * (B / A))) / ((double) M_PI))) + 1.0);
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.3e-276) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 9e-163) {
tmp = 180.0 * ((-1.0 + (Math.atan((0.5 * (B / A))) / Math.PI)) + 1.0);
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.3e-276: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 9e-163: tmp = 180.0 * ((-1.0 + (math.atan((0.5 * (B / A))) / math.pi)) + 1.0) else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.3e-276) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 9e-163) tmp = Float64(180.0 * Float64(Float64(-1.0 + Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) + 1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.3e-276) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 9e-163) tmp = 180.0 * ((-1.0 + (atan((0.5 * (B / A))) / pi)) + 1.0); else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.3e-276], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-163], N[(180.0 * N[(N[(-1.0 + N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.3 \cdot 10^{-276}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \left(\left(-1 + \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= B -9e-275)
(* 180.0 (+ (+ (/ (atan (/ (- (+ B C) A) B)) PI) -1.0) 1.0))
(if (<= B 9e-163)
(* 180.0 (+ (+ -1.0 (/ (atan (* 0.5 (/ B A))) PI)) 1.0))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9e-275) {
tmp = 180.0 * (((atan((((B + C) - A) / B)) / ((double) M_PI)) + -1.0) + 1.0);
} else if (B <= 9e-163) {
tmp = 180.0 * ((-1.0 + (atan((0.5 * (B / A))) / ((double) M_PI))) + 1.0);
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -9e-275) {
tmp = 180.0 * (((Math.atan((((B + C) - A) / B)) / Math.PI) + -1.0) + 1.0);
} else if (B <= 9e-163) {
tmp = 180.0 * ((-1.0 + (Math.atan((0.5 * (B / A))) / Math.PI)) + 1.0);
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -9e-275: tmp = 180.0 * (((math.atan((((B + C) - A) / B)) / math.pi) + -1.0) + 1.0) elif B <= 9e-163: tmp = 180.0 * ((-1.0 + (math.atan((0.5 * (B / A))) / math.pi)) + 1.0) else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -9e-275) tmp = Float64(180.0 * Float64(Float64(Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi) + -1.0) + 1.0)); elseif (B <= 9e-163) tmp = Float64(180.0 * Float64(Float64(-1.0 + Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) + 1.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -9e-275) tmp = 180.0 * (((atan((((B + C) - A) / B)) / pi) + -1.0) + 1.0); elseif (B <= 9e-163) tmp = 180.0 * ((-1.0 + (atan((0.5 * (B / A))) / pi)) + 1.0); else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -9e-275], N[(180.0 * N[(N[(N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] + -1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-163], N[(180.0 * N[(N[(-1.0 + N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -9 \cdot 10^{-275}:\\
\;\;\;\;180 \cdot \left(\left(\frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi} + -1\right) + 1\right)\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \left(\left(-1 + \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= B -7.6e-274)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 9e-163)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7.6e-274) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 9e-163) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -7.6e-274) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 9e-163) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7.6e-274: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 9e-163: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7.6e-274) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 9e-163) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -7.6e-274) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 9e-163) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7.6e-274], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-163], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -7.6 \cdot 10^{-274}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= B -1.95e+43)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.1e-259)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 1.55e-162)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e+43) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.1e-259) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 1.55e-162) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e+43) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.1e-259) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 1.55e-162) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.95e+43: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.1e-259: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 1.55e-162: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.95e+43) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.1e-259) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 1.55e-162) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.95e+43) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.1e-259) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 1.55e-162) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.95e+43], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.1e-259], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.55e-162], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.95 \cdot 10^{+43}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.1 \cdot 10^{-259}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.55 \cdot 10^{-162}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= B -8.6e-79)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.15e-162)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.6e-79) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.15e-162) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.6e-79) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.15e-162) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.6e-79: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.15e-162: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.6e-79) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.15e-162) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.6e-79) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.15e-162) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.6e-79], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.15e-162], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.6 \cdot 10^{-79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-162}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= B -1.75e-296) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.75e-296) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.75e-296) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.75e-296: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.75e-296) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.75e-296) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.75e-296], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.75 \cdot 10^{-296}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
herbie shell --seed 2023343
(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)))