
(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 31 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -1.5e+120) (* (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 <= -1.5e+120) {
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 <= -1.5e+120) {
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 <= -1.5e+120: 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 <= -1.5e+120) tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+120) 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, -1.5e+120], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+120}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.5e120Initial program 15.7%
Taylor expanded in A around -inf 75.8%
associate-*r/75.8%
Simplified75.8%
Taylor expanded in B around 0 75.8%
associate-*r/76.1%
*-commutative76.1%
associate-/l*76.3%
*-commutative76.3%
associate-*l/76.3%
Simplified76.3%
if -1.5e120 < A Initial program 62.7%
associate-*l/62.7%
*-lft-identity62.7%
+-commutative62.7%
unpow262.7%
unpow262.7%
hypot-define82.9%
Simplified82.9%
Final simplification82.0%
(FPCore (A B C) :precision binary64 (if (<= A -8e+118) (* (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 <= -8e+118) {
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 <= -8e+118) {
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 <= -8e+118: 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 <= -8e+118) tmp = Float64(atan(Float64(Float64(B * 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 <= -8e+118) 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, -8e+118], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $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 -8 \cdot 10^{+118}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot 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 < -7.99999999999999973e118Initial program 18.2%
Taylor expanded in A around -inf 76.5%
associate-*r/76.5%
Simplified76.5%
Taylor expanded in B around 0 76.5%
associate-*r/76.8%
*-commutative76.8%
associate-/l*77.0%
*-commutative77.0%
associate-*l/77.0%
Simplified77.0%
if -7.99999999999999973e118 < A Initial program 62.6%
Simplified82.4%
Final simplification81.7%
(FPCore (A B C) :precision binary64 (if (<= C 4.2e+173) (* 180.0 (/ 1.0 (/ PI (atan (- 1.0 (/ (- A C) B)))))) (* 180.0 (pow (/ PI (atan (* 0.5 (/ B A)))) -1.0))))
double code(double A, double B, double C) {
double tmp;
if (C <= 4.2e+173) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan((1.0 - ((A - C) / B)))));
} else {
tmp = 180.0 * pow((((double) M_PI) / atan((0.5 * (B / A)))), -1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 4.2e+173) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan((1.0 - ((A - C) / B)))));
} else {
tmp = 180.0 * Math.pow((Math.PI / Math.atan((0.5 * (B / A)))), -1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 4.2e+173: tmp = 180.0 * (1.0 / (math.pi / math.atan((1.0 - ((A - C) / B))))) else: tmp = 180.0 * math.pow((math.pi / math.atan((0.5 * (B / A)))), -1.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 4.2e+173) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(1.0 - Float64(Float64(A - C) / B)))))); else tmp = Float64(180.0 * (Float64(pi / atan(Float64(0.5 * Float64(B / A)))) ^ -1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 4.2e+173) tmp = 180.0 * (1.0 / (pi / atan((1.0 - ((A - C) / B))))); else tmp = 180.0 * ((pi / atan((0.5 * (B / A)))) ^ -1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 4.2e+173], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[Power[N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 4.2 \cdot 10^{+173}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot {\left(\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}\right)}^{-1}\\
\end{array}
\end{array}
if C < 4.2e173Initial program 60.5%
Taylor expanded in B around -inf 55.0%
associate--l+55.0%
div-sub56.3%
Simplified56.3%
clear-num56.3%
inv-pow56.3%
+-commutative56.3%
Applied egg-rr56.3%
unpow-156.3%
+-commutative56.3%
Simplified56.3%
if 4.2e173 < C Initial program 9.2%
Taylor expanded in A around -inf 22.2%
associate-*r/22.2%
Simplified22.2%
clear-num34.4%
inv-pow34.4%
associate-/l*34.4%
Applied egg-rr34.4%
Final simplification54.7%
(FPCore (A B C) :precision binary64 (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI))
double code(double A, double B, double C) {
return (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
}
public static double code(double A, double B, double C) {
return (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
}
def code(A, B, C): return (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi
function code(A, B, C) return Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi) end
function tmp = code(A, B, C) tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; end
code[A_, B_, C_] := N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]
\begin{array}{l}
\\
\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}
\end{array}
Initial program 56.7%
associate-*r/56.7%
associate-*l/56.7%
*-un-lft-identity56.7%
unpow256.7%
unpow256.7%
hypot-define78.2%
Applied egg-rr78.2%
Final simplification78.2%
(FPCore (A B C) :precision binary64 (* (atan (/ (+ A (hypot A B)) B)) (/ -180.0 PI)))
double code(double A, double B, double C) {
return atan(((A + hypot(A, B)) / B)) * (-180.0 / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return Math.atan(((A + Math.hypot(A, B)) / B)) * (-180.0 / Math.PI);
}
def code(A, B, C): return math.atan(((A + math.hypot(A, B)) / B)) * (-180.0 / math.pi)
function code(A, B, C) return Float64(atan(Float64(Float64(A + hypot(A, B)) / B)) * Float64(-180.0 / pi)) end
function tmp = code(A, B, C) tmp = atan(((A + hypot(A, B)) / B)) * (-180.0 / pi); end
code[A_, B_, C_] := N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(-180.0 / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right) \cdot \frac{-180}{\pi}
\end{array}
Initial program 56.7%
associate-*r/56.7%
associate-*l/56.7%
*-un-lft-identity56.7%
unpow256.7%
unpow256.7%
hypot-define78.2%
Applied egg-rr78.2%
clear-num78.2%
inv-pow78.2%
associate--l-75.8%
Applied egg-rr75.8%
Simplified78.1%
Taylor expanded in C around 0 47.7%
associate-*r/47.7%
mul-1-neg47.7%
+-commutative47.7%
unpow247.7%
unpow247.7%
hypot-undefine63.8%
distribute-neg-frac63.8%
distribute-neg-frac263.8%
Simplified63.8%
frac-2neg63.8%
metadata-eval63.8%
div-inv63.8%
distribute-neg-frac263.8%
add-sqr-sqrt29.9%
sqrt-unprod20.0%
sqr-neg20.0%
sqrt-prod4.2%
add-sqr-sqrt6.2%
atan-neg6.2%
distribute-frac-neg26.2%
clear-num6.2%
Applied egg-rr63.8%
neg-mul-163.8%
distribute-rgt-neg-in63.8%
hypot-undefine47.7%
unpow247.7%
unpow247.7%
+-commutative47.7%
unpow247.7%
unpow247.7%
hypot-define63.8%
distribute-neg-frac63.8%
metadata-eval63.8%
Simplified63.8%
Final simplification63.8%
(FPCore (A B C) :precision binary64 (if (<= C 6400.0) (* 180.0 (/ 1.0 (/ PI (atan (- 1.0 (/ (- A C) B)))))) (/ (* 180.0 (atan (/ (+ (* -0.5 (* B (/ B C))) (* A 0.0)) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 6400.0) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan((1.0 - ((A - C) / B)))));
} else {
tmp = (180.0 * atan((((-0.5 * (B * (B / C))) + (A * 0.0)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 6400.0) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan((1.0 - ((A - C) / B)))));
} else {
tmp = (180.0 * Math.atan((((-0.5 * (B * (B / C))) + (A * 0.0)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 6400.0: tmp = 180.0 * (1.0 / (math.pi / math.atan((1.0 - ((A - C) / B))))) else: tmp = (180.0 * math.atan((((-0.5 * (B * (B / C))) + (A * 0.0)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 6400.0) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(1.0 - Float64(Float64(A - C) / B)))))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-0.5 * Float64(B * Float64(B / C))) + Float64(A * 0.0)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 6400.0) tmp = 180.0 * (1.0 / (pi / atan((1.0 - ((A - C) / B))))); else tmp = (180.0 * atan((((-0.5 * (B * (B / C))) + (A * 0.0)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 6400.0], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(-0.5 * N[(B * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(A * 0.0), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 6400:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5 \cdot \left(B \cdot \frac{B}{C}\right) + A \cdot 0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < 6400Initial program 63.7%
Taylor expanded in B around -inf 59.4%
associate--l+59.4%
div-sub60.4%
Simplified60.4%
clear-num60.4%
inv-pow60.4%
+-commutative60.4%
Applied egg-rr60.4%
unpow-160.4%
+-commutative60.4%
Simplified60.4%
if 6400 < C Initial program 30.4%
associate-*r/30.4%
associate-*l/30.4%
*-un-lft-identity30.4%
unpow230.4%
unpow230.4%
hypot-define59.4%
Applied egg-rr59.4%
Taylor expanded in C around inf 65.9%
distribute-rgt1-in65.9%
metadata-eval65.9%
Simplified65.9%
unpow265.9%
*-un-lft-identity65.9%
times-frac69.3%
Applied egg-rr69.3%
Final simplification62.3%
(FPCore (A B C) :precision binary64 (if (<= C 7500.0) (* 180.0 (/ 1.0 (/ PI (atan (- 1.0 (/ (- A C) B)))))) (* 180.0 (/ (atan (+ (/ (- A A) B) (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 7500.0) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan((1.0 - ((A - C) / B)))));
} else {
tmp = 180.0 * (atan((((A - A) / B) + (-0.5 * (B / C)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 7500.0) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan((1.0 - ((A - C) / B)))));
} else {
tmp = 180.0 * (Math.atan((((A - A) / B) + (-0.5 * (B / C)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 7500.0: tmp = 180.0 * (1.0 / (math.pi / math.atan((1.0 - ((A - C) / B))))) else: tmp = 180.0 * (math.atan((((A - A) / B) + (-0.5 * (B / C)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 7500.0) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(1.0 - Float64(Float64(A - C) / B)))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(A - A) / B) + Float64(-0.5 * Float64(B / C)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 7500.0) tmp = 180.0 * (1.0 / (pi / atan((1.0 - ((A - C) / B))))); else tmp = 180.0 * (atan((((A - A) / B) + (-0.5 * (B / C)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 7500.0], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(A - A), $MachinePrecision] / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 7500:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 7500Initial program 63.7%
Taylor expanded in B around -inf 59.4%
associate--l+59.4%
div-sub60.4%
Simplified60.4%
clear-num60.4%
inv-pow60.4%
+-commutative60.4%
Applied egg-rr60.4%
unpow-160.4%
+-commutative60.4%
Simplified60.4%
if 7500 < C Initial program 30.4%
Taylor expanded in C around inf 68.6%
Final simplification62.1%
(FPCore (A B C) :precision binary64 (if (<= C 6800.0) (* 180.0 (/ 1.0 (/ PI (atan (- 1.0 (/ (- A C) B)))))) (/ (* 180.0 (atan (+ (/ (- A A) B) (* -0.5 (/ B C))))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 6800.0) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan((1.0 - ((A - C) / B)))));
} else {
tmp = (180.0 * atan((((A - A) / B) + (-0.5 * (B / C))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 6800.0) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan((1.0 - ((A - C) / B)))));
} else {
tmp = (180.0 * Math.atan((((A - A) / B) + (-0.5 * (B / C))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 6800.0: tmp = 180.0 * (1.0 / (math.pi / math.atan((1.0 - ((A - C) / B))))) else: tmp = (180.0 * math.atan((((A - A) / B) + (-0.5 * (B / C))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 6800.0) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(1.0 - Float64(Float64(A - C) / B)))))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(A - A) / B) + Float64(-0.5 * Float64(B / C))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 6800.0) tmp = 180.0 * (1.0 / (pi / atan((1.0 - ((A - C) / B))))); else tmp = (180.0 * atan((((A - A) / B) + (-0.5 * (B / C))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 6800.0], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(A - A), $MachinePrecision] / B), $MachinePrecision] + N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 6800:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A - A}{B} + -0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 6800Initial program 63.7%
Taylor expanded in B around -inf 59.4%
associate--l+59.4%
div-sub60.4%
Simplified60.4%
clear-num60.4%
inv-pow60.4%
+-commutative60.4%
Applied egg-rr60.4%
unpow-160.4%
+-commutative60.4%
Simplified60.4%
if 6800 < C Initial program 30.4%
associate-*r/30.4%
associate-*l/30.4%
*-un-lft-identity30.4%
unpow230.4%
unpow230.4%
hypot-define59.4%
Applied egg-rr59.4%
Taylor expanded in C around inf 68.5%
Final simplification62.1%
(FPCore (A B C) :precision binary64 (if (<= B 1.3e-154) (* 180.0 (/ 1.0 (/ PI (atan (- 1.0 (/ (- A C) B)))))) (/ (* 180.0 (atan (+ (/ C B) (- -1.0 (/ A B))))) PI)))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.3e-154) {
tmp = 180.0 * (1.0 / (((double) M_PI) / atan((1.0 - ((A - C) / B)))));
} else {
tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1.3e-154) {
tmp = 180.0 * (1.0 / (Math.PI / Math.atan((1.0 - ((A - C) / B)))));
} else {
tmp = (180.0 * Math.atan(((C / B) + (-1.0 - (A / B))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.3e-154: tmp = 180.0 * (1.0 / (math.pi / math.atan((1.0 - ((A - C) / B))))) else: tmp = (180.0 * math.atan(((C / B) + (-1.0 - (A / B))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1.3e-154) tmp = Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(1.0 - Float64(Float64(A - C) / B)))))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1.3e-154) tmp = 180.0 * (1.0 / (pi / atan((1.0 - ((A - C) / B))))); else tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.3e-154], N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.3 \cdot 10^{-154}:\\
\;\;\;\;180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.3e-154Initial program 55.9%
Taylor expanded in B around -inf 64.2%
associate--l+64.2%
div-sub66.8%
Simplified66.8%
clear-num66.8%
inv-pow66.8%
+-commutative66.8%
Applied egg-rr66.8%
unpow-166.8%
+-commutative66.8%
Simplified66.8%
if 1.3e-154 < B Initial program 57.9%
associate-*r/58.0%
associate-*l/58.0%
*-un-lft-identity58.0%
unpow258.0%
unpow258.0%
hypot-define81.2%
Applied egg-rr81.2%
Taylor expanded in B around inf 75.7%
Final simplification70.4%
(FPCore (A B C) :precision binary64 (if (<= B 4.6e-282) (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)) (* 180.0 (/ (atan (/ (+ A B) (- B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 4.6e-282) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + B) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 4.6e-282) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + B) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 4.6e-282: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A + B) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 4.6e-282) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + B) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 4.6e-282) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A + B) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 4.6e-282], 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[(N[(A + B), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 4.6 \cdot 10^{-282}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + B}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 4.5999999999999998e-282Initial program 56.3%
Taylor expanded in B around -inf 69.7%
associate--l+69.7%
div-sub72.0%
Simplified72.0%
Taylor expanded in C around inf 61.6%
if 4.5999999999999998e-282 < B Initial program 57.1%
Taylor expanded in C around 0 51.0%
mul-1-neg51.0%
distribute-neg-frac251.0%
+-commutative51.0%
unpow251.0%
unpow251.0%
hypot-define65.5%
Simplified65.5%
Taylor expanded in A around 0 60.4%
Final simplification61.0%
(FPCore (A B C) :precision binary64 (if (<= B -5.4e-101) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.4e-101) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.4e-101) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.4e-101: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.4e-101) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.4e-101) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.4e-101], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.4 \cdot 10^{-101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.4000000000000003e-101Initial program 50.5%
Taylor expanded in B around -inf 53.6%
if -5.4000000000000003e-101 < B Initial program 60.1%
Taylor expanded in A around inf 27.1%
Final simplification36.5%
(FPCore (A B C) :precision binary64 (if (<= B -6.5e-302) (* 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 (B <= -6.5e-302) {
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 (B <= -6.5e-302) {
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 B <= -6.5e-302: 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 (B <= -6.5e-302) 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 (B <= -6.5e-302) 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[B, -6.5e-302], 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}\;B \leq -6.5 \cdot 10^{-302}:\\
\;\;\;\;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 B < -6.4999999999999995e-302Initial program 55.3%
Taylor expanded in B around -inf 44.9%
if -6.4999999999999995e-302 < B Initial program 58.0%
associate-*r/58.0%
associate-*l/58.0%
*-un-lft-identity58.0%
unpow258.0%
unpow258.0%
hypot-define80.8%
Applied egg-rr80.8%
Taylor expanded in C around inf 28.2%
Taylor expanded in A around inf 28.2%
Final simplification36.2%
(FPCore (A B C) :precision binary64 (if (<= B -1.7e-85) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan (* (/ C B) 2.0)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.7e-85) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.7e-85) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.7e-85: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.7e-85) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.7e-85) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.7e-85], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.7 \cdot 10^{-85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.7e-85Initial program 50.5%
Taylor expanded in B around -inf 54.5%
if -1.7e-85 < B Initial program 60.0%
Taylor expanded in C around -inf 27.2%
Final simplification36.7%
(FPCore (A B C) :precision binary64 (if (<= B 5.5e-283) (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)) (* (/ 180.0 PI) (atan (- -1.0 (/ A B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5.5e-283) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 5.5e-283) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5.5e-283: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5.5e-283) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 5.5e-283) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5.5e-283], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 5.5 \cdot 10^{-283}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if B < 5.49999999999999953e-283Initial program 56.3%
Taylor expanded in B around -inf 69.7%
associate--l+69.7%
div-sub72.0%
Simplified72.0%
Taylor expanded in C around inf 61.6%
if 5.49999999999999953e-283 < B Initial program 57.1%
Taylor expanded in C around 0 51.0%
mul-1-neg51.0%
distribute-neg-frac251.0%
+-commutative51.0%
unpow251.0%
unpow251.0%
hypot-define65.5%
Simplified65.5%
Taylor expanded in A around 0 60.4%
Taylor expanded in A around 0 60.4%
associate-*r/60.4%
neg-mul-160.4%
distribute-frac-neg260.4%
*-commutative60.4%
associate-/l*60.4%
distribute-frac-neg260.4%
distribute-neg-frac60.4%
+-commutative60.4%
distribute-neg-in60.4%
unsub-neg60.4%
div-sub60.4%
distribute-frac-neg60.4%
*-inverses60.4%
metadata-eval60.4%
Simplified60.4%
Final simplification61.0%
(FPCore (A B C) :precision binary64 (if (<= B 3.3e-109) (* 180.0 (/ (atan (- 1.0 (/ A B))) PI)) (* (atan (/ (* B 0.5) A)) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.3e-109) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = atan(((B * 0.5) / A)) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.3e-109) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = Math.atan(((B * 0.5) / A)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.3e-109: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = math.atan(((B * 0.5) / A)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.3e-109) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(atan(Float64(Float64(B * 0.5) / A)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.3e-109) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = atan(((B * 0.5) / A)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.3e-109], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.3 \cdot 10^{-109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if B < 3.2999999999999999e-109Initial program 57.3%
Taylor expanded in C around 0 46.4%
mul-1-neg46.4%
distribute-neg-frac246.4%
+-commutative46.4%
unpow246.4%
unpow246.4%
hypot-define60.2%
Simplified60.2%
Taylor expanded in B around -inf 54.9%
mul-1-neg54.9%
unsub-neg54.9%
Simplified54.9%
if 3.2999999999999999e-109 < B Initial program 55.5%
Taylor expanded in A around -inf 23.6%
associate-*r/23.6%
Simplified23.6%
Taylor expanded in B around 0 23.6%
associate-*r/23.7%
*-commutative23.7%
associate-/l*23.7%
*-commutative23.7%
associate-*l/23.7%
Simplified23.7%
Final simplification43.9%
(FPCore (A B C) :precision binary64 (if (<= B 3.7e-109) (* 180.0 (/ (atan (- 1.0 (/ A B))) PI)) (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.7e-109) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.7e-109) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.7e-109: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.7e-109) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.7e-109) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = (180.0 / pi) * atan((0.5 * (B / A))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.7e-109], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.7 \cdot 10^{-109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\end{array}
\end{array}
if B < 3.69999999999999981e-109Initial program 57.3%
Taylor expanded in C around 0 46.4%
mul-1-neg46.4%
distribute-neg-frac246.4%
+-commutative46.4%
unpow246.4%
unpow246.4%
hypot-define60.2%
Simplified60.2%
Taylor expanded in B around -inf 54.9%
mul-1-neg54.9%
unsub-neg54.9%
Simplified54.9%
if 3.69999999999999981e-109 < B Initial program 55.5%
associate-*r/55.6%
associate-*l/55.6%
*-un-lft-identity55.6%
unpow255.6%
unpow255.6%
hypot-define81.9%
Applied egg-rr81.9%
clear-num81.9%
inv-pow81.9%
associate--l-79.9%
Applied egg-rr79.9%
Simplified81.9%
Taylor expanded in A around -inf 23.7%
associate-*r/23.7%
Simplified23.7%
associate-/r/23.7%
clear-num23.7%
associate-/l*23.7%
Applied egg-rr23.7%
Final simplification43.9%
(FPCore (A B C) :precision binary64 (if (<= B 8.2e-283) (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)) (* (/ 180.0 PI) (atan (* B (/ -0.5 C))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 8.2e-283) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} 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 tmp;
if (B <= 8.2e-283) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / C)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 8.2e-283: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / C))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 8.2e-283) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 8.2e-283) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = (180.0 / pi) * atan((B * (-0.5 / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 8.2e-283], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 8.2 \cdot 10^{-283}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\
\end{array}
\end{array}
if B < 8.19999999999999973e-283Initial program 56.3%
Taylor expanded in B around -inf 69.7%
associate--l+69.7%
div-sub72.0%
Simplified72.0%
Taylor expanded in C around inf 61.6%
if 8.19999999999999973e-283 < B Initial program 57.1%
associate-*r/57.1%
associate-*l/57.1%
*-un-lft-identity57.1%
unpow257.1%
unpow257.1%
hypot-define80.0%
Applied egg-rr80.0%
Taylor expanded in C around inf 29.2%
Taylor expanded in A around 0 29.2%
Simplified29.1%
Final simplification45.3%
(FPCore (A B C) :precision binary64 (if (<= B 5.5e-281) (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)) (/ 180.0 (/ PI (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5.5e-281) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 5.5e-281) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5.5e-281: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5.5e-281) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 5.5e-281) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5.5e-281], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 5.5 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if B < 5.5000000000000003e-281Initial program 56.3%
Taylor expanded in B around -inf 69.7%
associate--l+69.7%
div-sub72.0%
Simplified72.0%
Taylor expanded in C around inf 61.6%
if 5.5000000000000003e-281 < B Initial program 57.1%
associate-*r/57.1%
associate-*l/57.1%
*-un-lft-identity57.1%
unpow257.1%
unpow257.1%
hypot-define80.0%
Applied egg-rr80.0%
Taylor expanded in C around inf 25.4%
distribute-rgt1-in25.4%
metadata-eval25.4%
Simplified25.4%
clear-num25.4%
inv-pow25.4%
Applied egg-rr25.4%
unpow-125.4%
associate-/r*25.4%
metadata-eval25.4%
associate-/l/24.5%
unpow224.5%
times-frac29.8%
*-inverses29.8%
*-lft-identity29.8%
Simplified29.8%
Final simplification45.6%
(FPCore (A B C) :precision binary64 (if (<= B 3.6e-280) (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)) (/ (* 180.0 (atan (* B (/ -0.5 C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.6e-280) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((B * (-0.5 / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.6e-280) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((B * (-0.5 / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.6e-280: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = (180.0 * math.atan((B * (-0.5 / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.6e-280) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(-0.5 / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.6e-280) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = (180.0 * atan((B * (-0.5 / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.6e-280], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.6 \cdot 10^{-280}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if B < 3.59999999999999994e-280Initial program 56.3%
Taylor expanded in B around -inf 69.7%
associate--l+69.7%
div-sub72.0%
Simplified72.0%
Taylor expanded in C around inf 61.6%
if 3.59999999999999994e-280 < B Initial program 57.1%
associate-*r/57.1%
associate-*l/57.1%
*-un-lft-identity57.1%
unpow257.1%
unpow257.1%
hypot-define80.0%
Applied egg-rr80.0%
Taylor expanded in C around inf 29.2%
Taylor expanded in A around inf 29.2%
associate-*r/29.2%
*-commutative29.2%
associate-/l*29.2%
Simplified29.2%
Final simplification45.3%
(FPCore (A B C) :precision binary64 (if (<= B 5.4e-281) (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)) (/ (* 180.0 (atan (/ (* B -0.5) C))) PI)))
double code(double A, double B, double C) {
double tmp;
if (B <= 5.4e-281) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((B * -0.5) / C))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 5.4e-281) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((B * -0.5) / C))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5.4e-281: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = (180.0 * math.atan(((B * -0.5) / C))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5.4e-281) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / C))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 5.4e-281) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = (180.0 * atan(((B * -0.5) / C))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5.4e-281], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 5.4 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if B < 5.39999999999999979e-281Initial program 56.3%
Taylor expanded in B around -inf 69.7%
associate--l+69.7%
div-sub72.0%
Simplified72.0%
Taylor expanded in C around inf 61.6%
if 5.39999999999999979e-281 < B Initial program 57.1%
associate-*r/57.1%
associate-*l/57.1%
*-un-lft-identity57.1%
unpow257.1%
unpow257.1%
hypot-define80.0%
Applied egg-rr80.0%
Taylor expanded in C around inf 25.4%
distribute-rgt1-in25.4%
metadata-eval25.4%
Simplified25.4%
Taylor expanded in B around 0 29.2%
associate-*r/29.2%
Simplified29.2%
Final simplification45.3%
(FPCore (A B C) :precision binary64 (if (<= B 4.8e-109) (* 180.0 (/ (atan (- 1.0 (/ A B))) PI)) (/ (* 180.0 (atan (/ (* B 0.5) A))) PI)))
double code(double A, double B, double C) {
double tmp;
if (B <= 4.8e-109) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 4.8e-109) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 4.8e-109: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 4.8e-109) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 4.8e-109) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = (180.0 * atan(((B * 0.5) / A))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 4.8e-109], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 4.8 \cdot 10^{-109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\end{array}
\end{array}
if B < 4.79999999999999977e-109Initial program 57.3%
Taylor expanded in C around 0 46.4%
mul-1-neg46.4%
distribute-neg-frac246.4%
+-commutative46.4%
unpow246.4%
unpow246.4%
hypot-define60.2%
Simplified60.2%
Taylor expanded in B around -inf 54.9%
mul-1-neg54.9%
unsub-neg54.9%
Simplified54.9%
if 4.79999999999999977e-109 < B Initial program 55.5%
associate-*r/55.6%
associate-*l/55.6%
*-un-lft-identity55.6%
unpow255.6%
unpow255.6%
hypot-define81.9%
Applied egg-rr81.9%
Taylor expanded in A around -inf 23.7%
associate-*r/23.7%
Simplified23.7%
Final simplification43.9%
(FPCore (A B C) :precision binary64 (if (<= A 6.5e+25) (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)) (/ (* 180.0 (atan (/ (* A -2.0) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= 6.5e+25) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((A * -2.0) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= 6.5e+25) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((A * -2.0) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= 6.5e+25: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = (180.0 * math.atan(((A * -2.0) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= 6.5e+25) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(A * -2.0) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= 6.5e+25) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = (180.0 * atan(((A * -2.0) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, 6.5e+25], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq 6.5 \cdot 10^{+25}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < 6.50000000000000005e25Initial program 49.0%
Taylor expanded in B around -inf 42.4%
associate--l+42.4%
div-sub43.5%
Simplified43.5%
Taylor expanded in C around inf 41.8%
if 6.50000000000000005e25 < A Initial program 79.1%
associate-*r/79.2%
associate-*l/79.2%
*-un-lft-identity79.2%
unpow279.2%
unpow279.2%
hypot-define98.5%
Applied egg-rr98.5%
Taylor expanded in A around inf 72.4%
*-commutative72.4%
Simplified72.4%
Final simplification49.6%
(FPCore (A B C) :precision binary64 (if (<= B -6.2e-101) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan (- (/ A B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.2e-101) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-(A / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.2e-101) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-(A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.2e-101: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-(A / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.2e-101) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.2e-101) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-(A / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.2e-101], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.2 \cdot 10^{-101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.19999999999999946e-101Initial program 50.5%
Taylor expanded in B around -inf 53.6%
if -6.19999999999999946e-101 < B Initial program 60.1%
Taylor expanded in C around 0 49.5%
mul-1-neg49.5%
distribute-neg-frac249.5%
+-commutative49.5%
unpow249.5%
unpow249.5%
hypot-define62.7%
Simplified62.7%
Taylor expanded in A around 0 54.6%
Taylor expanded in A around inf 26.9%
associate-*r/26.9%
mul-1-neg26.9%
Simplified26.9%
Final simplification36.4%
(FPCore (A B C) :precision binary64 (* 180.0 (/ 1.0 (/ PI (atan (- 1.0 (/ (- A C) B)))))))
double code(double A, double B, double C) {
return 180.0 * (1.0 / (((double) M_PI) / atan((1.0 - ((A - C) / B)))));
}
public static double code(double A, double B, double C) {
return 180.0 * (1.0 / (Math.PI / Math.atan((1.0 - ((A - C) / B)))));
}
def code(A, B, C): return 180.0 * (1.0 / (math.pi / math.atan((1.0 - ((A - C) / B)))))
function code(A, B, C) return Float64(180.0 * Float64(1.0 / Float64(pi / atan(Float64(1.0 - Float64(Float64(A - C) / B)))))) end
function tmp = code(A, B, C) tmp = 180.0 * (1.0 / (pi / atan((1.0 - ((A - C) / B))))); end
code[A_, B_, C_] := N[(180.0 * N[(1.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{1}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}}
\end{array}
Initial program 56.7%
Taylor expanded in B around -inf 51.1%
associate--l+51.1%
div-sub52.7%
Simplified52.7%
clear-num52.7%
inv-pow52.7%
+-commutative52.7%
Applied egg-rr52.7%
unpow-152.7%
+-commutative52.7%
Simplified52.7%
Final simplification52.7%
(FPCore (A B C) :precision binary64 (if (<= B -5.4e-201) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan (/ 0.0 B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.4e-201) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.4e-201) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.4e-201: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.4e-201) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.4e-201) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.4e-201], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.4 \cdot 10^{-201}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.40000000000000011e-201Initial program 53.4%
Taylor expanded in B around -inf 48.1%
if -5.40000000000000011e-201 < B Initial program 59.2%
Taylor expanded in C around inf 15.5%
associate-*r/15.5%
distribute-rgt1-in15.5%
metadata-eval15.5%
mul0-lft15.5%
metadata-eval15.5%
Simplified15.5%
Final simplification29.6%
(FPCore (A B C) :precision binary64 (if (<= B -3.7e-203) (* 180.0 (/ (atan 1.0) PI)) (/ (* 180.0 (atan (/ 0.0 B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.7e-203) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = (180.0 * atan((0.0 / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.7e-203) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = (180.0 * Math.atan((0.0 / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.7e-203: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = (180.0 * math.atan((0.0 / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.7e-203) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(0.0 / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.7e-203) tmp = 180.0 * (atan(1.0) / pi); else tmp = (180.0 * atan((0.0 / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.7e-203], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.7 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.70000000000000002e-203Initial program 53.4%
Taylor expanded in B around -inf 48.1%
if -3.70000000000000002e-203 < B Initial program 59.2%
associate-*r/59.2%
associate-*l/59.2%
*-un-lft-identity59.2%
unpow259.2%
unpow259.2%
hypot-define80.9%
Applied egg-rr80.9%
Taylor expanded in C around inf 15.5%
distribute-rgt1-in15.5%
metadata-eval15.5%
mul0-lft15.5%
metadata-eval15.5%
Simplified15.5%
Final simplification29.6%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (- 1.0 (/ (- A C) B))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan((1.0 - ((A - C) / B))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan((1.0 - ((A - C) / B))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan((1.0 - ((A - C) / B))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(1.0 - Float64(Float64(A - C) / B))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan((1.0 - ((A - C) / B))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(1 - \frac{A - C}{B}\right)}{\pi}
\end{array}
Initial program 56.7%
Taylor expanded in B around -inf 51.1%
associate--l+51.1%
div-sub52.7%
Simplified52.7%
Final simplification52.7%
(FPCore (A B C) :precision binary64 (if (<= C 9.2e-205) (* 180.0 (/ (atan -1.0) PI)) (* 180.0 (/ (atan 1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 9.2e-205) {
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 (C <= 9.2e-205) {
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 C <= 9.2e-205: 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 (C <= 9.2e-205) 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 (C <= 9.2e-205) 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[C, 9.2e-205], 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}\;C \leq 9.2 \cdot 10^{-205}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\end{array}
\end{array}
if C < 9.1999999999999997e-205Initial program 66.0%
Taylor expanded in B around inf 27.0%
if 9.1999999999999997e-205 < C Initial program 41.6%
Taylor expanded in B around -inf 22.4%
Final simplification25.2%
(FPCore (A B C) :precision binary64 (if (<= C 3.05e-204) (* 180.0 (/ (atan -1.0) PI)) (/ (* 180.0 (atan 1.0)) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 3.05e-204) {
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 (C <= 3.05e-204) {
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 C <= 3.05e-204: 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 (C <= 3.05e-204) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(Float64(180.0 * atan(1.0)) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 3.05e-204) 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[C, 3.05e-204], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.05 \cdot 10^{-204}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 1}{\pi}\\
\end{array}
\end{array}
if C < 3.04999999999999987e-204Initial program 66.0%
Taylor expanded in B around inf 27.0%
if 3.04999999999999987e-204 < C Initial program 41.6%
associate-*r/41.7%
associate-*l/41.7%
*-un-lft-identity41.7%
unpow241.7%
unpow241.7%
hypot-define65.9%
Applied egg-rr65.9%
Taylor expanded in B around -inf 22.4%
Final simplification25.2%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan((1.0 + (C / B))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}
\end{array}
Initial program 56.7%
Taylor expanded in B around -inf 51.1%
associate--l+51.1%
div-sub52.7%
Simplified52.7%
Taylor expanded in C around inf 40.7%
Final simplification40.7%
(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.7%
Taylor expanded in B around inf 22.6%
Final simplification22.6%
herbie shell --seed 2024066
(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)))