
(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 17 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 -1.02e+14) (* (atan (* 0.5 (/ (fma C (/ B A) B) A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e+14) {
tmp = atan((0.5 * (fma(C, (B / A), B) / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
function code(A, B, C) tmp = 0.0 if (A <= -1.02e+14) tmp = Float64(atan(Float64(0.5 * Float64(fma(C, Float64(B / A), B) / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
code[A_, B_, C_] := If[LessEqual[A, -1.02e+14], N[(N[ArcTan[N[(0.5 * N[(N[(C * N[(B / A), $MachinePrecision] + B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.02 \cdot 10^{+14}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{\mathsf{fma}\left(C, \frac{B}{A}, B\right)}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.02e14Initial program 19.0%
Taylor expanded in A around -inf 68.2%
mul-1-neg68.2%
distribute-neg-frac268.2%
distribute-lft-out68.2%
associate-/l*72.3%
Simplified72.3%
Taylor expanded in B around 0 68.2%
Simplified73.9%
if -1.02e14 < A Initial program 58.6%
associate-*l/58.6%
*-lft-identity58.6%
+-commutative58.6%
unpow258.6%
unpow258.6%
hypot-define83.4%
Simplified83.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.02e+14)
(* (atan (* 0.5 (/ (fma C (/ B A) B) A))) (/ 180.0 PI))
(if (<= A 1.52e+33)
(* 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 <= -1.02e+14) {
tmp = atan((0.5 * (fma(C, (B / A), B) / A))) * (180.0 / ((double) M_PI));
} else if (A <= 1.52e+33) {
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;
}
function code(A, B, C) tmp = 0.0 if (A <= -1.02e+14) tmp = Float64(atan(Float64(0.5 * Float64(fma(C, Float64(B / A), B) / A))) * Float64(180.0 / pi)); elseif (A <= 1.52e+33) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
code[A_, B_, C_] := If[LessEqual[A, -1.02e+14], N[(N[ArcTan[N[(0.5 * N[(N[(C * N[(B / A), $MachinePrecision] + B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.52e+33], 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 -1.02 \cdot 10^{+14}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{\mathsf{fma}\left(C, \frac{B}{A}, B\right)}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 1.52 \cdot 10^{+33}:\\
\;\;\;\;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{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.02e14Initial program 19.0%
Taylor expanded in A around -inf 68.2%
mul-1-neg68.2%
distribute-neg-frac268.2%
distribute-lft-out68.2%
associate-/l*72.3%
Simplified72.3%
Taylor expanded in B around 0 68.2%
Simplified73.9%
if -1.02e14 < A < 1.5200000000000001e33Initial program 52.8%
Taylor expanded in A around 0 50.9%
unpow250.9%
unpow250.9%
hypot-define78.7%
Simplified78.7%
if 1.5200000000000001e33 < A Initial program 72.3%
Taylor expanded in C around 0 72.3%
mul-1-neg72.3%
distribute-neg-frac272.3%
+-commutative72.3%
unpow272.3%
unpow272.3%
hypot-define83.4%
Simplified83.4%
(FPCore (A B C)
:precision binary64
(if (<= A -86000000000000.0)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= A 7.8e+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 <= -86000000000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (A <= 7.8e+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 <= -86000000000000.0) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (A <= 7.8e+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 <= -86000000000000.0: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif A <= 7.8e+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 <= -86000000000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (A <= 7.8e+31) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -86000000000000.0) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (A <= 7.8e+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, -86000000000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.8e+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 -86000000000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;A \leq 7.8 \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{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.6e13Initial program 19.0%
Taylor expanded in A around -inf 73.3%
associate-*r/73.3%
Simplified73.3%
clear-num73.0%
inv-pow73.0%
associate-/l*73.0%
Applied egg-rr73.0%
unpow-173.0%
associate-*r/73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in B around 0 73.3%
associate-*r/73.2%
*-commutative73.2%
associate-*l/73.2%
associate-*r/73.3%
associate-*l/73.4%
*-commutative73.4%
Simplified73.4%
if -8.6e13 < A < 7.79999999999999999e31Initial program 52.8%
Taylor expanded in A around 0 50.9%
unpow250.9%
unpow250.9%
hypot-define78.7%
Simplified78.7%
if 7.79999999999999999e31 < A Initial program 72.3%
Taylor expanded in C around 0 72.3%
mul-1-neg72.3%
distribute-neg-frac272.3%
+-commutative72.3%
unpow272.3%
unpow272.3%
hypot-define83.4%
Simplified83.4%
Final simplification78.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.15e+14)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= A 1.02e+143)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+14) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (A <= 1.02e+143) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+14) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (A <= 1.02e+143) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e+14: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif A <= 1.02e+143: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e+14) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (A <= 1.02e+143) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e+14) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (A <= 1.02e+143) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e+14], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.02e+143], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+14}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;A \leq 1.02 \cdot 10^{+143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.15e14Initial program 19.0%
Taylor expanded in A around -inf 73.3%
associate-*r/73.3%
Simplified73.3%
clear-num73.0%
inv-pow73.0%
associate-/l*73.0%
Applied egg-rr73.0%
unpow-173.0%
associate-*r/73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in B around 0 73.3%
associate-*r/73.2%
*-commutative73.2%
associate-*l/73.2%
associate-*r/73.3%
associate-*l/73.4%
*-commutative73.4%
Simplified73.4%
if -1.15e14 < A < 1.01999999999999995e143Initial program 55.5%
Taylor expanded in A around 0 51.3%
unpow251.3%
unpow251.3%
hypot-define77.3%
Simplified77.3%
if 1.01999999999999995e143 < A Initial program 71.7%
associate-*r/71.7%
associate-*l/71.7%
*-un-lft-identity71.7%
unpow271.7%
unpow271.7%
hypot-define92.2%
Applied egg-rr92.2%
Taylor expanded in B around inf 78.4%
Taylor expanded in C around 0 78.7%
neg-mul-178.7%
distribute-neg-in78.7%
metadata-eval78.7%
unsub-neg78.7%
Simplified78.7%
Final simplification76.6%
(FPCore (A B C) :precision binary64 (if (<= A -1.16e+14) (* (atan (* 0.5 (/ (fma C (/ B A) B) A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.16e+14) {
tmp = atan((0.5 * (fma(C, (B / A), B) / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
function code(A, B, C) tmp = 0.0 if (A <= -1.16e+14) tmp = Float64(atan(Float64(0.5 * Float64(fma(C, Float64(B / A), B) / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
code[A_, B_, C_] := If[LessEqual[A, -1.16e+14], N[(N[ArcTan[N[(0.5 * N[(N[(C * N[(B / A), $MachinePrecision] + B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $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 -1.16 \cdot 10^{+14}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{\mathsf{fma}\left(C, \frac{B}{A}, B\right)}{A}\right) \cdot \frac{180}{\pi}\\
\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}
if A < -1.16e14Initial program 19.0%
Taylor expanded in A around -inf 68.2%
mul-1-neg68.2%
distribute-neg-frac268.2%
distribute-lft-out68.2%
associate-/l*72.3%
Simplified72.3%
Taylor expanded in B around 0 68.2%
Simplified73.9%
if -1.16e14 < A Initial program 58.6%
Simplified83.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= C -9.5e-100)
t_0
(if (<= C 3.3e-245)
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)
(if (<= C 3.15e+19) t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (C <= -9.5e-100) {
tmp = t_0;
} else if (C <= 3.3e-245) {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
} else if (C <= 3.15e+19) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (C <= -9.5e-100) {
tmp = t_0;
} else if (C <= 3.3e-245) {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
} else if (C <= 3.15e+19) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if C <= -9.5e-100: tmp = t_0 elif C <= 3.3e-245: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi elif C <= 3.15e+19: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (C <= -9.5e-100) tmp = t_0; elseif (C <= 3.3e-245) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); elseif (C <= 3.15e+19) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (C <= -9.5e-100) tmp = t_0; elseif (C <= 3.3e-245) tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; elseif (C <= 3.15e+19) tmp = t_0; else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -9.5e-100], t$95$0, If[LessEqual[C, 3.3e-245], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.15e+19], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -9.5 \cdot 10^{-100}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3.3 \cdot 10^{-245}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.15 \cdot 10^{+19}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -9.4999999999999992e-100 or 3.3000000000000001e-245 < C < 3.15e19Initial program 63.6%
Taylor expanded in B around -inf 67.8%
associate--l+67.8%
div-sub67.8%
Simplified67.8%
if -9.4999999999999992e-100 < C < 3.3000000000000001e-245Initial program 54.4%
associate-*r/54.4%
associate-*l/54.4%
*-un-lft-identity54.4%
unpow254.4%
unpow254.4%
hypot-define81.1%
Applied egg-rr81.1%
Taylor expanded in B around inf 57.0%
Taylor expanded in C around 0 57.0%
neg-mul-157.0%
distribute-neg-in57.0%
metadata-eval57.0%
unsub-neg57.0%
Simplified57.0%
if 3.15e19 < C Initial program 15.8%
Taylor expanded in C around inf 68.8%
clear-num67.1%
inv-pow67.1%
+-commutative67.1%
fma-define67.1%
mul-1-neg67.1%
distribute-rgt1-in67.1%
metadata-eval67.1%
Applied egg-rr67.1%
Simplified67.1%
Taylor expanded in B around 0 68.8%
associate-*r/68.8%
associate-*r/68.8%
*-commutative68.8%
associate-*r/68.9%
associate-*r/68.9%
Simplified68.9%
Final simplification65.6%
(FPCore (A B C)
:precision binary64
(if (<= B -3.6e+30)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.65e-240)
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI))
(if (<= B 16500000.0)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.6e+30) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.65e-240) {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
} else if (B <= 16500000.0) {
tmp = 180.0 * (atan(((C / B) * 2.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 <= -3.6e+30) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.65e-240) {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
} else if (B <= 16500000.0) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.6e+30: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.65e-240: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) elif B <= 16500000.0: tmp = 180.0 * (math.atan(((C / B) * 2.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 <= -3.6e+30) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.65e-240) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); elseif (B <= 16500000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.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 <= -3.6e+30) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.65e-240) tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); elseif (B <= 16500000.0) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.6e+30], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.65e-240], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 16500000.0], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $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 -3.6 \cdot 10^{+30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.65 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 16500000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.6000000000000002e30Initial program 45.9%
Taylor expanded in B around -inf 70.3%
if -3.6000000000000002e30 < B < -1.6500000000000001e-240Initial program 39.8%
Taylor expanded in C around inf 45.0%
Taylor expanded in B around inf 29.4%
distribute-rgt1-in29.4%
metadata-eval29.4%
mul0-lft29.4%
div045.1%
metadata-eval45.1%
neg-sub045.1%
associate-*r/45.1%
metadata-eval45.1%
distribute-neg-frac45.1%
metadata-eval45.1%
Simplified45.1%
if -1.6500000000000001e-240 < B < 1.65e7Initial program 56.9%
Taylor expanded in C around -inf 40.9%
if 1.65e7 < B Initial program 50.5%
Taylor expanded in B around inf 63.9%
Final simplification54.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.12e+30)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.5e-240)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 4800000.0)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.12e+30) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.5e-240) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 4800000.0) {
tmp = 180.0 * (atan(((C / B) * 2.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.12e+30) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.5e-240) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 4800000.0) {
tmp = 180.0 * (Math.atan(((C / B) * 2.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.12e+30: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.5e-240: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 4800000.0: tmp = 180.0 * (math.atan(((C / B) * 2.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.12e+30) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.5e-240) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 4800000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.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.12e+30) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.5e-240) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 4800000.0) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.12e+30], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.5e-240], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4800000.0], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $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.12 \cdot 10^{+30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.5 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4800000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.12e30Initial program 45.9%
Taylor expanded in B around -inf 70.3%
if -1.12e30 < B < -2.5000000000000002e-240Initial program 39.8%
Taylor expanded in C around inf 45.0%
Taylor expanded in A around inf 45.0%
if -2.5000000000000002e-240 < B < 4.8e6Initial program 56.9%
Taylor expanded in C around -inf 40.9%
if 4.8e6 < B Initial program 50.5%
Taylor expanded in B around inf 63.9%
Final simplification54.8%
(FPCore (A B C)
:precision binary64
(if (<= B -3.4e-117)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B -1.05e-241)
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI))
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.4e-117) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= -1.05e-241) {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.4e-117) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= -1.05e-241) {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.4e-117: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= -1.05e-241: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) else: tmp = 180.0 * (math.atan(((1.0 / B) * ((C - A) - B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.4e-117) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= -1.05e-241) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.4e-117) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= -1.05e-241) tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); else tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.4e-117], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.05e-241], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.4 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.05 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - B\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.40000000000000035e-117Initial program 46.2%
Taylor expanded in B around -inf 71.5%
associate--l+71.5%
div-sub71.5%
Simplified71.5%
if -3.40000000000000035e-117 < B < -1.05e-241Initial program 30.4%
Taylor expanded in C around inf 59.6%
Taylor expanded in B around inf 23.4%
distribute-rgt1-in23.4%
metadata-eval23.4%
mul0-lft23.4%
div059.7%
metadata-eval59.7%
neg-sub059.7%
associate-*r/59.7%
metadata-eval59.7%
distribute-neg-frac59.7%
metadata-eval59.7%
Simplified59.7%
if -1.05e-241 < B Initial program 54.0%
Taylor expanded in B around inf 64.1%
(FPCore (A B C)
:precision binary64
(if (<= B -5.8e+28)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -9.5e-241)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 4800000.0)
(/ (* 180.0 (atan (/ C B))) PI)
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.8e+28) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -9.5e-241) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 4800000.0) {
tmp = (180.0 * atan((C / 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 <= -5.8e+28) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -9.5e-241) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 4800000.0) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.8e+28: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -9.5e-241: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 4800000.0: tmp = (180.0 * math.atan((C / 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 <= -5.8e+28) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -9.5e-241) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 4800000.0) tmp = Float64(Float64(180.0 * atan(Float64(C / 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 <= -5.8e+28) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -9.5e-241) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 4800000.0) tmp = (180.0 * atan((C / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.8e+28], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-241], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4800000.0], N[(N[(180.0 * N[ArcTan[N[(C / B), $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 -5.8 \cdot 10^{+28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -9.5 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4800000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.8000000000000002e28Initial program 45.9%
Taylor expanded in B around -inf 70.3%
if -5.8000000000000002e28 < B < -9.49999999999999971e-241Initial program 39.8%
Taylor expanded in C around inf 45.0%
Taylor expanded in A around inf 45.0%
if -9.49999999999999971e-241 < B < 4.8e6Initial program 56.9%
associate-*r/56.9%
associate-*l/56.9%
*-un-lft-identity56.9%
unpow256.9%
unpow256.9%
hypot-define70.7%
Applied egg-rr70.7%
Taylor expanded in B around inf 52.7%
Taylor expanded in C around inf 40.9%
if 4.8e6 < B Initial program 50.5%
Taylor expanded in B around inf 63.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -9.2e-117)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B -2.2e-240)
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI))
(* (/ 180.0 PI) (atan (+ -1.0 t_0)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -9.2e-117) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= -2.2e-240) {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 + t_0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -9.2e-117) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= -2.2e-240) {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 + t_0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -9.2e-117: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= -2.2e-240: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-1.0 + t_0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -9.2e-117) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= -2.2e-240) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 + t_0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -9.2e-117) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= -2.2e-240) tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); else tmp = (180.0 / pi) * atan((-1.0 + t_0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -9.2e-117], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.2e-240], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -9.2 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.2 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 + t\_0\right)\\
\end{array}
\end{array}
if B < -9.19999999999999978e-117Initial program 46.2%
Taylor expanded in B around -inf 71.5%
associate--l+71.5%
div-sub71.5%
Simplified71.5%
if -9.19999999999999978e-117 < B < -2.1999999999999999e-240Initial program 30.4%
Taylor expanded in C around inf 59.6%
Taylor expanded in B around inf 23.4%
distribute-rgt1-in23.4%
metadata-eval23.4%
mul0-lft23.4%
div059.7%
metadata-eval59.7%
neg-sub059.7%
associate-*r/59.7%
metadata-eval59.7%
distribute-neg-frac59.7%
metadata-eval59.7%
Simplified59.7%
if -2.1999999999999999e-240 < B Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
*-un-lft-identity54.0%
unpow254.0%
unpow254.0%
hypot-define75.1%
Applied egg-rr75.1%
Taylor expanded in B around inf 64.1%
Taylor expanded in C around 0 64.1%
associate-*r/64.1%
associate--r+64.1%
*-commutative64.1%
associate--r+64.1%
+-commutative64.1%
associate--r+64.1%
sub-neg64.1%
mul-1-neg64.1%
+-commutative64.1%
associate-/l*64.1%
Simplified64.1%
Final simplification66.4%
(FPCore (A B C)
:precision binary64
(if (<= A -7.2e-41)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= A 21000000000000.0)
(/ (* 180.0 (atan (+ -1.0 (/ C B)))) PI)
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.2e-41) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (A <= 21000000000000.0) {
tmp = (180.0 * atan((-1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.2e-41) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (A <= 21000000000000.0) {
tmp = (180.0 * Math.atan((-1.0 + (C / B)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.2e-41: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif A <= 21000000000000.0: tmp = (180.0 * math.atan((-1.0 + (C / B)))) / math.pi else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.2e-41) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (A <= 21000000000000.0) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(C / B)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.2e-41) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (A <= 21000000000000.0) tmp = (180.0 * atan((-1.0 + (C / B)))) / pi; else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.2e-41], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 21000000000000.0], N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.2 \cdot 10^{-41}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;A \leq 21000000000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.2e-41Initial program 23.8%
Taylor expanded in A around -inf 66.5%
associate-*r/66.5%
Simplified66.5%
clear-num66.2%
inv-pow66.2%
associate-/l*66.2%
Applied egg-rr66.2%
unpow-166.2%
associate-*r/66.2%
*-commutative66.2%
Simplified66.2%
Taylor expanded in B around 0 66.5%
associate-*r/66.4%
*-commutative66.4%
associate-*l/66.4%
associate-*r/66.4%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
if -7.2e-41 < A < 2.1e13Initial program 53.2%
associate-*r/53.2%
associate-*l/53.2%
*-un-lft-identity53.2%
unpow253.2%
unpow253.2%
hypot-define82.2%
Applied egg-rr82.2%
Taylor expanded in B around inf 49.2%
Taylor expanded in A around 0 47.3%
if 2.1e13 < A Initial program 71.0%
associate-*r/71.0%
associate-*l/71.0%
*-un-lft-identity71.0%
unpow271.0%
unpow271.0%
hypot-define88.6%
Applied egg-rr88.6%
Taylor expanded in B around inf 72.6%
Taylor expanded in C around 0 73.0%
neg-mul-173.0%
distribute-neg-in73.0%
metadata-eval73.0%
unsub-neg73.0%
Simplified73.0%
Final simplification59.0%
(FPCore (A B C)
:precision binary64
(if (<= B -3.8e+31)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -8.8e-243)
(* 180.0 (/ (atan (* B (/ -0.5 C))) PI))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e+31) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -8.8e-243) {
tmp = 180.0 * (atan((B * (-0.5 / C))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e+31) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -8.8e-243) {
tmp = 180.0 * (Math.atan((B * (-0.5 / C))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.8e+31: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -8.8e-243: tmp = 180.0 * (math.atan((B * (-0.5 / C))) / math.pi) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.8e+31) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -8.8e-243) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.8e+31) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -8.8e-243) tmp = 180.0 * (atan((B * (-0.5 / C))) / pi); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.8e+31], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.8e-243], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.8 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -8.8 \cdot 10^{-243}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.8000000000000001e31Initial program 45.9%
Taylor expanded in B around -inf 70.3%
if -3.8000000000000001e31 < B < -8.7999999999999996e-243Initial program 39.8%
Taylor expanded in C around inf 45.0%
Taylor expanded in B around inf 29.4%
distribute-rgt1-in29.4%
metadata-eval29.4%
mul0-lft29.4%
div045.1%
metadata-eval45.1%
neg-sub045.1%
associate-*r/45.1%
metadata-eval45.1%
distribute-neg-frac45.1%
metadata-eval45.1%
Simplified45.1%
if -8.7999999999999996e-243 < B Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
*-un-lft-identity54.0%
unpow254.0%
unpow254.0%
hypot-define75.1%
Applied egg-rr75.1%
Taylor expanded in B around inf 64.1%
Taylor expanded in C around 0 55.1%
neg-mul-155.1%
distribute-neg-in55.1%
metadata-eval55.1%
unsub-neg55.1%
Simplified55.1%
(FPCore (A B C)
:precision binary64
(if (<= B -3400000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 60000000.0)
(/ (* 180.0 (atan (/ C B))) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3400000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 60000000.0) {
tmp = (180.0 * atan((C / 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 <= -3400000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 60000000.0) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3400000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 60000000.0: tmp = (180.0 * math.atan((C / 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 <= -3400000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 60000000.0) tmp = Float64(Float64(180.0 * atan(Float64(C / 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 <= -3400000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 60000000.0) tmp = (180.0 * atan((C / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3400000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 60000000.0], N[(N[(180.0 * N[ArcTan[N[(C / B), $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 -3400000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 60000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.4e6Initial program 43.5%
Taylor expanded in B around -inf 66.5%
if -3.4e6 < B < 6e7Initial program 51.6%
associate-*r/51.6%
associate-*l/51.6%
*-un-lft-identity51.6%
unpow251.6%
unpow251.6%
hypot-define67.9%
Applied egg-rr67.9%
Taylor expanded in B around inf 45.4%
Taylor expanded in C around inf 34.0%
if 6e7 < B Initial program 50.5%
Taylor expanded in B around inf 63.9%
(FPCore (A B C)
:precision binary64
(if (<= B -6.5e-117)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.18e-64)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.5e-117) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.18e-64) {
tmp = (180.0 * atan(0.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 <= -6.5e-117) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.18e-64) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.5e-117: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.18e-64: tmp = (180.0 * math.atan(0.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 <= -6.5e-117) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.18e-64) tmp = Float64(Float64(180.0 * atan(0.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 <= -6.5e-117) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.18e-64) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.5e-117], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.18e-64], N[(N[(180.0 * N[ArcTan[0.0], $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 -6.5 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.18 \cdot 10^{-64}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.5000000000000001e-117Initial program 46.2%
Taylor expanded in B around -inf 54.4%
if -6.5000000000000001e-117 < B < 1.17999999999999996e-64Initial program 48.6%
associate-*r/48.6%
associate-*l/48.6%
*-un-lft-identity48.6%
unpow248.6%
unpow248.6%
hypot-define70.2%
Applied egg-rr70.2%
Taylor expanded in C around inf 27.9%
distribute-rgt1-in27.9%
metadata-eval27.9%
mul0-lft27.9%
metadata-eval27.9%
Simplified27.9%
Taylor expanded in B around 0 27.9%
*-commutative27.9%
Simplified27.9%
if 1.17999999999999996e-64 < B Initial program 53.2%
Taylor expanded in B around inf 56.0%
Final simplification46.1%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
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 <= -5e-310) {
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 <= -5e-310: 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 <= -5e-310) 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 <= -5e-310) 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, -5e-310], 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 -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 45.0%
Taylor expanded in B around -inf 43.8%
if -4.999999999999985e-310 < B Initial program 53.0%
Taylor expanded in B around inf 37.5%
(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}
Initial program 49.1%
Taylor expanded in B around inf 20.2%
herbie shell --seed 2024114
(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)))