
(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 19 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 8.2e+49) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* 180.0 (/ (atan (* B (- (* -0.5 (/ A (pow C 2.0))) (/ 0.5 C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 8.2e+49) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B * ((-0.5 * (A / pow(C, 2.0))) - (0.5 / C)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 8.2e+49) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B * ((-0.5 * (A / Math.pow(C, 2.0))) - (0.5 / C)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 8.2e+49: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan((B * ((-0.5 * (A / math.pow(C, 2.0))) - (0.5 / C)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 8.2e+49) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(Float64(-0.5 * Float64(A / (C ^ 2.0))) - Float64(0.5 / C)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 8.2e+49) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan((B * ((-0.5 * (A / (C ^ 2.0))) - (0.5 / C)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 8.2e+49], 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[(180.0 * N[(N[ArcTan[N[(B * N[(N[(-0.5 * N[(A / N[Power[C, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.5 / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 8.2 \cdot 10^{+49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \left(-0.5 \cdot \frac{A}{{C}^{2}} - \frac{0.5}{C}\right)\right)}{\pi}\\
\end{array}
\end{array}
if C < 8.2e49Initial program 59.8%
associate-*l/59.8%
*-lft-identity59.8%
+-commutative59.8%
unpow259.8%
unpow259.8%
hypot-define86.1%
Simplified86.1%
if 8.2e49 < C Initial program 16.5%
Taylor expanded in C around inf 81.5%
Taylor expanded in B around inf 81.8%
associate-*r/81.8%
metadata-eval81.8%
Simplified81.8%
(FPCore (A B C)
:precision binary64
(if (<= C -8.8e+42)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(if (<= C 7.5e+49)
(* 180.0 (/ (atan (/ (+ A (hypot A B)) (- B))) PI))
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8.8e+42) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else if (C <= 7.5e+49) {
tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -8.8e+42) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else if (C <= 7.5e+49) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(A, B)) / -B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -8.8e+42: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi elif C <= 7.5e+49: tmp = 180.0 * (math.atan(((A + math.hypot(A, B)) / -B)) / math.pi) else: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -8.8e+42) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); elseif (C <= 7.5e+49) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8.8e+42) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; elseif (C <= 7.5e+49) tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / pi); else tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8.8e+42], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 7.5e+49], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8.8 \cdot 10^{+42}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{+49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -8.8000000000000005e42Initial program 68.4%
associate-*r/68.4%
Applied egg-rr96.8%
Taylor expanded in A around 0 68.4%
+-commutative68.4%
unpow268.4%
unpow268.4%
hypot-define95.3%
Simplified95.3%
if -8.8000000000000005e42 < C < 7.4999999999999995e49Initial program 56.6%
Taylor expanded in C around 0 53.6%
associate-*r/53.6%
mul-1-neg53.6%
unpow253.6%
unpow253.6%
hypot-define79.4%
Simplified79.4%
if 7.4999999999999995e49 < C Initial program 16.5%
Taylor expanded in C around inf 81.5%
Taylor expanded in C around -inf 79.6%
distribute-rgt1-in79.6%
metadata-eval79.6%
neg-mul-179.6%
mul-1-neg79.6%
unsub-neg79.6%
mul0-lft79.6%
div079.6%
metadata-eval79.6%
neg-sub079.6%
mul-1-neg79.6%
associate-*r/79.6%
distribute-lft-out79.6%
associate-*r*79.6%
metadata-eval79.6%
associate-/l*81.7%
Simplified81.7%
Final simplification83.4%
(FPCore (A B C)
:precision binary64
(if (<= C -1.1e+43)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(if (<= C 3.9e+49)
(/ (* -180.0 (atan (/ (+ A (hypot A B)) B))) PI)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.1e+43) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else if (C <= 3.9e+49) {
tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.1e+43) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else if (C <= 3.9e+49) {
tmp = (-180.0 * Math.atan(((A + Math.hypot(A, B)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.1e+43: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi elif C <= 3.9e+49: tmp = (-180.0 * math.atan(((A + math.hypot(A, B)) / B))) / math.pi else: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.1e+43) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); elseif (C <= 3.9e+49) tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(A, B)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.1e+43) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; elseif (C <= 3.9e+49) tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / pi; else tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.1e+43], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.9e+49], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.1 \cdot 10^{+43}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.9 \cdot 10^{+49}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.1e43Initial program 68.4%
associate-*r/68.4%
Applied egg-rr96.8%
Taylor expanded in A around 0 68.4%
+-commutative68.4%
unpow268.4%
unpow268.4%
hypot-define95.3%
Simplified95.3%
if -1.1e43 < C < 3.9000000000000001e49Initial program 56.6%
associate-*r/56.5%
Applied egg-rr82.1%
Taylor expanded in C around 0 53.6%
mul-1-neg53.6%
distribute-neg-frac253.6%
unpow253.6%
unpow253.6%
hypot-define79.4%
Simplified79.4%
associate-/l*79.4%
distribute-frac-neg279.4%
atan-neg79.4%
Applied egg-rr79.4%
associate-*r/79.4%
distribute-rgt-neg-out79.4%
distribute-lft-neg-in79.4%
metadata-eval79.4%
Simplified79.4%
if 3.9000000000000001e49 < C Initial program 16.5%
Taylor expanded in C around inf 81.5%
Taylor expanded in C around -inf 79.6%
distribute-rgt1-in79.6%
metadata-eval79.6%
neg-mul-179.6%
mul-1-neg79.6%
unsub-neg79.6%
mul0-lft79.6%
div079.6%
metadata-eval79.6%
neg-sub079.6%
mul-1-neg79.6%
associate-*r/79.6%
distribute-lft-out79.6%
associate-*r*79.6%
metadata-eval79.6%
associate-/l*81.7%
Simplified81.7%
(FPCore (A B C)
:precision binary64
(if (<= C -8.8e+42)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(if (<= C 8.2e+49)
(/ (* -180.0 (atan (/ (+ A (hypot A B)) B))) PI)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8.8e+42) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else if (C <= 8.2e+49) {
tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -8.8e+42) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else if (C <= 8.2e+49) {
tmp = (-180.0 * Math.atan(((A + Math.hypot(A, B)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -8.8e+42: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) elif C <= 8.2e+49: tmp = (-180.0 * math.atan(((A + math.hypot(A, B)) / B))) / math.pi else: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -8.8e+42) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); elseif (C <= 8.2e+49) tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(A, B)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8.8e+42) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); elseif (C <= 8.2e+49) tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / pi; else tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8.8e+42], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.2e+49], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8.8 \cdot 10^{+42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.2 \cdot 10^{+49}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -8.8000000000000005e42Initial program 68.4%
Taylor expanded in A around 0 68.4%
+-commutative68.4%
unpow268.4%
unpow268.4%
hypot-define95.3%
Simplified95.3%
if -8.8000000000000005e42 < C < 8.2e49Initial program 56.6%
associate-*r/56.5%
Applied egg-rr82.1%
Taylor expanded in C around 0 53.6%
mul-1-neg53.6%
distribute-neg-frac253.6%
unpow253.6%
unpow253.6%
hypot-define79.4%
Simplified79.4%
associate-/l*79.4%
distribute-frac-neg279.4%
atan-neg79.4%
Applied egg-rr79.4%
associate-*r/79.4%
distribute-rgt-neg-out79.4%
distribute-lft-neg-in79.4%
metadata-eval79.4%
Simplified79.4%
if 8.2e49 < C Initial program 16.5%
Taylor expanded in C around inf 81.5%
Taylor expanded in C around -inf 79.6%
distribute-rgt1-in79.6%
metadata-eval79.6%
neg-mul-179.6%
mul-1-neg79.6%
unsub-neg79.6%
mul0-lft79.6%
div079.6%
metadata-eval79.6%
neg-sub079.6%
mul-1-neg79.6%
associate-*r/79.6%
distribute-lft-out79.6%
associate-*r*79.6%
metadata-eval79.6%
associate-/l*81.7%
Simplified81.7%
(FPCore (A B C)
:precision binary64
(if (<= A -6.4e+179)
(* (atan (* B (/ 0.5 A))) (/ 180.0 PI))
(if (<= A 1.06e-41)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+179) {
tmp = atan((B * (0.5 / A))) * (180.0 / ((double) M_PI));
} else if (A <= 1.06e-41) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+179) {
tmp = Math.atan((B * (0.5 / A))) * (180.0 / Math.PI);
} else if (A <= 1.06e-41) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.4e+179: tmp = math.atan((B * (0.5 / A))) * (180.0 / math.pi) elif A <= 1.06e-41: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.4e+179) tmp = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi)); elseif (A <= 1.06e-41) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.4e+179) tmp = atan((B * (0.5 / A))) * (180.0 / pi); elseif (A <= 1.06e-41) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.4e+179], N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.06e-41], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.4 \cdot 10^{+179}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 1.06 \cdot 10^{-41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.4000000000000003e179Initial program 8.0%
associate-*r/8.0%
Applied egg-rr59.2%
Taylor expanded in A around -inf 91.0%
Taylor expanded in B around 0 91.0%
associate-*r/91.0%
*-commutative91.0%
associate-/l*91.2%
associate-*r/91.2%
*-commutative91.2%
associate-/l*91.1%
Simplified91.1%
if -6.4000000000000003e179 < A < 1.06e-41Initial program 51.6%
Taylor expanded in A around 0 49.6%
+-commutative49.6%
unpow249.6%
unpow249.6%
hypot-define75.9%
Simplified75.9%
if 1.06e-41 < A Initial program 72.8%
Taylor expanded in B around inf 74.8%
Taylor expanded in C around 0 77.9%
neg-mul-177.9%
distribute-neg-in77.9%
metadata-eval77.9%
unsub-neg77.9%
Simplified77.9%
(FPCore (A B C) :precision binary64 (if (<= C 8.2e+49) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 8.2e+49) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 8.2e+49) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 8.2e+49: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 8.2e+49) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 8.2e+49) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 8.2e+49], 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[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 8.2 \cdot 10^{+49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 8.2e49Initial program 59.8%
associate-*l/59.8%
*-lft-identity59.8%
+-commutative59.8%
unpow259.8%
unpow259.8%
hypot-define86.1%
Simplified86.1%
if 8.2e49 < C Initial program 16.5%
Taylor expanded in C around inf 81.5%
Taylor expanded in C around -inf 79.6%
distribute-rgt1-in79.6%
metadata-eval79.6%
neg-mul-179.6%
mul-1-neg79.6%
unsub-neg79.6%
mul0-lft79.6%
div079.6%
metadata-eval79.6%
neg-sub079.6%
mul-1-neg79.6%
associate-*r/79.6%
distribute-lft-out79.6%
associate-*r*79.6%
metadata-eval79.6%
associate-/l*81.7%
Simplified81.7%
(FPCore (A B C) :precision binary64 (if (<= A -2.3e+113) (* (atan (* B (/ 0.5 A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e+113) {
tmp = atan((B * (0.5 / A))) * (180.0 / ((double) M_PI));
} 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 <= -2.3e+113) {
tmp = Math.atan((B * (0.5 / A))) * (180.0 / Math.PI);
} 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 <= -2.3e+113: tmp = math.atan((B * (0.5 / A))) * (180.0 / math.pi) 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 <= -2.3e+113) tmp = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.3e+113) tmp = atan((B * (0.5 / A))) * (180.0 / pi); 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, -2.3e+113], N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.3 \cdot 10^{+113}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.29999999999999997e113Initial program 16.3%
associate-*r/16.3%
Applied egg-rr59.5%
Taylor expanded in A around -inf 80.5%
Taylor expanded in B around 0 80.6%
associate-*r/80.5%
*-commutative80.5%
associate-/l*80.8%
associate-*r/80.8%
*-commutative80.8%
associate-/l*80.7%
Simplified80.7%
if -2.29999999999999997e113 < A Initial program 59.4%
Simplified83.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -2.3e-112)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -9.5e-220)
t_0
(if (<= B 6.8e-255)
(* 180.0 (/ (atan (- (/ A B))) PI))
(if (<= B 2e-125)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 2.5e-13) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -2.3e-112) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -9.5e-220) {
tmp = t_0;
} else if (B <= 6.8e-255) {
tmp = 180.0 * (atan(-(A / B)) / ((double) M_PI));
} else if (B <= 2e-125) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 2.5e-13) {
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((C / B)) / Math.PI);
double tmp;
if (B <= -2.3e-112) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -9.5e-220) {
tmp = t_0;
} else if (B <= 6.8e-255) {
tmp = 180.0 * (Math.atan(-(A / B)) / Math.PI);
} else if (B <= 2e-125) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 2.5e-13) {
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((C / B)) / math.pi) tmp = 0 if B <= -2.3e-112: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -9.5e-220: tmp = t_0 elif B <= 6.8e-255: tmp = 180.0 * (math.atan(-(A / B)) / math.pi) elif B <= 2e-125: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 2.5e-13: 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(C / B)) / pi)) tmp = 0.0 if (B <= -2.3e-112) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -9.5e-220) tmp = t_0; elseif (B <= 6.8e-255) tmp = Float64(180.0 * Float64(atan(Float64(-Float64(A / B))) / pi)); elseif (B <= 2e-125) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 2.5e-13) 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((C / B)) / pi); tmp = 0.0; if (B <= -2.3e-112) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -9.5e-220) tmp = t_0; elseif (B <= 6.8e-255) tmp = 180.0 * (atan(-(A / B)) / pi); elseif (B <= 2e-125) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 2.5e-13) 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[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.3e-112], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-220], t$95$0, If[LessEqual[B, 6.8e-255], N[(180.0 * N[(N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2e-125], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.5e-13], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.3 \cdot 10^{-112}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -9.5 \cdot 10^{-220}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-255}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-125}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.29999999999999991e-112Initial program 48.3%
Taylor expanded in B around -inf 57.2%
if -2.29999999999999991e-112 < B < -9.50000000000000062e-220 or 2.00000000000000002e-125 < B < 2.49999999999999995e-13Initial program 62.8%
Taylor expanded in B around inf 59.4%
Taylor expanded in C around inf 45.6%
if -9.50000000000000062e-220 < B < 6.79999999999999967e-255Initial program 69.0%
Taylor expanded in B around inf 58.8%
Taylor expanded in A around inf 55.7%
associate-*r/55.7%
mul-1-neg55.7%
Simplified55.7%
if 6.79999999999999967e-255 < B < 2.00000000000000002e-125Initial program 33.4%
associate-*r/33.4%
Applied egg-rr74.5%
Taylor expanded in C around inf 55.9%
distribute-rgt1-in55.9%
metadata-eval55.9%
mul0-lft55.9%
div055.9%
metadata-eval55.9%
Simplified55.9%
if 2.49999999999999995e-13 < B Initial program 49.9%
Taylor expanded in B around inf 64.1%
Final simplification56.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -8.2e-57)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(if (<= C 5.4e-305)
t_0
(if (<= C 4.6e-90)
(/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)
(if (<= C 2.75e-14) t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) C)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -8.2e-57) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 5.4e-305) {
tmp = t_0;
} else if (C <= 4.6e-90) {
tmp = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
} else if (C <= 2.75e-14) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
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 tmp;
if (C <= -8.2e-57) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else if (C <= 5.4e-305) {
tmp = t_0;
} else if (C <= 4.6e-90) {
tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
} else if (C <= 2.75e-14) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -8.2e-57: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) elif C <= 5.4e-305: tmp = t_0 elif C <= 4.6e-90: tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi elif C <= 2.75e-14: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -8.2e-57) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); elseif (C <= 5.4e-305) tmp = t_0; elseif (C <= 4.6e-90) tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); elseif (C <= 2.75e-14) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -8.2e-57) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); elseif (C <= 5.4e-305) tmp = t_0; elseif (C <= 4.6e-90) tmp = (180.0 * atan((1.0 - (A / B)))) / pi; elseif (C <= 2.75e-14) tmp = t_0; else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); 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]}, If[LessEqual[C, -8.2e-57], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.4e-305], t$95$0, If[LessEqual[C, 4.6e-90], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.75e-14], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -8.2 \cdot 10^{-57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.4 \cdot 10^{-305}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 4.6 \cdot 10^{-90}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.75 \cdot 10^{-14}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if C < -8.2000000000000003e-57Initial program 68.8%
Taylor expanded in B around inf 79.1%
Taylor expanded in A around 0 78.1%
if -8.2000000000000003e-57 < C < 5.3999999999999998e-305 or 4.5999999999999996e-90 < C < 2.74999999999999996e-14Initial program 57.2%
Taylor expanded in B around inf 58.8%
Taylor expanded in C around 0 57.5%
neg-mul-157.5%
distribute-neg-in57.5%
metadata-eval57.5%
unsub-neg57.5%
Simplified57.5%
if 5.3999999999999998e-305 < C < 4.5999999999999996e-90Initial program 58.7%
associate-*r/58.6%
Applied egg-rr83.6%
Taylor expanded in C around 0 58.8%
mul-1-neg58.8%
distribute-neg-frac258.8%
unpow258.8%
unpow258.8%
hypot-define83.7%
Simplified83.7%
Taylor expanded in B around -inf 66.8%
mul-1-neg66.8%
unsub-neg66.8%
Simplified66.8%
if 2.74999999999999996e-14 < C Initial program 20.0%
associate-*r/20.0%
Applied egg-rr52.6%
Taylor expanded in C around inf 59.3%
distribute-rgt1-in59.3%
metadata-eval59.3%
Simplified59.3%
Taylor expanded in B around 0 69.0%
associate-*r/69.1%
*-commutative69.1%
associate-/l*69.2%
*-commutative69.2%
associate-*l/69.2%
Simplified69.2%
Final simplification68.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -3.8e-110)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4e-200)
t_0
(if (<= B 3.6e-125)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 5.6e-13) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -3.8e-110) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4e-200) {
tmp = t_0;
} else if (B <= 3.6e-125) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 5.6e-13) {
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((C / B)) / Math.PI);
double tmp;
if (B <= -3.8e-110) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4e-200) {
tmp = t_0;
} else if (B <= 3.6e-125) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 5.6e-13) {
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((C / B)) / math.pi) tmp = 0 if B <= -3.8e-110: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4e-200: tmp = t_0 elif B <= 3.6e-125: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 5.6e-13: 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(C / B)) / pi)) tmp = 0.0 if (B <= -3.8e-110) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4e-200) tmp = t_0; elseif (B <= 3.6e-125) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 5.6e-13) 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((C / B)) / pi); tmp = 0.0; if (B <= -3.8e-110) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4e-200) tmp = t_0; elseif (B <= 3.6e-125) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 5.6e-13) 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[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.8e-110], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4e-200], t$95$0, If[LessEqual[B, 3.6e-125], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5.6e-13], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -3.8 \cdot 10^{-110}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-125}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 5.6 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.7999999999999998e-110Initial program 48.3%
Taylor expanded in B around -inf 57.2%
if -3.7999999999999998e-110 < B < -3.9999999999999999e-200 or 3.6000000000000002e-125 < B < 5.6000000000000004e-13Initial program 66.8%
Taylor expanded in B around inf 63.4%
Taylor expanded in C around inf 48.5%
if -3.9999999999999999e-200 < B < 3.6000000000000002e-125Initial program 50.4%
associate-*r/50.3%
Applied egg-rr82.9%
Taylor expanded in C around inf 42.5%
distribute-rgt1-in42.5%
metadata-eval42.5%
mul0-lft42.5%
div042.5%
metadata-eval42.5%
Simplified42.5%
if 5.6000000000000004e-13 < B Initial program 49.9%
Taylor expanded in B around inf 64.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B 3.1e-254)
t_0
(if (<= B 3.7e-125)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= B 2.3e-13) t_0 (* 180.0 (/ (atan (- -1.0 (/ A 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 <= 3.1e-254) {
tmp = t_0;
} else if (B <= 3.7e-125) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (B <= 2.3e-13) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= 3.1e-254) {
tmp = t_0;
} else if (B <= 3.7e-125) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (B <= 2.3e-13) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / 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 <= 3.1e-254: tmp = t_0 elif B <= 3.7e-125: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif B <= 2.3e-13: tmp = t_0 else: tmp = 180.0 * (math.atan((-1.0 - (A / 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 <= 3.1e-254) tmp = t_0; elseif (B <= 3.7e-125) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (B <= 2.3e-13) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / 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 <= 3.1e-254) tmp = t_0; elseif (B <= 3.7e-125) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (B <= 2.3e-13) tmp = t_0; else tmp = 180.0 * (atan((-1.0 - (A / 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, 3.1e-254], t$95$0, If[LessEqual[B, 3.7e-125], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.3e-13], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $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 3.1 \cdot 10^{-254}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-125}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 3.09999999999999988e-254 or 3.6999999999999999e-125 < B < 2.29999999999999979e-13Initial program 56.7%
Taylor expanded in B around -inf 64.9%
associate--l+64.9%
div-sub66.9%
Simplified66.9%
if 3.09999999999999988e-254 < B < 3.6999999999999999e-125Initial program 33.4%
Taylor expanded in A around -inf 56.2%
associate-*r/56.2%
Simplified56.2%
if 2.29999999999999979e-13 < B Initial program 49.9%
Taylor expanded in B around inf 82.6%
Taylor expanded in C around 0 74.9%
neg-mul-174.9%
distribute-neg-in74.9%
metadata-eval74.9%
unsub-neg74.9%
Simplified74.9%
Final simplification68.2%
(FPCore (A B C)
:precision binary64
(if (<= B 3e-252)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 3.6e-125)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan (/ (- (- C B) A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3e-252) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 3.6e-125) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3e-252) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 3.6e-125) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3e-252: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 3.6e-125: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3e-252) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 3.6e-125) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3e-252) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 3.6e-125) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan((((C - B) - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3e-252], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-125], 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[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3 \cdot 10^{-252}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-125}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 2.99999999999999995e-252Initial program 53.2%
Taylor expanded in B around -inf 64.4%
associate--l+64.4%
div-sub66.7%
Simplified66.7%
if 2.99999999999999995e-252 < B < 3.6000000000000002e-125Initial program 33.4%
Taylor expanded in A around -inf 56.2%
associate-*r/56.2%
Simplified56.2%
if 3.6000000000000002e-125 < B Initial program 56.3%
Taylor expanded in B around inf 81.4%
Taylor expanded in B around 0 81.4%
mul-1-neg81.4%
unsub-neg81.4%
Simplified81.4%
Final simplification71.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1e-38)
(* (atan (* B (/ 0.5 A))) (/ 180.0 PI))
(if (<= A 1.7e-135)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1e-38) {
tmp = atan((B * (0.5 / A))) * (180.0 / ((double) M_PI));
} else if (A <= 1.7e-135) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1e-38) {
tmp = Math.atan((B * (0.5 / A))) * (180.0 / Math.PI);
} else if (A <= 1.7e-135) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1e-38: tmp = math.atan((B * (0.5 / A))) * (180.0 / math.pi) elif A <= 1.7e-135: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1e-38) tmp = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi)); elseif (A <= 1.7e-135) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1e-38) tmp = atan((B * (0.5 / A))) * (180.0 / pi); elseif (A <= 1.7e-135) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1e-38], N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.7e-135], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1 \cdot 10^{-38}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 1.7 \cdot 10^{-135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.9999999999999996e-39Initial program 24.7%
associate-*r/24.7%
Applied egg-rr63.9%
Taylor expanded in A around -inf 62.4%
Taylor expanded in B around 0 62.5%
associate-*r/62.4%
*-commutative62.4%
associate-/l*62.6%
associate-*r/62.6%
*-commutative62.6%
associate-/l*62.5%
Simplified62.5%
if -9.9999999999999996e-39 < A < 1.69999999999999995e-135Initial program 58.2%
Taylor expanded in B around inf 55.5%
Taylor expanded in A around 0 54.1%
if 1.69999999999999995e-135 < A Initial program 69.9%
Taylor expanded in B around inf 70.7%
Taylor expanded in C around 0 73.1%
neg-mul-173.1%
distribute-neg-in73.1%
metadata-eval73.1%
unsub-neg73.1%
Simplified73.1%
Final simplification63.3%
(FPCore (A B C)
:precision binary64
(if (<= A -5.4e-42)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 7.6e-134)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e-42) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 7.6e-134) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e-42) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 7.6e-134) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.4e-42: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 7.6e-134: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.4e-42) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 7.6e-134) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.4e-42) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 7.6e-134) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.4e-42], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.6e-134], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.4 \cdot 10^{-42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.6 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.39999999999999998e-42Initial program 24.7%
Taylor expanded in A around -inf 62.5%
associate-*r/62.5%
Simplified62.5%
if -5.39999999999999998e-42 < A < 7.60000000000000006e-134Initial program 58.2%
Taylor expanded in B around inf 55.5%
Taylor expanded in A around 0 54.1%
if 7.60000000000000006e-134 < A Initial program 69.9%
Taylor expanded in B around inf 70.7%
Taylor expanded in C around 0 73.1%
neg-mul-173.1%
distribute-neg-in73.1%
metadata-eval73.1%
unsub-neg73.1%
Simplified73.1%
Final simplification63.3%
(FPCore (A B C)
:precision binary64
(if (<= C -1.2e-57)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(if (<= C 2.7e-18)
(* 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 <= -1.2e-57) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 2.7e-18) {
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 <= -1.2e-57) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else if (C <= 2.7e-18) {
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 <= -1.2e-57: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) elif C <= 2.7e-18: 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 <= -1.2e-57) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); elseif (C <= 2.7e-18) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.2e-57) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); elseif (C <= 2.7e-18) 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, -1.2e-57], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.7e-18], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.2 \cdot 10^{-57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.7 \cdot 10^{-18}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.20000000000000003e-57Initial program 68.8%
Taylor expanded in B around inf 79.1%
Taylor expanded in A around 0 78.1%
if -1.20000000000000003e-57 < C < 2.69999999999999989e-18Initial program 57.7%
Taylor expanded in B around inf 50.6%
Taylor expanded in C around 0 49.8%
neg-mul-149.8%
distribute-neg-in49.8%
metadata-eval49.8%
unsub-neg49.8%
Simplified49.8%
if 2.69999999999999989e-18 < C Initial program 20.0%
Taylor expanded in C around inf 69.0%
Taylor expanded in B around inf 42.0%
distribute-rgt1-in42.0%
metadata-eval42.0%
mul0-lft42.0%
div069.0%
metadata-eval69.0%
neg-sub069.0%
associate-*r/69.0%
metadata-eval69.0%
distribute-neg-frac69.0%
metadata-eval69.0%
Simplified69.0%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= C -6.8e+99)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 3.1e-20)
(* 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 <= -6.8e+99) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 3.1e-20) {
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 <= -6.8e+99) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 3.1e-20) {
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 <= -6.8e+99: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 3.1e-20: 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 <= -6.8e+99) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 3.1e-20) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -6.8e+99) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 3.1e-20) 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, -6.8e+99], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.1e-20], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6.8 \cdot 10^{+99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.1 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -6.79999999999999968e99Initial program 73.8%
Taylor expanded in B around inf 76.2%
Taylor expanded in C around inf 68.4%
if -6.79999999999999968e99 < C < 3.1e-20Initial program 59.1%
Taylor expanded in B around inf 58.6%
Taylor expanded in C around 0 54.0%
neg-mul-154.0%
distribute-neg-in54.0%
metadata-eval54.0%
unsub-neg54.0%
Simplified54.0%
if 3.1e-20 < C Initial program 20.0%
Taylor expanded in C around inf 69.0%
Taylor expanded in B around inf 42.0%
distribute-rgt1-in42.0%
metadata-eval42.0%
mul0-lft42.0%
div069.0%
metadata-eval69.0%
neg-sub069.0%
associate-*r/69.0%
metadata-eval69.0%
distribute-neg-frac69.0%
metadata-eval69.0%
Simplified69.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1.36e-103)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.18e-126)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.36e-103) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.18e-126) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.36e-103) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.18e-126) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.36e-103: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.18e-126: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.36e-103) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.18e-126) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.36e-103) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.18e-126) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.36e-103], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.18e-126], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.36 \cdot 10^{-103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.18 \cdot 10^{-126}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.36000000000000006e-103Initial program 49.5%
Taylor expanded in B around -inf 58.6%
if -1.36000000000000006e-103 < B < 1.1799999999999999e-126Initial program 51.0%
associate-*r/50.9%
Applied egg-rr79.5%
Taylor expanded in C around inf 37.0%
distribute-rgt1-in37.0%
metadata-eval37.0%
mul0-lft37.0%
div037.0%
metadata-eval37.0%
Simplified37.0%
if 1.1799999999999999e-126 < B Initial program 55.8%
Taylor expanded in B around inf 54.3%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 52.9%
Taylor expanded in B around -inf 41.0%
if -4.999999999999985e-310 < B Initial program 51.9%
Taylor expanded in B around inf 42.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 52.4%
Taylor expanded in B around inf 22.9%
herbie shell --seed 2024136
(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)))