
(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 20 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 2.4e+79) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B)))) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.4e+79) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} 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 <= 2.4e+79) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2.4e+79: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2.4e+79) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); 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 <= 2.4e+79) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2.4e+79], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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 2.4 \cdot 10^{+79}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 2.39999999999999986e79Initial program 65.0%
Applied egg-rr86.0%
if 2.39999999999999986e79 < C Initial program 19.3%
Taylor expanded in A around 0 17.3%
unpow217.3%
unpow217.3%
hypot-def44.5%
Simplified44.5%
Taylor expanded in C around inf 81.2%
Final simplification85.1%
(FPCore (A B C)
:precision binary64
(if (<= C -2.45e-116)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 2.1e+79)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.45e-116) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 2.1e+79) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((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 <= -2.45e-116) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 2.1e+79) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / 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 <= -2.45e-116: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 2.1e+79: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / 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 <= -2.45e-116) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 2.1e+79) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / 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 <= -2.45e-116) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 2.1e+79) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.45e-116], 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.1e+79], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $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 -2.45 \cdot 10^{-116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.1 \cdot 10^{+79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.44999999999999989e-116Initial program 78.0%
Taylor expanded in A around 0 74.9%
unpow274.9%
unpow274.9%
hypot-def82.3%
Simplified82.3%
if -2.44999999999999989e-116 < C < 2.10000000000000008e79Initial program 57.3%
Taylor expanded in C around 0 56.4%
associate-*r/56.4%
mul-1-neg56.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-def83.1%
Simplified83.1%
if 2.10000000000000008e79 < C Initial program 19.3%
Taylor expanded in A around 0 17.3%
unpow217.3%
unpow217.3%
hypot-def44.5%
Simplified44.5%
Taylor expanded in C around inf 81.2%
Final simplification82.5%
(FPCore (A B C)
:precision binary64
(if (<= C -3.2e-117)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 1.7e+78)
(/ 180.0 (/ PI (atan (/ (- (- A) (hypot A B)) B))))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.2e-117) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 1.7e+78) {
tmp = 180.0 / (((double) M_PI) / atan(((-A - hypot(A, B)) / B)));
} 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 <= -3.2e-117) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 1.7e+78) {
tmp = 180.0 / (Math.PI / Math.atan(((-A - Math.hypot(A, B)) / B)));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.2e-117: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 1.7e+78: tmp = 180.0 / (math.pi / math.atan(((-A - math.hypot(A, B)) / B))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.2e-117) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 1.7e+78) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)))); 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 <= -3.2e-117) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 1.7e+78) tmp = 180.0 / (pi / atan(((-A - hypot(A, B)) / B))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.2e-117], 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, 1.7e+78], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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 -3.2 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.7 \cdot 10^{+78}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.19999999999999995e-117Initial program 78.0%
Taylor expanded in A around 0 74.9%
unpow274.9%
unpow274.9%
hypot-def82.3%
Simplified82.3%
if -3.19999999999999995e-117 < C < 1.70000000000000004e78Initial program 57.3%
Applied egg-rr84.4%
Taylor expanded in C around 0 56.4%
mul-1-neg56.4%
unpow256.4%
unpow256.4%
hypot-def83.1%
Simplified83.1%
if 1.70000000000000004e78 < C Initial program 19.3%
Taylor expanded in A around 0 17.3%
unpow217.3%
unpow217.3%
hypot-def44.5%
Simplified44.5%
Taylor expanded in C around inf 81.2%
Final simplification82.5%
(FPCore (A B C)
:precision binary64
(if (<= C -1e-116)
(* 180.0 (/ (atan (/ (- C (+ A (hypot B A))) B)) PI))
(if (<= C 1.75e+77)
(/ 180.0 (/ PI (atan (/ (- (- A) (hypot A B)) B))))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1e-116) {
tmp = 180.0 * (atan(((C - (A + hypot(B, A))) / B)) / ((double) M_PI));
} else if (C <= 1.75e+77) {
tmp = 180.0 / (((double) M_PI) / atan(((-A - hypot(A, B)) / B)));
} 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 <= -1e-116) {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, A))) / B)) / Math.PI);
} else if (C <= 1.75e+77) {
tmp = 180.0 / (Math.PI / Math.atan(((-A - Math.hypot(A, B)) / B)));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1e-116: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, A))) / B)) / math.pi) elif C <= 1.75e+77: tmp = 180.0 / (math.pi / math.atan(((-A - math.hypot(A, B)) / B))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1e-116) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, A))) / B)) / pi)); elseif (C <= 1.75e+77) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)))); 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 <= -1e-116) tmp = 180.0 * (atan(((C - (A + hypot(B, A))) / B)) / pi); elseif (C <= 1.75e+77) tmp = 180.0 / (pi / atan(((-A - hypot(A, B)) / B))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1e-116], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.75e+77], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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 -1 \cdot 10^{-116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A\right)\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.75 \cdot 10^{+77}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -9.9999999999999999e-117Initial program 78.0%
Simplified86.4%
Taylor expanded in C around 0 77.2%
+-commutative77.2%
unpow277.2%
unpow277.2%
hypot-def85.5%
Simplified85.5%
if -9.9999999999999999e-117 < C < 1.7500000000000001e77Initial program 57.3%
Applied egg-rr84.4%
Taylor expanded in C around 0 56.4%
mul-1-neg56.4%
unpow256.4%
unpow256.4%
hypot-def83.1%
Simplified83.1%
if 1.7500000000000001e77 < C Initial program 19.3%
Taylor expanded in A around 0 17.3%
unpow217.3%
unpow217.3%
hypot-def44.5%
Simplified44.5%
Taylor expanded in C around inf 81.2%
Final simplification83.4%
(FPCore (A B C)
:precision binary64
(if (<= A -3.5e+73)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A 1.35e+32)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+73) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= 1.35e+32) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e+73) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= 1.35e+32) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.5e+73: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= 1.35e+32: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.5e+73) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= 1.35e+32) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.5e+73) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= 1.35e+32) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.5e+73], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.35e+32], 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[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.5 \cdot 10^{+73}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq 1.35 \cdot 10^{+32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -3.50000000000000002e73Initial program 20.5%
Applied egg-rr57.0%
Taylor expanded in A around -inf 79.7%
associate-/r/79.9%
associate-*r/79.9%
Applied egg-rr79.9%
if -3.50000000000000002e73 < A < 1.35000000000000006e32Initial program 52.7%
Taylor expanded in A around 0 51.6%
unpow251.6%
unpow251.6%
hypot-def77.3%
Simplified77.3%
if 1.35000000000000006e32 < A Initial program 82.1%
Applied egg-rr94.1%
Taylor expanded in B around inf 83.2%
mul-1-neg83.2%
unsub-neg83.2%
Simplified83.2%
Final simplification79.3%
(FPCore (A B C) :precision binary64 (if (<= A -1.9e+75) (* (/ 180.0 PI) (atan (/ (* B 0.5) A))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e+75) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e+75) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.9e+75: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.9e+75) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.9e+75) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.9e+75], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.9 \cdot 10^{+75}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.9000000000000001e75Initial program 20.5%
Applied egg-rr57.0%
Taylor expanded in A around -inf 79.7%
associate-/r/79.9%
associate-*r/79.9%
Applied egg-rr79.9%
if -1.9000000000000001e75 < A Initial program 61.9%
Simplified83.4%
Final simplification82.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -1320000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.95e-286)
t_0
(if (<= B 1.45e-237)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 7.2e-90)
t_0
(if (<= B 0.00085)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 38.0) 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 <= -1320000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.95e-286) {
tmp = t_0;
} else if (B <= 1.45e-237) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 7.2e-90) {
tmp = t_0;
} else if (B <= 0.00085) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 38.0) {
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 <= -1320000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.95e-286) {
tmp = t_0;
} else if (B <= 1.45e-237) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 7.2e-90) {
tmp = t_0;
} else if (B <= 0.00085) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 38.0) {
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 <= -1320000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.95e-286: tmp = t_0 elif B <= 1.45e-237: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 7.2e-90: tmp = t_0 elif B <= 0.00085: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 38.0: 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 <= -1320000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.95e-286) tmp = t_0; elseif (B <= 1.45e-237) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 7.2e-90) tmp = t_0; elseif (B <= 0.00085) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 38.0) 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 <= -1320000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.95e-286) tmp = t_0; elseif (B <= 1.45e-237) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 7.2e-90) tmp = t_0; elseif (B <= 0.00085) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 38.0) 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, -1320000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.95e-286], t$95$0, If[LessEqual[B, 1.45e-237], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.2e-90], t$95$0, If[LessEqual[B, 0.00085], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 38.0], 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 -1320000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-237}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{-90}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 0.00085:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 38:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.32e6Initial program 45.7%
Taylor expanded in B around -inf 65.9%
if -1.32e6 < B < 1.94999999999999998e-286 or 1.45000000000000005e-237 < B < 7.19999999999999961e-90 or 8.49999999999999953e-4 < B < 38Initial program 67.5%
Taylor expanded in A around inf 45.2%
if 1.94999999999999998e-286 < B < 1.45000000000000005e-237Initial program 35.0%
Taylor expanded in C around inf 51.1%
associate-*r/51.1%
distribute-rgt1-in51.1%
metadata-eval51.1%
mul0-lft51.1%
metadata-eval51.1%
Simplified51.1%
if 7.19999999999999961e-90 < B < 8.49999999999999953e-4Initial program 48.8%
Taylor expanded in A around 0 38.0%
unpow238.0%
unpow238.0%
hypot-def39.2%
Simplified39.2%
Taylor expanded in C around inf 54.2%
if 38 < B Initial program 53.5%
Taylor expanded in B around inf 63.3%
Final simplification55.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))
(t_1 (* 180.0 (/ (atan 1.0) PI))))
(if (<= C -1.1e-60)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -1.42e-244)
t_0
(if (<= C 7.4e-260)
t_1
(if (<= C 1e-174)
t_0
(if (<= C 4e-77) t_1 (* 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 t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (C <= -1.1e-60) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -1.42e-244) {
tmp = t_0;
} else if (C <= 7.4e-260) {
tmp = t_1;
} else if (C <= 1e-174) {
tmp = t_0;
} else if (C <= 4e-77) {
tmp = t_1;
} 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 t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (C <= -1.1e-60) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -1.42e-244) {
tmp = t_0;
} else if (C <= 7.4e-260) {
tmp = t_1;
} else if (C <= 1e-174) {
tmp = t_0;
} else if (C <= 4e-77) {
tmp = t_1;
} 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) t_1 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if C <= -1.1e-60: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -1.42e-244: tmp = t_0 elif C <= 7.4e-260: tmp = t_1 elif C <= 1e-174: tmp = t_0 elif C <= 4e-77: tmp = t_1 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)) t_1 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (C <= -1.1e-60) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -1.42e-244) tmp = t_0; elseif (C <= 7.4e-260) tmp = t_1; elseif (C <= 1e-174) tmp = t_0; elseif (C <= 4e-77) tmp = t_1; 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); t_1 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (C <= -1.1e-60) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -1.42e-244) tmp = t_0; elseif (C <= 7.4e-260) tmp = t_1; elseif (C <= 1e-174) tmp = t_0; elseif (C <= 4e-77) tmp = t_1; 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]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.1e-60], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.42e-244], t$95$0, If[LessEqual[C, 7.4e-260], t$95$1, If[LessEqual[C, 1e-174], t$95$0, If[LessEqual[C, 4e-77], t$95$1, 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}\\
t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;C \leq -1.1 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.42 \cdot 10^{-244}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 7.4 \cdot 10^{-260}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 10^{-174}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 4 \cdot 10^{-77}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.0999999999999999e-60Initial program 82.7%
Taylor expanded in C around -inf 70.0%
if -1.0999999999999999e-60 < C < -1.42000000000000003e-244 or 7.4000000000000004e-260 < C < 1e-174Initial program 56.7%
Taylor expanded in A around -inf 41.4%
associate-*r/41.4%
Simplified41.4%
if -1.42000000000000003e-244 < C < 7.4000000000000004e-260 or 1e-174 < C < 3.9999999999999997e-77Initial program 65.2%
Taylor expanded in B around -inf 41.5%
if 3.9999999999999997e-77 < C Initial program 25.9%
Taylor expanded in A around 0 19.0%
unpow219.0%
unpow219.0%
hypot-def47.2%
Simplified47.2%
Taylor expanded in C around inf 67.1%
Final simplification56.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (+ C B) B)) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -5.5e+18)
t_1
(if (<= A -1.9e-5)
t_0
(if (<= A -1e-109)
t_1
(if (<= A 8.2e-32)
t_0
(if (<= A 2.75e-5)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C + B) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -5.5e+18) {
tmp = t_1;
} else if (A <= -1.9e-5) {
tmp = t_0;
} else if (A <= -1e-109) {
tmp = t_1;
} else if (A <= 8.2e-32) {
tmp = t_0;
} else if (A <= 2.75e-5) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C + B) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -5.5e+18) {
tmp = t_1;
} else if (A <= -1.9e-5) {
tmp = t_0;
} else if (A <= -1e-109) {
tmp = t_1;
} else if (A <= 8.2e-32) {
tmp = t_0;
} else if (A <= 2.75e-5) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C + B) / B)) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -5.5e+18: tmp = t_1 elif A <= -1.9e-5: tmp = t_0 elif A <= -1e-109: tmp = t_1 elif A <= 8.2e-32: tmp = t_0 elif A <= 2.75e-5: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C + B) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -5.5e+18) tmp = t_1; elseif (A <= -1.9e-5) tmp = t_0; elseif (A <= -1e-109) tmp = t_1; elseif (A <= 8.2e-32) tmp = t_0; elseif (A <= 2.75e-5) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C + B) / B)) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -5.5e+18) tmp = t_1; elseif (A <= -1.9e-5) tmp = t_0; elseif (A <= -1e-109) tmp = t_1; elseif (A <= 8.2e-32) tmp = t_0; elseif (A <= 2.75e-5) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C + B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.5e+18], t$95$1, If[LessEqual[A, -1.9e-5], t$95$0, If[LessEqual[A, -1e-109], t$95$1, If[LessEqual[A, 8.2e-32], t$95$0, If[LessEqual[A, 2.75e-5], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.5 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1.9 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1 \cdot 10^{-109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 8.2 \cdot 10^{-32}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 2.75 \cdot 10^{-5}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.5e18 or -1.9000000000000001e-5 < A < -9.9999999999999999e-110Initial program 29.6%
Taylor expanded in A around -inf 64.1%
associate-*r/64.1%
Simplified64.1%
if -5.5e18 < A < -1.9000000000000001e-5 or -9.9999999999999999e-110 < A < 8.1999999999999995e-32Initial program 57.2%
Taylor expanded in A around 0 57.1%
unpow257.1%
unpow257.1%
hypot-def83.3%
Simplified83.3%
Taylor expanded in B around -inf 55.2%
if 8.1999999999999995e-32 < A < 2.7500000000000001e-5Initial program 9.3%
Taylor expanded in A around 0 9.3%
unpow29.3%
unpow29.3%
hypot-def46.9%
Simplified46.9%
Taylor expanded in C around inf 68.7%
if 2.7500000000000001e-5 < A Initial program 81.7%
Taylor expanded in A around inf 73.1%
Final simplification63.3%
(FPCore (A B C)
:precision binary64
(if (<= C -4.5e-118)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (or (<= C 6.5e-76) (and (not (<= C 3.4e+23)) (<= C 3.2e+60)))
(/ 180.0 (/ PI (atan (- 1.0 (/ A B)))))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.5e-118) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if ((C <= 6.5e-76) || (!(C <= 3.4e+23) && (C <= 3.2e+60))) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 - (A / B))));
} 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 <= -4.5e-118) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if ((C <= 6.5e-76) || (!(C <= 3.4e+23) && (C <= 3.2e+60))) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 - (A / B))));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.5e-118: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif (C <= 6.5e-76) or (not (C <= 3.4e+23) and (C <= 3.2e+60)): tmp = 180.0 / (math.pi / math.atan((1.0 - (A / B)))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.5e-118) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif ((C <= 6.5e-76) || (!(C <= 3.4e+23) && (C <= 3.2e+60))) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 - Float64(A / B))))); 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 <= -4.5e-118) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif ((C <= 6.5e-76) || (~((C <= 3.4e+23)) && (C <= 3.2e+60))) tmp = 180.0 / (pi / atan((1.0 - (A / B)))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.5e-118], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 6.5e-76], And[N[Not[LessEqual[C, 3.4e+23]], $MachinePrecision], LessEqual[C, 3.2e+60]]], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 -4.5 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.5 \cdot 10^{-76} \lor \neg \left(C \leq 3.4 \cdot 10^{+23}\right) \land C \leq 3.2 \cdot 10^{+60}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.5e-118Initial program 78.3%
Taylor expanded in A around 0 75.2%
unpow275.2%
unpow275.2%
hypot-def82.5%
Simplified82.5%
Taylor expanded in C around 0 72.1%
mul-1-neg72.1%
unsub-neg72.1%
Simplified72.1%
if -4.5e-118 < C < 6.5e-76 or 3.39999999999999992e23 < C < 3.19999999999999991e60Initial program 62.2%
Applied egg-rr89.2%
Taylor expanded in B around -inf 56.2%
associate--l+56.2%
div-sub56.2%
Simplified56.2%
Taylor expanded in C around 0 55.8%
associate-*r/55.8%
mul-1-neg55.8%
Simplified55.8%
if 6.5e-76 < C < 3.39999999999999992e23 or 3.19999999999999991e60 < C Initial program 22.0%
Taylor expanded in A around 0 18.4%
unpow218.4%
unpow218.4%
hypot-def45.9%
Simplified45.9%
Taylor expanded in C around inf 71.2%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -440000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.7e-288)
t_0
(if (<= B 7.9e-237)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 14.5) 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 <= -440000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.7e-288) {
tmp = t_0;
} else if (B <= 7.9e-237) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 14.5) {
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 <= -440000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.7e-288) {
tmp = t_0;
} else if (B <= 7.9e-237) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 14.5) {
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 <= -440000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.7e-288: tmp = t_0 elif B <= 7.9e-237: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 14.5: 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 <= -440000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.7e-288) tmp = t_0; elseif (B <= 7.9e-237) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 14.5) 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 <= -440000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.7e-288) tmp = t_0; elseif (B <= 7.9e-237) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 14.5) 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, -440000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.7e-288], t$95$0, If[LessEqual[B, 7.9e-237], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 14.5], 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 -440000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.7 \cdot 10^{-288}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 7.9 \cdot 10^{-237}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 14.5:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.4e5Initial program 45.7%
Taylor expanded in B around -inf 65.9%
if -4.4e5 < B < 1.69999999999999986e-288 or 7.8999999999999998e-237 < B < 14.5Initial program 65.1%
Taylor expanded in A around inf 42.3%
if 1.69999999999999986e-288 < B < 7.8999999999999998e-237Initial program 35.0%
Taylor expanded in C around inf 51.1%
associate-*r/51.1%
distribute-rgt1-in51.1%
metadata-eval51.1%
mul0-lft51.1%
metadata-eval51.1%
Simplified51.1%
if 14.5 < B Initial program 53.5%
Taylor expanded in B around inf 63.3%
Final simplification53.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B 1.45e-287)
t_0
(if (<= B 1.8e-237)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= B 280.0) t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))))))
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 (B <= 1.45e-287) {
tmp = t_0;
} else if (B <= 1.8e-237) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (B <= 280.0) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
}
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 (B <= 1.45e-287) {
tmp = t_0;
} else if (B <= 1.8e-237) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (B <= 280.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= 1.45e-287: tmp = t_0 elif B <= 1.8e-237: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif B <= 280.0: tmp = t_0 else: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) 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 (B <= 1.45e-287) tmp = t_0; elseif (B <= 1.8e-237) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (B <= 280.0) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); 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 (B <= 1.45e-287) tmp = t_0; elseif (B <= 1.8e-237) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (B <= 280.0) tmp = t_0; else tmp = 180.0 * (atan(((C - B) / B)) / pi); 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[B, 1.45e-287], t$95$0, If[LessEqual[B, 1.8e-237], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 280.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $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}\;B \leq 1.45 \cdot 10^{-287}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-237}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;B \leq 280:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.4499999999999999e-287 or 1.79999999999999998e-237 < B < 280Initial program 58.5%
Taylor expanded in B around -inf 67.0%
associate--l+67.0%
div-sub67.6%
Simplified67.6%
if 1.4499999999999999e-287 < B < 1.79999999999999998e-237Initial program 35.0%
Applied egg-rr59.2%
Taylor expanded in A around -inf 66.8%
associate-/r/67.7%
associate-*r/67.7%
Applied egg-rr67.7%
if 280 < B Initial program 53.5%
Taylor expanded in A around 0 46.9%
unpow246.9%
unpow246.9%
hypot-def72.3%
Simplified72.3%
Taylor expanded in C around 0 70.7%
mul-1-neg70.7%
unsub-neg70.7%
Simplified70.7%
Final simplification68.4%
(FPCore (A B C)
:precision binary64
(if (<= B 3.5e-290)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 1.8e-237)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.5e-290) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 1.8e-237) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.5e-290) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 1.8e-237) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.5e-290: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 1.8e-237: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.5e-290) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 1.8e-237) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.5e-290) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 1.8e-237) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.5e-290], 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.8e-237], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.5 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-237}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 3.49999999999999981e-290Initial program 56.6%
Taylor expanded in B around -inf 70.4%
associate--l+70.4%
div-sub71.2%
Simplified71.2%
if 3.49999999999999981e-290 < B < 1.79999999999999998e-237Initial program 35.0%
Applied egg-rr59.2%
Taylor expanded in A around -inf 66.8%
associate-/r/67.7%
associate-*r/67.7%
Applied egg-rr67.7%
if 1.79999999999999998e-237 < B Initial program 57.8%
Simplified75.6%
Taylor expanded in B around inf 69.9%
+-commutative69.9%
Simplified69.9%
Final simplification70.5%
(FPCore (A B C)
:precision binary64
(if (<= B 5.6e-291)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 1.4e-236)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5.6e-291) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 1.4e-236) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 5.6e-291) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 1.4e-236) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5.6e-291: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 1.4e-236: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5.6e-291) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 1.4e-236) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 5.6e-291) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 1.4e-236) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5.6e-291], 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.4e-236], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 5.6 \cdot 10^{-291}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-236}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < 5.5999999999999999e-291Initial program 56.6%
Taylor expanded in B around -inf 70.4%
associate--l+70.4%
div-sub71.2%
Simplified71.2%
if 5.5999999999999999e-291 < B < 1.39999999999999993e-236Initial program 35.0%
Applied egg-rr59.2%
Taylor expanded in A around -inf 66.8%
associate-/r/67.7%
associate-*r/67.7%
Applied egg-rr67.7%
if 1.39999999999999993e-236 < B Initial program 57.8%
Applied egg-rr79.0%
Taylor expanded in B around inf 69.9%
mul-1-neg69.9%
unsub-neg69.9%
Simplified69.9%
Final simplification70.5%
(FPCore (A B C)
:precision binary64
(if (<= C -4.8e-139)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 4.5e-77)
(* 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 <= -4.8e-139) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 4.5e-77) {
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 <= -4.8e-139) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 4.5e-77) {
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 <= -4.8e-139: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 4.5e-77: 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 <= -4.8e-139) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 4.5e-77) 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 <= -4.8e-139) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 4.5e-77) 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, -4.8e-139], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.5e-77], 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 -4.8 \cdot 10^{-139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.5 \cdot 10^{-77}:\\
\;\;\;\;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 < -4.80000000000000029e-139Initial program 77.9%
Taylor expanded in C around -inf 62.6%
if -4.80000000000000029e-139 < C < 4.5000000000000001e-77Initial program 61.8%
Taylor expanded in B around -inf 33.0%
if 4.5000000000000001e-77 < C Initial program 25.9%
Taylor expanded in A around 0 19.0%
unpow219.0%
unpow219.0%
hypot-def47.2%
Simplified47.2%
Taylor expanded in C around inf 67.1%
Final simplification52.6%
(FPCore (A B C)
:precision binary64
(if (<= B 2.55e-288)
(* 180.0 (/ (atan (/ (+ C B) B)) PI))
(if (<= B 2.3e-148)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan (/ (- C B) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2.55e-288) {
tmp = 180.0 * (atan(((C + B) / B)) / ((double) M_PI));
} else if (B <= 2.3e-148) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 2.55e-288) {
tmp = 180.0 * (Math.atan(((C + B) / B)) / Math.PI);
} else if (B <= 2.3e-148) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2.55e-288: tmp = 180.0 * (math.atan(((C + B) / B)) / math.pi) elif B <= 2.3e-148: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2.55e-288) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + B) / B)) / pi)); elseif (B <= 2.3e-148) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2.55e-288) tmp = 180.0 * (atan(((C + B) / B)) / pi); elseif (B <= 2.3e-148) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((C - B) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2.55e-288], N[(180.0 * N[(N[ArcTan[N[(N[(C + B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.3e-148], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.55 \cdot 10^{-288}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-148}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 2.54999999999999997e-288Initial program 56.6%
Taylor expanded in A around 0 46.6%
unpow246.6%
unpow246.6%
hypot-def64.2%
Simplified64.2%
Taylor expanded in B around -inf 55.9%
if 2.54999999999999997e-288 < B < 2.29999999999999997e-148Initial program 54.0%
Taylor expanded in A around -inf 51.6%
associate-*r/51.6%
Simplified51.6%
if 2.29999999999999997e-148 < B Initial program 56.2%
Taylor expanded in A around 0 46.8%
unpow246.8%
unpow246.8%
hypot-def66.4%
Simplified66.4%
Taylor expanded in C around 0 64.0%
mul-1-neg64.0%
unsub-neg64.0%
Simplified64.0%
Final simplification58.3%
(FPCore (A B C)
:precision binary64
(if (<= B 9e-292)
(* 180.0 (/ (atan (/ (+ C B) B)) PI))
(if (<= B 7e-148)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(* 180.0 (/ (atan (/ (- C B) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 9e-292) {
tmp = 180.0 * (atan(((C + B) / B)) / ((double) M_PI));
} else if (B <= 7e-148) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 9e-292) {
tmp = 180.0 * (Math.atan(((C + B) / B)) / Math.PI);
} else if (B <= 7e-148) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 9e-292: tmp = 180.0 * (math.atan(((C + B) / B)) / math.pi) elif B <= 7e-148: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) else: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 9e-292) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + B) / B)) / pi)); elseif (B <= 7e-148) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 9e-292) tmp = 180.0 * (atan(((C + B) / B)) / pi); elseif (B <= 7e-148) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); else tmp = 180.0 * (atan(((C - B) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 9e-292], N[(180.0 * N[(N[ArcTan[N[(N[(C + B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-148], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 9 \cdot 10^{-292}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-148}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 8.99999999999999913e-292Initial program 56.6%
Taylor expanded in A around 0 46.6%
unpow246.6%
unpow246.6%
hypot-def64.2%
Simplified64.2%
Taylor expanded in B around -inf 55.9%
if 8.99999999999999913e-292 < B < 7.0000000000000001e-148Initial program 54.0%
Applied egg-rr75.9%
Taylor expanded in A around -inf 51.4%
associate-/r/51.7%
associate-*r/51.7%
Applied egg-rr51.7%
if 7.0000000000000001e-148 < B Initial program 56.2%
Taylor expanded in A around 0 46.8%
unpow246.8%
unpow246.8%
hypot-def66.4%
Simplified66.4%
Taylor expanded in C around 0 64.0%
mul-1-neg64.0%
unsub-neg64.0%
Simplified64.0%
Final simplification58.3%
(FPCore (A B C)
:precision binary64
(if (<= B -4.3e-92)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 8.5e-123)
(* 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 <= -4.3e-92) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 8.5e-123) {
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 <= -4.3e-92) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 8.5e-123) {
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 <= -4.3e-92: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 8.5e-123: 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 <= -4.3e-92) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 8.5e-123) 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 <= -4.3e-92) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 8.5e-123) 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, -4.3e-92], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-123], 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 -4.3 \cdot 10^{-92}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-123}:\\
\;\;\;\;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 < -4.30000000000000014e-92Initial program 57.4%
Taylor expanded in B around -inf 54.8%
if -4.30000000000000014e-92 < B < 8.4999999999999995e-123Initial program 54.9%
Taylor expanded in C around inf 33.8%
associate-*r/33.8%
distribute-rgt1-in33.8%
metadata-eval33.8%
mul0-lft33.8%
metadata-eval33.8%
Simplified33.8%
if 8.4999999999999995e-123 < B Initial program 55.9%
Taylor expanded in B around inf 52.3%
Final simplification47.6%
(FPCore (A B C) :precision binary64 (if (<= B -3e-303) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3e-303) {
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 <= -3e-303) {
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 <= -3e-303: 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 <= -3e-303) 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 <= -3e-303) 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, -3e-303], 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 -3 \cdot 10^{-303}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.00000000000000028e-303Initial program 56.3%
Taylor expanded in B around -inf 43.0%
if -3.00000000000000028e-303 < B Initial program 55.9%
Taylor expanded in B around inf 38.9%
Final simplification41.0%
(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 56.1%
Taylor expanded in B around inf 20.5%
Final simplification20.5%
herbie shell --seed 2024026
(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)))