
(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 22 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 (<= C 1.9e+71) (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI) (/ (* 180.0 (atan (* -0.5 (+ (/ B C) (* A (/ B (pow C 2.0))))))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.9e+71) {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((-0.5 * ((B / C) + (A * (B / pow(C, 2.0))))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.9e+71) {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((-0.5 * ((B / C) + (A * (B / Math.pow(C, 2.0))))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.9e+71: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi else: tmp = (180.0 * math.atan((-0.5 * ((B / C) + (A * (B / math.pow(C, 2.0))))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.9e+71) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(Float64(B / C) + Float64(A * Float64(B / (C ^ 2.0))))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.9e+71) tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; else tmp = (180.0 * atan((-0.5 * ((B / C) + (A * (B / (C ^ 2.0))))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.9e+71], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(N[(B / C), $MachinePrecision] + N[(A * N[(B / N[Power[C, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.9 \cdot 10^{+71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \left(\frac{B}{C} + A \cdot \frac{B}{{C}^{2}}\right)\right)}{\pi}\\
\end{array}
\end{array}
if C < 1.9e71Initial program 62.6%
associate-*r/62.6%
associate-*l/62.6%
*-un-lft-identity62.6%
unpow262.6%
unpow262.6%
hypot-define83.4%
Applied egg-rr83.4%
if 1.9e71 < C Initial program 19.0%
associate-*r/19.0%
associate-*l/19.0%
*-un-lft-identity19.0%
unpow219.0%
unpow219.0%
hypot-define47.1%
Applied egg-rr47.1%
Taylor expanded in C around inf 74.4%
associate-+r+74.4%
associate-*r/74.4%
distribute-rgt1-in74.4%
metadata-eval74.4%
mul0-lft74.4%
metadata-eval74.4%
div074.4%
metadata-eval74.4%
cancel-sign-sub-inv74.4%
neg-sub074.4%
distribute-lft-neg-in74.4%
metadata-eval74.4%
distribute-lft-out74.4%
associate-/l*78.6%
Simplified78.6%
(FPCore (A B C)
:precision binary64
(if (<= C -9.2e-90)
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))
(if (<= C 5e+71)
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI))
(/ (* 180.0 (atan (* B (/ -0.5 C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -9.2e-90) {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
} else if (C <= 5e+71) {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -9.2e-90) {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
} else if (C <= 5e+71) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -9.2e-90: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) elif C <= 5e+71: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -9.2e-90) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); elseif (C <= 5e+71) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -9.2e-90) tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); elseif (C <= 5e+71) tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -9.2e-90], 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], If[LessEqual[C, 5e+71], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -9.2 \cdot 10^{-90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -9.1999999999999992e-90Initial program 82.0%
Simplified93.2%
if -9.1999999999999992e-90 < C < 4.99999999999999972e71Initial program 51.0%
Taylor expanded in C around 0 50.3%
mul-1-neg50.3%
distribute-neg-frac250.3%
+-commutative50.3%
unpow250.3%
unpow250.3%
hypot-define76.2%
Simplified76.2%
if 4.99999999999999972e71 < C Initial program 19.0%
associate-*r/19.0%
associate-*l/19.0%
*-un-lft-identity19.0%
unpow219.0%
unpow219.0%
hypot-define47.1%
Applied egg-rr47.1%
Taylor expanded in C around inf 77.6%
associate-*r/77.6%
distribute-rgt1-in77.6%
metadata-eval77.6%
mul0-lft77.6%
metadata-eval77.6%
div077.6%
+-lft-identity77.6%
associate-*r/77.6%
*-commutative77.6%
associate-*r/77.7%
Simplified77.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (+ A (hypot B A))))
(if (<= C -5.2e-89)
(* 180.0 (/ (atan (/ (- C t_0) B)) PI))
(if (<= C 1e+72)
(* 180.0 (/ (atan (/ t_0 (- B))) PI))
(/ (* 180.0 (atan (* B (/ -0.5 C)))) PI)))))
double code(double A, double B, double C) {
double t_0 = A + hypot(B, A);
double tmp;
if (C <= -5.2e-89) {
tmp = 180.0 * (atan(((C - t_0) / B)) / ((double) M_PI));
} else if (C <= 1e+72) {
tmp = 180.0 * (atan((t_0 / -B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = A + Math.hypot(B, A);
double tmp;
if (C <= -5.2e-89) {
tmp = 180.0 * (Math.atan(((C - t_0) / B)) / Math.PI);
} else if (C <= 1e+72) {
tmp = 180.0 * (Math.atan((t_0 / -B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = A + math.hypot(B, A) tmp = 0 if C <= -5.2e-89: tmp = 180.0 * (math.atan(((C - t_0) / B)) / math.pi) elif C <= 1e+72: tmp = 180.0 * (math.atan((t_0 / -B)) / math.pi) else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(A + hypot(B, A)) tmp = 0.0 if (C <= -5.2e-89) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - t_0) / B)) / pi)); elseif (C <= 1e+72) tmp = Float64(180.0 * Float64(atan(Float64(t_0 / Float64(-B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = A + hypot(B, A); tmp = 0.0; if (C <= -5.2e-89) tmp = 180.0 * (atan(((C - t_0) / B)) / pi); elseif (C <= 1e+72) tmp = 180.0 * (atan((t_0 / -B)) / pi); else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5.2e-89], N[(180.0 * N[(N[ArcTan[N[(N[(C - t$95$0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1e+72], N[(180.0 * N[(N[ArcTan[N[(t$95$0 / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := A + \mathsf{hypot}\left(B, A\right)\\
\mathbf{if}\;C \leq -5.2 \cdot 10^{-89}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - t\_0}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_0}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.1999999999999997e-89Initial program 82.0%
Simplified93.2%
Taylor expanded in C around 0 80.1%
+-commutative80.1%
unpow280.1%
unpow280.1%
hypot-define91.0%
Simplified91.0%
if -5.1999999999999997e-89 < C < 9.99999999999999944e71Initial program 51.0%
Taylor expanded in C around 0 50.3%
mul-1-neg50.3%
distribute-neg-frac250.3%
+-commutative50.3%
unpow250.3%
unpow250.3%
hypot-define76.2%
Simplified76.2%
if 9.99999999999999944e71 < C Initial program 19.0%
associate-*r/19.0%
associate-*l/19.0%
*-un-lft-identity19.0%
unpow219.0%
unpow219.0%
hypot-define47.1%
Applied egg-rr47.1%
Taylor expanded in C around inf 77.6%
associate-*r/77.6%
distribute-rgt1-in77.6%
metadata-eval77.6%
mul0-lft77.6%
metadata-eval77.6%
div077.6%
+-lft-identity77.6%
associate-*r/77.6%
*-commutative77.6%
associate-*r/77.7%
Simplified77.7%
(FPCore (A B C)
:precision binary64
(if (<= C -1e-58)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 2.9e+72)
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI))
(/ (* 180.0 (atan (* B (/ -0.5 C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1e-58) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 2.9e+72) {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1e-58) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 2.9e+72) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1e-58: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 2.9e+72: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1e-58) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 2.9e+72) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1e-58) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 2.9e+72) tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1e-58], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.9e+72], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1 \cdot 10^{-58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.9 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1e-58Initial program 83.3%
Taylor expanded in A around 0 82.3%
unpow282.3%
unpow282.3%
hypot-define91.8%
Simplified91.8%
if -1e-58 < C < 2.90000000000000017e72Initial program 51.8%
Taylor expanded in C around 0 50.4%
mul-1-neg50.4%
distribute-neg-frac250.4%
+-commutative50.4%
unpow250.4%
unpow250.4%
hypot-define76.4%
Simplified76.4%
if 2.90000000000000017e72 < C Initial program 19.0%
associate-*r/19.0%
associate-*l/19.0%
*-un-lft-identity19.0%
unpow219.0%
unpow219.0%
hypot-define47.1%
Applied egg-rr47.1%
Taylor expanded in C around inf 77.6%
associate-*r/77.6%
distribute-rgt1-in77.6%
metadata-eval77.6%
mul0-lft77.6%
metadata-eval77.6%
div077.6%
+-lft-identity77.6%
associate-*r/77.6%
*-commutative77.6%
associate-*r/77.7%
Simplified77.7%
(FPCore (A B C)
:precision binary64
(if (<= A -3.1e+101)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI))
(if (<= A 2.8e+78)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e+101) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
} else if (A <= 2.8e+78) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e+101) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
} else if (A <= 2.8e+78) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.1e+101: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi) elif A <= 2.8e+78: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.1e+101) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi)); elseif (A <= 2.8e+78) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.1e+101) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi); elseif (A <= 2.8e+78) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.1e+101], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e+78], 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[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.1 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{+78}:\\
\;\;\;\;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(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.09999999999999999e101Initial program 20.4%
Taylor expanded in A around -inf 74.9%
mul-1-neg74.9%
distribute-neg-frac274.9%
distribute-lft-out74.9%
associate-/l*75.3%
Simplified75.3%
if -3.09999999999999999e101 < A < 2.8000000000000001e78Initial program 53.5%
Taylor expanded in A around 0 51.5%
unpow251.5%
unpow251.5%
hypot-define72.7%
Simplified72.7%
if 2.8000000000000001e78 < A Initial program 80.2%
associate-*r/80.2%
associate-*l/80.2%
*-un-lft-identity80.2%
unpow280.2%
unpow280.2%
hypot-define100.0%
Applied egg-rr100.0%
Taylor expanded in B around inf 84.9%
+-commutative84.9%
associate--r+84.9%
div-sub89.3%
Simplified89.3%
Final simplification76.1%
(FPCore (A B C) :precision binary64 (if (<= C 3.1e+144) (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI) (/ (* 180.0 (atan (* B (/ -0.5 C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 3.1e+144) {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 3.1e+144) {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 3.1e+144: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 3.1e+144) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 3.1e+144) tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 3.1e+144], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.1 \cdot 10^{+144}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 3.1000000000000002e144Initial program 61.5%
associate-*r/61.6%
associate-*l/61.6%
*-un-lft-identity61.6%
unpow261.6%
unpow261.6%
hypot-define82.1%
Applied egg-rr82.1%
if 3.1000000000000002e144 < C Initial program 8.9%
associate-*r/8.9%
associate-*l/8.9%
*-un-lft-identity8.9%
unpow28.9%
unpow28.9%
hypot-define40.9%
Applied egg-rr40.9%
Taylor expanded in C around inf 83.0%
associate-*r/83.0%
distribute-rgt1-in83.0%
metadata-eval83.0%
mul0-lft83.0%
metadata-eval83.0%
div083.0%
+-lft-identity83.0%
associate-*r/83.0%
*-commutative83.0%
associate-*r/83.2%
Simplified83.2%
(FPCore (A B C) :precision binary64 (if (<= C 4.8e+144) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (/ (* 180.0 (atan (* B (/ -0.5 C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 4.8e+144) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 4.8e+144) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 4.8e+144: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 4.8e+144) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 4.8e+144) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 4.8e+144], 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], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 4.8 \cdot 10^{+144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 4.8000000000000001e144Initial program 61.5%
associate-*l/61.6%
*-lft-identity61.6%
+-commutative61.6%
unpow261.6%
unpow261.6%
hypot-define82.1%
Simplified82.1%
if 4.8000000000000001e144 < C Initial program 8.9%
associate-*r/8.9%
associate-*l/8.9%
*-un-lft-identity8.9%
unpow28.9%
unpow28.9%
hypot-define40.9%
Applied egg-rr40.9%
Taylor expanded in C around inf 83.0%
associate-*r/83.0%
distribute-rgt1-in83.0%
metadata-eval83.0%
mul0-lft83.0%
metadata-eval83.0%
div083.0%
+-lft-identity83.0%
associate-*r/83.0%
*-commutative83.0%
associate-*r/83.2%
Simplified83.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))
(t_1 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -2.6e+117)
t_1
(if (<= B -1.35e+99)
t_0
(if (<= B -6.5e+29)
t_1
(if (<= B -1.7e-190)
t_0
(if (<= B -1.1e-255)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.4e-229)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 1.05e-183) 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 / C))) / ((double) M_PI));
double t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -2.6e+117) {
tmp = t_1;
} else if (B <= -1.35e+99) {
tmp = t_0;
} else if (B <= -6.5e+29) {
tmp = t_1;
} else if (B <= -1.7e-190) {
tmp = t_0;
} else if (B <= -1.1e-255) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.4e-229) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 1.05e-183) {
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 / C))) / Math.PI);
double t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -2.6e+117) {
tmp = t_1;
} else if (B <= -1.35e+99) {
tmp = t_0;
} else if (B <= -6.5e+29) {
tmp = t_1;
} else if (B <= -1.7e-190) {
tmp = t_0;
} else if (B <= -1.1e-255) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.4e-229) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 1.05e-183) {
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 / C))) / math.pi) t_1 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -2.6e+117: tmp = t_1 elif B <= -1.35e+99: tmp = t_0 elif B <= -6.5e+29: tmp = t_1 elif B <= -1.7e-190: tmp = t_0 elif B <= -1.1e-255: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.4e-229: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 1.05e-183: 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(-0.5 * Float64(B / C))) / pi)) t_1 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -2.6e+117) tmp = t_1; elseif (B <= -1.35e+99) tmp = t_0; elseif (B <= -6.5e+29) tmp = t_1; elseif (B <= -1.7e-190) tmp = t_0; elseif (B <= -1.1e-255) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.4e-229) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 1.05e-183) 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 / C))) / pi); t_1 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -2.6e+117) tmp = t_1; elseif (B <= -1.35e+99) tmp = t_0; elseif (B <= -6.5e+29) tmp = t_1; elseif (B <= -1.7e-190) tmp = t_0; elseif (B <= -1.1e-255) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.4e-229) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 1.05e-183) 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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.6e+117], t$95$1, If[LessEqual[B, -1.35e+99], t$95$0, If[LessEqual[B, -6.5e+29], t$95$1, If[LessEqual[B, -1.7e-190], t$95$0, If[LessEqual[B, -1.1e-255], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-229], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.05e-183], 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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -2.6 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -1.35 \cdot 10^{+99}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -6.5 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -1.7 \cdot 10^{-190}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -1.1 \cdot 10^{-255}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-229}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-183}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.5999999999999999e117 or -1.34999999999999994e99 < B < -6.49999999999999971e29Initial program 50.3%
Taylor expanded in B around -inf 64.4%
if -2.5999999999999999e117 < B < -1.34999999999999994e99 or -6.49999999999999971e29 < B < -1.69999999999999991e-190 or 2.4e-229 < B < 1.0500000000000001e-183Initial program 47.0%
Taylor expanded in A around 0 39.5%
unpow239.5%
unpow239.5%
hypot-define47.3%
Simplified47.3%
Taylor expanded in C around inf 45.8%
if -1.69999999999999991e-190 < B < -1.1e-255Initial program 65.4%
Taylor expanded in C around inf 60.3%
associate-*r/60.3%
distribute-rgt1-in60.3%
metadata-eval60.3%
mul0-lft60.3%
metadata-eval60.3%
Simplified60.3%
if -1.1e-255 < B < 2.4e-229Initial program 74.4%
Taylor expanded in A around inf 69.1%
if 1.0500000000000001e-183 < B Initial program 52.2%
Taylor expanded in B around inf 47.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))
(t_1 (atan (/ (* B 0.5) A))))
(if (<= C -1.46e-20)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C -1.4e-103)
t_0
(if (<= C -5e-188)
(* 180.0 (/ t_1 PI))
(if (<= C 7.5e-219)
t_0
(if (<= C 3e-106)
(/ (* 180.0 t_1) PI)
(if (<= C 1.08e+70)
t_0
(/ (* 180.0 (atan (* B (/ -0.5 C)))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double t_1 = atan(((B * 0.5) / A));
double tmp;
if (C <= -1.46e-20) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= -1.4e-103) {
tmp = t_0;
} else if (C <= -5e-188) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (C <= 7.5e-219) {
tmp = t_0;
} else if (C <= 3e-106) {
tmp = (180.0 * t_1) / ((double) M_PI);
} else if (C <= 1.08e+70) {
tmp = t_0;
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double t_1 = Math.atan(((B * 0.5) / A));
double tmp;
if (C <= -1.46e-20) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= -1.4e-103) {
tmp = t_0;
} else if (C <= -5e-188) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (C <= 7.5e-219) {
tmp = t_0;
} else if (C <= 3e-106) {
tmp = (180.0 * t_1) / Math.PI;
} else if (C <= 1.08e+70) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) t_1 = math.atan(((B * 0.5) / A)) tmp = 0 if C <= -1.46e-20: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= -1.4e-103: tmp = t_0 elif C <= -5e-188: tmp = 180.0 * (t_1 / math.pi) elif C <= 7.5e-219: tmp = t_0 elif C <= 3e-106: tmp = (180.0 * t_1) / math.pi elif C <= 1.08e+70: tmp = t_0 else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) t_1 = atan(Float64(Float64(B * 0.5) / A)) tmp = 0.0 if (C <= -1.46e-20) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= -1.4e-103) tmp = t_0; elseif (C <= -5e-188) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (C <= 7.5e-219) tmp = t_0; elseif (C <= 3e-106) tmp = Float64(Float64(180.0 * t_1) / pi); elseif (C <= 1.08e+70) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); t_1 = atan(((B * 0.5) / A)); tmp = 0.0; if (C <= -1.46e-20) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= -1.4e-103) tmp = t_0; elseif (C <= -5e-188) tmp = 180.0 * (t_1 / pi); elseif (C <= 7.5e-219) tmp = t_0; elseif (C <= 3e-106) tmp = (180.0 * t_1) / pi; elseif (C <= 1.08e+70) tmp = t_0; else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[C, -1.46e-20], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.4e-103], t$95$0, If[LessEqual[C, -5e-188], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.5e-219], t$95$0, If[LessEqual[C, 3e-106], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.08e+70], t$95$0, N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
t_1 := \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{if}\;C \leq -1.46 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.4 \cdot 10^{-103}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -5 \cdot 10^{-188}:\\
\;\;\;\;180 \cdot \frac{t\_1}{\pi}\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{-219}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3 \cdot 10^{-106}:\\
\;\;\;\;\frac{180 \cdot t\_1}{\pi}\\
\mathbf{elif}\;C \leq 1.08 \cdot 10^{+70}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.46000000000000002e-20Initial program 81.7%
Taylor expanded in A around 0 80.6%
unpow280.6%
unpow280.6%
hypot-define91.0%
Simplified91.0%
Taylor expanded in C around 0 84.5%
if -1.46000000000000002e-20 < C < -1.40000000000000011e-103 or -5.0000000000000001e-188 < C < 7.4999999999999996e-219 or 3.00000000000000019e-106 < C < 1.0799999999999999e70Initial program 57.9%
Taylor expanded in B around -inf 53.5%
associate--l+53.5%
div-sub54.5%
Simplified54.5%
Taylor expanded in C around 0 53.4%
associate-*r/53.4%
mul-1-neg53.4%
Simplified53.4%
if -1.40000000000000011e-103 < C < -5.0000000000000001e-188Initial program 41.8%
Taylor expanded in A around -inf 58.4%
associate-*r/58.4%
Simplified58.4%
if 7.4999999999999996e-219 < C < 3.00000000000000019e-106Initial program 43.4%
associate-*r/43.4%
associate-*l/43.4%
*-un-lft-identity43.4%
unpow243.4%
unpow243.4%
hypot-define64.3%
Applied egg-rr64.3%
Taylor expanded in A around -inf 53.0%
associate-*r/53.0%
Simplified53.0%
if 1.0799999999999999e70 < C Initial program 18.7%
associate-*r/18.7%
associate-*l/18.7%
*-un-lft-identity18.7%
unpow218.7%
unpow218.7%
hypot-define48.0%
Applied egg-rr48.0%
Taylor expanded in C around inf 76.3%
associate-*r/76.3%
distribute-rgt1-in76.3%
metadata-eval76.3%
mul0-lft76.3%
metadata-eval76.3%
div076.3%
+-lft-identity76.3%
associate-*r/76.4%
*-commutative76.4%
associate-*r/76.5%
Simplified76.5%
Final simplification66.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)) (t_1 (* 180.0 (/ (atan (+ t_0 1.0)) PI))))
(if (<= B -8000000.0)
t_1
(if (<= B -5.2e-65)
(/ (* 180.0 (atan (/ (* (+ B (* B (/ C A))) 0.5) A))) PI)
(if (<= B -1e-223)
t_1
(if (<= B -1.02e-254)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ (* 180.0 (atan (+ t_0 -1.0))) PI)))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = 180.0 * (atan((t_0 + 1.0)) / ((double) M_PI));
double tmp;
if (B <= -8000000.0) {
tmp = t_1;
} else if (B <= -5.2e-65) {
tmp = (180.0 * atan((((B + (B * (C / A))) * 0.5) / A))) / ((double) M_PI);
} else if (B <= -1e-223) {
tmp = t_1;
} else if (B <= -1.02e-254) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = 180.0 * (Math.atan((t_0 + 1.0)) / Math.PI);
double tmp;
if (B <= -8000000.0) {
tmp = t_1;
} else if (B <= -5.2e-65) {
tmp = (180.0 * Math.atan((((B + (B * (C / A))) * 0.5) / A))) / Math.PI;
} else if (B <= -1e-223) {
tmp = t_1;
} else if (B <= -1.02e-254) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B t_1 = 180.0 * (math.atan((t_0 + 1.0)) / math.pi) tmp = 0 if B <= -8000000.0: tmp = t_1 elif B <= -5.2e-65: tmp = (180.0 * math.atan((((B + (B * (C / A))) * 0.5) / A))) / math.pi elif B <= -1e-223: tmp = t_1 elif B <= -1.02e-254: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) t_1 = Float64(180.0 * Float64(atan(Float64(t_0 + 1.0)) / pi)) tmp = 0.0 if (B <= -8000000.0) tmp = t_1; elseif (B <= -5.2e-65) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(B + Float64(B * Float64(C / A))) * 0.5) / A))) / pi); elseif (B <= -1e-223) tmp = t_1; elseif (B <= -1.02e-254) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; t_1 = 180.0 * (atan((t_0 + 1.0)) / pi); tmp = 0.0; if (B <= -8000000.0) tmp = t_1; elseif (B <= -5.2e-65) tmp = (180.0 * atan((((B + (B * (C / A))) * 0.5) / A))) / pi; elseif (B <= -1e-223) tmp = t_1; elseif (B <= -1.02e-254) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8000000.0], t$95$1, If[LessEqual[B, -5.2e-65], N[(N[(180.0 * N[ArcTan[N[(N[(N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -1e-223], t$95$1, If[LessEqual[B, -1.02e-254], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{if}\;B \leq -8000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -5.2 \cdot 10^{-65}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(B + B \cdot \frac{C}{A}\right) \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1 \cdot 10^{-223}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -1.02 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -8e6 or -5.20000000000000019e-65 < B < -9.9999999999999997e-224Initial program 53.7%
Taylor expanded in B around -inf 69.2%
associate--l+69.2%
div-sub69.2%
Simplified69.2%
if -8e6 < B < -5.20000000000000019e-65Initial program 27.8%
associate-*r/27.8%
associate-*l/27.8%
*-un-lft-identity27.8%
unpow227.8%
unpow227.8%
hypot-define40.3%
Applied egg-rr40.3%
Taylor expanded in A around -inf 53.0%
associate-*r/53.0%
distribute-lft-out53.0%
associate-*r*53.0%
metadata-eval53.0%
associate-/l*53.0%
Simplified53.0%
if -9.9999999999999997e-224 < B < -1.0200000000000001e-254Initial program 64.2%
Taylor expanded in C around inf 71.6%
associate-*r/71.6%
distribute-rgt1-in71.6%
metadata-eval71.6%
mul0-lft71.6%
metadata-eval71.6%
Simplified71.6%
if -1.0200000000000001e-254 < B Initial program 53.9%
associate-*r/53.9%
associate-*l/53.9%
*-un-lft-identity53.9%
unpow253.9%
unpow253.9%
hypot-define75.6%
Applied egg-rr75.6%
Taylor expanded in B around inf 64.3%
+-commutative64.3%
associate--r+64.3%
div-sub65.9%
Simplified65.9%
Final simplification66.7%
(FPCore (A B C)
:precision binary64
(if (<= C -2.6e-19)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C -2.8e-103)
(* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI))
(if (<= C -1.02e-186)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 9.6e+69)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(/ (* 180.0 (atan (* B (/ -0.5 C)))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.6e-19) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= -2.8e-103) {
tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
} else if (C <= -1.02e-186) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 9.6e+69) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.6e-19) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= -2.8e-103) {
tmp = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
} else if (C <= -1.02e-186) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 9.6e+69) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.6e-19: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= -2.8e-103: tmp = 180.0 * (math.atan((((C - A) / B) + 1.0)) / math.pi) elif C <= -1.02e-186: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 9.6e+69: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.6e-19) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= -2.8e-103) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + 1.0)) / pi)); elseif (C <= -1.02e-186) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 9.6e+69) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.6e-19) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= -2.8e-103) tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / pi); elseif (C <= -1.02e-186) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 9.6e+69) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.6e-19], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.8e-103], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.02e-186], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.6e+69], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.6 \cdot 10^{-19}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.8 \cdot 10^{-103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.02 \cdot 10^{-186}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 9.6 \cdot 10^{+69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.60000000000000013e-19Initial program 81.7%
Taylor expanded in A around 0 80.6%
unpow280.6%
unpow280.6%
hypot-define91.0%
Simplified91.0%
Taylor expanded in C around 0 84.5%
if -2.60000000000000013e-19 < C < -2.80000000000000023e-103Initial program 81.8%
Taylor expanded in B around -inf 73.5%
associate--l+73.5%
div-sub73.5%
Simplified73.5%
if -2.80000000000000023e-103 < C < -1.01999999999999994e-186Initial program 41.8%
Taylor expanded in A around -inf 58.4%
associate-*r/58.4%
Simplified58.4%
if -1.01999999999999994e-186 < C < 9.6000000000000007e69Initial program 51.4%
Taylor expanded in B around -inf 46.4%
associate--l+46.4%
div-sub47.4%
Simplified47.4%
Taylor expanded in C around 0 47.6%
associate-*r/47.6%
mul-1-neg47.6%
Simplified47.6%
if 9.6000000000000007e69 < C Initial program 18.7%
associate-*r/18.7%
associate-*l/18.7%
*-un-lft-identity18.7%
unpow218.7%
unpow218.7%
hypot-define48.0%
Applied egg-rr48.0%
Taylor expanded in C around inf 76.3%
associate-*r/76.3%
distribute-rgt1-in76.3%
metadata-eval76.3%
mul0-lft76.3%
metadata-eval76.3%
div076.3%
+-lft-identity76.3%
associate-*r/76.4%
*-commutative76.4%
associate-*r/76.5%
Simplified76.5%
Final simplification65.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (* B 0.5) A))))
(if (<= C -7.4e-60)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 2.6e-262)
(* 180.0 (/ t_0 PI))
(if (<= C 8.5e-211)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 1e-85)
(/ (* 180.0 t_0) PI)
(/ (* 180.0 (atan (* B (/ -0.5 C)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = atan(((B * 0.5) / A));
double tmp;
if (C <= -7.4e-60) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 2.6e-262) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (C <= 8.5e-211) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 1e-85) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((B * 0.5) / A));
double tmp;
if (C <= -7.4e-60) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 2.6e-262) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (C <= 8.5e-211) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 1e-85) {
tmp = (180.0 * t_0) / Math.PI;
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((B * 0.5) / A)) tmp = 0 if C <= -7.4e-60: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 2.6e-262: tmp = 180.0 * (t_0 / math.pi) elif C <= 8.5e-211: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 1e-85: tmp = (180.0 * t_0) / math.pi else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(B * 0.5) / A)) tmp = 0.0 if (C <= -7.4e-60) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 2.6e-262) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (C <= 8.5e-211) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 1e-85) tmp = Float64(Float64(180.0 * t_0) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((B * 0.5) / A)); tmp = 0.0; if (C <= -7.4e-60) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 2.6e-262) tmp = 180.0 * (t_0 / pi); elseif (C <= 8.5e-211) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 1e-85) tmp = (180.0 * t_0) / pi; else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[C, -7.4e-60], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.6e-262], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.5e-211], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1e-85], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{if}\;C \leq -7.4 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.6 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;C \leq 8.5 \cdot 10^{-211}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 10^{-85}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.4000000000000005e-60Initial program 83.3%
Taylor expanded in A around 0 82.3%
unpow282.3%
unpow282.3%
hypot-define91.8%
Simplified91.8%
Taylor expanded in C around 0 82.1%
if -7.4000000000000005e-60 < C < 2.5999999999999999e-262Initial program 54.9%
Taylor expanded in A around -inf 35.5%
associate-*r/35.5%
Simplified35.5%
if 2.5999999999999999e-262 < C < 8.49999999999999936e-211Initial program 69.0%
Taylor expanded in B around inf 58.5%
if 8.49999999999999936e-211 < C < 9.9999999999999998e-86Initial program 45.4%
associate-*r/45.4%
associate-*l/45.4%
*-un-lft-identity45.4%
unpow245.4%
unpow245.4%
hypot-define70.1%
Applied egg-rr70.1%
Taylor expanded in A around -inf 47.6%
associate-*r/47.6%
Simplified47.6%
if 9.9999999999999998e-86 < C Initial program 28.7%
associate-*r/28.7%
associate-*l/28.7%
*-un-lft-identity28.7%
unpow228.7%
unpow228.7%
hypot-define59.1%
Applied egg-rr59.1%
Taylor expanded in C around inf 61.3%
associate-*r/61.3%
distribute-rgt1-in61.3%
metadata-eval61.3%
mul0-lft61.3%
metadata-eval61.3%
div061.3%
+-lft-identity61.3%
associate-*r/61.3%
*-commutative61.3%
associate-*r/61.4%
Simplified61.4%
Final simplification59.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= C -3.55e-60)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 2.55e-262)
t_0
(if (<= C 5e-210)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 1.2e-86) t_0 (/ (* 180.0 (atan (* B (/ -0.5 C)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (C <= -3.55e-60) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 2.55e-262) {
tmp = t_0;
} else if (C <= 5e-210) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 1.2e-86) {
tmp = t_0;
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (C <= -3.55e-60) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 2.55e-262) {
tmp = t_0;
} else if (C <= 5e-210) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 1.2e-86) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if C <= -3.55e-60: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 2.55e-262: tmp = t_0 elif C <= 5e-210: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 1.2e-86: tmp = t_0 else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (C <= -3.55e-60) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 2.55e-262) tmp = t_0; elseif (C <= 5e-210) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 1.2e-86) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (C <= -3.55e-60) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 2.55e-262) tmp = t_0; elseif (C <= 5e-210) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 1.2e-86) tmp = t_0; else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.55e-60], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.55e-262], t$95$0, If[LessEqual[C, 5e-210], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.2e-86], t$95$0, N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;C \leq -3.55 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.55 \cdot 10^{-262}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 5 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 1.2 \cdot 10^{-86}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.55000000000000016e-60Initial program 83.3%
Taylor expanded in A around 0 82.3%
unpow282.3%
unpow282.3%
hypot-define91.8%
Simplified91.8%
Taylor expanded in C around 0 82.1%
if -3.55000000000000016e-60 < C < 2.5499999999999998e-262 or 5.0000000000000002e-210 < C < 1.20000000000000007e-86Initial program 52.1%
Taylor expanded in A around -inf 39.0%
associate-*r/39.0%
Simplified39.0%
if 2.5499999999999998e-262 < C < 5.0000000000000002e-210Initial program 69.0%
Taylor expanded in B around inf 58.5%
if 1.20000000000000007e-86 < C Initial program 28.7%
associate-*r/28.7%
associate-*l/28.7%
*-un-lft-identity28.7%
unpow228.7%
unpow228.7%
hypot-define59.1%
Applied egg-rr59.1%
Taylor expanded in C around inf 61.3%
associate-*r/61.3%
distribute-rgt1-in61.3%
metadata-eval61.3%
mul0-lft61.3%
metadata-eval61.3%
div061.3%
+-lft-identity61.3%
associate-*r/61.3%
*-commutative61.3%
associate-*r/61.4%
Simplified61.4%
Final simplification59.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= C -4.4e-60)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 2e-262)
t_0
(if (<= C 1.1e-210)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 4.2e-88) t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (C <= -4.4e-60) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 2e-262) {
tmp = t_0;
} else if (C <= 1.1e-210) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 4.2e-88) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (C <= -4.4e-60) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 2e-262) {
tmp = t_0;
} else if (C <= 1.1e-210) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 4.2e-88) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if C <= -4.4e-60: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 2e-262: tmp = t_0 elif C <= 1.1e-210: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 4.2e-88: tmp = t_0 else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (C <= -4.4e-60) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 2e-262) tmp = t_0; elseif (C <= 1.1e-210) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 4.2e-88) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (C <= -4.4e-60) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 2e-262) tmp = t_0; elseif (C <= 1.1e-210) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 4.2e-88) tmp = t_0; else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -4.4e-60], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2e-262], t$95$0, If[LessEqual[C, 1.1e-210], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.2e-88], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;C \leq -4.4 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2 \cdot 10^{-262}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 1.1 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 4.2 \cdot 10^{-88}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.3999999999999998e-60Initial program 83.3%
Taylor expanded in A around 0 82.3%
unpow282.3%
unpow282.3%
hypot-define91.8%
Simplified91.8%
Taylor expanded in C around 0 82.1%
if -4.3999999999999998e-60 < C < 2.00000000000000002e-262 or 1.09999999999999995e-210 < C < 4.1999999999999999e-88Initial program 52.1%
Taylor expanded in A around -inf 39.0%
associate-*r/39.0%
Simplified39.0%
if 2.00000000000000002e-262 < C < 1.09999999999999995e-210Initial program 69.0%
Taylor expanded in B around inf 58.5%
if 4.1999999999999999e-88 < C Initial program 28.7%
Taylor expanded in A around 0 23.9%
unpow223.9%
unpow223.9%
hypot-define50.7%
Simplified50.7%
div-sub35.4%
Applied egg-rr35.4%
Taylor expanded in C around inf 61.2%
associate-*r/61.2%
*-commutative61.2%
Simplified61.2%
Final simplification59.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= C -1.5e-58)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 1.95e-262)
t_0
(if (<= C 1.25e-210)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 1.7e-87) t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (C <= -1.5e-58) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 1.95e-262) {
tmp = t_0;
} else if (C <= 1.25e-210) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 1.7e-87) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (C <= -1.5e-58) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 1.95e-262) {
tmp = t_0;
} else if (C <= 1.25e-210) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 1.7e-87) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if C <= -1.5e-58: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 1.95e-262: tmp = t_0 elif C <= 1.25e-210: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 1.7e-87: tmp = t_0 else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (C <= -1.5e-58) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 1.95e-262) tmp = t_0; elseif (C <= 1.25e-210) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 1.7e-87) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (C <= -1.5e-58) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 1.95e-262) tmp = t_0; elseif (C <= 1.25e-210) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 1.7e-87) tmp = t_0; else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.5e-58], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.95e-262], t$95$0, If[LessEqual[C, 1.25e-210], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.7e-87], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.5 \cdot 10^{-58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.95 \cdot 10^{-262}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 1.25 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 1.7 \cdot 10^{-87}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.50000000000000004e-58Initial program 83.3%
Taylor expanded in C around -inf 72.1%
if -1.50000000000000004e-58 < C < 1.94999999999999992e-262 or 1.2500000000000001e-210 < C < 1.6999999999999999e-87Initial program 52.1%
Taylor expanded in A around -inf 39.0%
associate-*r/39.0%
Simplified39.0%
if 1.94999999999999992e-262 < C < 1.2500000000000001e-210Initial program 69.0%
Taylor expanded in B around inf 58.5%
if 1.6999999999999999e-87 < C Initial program 28.7%
Taylor expanded in A around 0 23.9%
unpow223.9%
unpow223.9%
hypot-define50.7%
Simplified50.7%
div-sub35.4%
Applied egg-rr35.4%
Taylor expanded in C around inf 61.2%
associate-*r/61.2%
*-commutative61.2%
Simplified61.2%
Final simplification56.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= C -1.15e-59)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 2e-262)
t_0
(if (<= C 2.5e-210)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 6.4e-88) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (C <= -1.15e-59) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 2e-262) {
tmp = t_0;
} else if (C <= 2.5e-210) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 6.4e-88) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (C <= -1.15e-59) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 2e-262) {
tmp = t_0;
} else if (C <= 2.5e-210) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 6.4e-88) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if C <= -1.15e-59: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 2e-262: tmp = t_0 elif C <= 2.5e-210: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 6.4e-88: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (C <= -1.15e-59) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 2e-262) tmp = t_0; elseif (C <= 2.5e-210) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 6.4e-88) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (C <= -1.15e-59) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 2e-262) tmp = t_0; elseif (C <= 2.5e-210) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 6.4e-88) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.15e-59], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2e-262], t$95$0, If[LessEqual[C, 2.5e-210], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.4e-88], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.15 \cdot 10^{-59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2 \cdot 10^{-262}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 2.5 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 6.4 \cdot 10^{-88}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.1499999999999999e-59Initial program 83.3%
Taylor expanded in C around -inf 72.1%
if -1.1499999999999999e-59 < C < 2.00000000000000002e-262 or 2.5000000000000001e-210 < C < 6.40000000000000025e-88Initial program 52.1%
Taylor expanded in A around -inf 39.0%
associate-*r/39.0%
Simplified39.0%
if 2.00000000000000002e-262 < C < 2.5000000000000001e-210Initial program 69.0%
Taylor expanded in B around inf 58.5%
if 6.40000000000000025e-88 < C Initial program 28.7%
Taylor expanded in A around 0 23.9%
unpow223.9%
unpow223.9%
hypot-define50.7%
Simplified50.7%
Taylor expanded in C around inf 61.2%
Final simplification56.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -6e+29)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.1e-140)
t_0
(if (<= B -1.7e-260)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.4e-117) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double tmp;
if (B <= -6e+29) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.1e-140) {
tmp = t_0;
} else if (B <= -1.7e-260) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.4e-117) {
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((-2.0 * (A / B))) / Math.PI);
double tmp;
if (B <= -6e+29) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.1e-140) {
tmp = t_0;
} else if (B <= -1.7e-260) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.4e-117) {
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((-2.0 * (A / B))) / math.pi) tmp = 0 if B <= -6e+29: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.1e-140: tmp = t_0 elif B <= -1.7e-260: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.4e-117: 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(-2.0 * Float64(A / B))) / pi)) tmp = 0.0 if (B <= -6e+29) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.1e-140) tmp = t_0; elseif (B <= -1.7e-260) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.4e-117) 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((-2.0 * (A / B))) / pi); tmp = 0.0; if (B <= -6e+29) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.1e-140) tmp = t_0; elseif (B <= -1.7e-260) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.4e-117) 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[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6e+29], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.1e-140], t$95$0, If[LessEqual[B, -1.7e-260], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-117], 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(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -6 \cdot 10^{+29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.1 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -1.7 \cdot 10^{-260}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-117}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.9999999999999998e29Initial program 49.1%
Taylor expanded in B around -inf 59.1%
if -5.9999999999999998e29 < B < -3.0999999999999999e-140 or -1.6999999999999999e-260 < B < 1.4e-117Initial program 55.8%
Taylor expanded in A around inf 33.9%
if -3.0999999999999999e-140 < B < -1.6999999999999999e-260Initial program 62.3%
Taylor expanded in C around inf 52.3%
associate-*r/52.3%
distribute-rgt1-in52.3%
metadata-eval52.3%
mul0-lft52.3%
metadata-eval52.3%
Simplified52.3%
if 1.4e-117 < B Initial program 49.4%
Taylor expanded in B around inf 52.0%
(FPCore (A B C)
:precision binary64
(if (<= C -8.5e-61)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 1.35e-261)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 1.9e-210)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8.5e-61) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 1.35e-261) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 1.9e-210) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -8.5e-61) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 1.35e-261) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 1.9e-210) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -8.5e-61: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 1.35e-261: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 1.9e-210: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -8.5e-61) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 1.35e-261) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 1.9e-210) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8.5e-61) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 1.35e-261) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 1.9e-210) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8.5e-61], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.35e-261], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.9e-210], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8.5 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.35 \cdot 10^{-261}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 1.9 \cdot 10^{-210}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -8.50000000000000016e-61Initial program 83.1%
Taylor expanded in C around -inf 71.2%
if -8.50000000000000016e-61 < C < 1.3499999999999999e-261Initial program 54.1%
Taylor expanded in B around -inf 31.8%
if 1.3499999999999999e-261 < C < 1.90000000000000002e-210Initial program 74.1%
Taylor expanded in B around inf 64.2%
if 1.90000000000000002e-210 < C Initial program 32.2%
Taylor expanded in A around 0 24.1%
unpow224.1%
unpow224.1%
hypot-define49.7%
Simplified49.7%
Taylor expanded in C around inf 53.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.4e-223)
(* 180.0 (/ (atan (+ t_0 1.0)) PI))
(if (<= B -2.1e-256)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ (* 180.0 (atan (+ t_0 -1.0))) PI)))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.4e-223) {
tmp = 180.0 * (atan((t_0 + 1.0)) / ((double) M_PI));
} else if (B <= -2.1e-256) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.4e-223) {
tmp = 180.0 * (Math.atan((t_0 + 1.0)) / Math.PI);
} else if (B <= -2.1e-256) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.4e-223: tmp = 180.0 * (math.atan((t_0 + 1.0)) / math.pi) elif B <= -2.1e-256: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.4e-223) tmp = Float64(180.0 * Float64(atan(Float64(t_0 + 1.0)) / pi)); elseif (B <= -2.1e-256) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.4e-223) tmp = 180.0 * (atan((t_0 + 1.0)) / pi); elseif (B <= -2.1e-256) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.4e-223], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.1e-256], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.4 \cdot 10^{-223}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.1 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.40000000000000007e-223Initial program 50.2%
Taylor expanded in B around -inf 63.4%
associate--l+63.4%
div-sub63.4%
Simplified63.4%
if -1.40000000000000007e-223 < B < -2.10000000000000003e-256Initial program 64.2%
Taylor expanded in C around inf 71.6%
associate-*r/71.6%
distribute-rgt1-in71.6%
metadata-eval71.6%
mul0-lft71.6%
metadata-eval71.6%
Simplified71.6%
if -2.10000000000000003e-256 < B Initial program 53.9%
associate-*r/53.9%
associate-*l/53.9%
*-un-lft-identity53.9%
unpow253.9%
unpow253.9%
hypot-define75.6%
Applied egg-rr75.6%
Taylor expanded in B around inf 64.3%
+-commutative64.3%
associate--r+64.3%
div-sub65.9%
Simplified65.9%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(if (<= B -9e-167)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.2e-129)
(* 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 <= -9e-167) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.2e-129) {
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 <= -9e-167) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.2e-129) {
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 <= -9e-167: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.2e-129: 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 <= -9e-167) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.2e-129) 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 <= -9e-167) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.2e-129) 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, -9e-167], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.2e-129], 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 -9 \cdot 10^{-167}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.0000000000000002e-167Initial program 49.2%
Taylor expanded in B around -inf 43.8%
if -9.0000000000000002e-167 < B < 3.2000000000000003e-129Initial program 58.7%
Taylor expanded in C around inf 36.1%
associate-*r/36.1%
distribute-rgt1-in36.1%
metadata-eval36.1%
mul0-lft36.1%
metadata-eval36.1%
Simplified36.1%
if 3.2000000000000003e-129 < B Initial program 52.8%
Taylor expanded in B around inf 50.7%
(FPCore (A B C) :precision binary64 (if (<= B -5e-311) (* 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-311) {
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-311) {
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-311: 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-311) 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-311) 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-311], 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^{-311}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.00000000000023e-311Initial program 53.3%
Taylor expanded in B around -inf 36.1%
if -5.00000000000023e-311 < B Initial program 52.0%
Taylor expanded in B around inf 41.1%
(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 52.7%
Taylor expanded in B around inf 19.8%
herbie shell --seed 2024086
(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)))