
(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 21 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 -9.6e+157) (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.6e+157) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.6e+157) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.6e+157: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.6e+157) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); 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 <= -9.6e+157) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.6e+157], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $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 -9.6 \cdot 10^{+157}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\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 < -9.5999999999999998e157Initial program 4.7%
associate-*l/4.7%
*-lft-identity4.7%
+-commutative4.7%
unpow24.7%
unpow24.7%
hypot-def38.3%
Simplified38.3%
Taylor expanded in A around -inf 81.8%
unpow281.8%
Simplified81.8%
Taylor expanded in B around 0 96.3%
associate-*r/96.4%
associate-/l*93.9%
Simplified93.9%
associate-/r/96.5%
Applied egg-rr96.5%
if -9.5999999999999998e157 < A Initial program 57.3%
associate-*l/57.3%
*-lft-identity57.3%
+-commutative57.3%
unpow257.3%
unpow257.3%
hypot-def82.7%
Simplified82.7%
Final simplification84.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B))))
(t_1 (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))))
(if (<= A -2.6e+150)
t_1
(if (<= A -6.5e+101)
t_0
(if (<= A -1.1e+74)
t_1
(if (<= A 1.55e+118)
t_0
(* 180.0 (/ (atan (/ (- (+ A (hypot A B))) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
double t_1 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double tmp;
if (A <= -2.6e+150) {
tmp = t_1;
} else if (A <= -6.5e+101) {
tmp = t_0;
} else if (A <= -1.1e+74) {
tmp = t_1;
} else if (A <= 1.55e+118) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-(A + hypot(A, B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
double t_1 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -2.6e+150) {
tmp = t_1;
} else if (A <= -6.5e+101) {
tmp = t_0;
} else if (A <= -1.1e+74) {
tmp = t_1;
} else if (A <= 1.55e+118) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-(A + Math.hypot(A, B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) t_1 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) tmp = 0 if A <= -2.6e+150: tmp = t_1 elif A <= -6.5e+101: tmp = t_0 elif A <= -1.1e+74: tmp = t_1 elif A <= 1.55e+118: tmp = t_0 else: tmp = 180.0 * (math.atan((-(A + math.hypot(A, B)) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) tmp = 0.0 if (A <= -2.6e+150) tmp = t_1; elseif (A <= -6.5e+101) tmp = t_0; elseif (A <= -1.1e+74) tmp = t_1; elseif (A <= 1.55e+118) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-Float64(A + hypot(A, B))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); t_1 = (180.0 / pi) * atan((0.5 * (B / A))); tmp = 0.0; if (A <= -2.6e+150) tmp = t_1; elseif (A <= -6.5e+101) tmp = t_0; elseif (A <= -1.1e+74) tmp = t_1; elseif (A <= 1.55e+118) tmp = t_0; else tmp = 180.0 * (atan((-(A + hypot(A, B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.6e+150], t$95$1, If[LessEqual[A, -6.5e+101], t$95$0, If[LessEqual[A, -1.1e+74], t$95$1, If[LessEqual[A, 1.55e+118], t$95$0, N[(180.0 * N[(N[ArcTan[N[((-N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -2.6 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -6.5 \cdot 10^{+101}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.1 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{+118}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + \mathsf{hypot}\left(A, B\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.60000000000000006e150 or -6.50000000000000016e101 < A < -1.1000000000000001e74Initial program 12.1%
associate-*l/12.1%
*-lft-identity12.1%
+-commutative12.1%
unpow212.1%
unpow212.1%
hypot-def42.6%
Simplified42.6%
Taylor expanded in A around -inf 71.2%
unpow271.2%
Simplified71.2%
Taylor expanded in B around 0 89.1%
associate-*r/89.2%
associate-/l*86.7%
Simplified86.7%
associate-/r/89.3%
Applied egg-rr89.3%
if -2.60000000000000006e150 < A < -6.50000000000000016e101 or -1.1000000000000001e74 < A < 1.54999999999999993e118Initial program 55.0%
associate-*r/54.9%
associate-*l/55.0%
associate-*l/55.0%
*-lft-identity55.0%
sub-neg55.0%
associate-+l-55.0%
sub-neg55.0%
remove-double-neg55.0%
+-commutative55.0%
unpow255.0%
unpow255.0%
hypot-def81.1%
Simplified81.1%
Taylor expanded in A around 0 51.4%
unpow251.4%
unpow251.4%
hypot-def77.7%
Simplified77.7%
if 1.54999999999999993e118 < A Initial program 72.8%
associate-*l/72.8%
*-lft-identity72.8%
+-commutative72.8%
unpow272.8%
unpow272.8%
hypot-def95.7%
Simplified95.7%
Taylor expanded in C around 0 72.8%
mul-1-neg72.8%
+-commutative72.8%
unpow272.8%
unpow272.8%
hypot-def91.2%
Simplified91.2%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B))))
(t_1 (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))))
(if (<= A -2.7e+150)
t_1
(if (<= A -6.2e+101)
t_0
(if (<= A -1.12e+76)
t_1
(if (<= A 7.2e+121) t_0 (* 180.0 (/ (atan (/ (- B A) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
double t_1 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double tmp;
if (A <= -2.7e+150) {
tmp = t_1;
} else if (A <= -6.2e+101) {
tmp = t_0;
} else if (A <= -1.12e+76) {
tmp = t_1;
} else if (A <= 7.2e+121) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
double t_1 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -2.7e+150) {
tmp = t_1;
} else if (A <= -6.2e+101) {
tmp = t_0;
} else if (A <= -1.12e+76) {
tmp = t_1;
} else if (A <= 7.2e+121) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) t_1 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) tmp = 0 if A <= -2.7e+150: tmp = t_1 elif A <= -6.2e+101: tmp = t_0 elif A <= -1.12e+76: tmp = t_1 elif A <= 7.2e+121: tmp = t_0 else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) tmp = 0.0 if (A <= -2.7e+150) tmp = t_1; elseif (A <= -6.2e+101) tmp = t_0; elseif (A <= -1.12e+76) tmp = t_1; elseif (A <= 7.2e+121) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); t_1 = (180.0 / pi) * atan((0.5 * (B / A))); tmp = 0.0; if (A <= -2.7e+150) tmp = t_1; elseif (A <= -6.2e+101) tmp = t_0; elseif (A <= -1.12e+76) tmp = t_1; elseif (A <= 7.2e+121) tmp = t_0; else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.7e+150], t$95$1, If[LessEqual[A, -6.2e+101], t$95$0, If[LessEqual[A, -1.12e+76], t$95$1, If[LessEqual[A, 7.2e+121], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -2.7 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -6.2 \cdot 10^{+101}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.12 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 7.2 \cdot 10^{+121}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.70000000000000008e150 or -6.19999999999999998e101 < A < -1.12000000000000005e76Initial program 12.1%
associate-*l/12.1%
*-lft-identity12.1%
+-commutative12.1%
unpow212.1%
unpow212.1%
hypot-def42.6%
Simplified42.6%
Taylor expanded in A around -inf 71.2%
unpow271.2%
Simplified71.2%
Taylor expanded in B around 0 89.1%
associate-*r/89.2%
associate-/l*86.7%
Simplified86.7%
associate-/r/89.3%
Applied egg-rr89.3%
if -2.70000000000000008e150 < A < -6.19999999999999998e101 or -1.12000000000000005e76 < A < 7.19999999999999963e121Initial program 54.7%
associate-*r/54.7%
associate-*l/54.7%
associate-*l/54.7%
*-lft-identity54.7%
sub-neg54.7%
associate-+l-54.8%
sub-neg54.8%
remove-double-neg54.8%
+-commutative54.8%
unpow254.8%
unpow254.8%
hypot-def81.2%
Simplified81.2%
Taylor expanded in A around 0 51.3%
unpow251.3%
unpow251.3%
hypot-def77.8%
Simplified77.8%
if 7.19999999999999963e121 < A Initial program 74.1%
associate-*l/74.1%
*-lft-identity74.1%
+-commutative74.1%
unpow274.1%
unpow274.1%
hypot-def95.6%
Simplified95.6%
Taylor expanded in B around -inf 86.4%
Taylor expanded in C around 0 86.5%
Final simplification81.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B))))
(t_1 (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))))
(if (<= A -4.5e+152)
t_1
(if (<= A -6.5e+101)
t_0
(if (<= A -5.6e+71)
t_1
(if (<= A 1.1e+117)
t_0
(/ (* -180.0 (atan (/ (+ A (hypot A B)) B))) PI)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
double t_1 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double tmp;
if (A <= -4.5e+152) {
tmp = t_1;
} else if (A <= -6.5e+101) {
tmp = t_0;
} else if (A <= -5.6e+71) {
tmp = t_1;
} else if (A <= 1.1e+117) {
tmp = t_0;
} else {
tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
double t_1 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -4.5e+152) {
tmp = t_1;
} else if (A <= -6.5e+101) {
tmp = t_0;
} else if (A <= -5.6e+71) {
tmp = t_1;
} else if (A <= 1.1e+117) {
tmp = t_0;
} else {
tmp = (-180.0 * Math.atan(((A + Math.hypot(A, B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) t_1 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) tmp = 0 if A <= -4.5e+152: tmp = t_1 elif A <= -6.5e+101: tmp = t_0 elif A <= -5.6e+71: tmp = t_1 elif A <= 1.1e+117: tmp = t_0 else: tmp = (-180.0 * math.atan(((A + math.hypot(A, B)) / B))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) tmp = 0.0 if (A <= -4.5e+152) tmp = t_1; elseif (A <= -6.5e+101) tmp = t_0; elseif (A <= -5.6e+71) tmp = t_1; elseif (A <= 1.1e+117) tmp = t_0; else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(A, B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); t_1 = (180.0 / pi) * atan((0.5 * (B / A))); tmp = 0.0; if (A <= -4.5e+152) tmp = t_1; elseif (A <= -6.5e+101) tmp = t_0; elseif (A <= -5.6e+71) tmp = t_1; elseif (A <= 1.1e+117) tmp = t_0; else tmp = (-180.0 * atan(((A + hypot(A, B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.5e+152], t$95$1, If[LessEqual[A, -6.5e+101], t$95$0, If[LessEqual[A, -5.6e+71], t$95$1, If[LessEqual[A, 1.1e+117], t$95$0, N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -4.5 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -6.5 \cdot 10^{+101}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -5.6 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.1 \cdot 10^{+117}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.5000000000000001e152 or -6.50000000000000016e101 < A < -5.60000000000000004e71Initial program 12.1%
associate-*l/12.1%
*-lft-identity12.1%
+-commutative12.1%
unpow212.1%
unpow212.1%
hypot-def42.6%
Simplified42.6%
Taylor expanded in A around -inf 71.2%
unpow271.2%
Simplified71.2%
Taylor expanded in B around 0 89.1%
associate-*r/89.2%
associate-/l*86.7%
Simplified86.7%
associate-/r/89.3%
Applied egg-rr89.3%
if -4.5000000000000001e152 < A < -6.50000000000000016e101 or -5.60000000000000004e71 < A < 1.10000000000000007e117Initial program 55.0%
associate-*r/54.9%
associate-*l/55.0%
associate-*l/55.0%
*-lft-identity55.0%
sub-neg55.0%
associate-+l-55.0%
sub-neg55.0%
remove-double-neg55.0%
+-commutative55.0%
unpow255.0%
unpow255.0%
hypot-def81.1%
Simplified81.1%
Taylor expanded in A around 0 51.4%
unpow251.4%
unpow251.4%
hypot-def77.7%
Simplified77.7%
if 1.10000000000000007e117 < A Initial program 72.8%
associate-*l/72.8%
*-lft-identity72.8%
+-commutative72.8%
unpow272.8%
unpow272.8%
hypot-def95.7%
Simplified95.7%
Taylor expanded in C around 0 72.8%
mul-1-neg72.8%
+-commutative72.8%
unpow272.8%
unpow272.8%
hypot-def91.2%
Simplified91.2%
expm1-log1p-u47.1%
expm1-udef47.1%
associate-*r/47.1%
distribute-frac-neg47.1%
atan-neg47.1%
Applied egg-rr47.1%
expm1-def47.1%
expm1-log1p91.2%
distribute-rgt-neg-out91.2%
distribute-lft-neg-in91.2%
metadata-eval91.2%
Simplified91.2%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= B 7.6e-203)
(* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))
(if (<= B 5.2e-156)
t_0
(if (<= B 2.8e-110)
(* 180.0 (/ (atan (+ (/ (* (- C A) 2.0) B) (* 0.5 (/ B C)))) PI))
(if (<= B 8e-88) t_0 (* (/ 180.0 PI) (atan (/ (- C (+ A B)) B)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (B <= 7.6e-203) {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
} else if (B <= 5.2e-156) {
tmp = t_0;
} else if (B <= 2.8e-110) {
tmp = 180.0 * (atan(((((C - A) * 2.0) / B) + (0.5 * (B / C)))) / ((double) M_PI));
} else if (B <= 8e-88) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + B)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (B <= 7.6e-203) {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
} else if (B <= 5.2e-156) {
tmp = t_0;
} else if (B <= 2.8e-110) {
tmp = 180.0 * (Math.atan(((((C - A) * 2.0) / B) + (0.5 * (B / C)))) / Math.PI);
} else if (B <= 8e-88) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + B)) / B));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if B <= 7.6e-203: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) elif B <= 5.2e-156: tmp = t_0 elif B <= 2.8e-110: tmp = 180.0 * (math.atan(((((C - A) * 2.0) / B) + (0.5 * (B / C)))) / math.pi) elif B <= 8e-88: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((C - (A + B)) / B)) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (B <= 7.6e-203) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); elseif (B <= 5.2e-156) tmp = t_0; elseif (B <= 2.8e-110) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(Float64(C - A) * 2.0) / B) + Float64(0.5 * Float64(B / C)))) / pi)); elseif (B <= 8e-88) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + B)) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (B <= 7.6e-203) tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); elseif (B <= 5.2e-156) tmp = t_0; elseif (B <= 2.8e-110) tmp = 180.0 * (atan(((((C - A) * 2.0) / B) + (0.5 * (B / C)))) / pi); elseif (B <= 8e-88) tmp = t_0; else tmp = (180.0 / pi) * atan(((C - (A + B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 7.6e-203], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e-156], t$95$0, If[LessEqual[B, 2.8e-110], N[(180.0 * N[(N[ArcTan[N[(N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision] + N[(0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8e-88], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq 7.6 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-156}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{-110}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B} + 0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-88}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\
\end{array}
\end{array}
if B < 7.6000000000000005e-203Initial program 53.3%
associate-*l/53.3%
*-lft-identity53.3%
+-commutative53.3%
unpow253.3%
unpow253.3%
hypot-def81.5%
Simplified81.5%
Taylor expanded in B around -inf 64.6%
if 7.6000000000000005e-203 < B < 5.2000000000000002e-156 or 2.8e-110 < B < 7.99999999999999947e-88Initial program 19.5%
associate-*l/19.5%
*-lft-identity19.5%
+-commutative19.5%
unpow219.5%
unpow219.5%
hypot-def53.3%
Simplified53.3%
Taylor expanded in C around inf 47.3%
fma-def47.3%
associate--l+47.3%
unpow247.3%
fma-def47.3%
unpow247.3%
unpow247.3%
difference-of-squares53.2%
distribute-rgt1-in53.2%
metadata-eval53.2%
mul0-lft53.2%
mul-1-neg53.2%
distribute-rgt1-in53.2%
metadata-eval53.2%
mul0-lft53.2%
metadata-eval53.2%
Simplified53.2%
Taylor expanded in B around 0 67.9%
if 5.2000000000000002e-156 < B < 2.8e-110Initial program 70.4%
associate-*l/70.4%
*-lft-identity70.4%
+-commutative70.4%
unpow270.4%
unpow270.4%
hypot-def70.4%
Simplified70.4%
Taylor expanded in C around -inf 70.6%
associate-+r+70.6%
+-commutative70.6%
metadata-eval70.6%
cancel-sign-sub-inv70.6%
associate-*r/70.6%
associate-*r/70.6%
div-sub70.6%
distribute-lft-out--70.6%
Simplified70.6%
if 7.99999999999999947e-88 < B Initial program 51.4%
associate-*r/51.4%
associate-*l/51.4%
associate-*l/51.4%
*-lft-identity51.4%
sub-neg51.4%
associate-+l-51.4%
sub-neg51.4%
remove-double-neg51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-def76.5%
Simplified76.5%
Taylor expanded in B around inf 75.5%
Final simplification68.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C B) B)))))
(if (<= A -1.25e+61)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -8.6e-11)
t_0
(if (<= A -5e-85)
(* (/ 180.0 PI) (atan (/ -0.5 (/ C B))))
(if (<= A 2e-171)
t_0
(* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
double tmp;
if (A <= -1.25e+61) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -8.6e-11) {
tmp = t_0;
} else if (A <= -5e-85) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 / (C / B)));
} else if (A <= 2e-171) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C - B) / B));
double tmp;
if (A <= -1.25e+61) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -8.6e-11) {
tmp = t_0;
} else if (A <= -5e-85) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 / (C / B)));
} else if (A <= 2e-171) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C - B) / B)) tmp = 0 if A <= -1.25e+61: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -8.6e-11: tmp = t_0 elif A <= -5e-85: tmp = (180.0 / math.pi) * math.atan((-0.5 / (C / B))) elif A <= 2e-171: tmp = t_0 else: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))) tmp = 0.0 if (A <= -1.25e+61) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -8.6e-11) tmp = t_0; elseif (A <= -5e-85) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 / Float64(C / B)))); elseif (A <= 2e-171) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C - B) / B)); tmp = 0.0; if (A <= -1.25e+61) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -8.6e-11) tmp = t_0; elseif (A <= -5e-85) tmp = (180.0 / pi) * atan((-0.5 / (C / B))); elseif (A <= 2e-171) tmp = t_0; else tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.25e+61], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.6e-11], t$95$0, If[LessEqual[A, -5e-85], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e-171], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{if}\;A \leq -1.25 \cdot 10^{+61}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -8.6 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -5 \cdot 10^{-85}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-171}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.25000000000000004e61Initial program 15.7%
associate-*l/15.7%
*-lft-identity15.7%
+-commutative15.7%
unpow215.7%
unpow215.7%
hypot-def54.7%
Simplified54.7%
Taylor expanded in A around -inf 66.1%
unpow266.1%
Simplified66.1%
Taylor expanded in B around 0 76.6%
associate-*r/76.7%
associate-/l*74.8%
Simplified74.8%
associate-/r/76.8%
Applied egg-rr76.8%
if -1.25000000000000004e61 < A < -8.60000000000000003e-11 or -5.0000000000000002e-85 < A < 2e-171Initial program 60.5%
associate-*r/60.4%
associate-*l/60.5%
associate-*l/60.5%
*-lft-identity60.5%
sub-neg60.5%
associate-+l-60.4%
sub-neg60.4%
remove-double-neg60.4%
+-commutative60.4%
unpow260.4%
unpow260.4%
hypot-def80.3%
Simplified80.3%
Taylor expanded in A around 0 59.9%
unpow259.9%
unpow259.9%
hypot-def79.7%
Simplified79.7%
Taylor expanded in C around 0 62.0%
mul-1-neg62.0%
unsub-neg62.0%
Simplified62.0%
if -8.60000000000000003e-11 < A < -5.0000000000000002e-85Initial program 27.0%
associate-*r/27.0%
associate-*l/27.0%
associate-*l/27.0%
*-lft-identity27.0%
sub-neg27.0%
associate-+l-27.5%
sub-neg27.5%
remove-double-neg27.5%
+-commutative27.5%
unpow227.5%
unpow227.5%
hypot-def66.3%
Simplified66.3%
Taylor expanded in A around 0 27.2%
unpow227.2%
unpow227.2%
hypot-def66.0%
Simplified66.0%
Taylor expanded in C around inf 59.7%
associate-*r/59.7%
associate-/l*59.7%
Simplified59.7%
if 2e-171 < A Initial program 64.9%
associate-*l/64.9%
*-lft-identity64.9%
+-commutative64.9%
unpow264.9%
unpow264.9%
hypot-def88.9%
Simplified88.9%
Taylor expanded in B around -inf 70.9%
Final simplification68.2%
(FPCore (A B C)
:precision binary64
(if (<= C -1.25e-35)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C -3.7e-206)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C -3.2e-272)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= C 7.8e-64)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.25e-35) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= -3.7e-206) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= -3.2e-272) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (C <= 7.8e-64) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.25e-35) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= -3.7e-206) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= -3.2e-272) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (C <= 7.8e-64) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.25e-35: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= -3.7e-206: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= -3.2e-272: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif C <= 7.8e-64: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.25e-35) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= -3.7e-206) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= -3.2e-272) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (C <= 7.8e-64) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.25e-35) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= -3.7e-206) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= -3.2e-272) tmp = 180.0 * (atan((-A / B)) / pi); elseif (C <= 7.8e-64) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.25e-35], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.7e-206], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.2e-272], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.8e-64], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.25 \cdot 10^{-35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -3.7 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq -3.2 \cdot 10^{-272}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.8 \cdot 10^{-64}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.24999999999999991e-35Initial program 73.4%
associate-*l/73.4%
*-lft-identity73.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-def92.3%
Simplified92.3%
Taylor expanded in B around -inf 78.1%
Taylor expanded in C around inf 68.7%
if -1.24999999999999991e-35 < C < -3.69999999999999998e-206Initial program 49.2%
associate-*l/49.2%
*-lft-identity49.2%
+-commutative49.2%
unpow249.2%
unpow249.2%
hypot-def84.7%
Simplified84.7%
Taylor expanded in B around inf 34.9%
if -3.69999999999999998e-206 < C < -3.2e-272Initial program 100.0%
associate-*l/100.0%
*-lft-identity100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around -inf 85.9%
Taylor expanded in A around inf 83.2%
associate-*r/83.2%
neg-mul-183.2%
Simplified83.2%
if -3.2e-272 < C < 7.7999999999999994e-64Initial program 62.7%
associate-*l/62.7%
*-lft-identity62.7%
+-commutative62.7%
unpow262.7%
unpow262.7%
hypot-def82.0%
Simplified82.0%
Taylor expanded in B around -inf 31.7%
if 7.7999999999999994e-64 < C Initial program 23.1%
associate-*l/23.1%
*-lft-identity23.1%
+-commutative23.1%
unpow223.1%
unpow223.1%
hypot-def58.3%
Simplified58.3%
Taylor expanded in C around inf 40.5%
fma-def40.5%
associate--l+46.5%
unpow246.5%
fma-def46.5%
unpow246.5%
unpow246.5%
difference-of-squares56.8%
distribute-rgt1-in56.8%
metadata-eval56.8%
mul0-lft56.8%
mul-1-neg56.8%
distribute-rgt1-in56.8%
metadata-eval56.8%
mul0-lft56.8%
metadata-eval56.8%
Simplified56.8%
Taylor expanded in B around 0 64.5%
Final simplification56.1%
(FPCore (A B C)
:precision binary64
(if (<= C -1.3e-35)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C -1.5e-220)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C -1.06e-284)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= C 3.7e-180)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-35) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= -1.5e-220) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= -1.06e-284) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (C <= 3.7e-180) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-35) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= -1.5e-220) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= -1.06e-284) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (C <= 3.7e-180) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.3e-35: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= -1.5e-220: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= -1.06e-284: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif C <= 3.7e-180: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.3e-35) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= -1.5e-220) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= -1.06e-284) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (C <= 3.7e-180) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.3e-35) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= -1.5e-220) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= -1.06e-284) tmp = 180.0 * (atan((-A / B)) / pi); elseif (C <= 3.7e-180) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.3e-35], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.5e-220], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.06e-284], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.7e-180], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.3 \cdot 10^{-35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.5 \cdot 10^{-220}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq -1.06 \cdot 10^{-284}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.7 \cdot 10^{-180}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.30000000000000002e-35Initial program 73.4%
associate-*l/73.4%
*-lft-identity73.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-def92.3%
Simplified92.3%
Taylor expanded in B around -inf 78.1%
Taylor expanded in C around inf 68.7%
if -1.30000000000000002e-35 < C < -1.50000000000000009e-220Initial program 49.2%
associate-*l/49.2%
*-lft-identity49.2%
+-commutative49.2%
unpow249.2%
unpow249.2%
hypot-def84.7%
Simplified84.7%
Taylor expanded in B around inf 34.9%
if -1.50000000000000009e-220 < C < -1.06e-284Initial program 89.8%
associate-*l/89.8%
*-lft-identity89.8%
+-commutative89.8%
unpow289.8%
unpow289.8%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around -inf 87.7%
Taylor expanded in A around inf 73.1%
associate-*r/73.1%
neg-mul-173.1%
Simplified73.1%
if -1.06e-284 < C < 3.70000000000000016e-180Initial program 55.7%
associate-*l/55.7%
*-lft-identity55.7%
+-commutative55.7%
unpow255.7%
unpow255.7%
hypot-def76.1%
Simplified76.1%
Taylor expanded in A around -inf 45.1%
if 3.70000000000000016e-180 < C Initial program 33.1%
associate-*l/33.1%
*-lft-identity33.1%
+-commutative33.1%
unpow233.1%
unpow233.1%
hypot-def64.3%
Simplified64.3%
Taylor expanded in C around inf 35.6%
fma-def35.6%
associate--l+41.2%
unpow241.2%
fma-def41.2%
unpow241.2%
unpow241.2%
difference-of-squares51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
mul-1-neg51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
metadata-eval51.3%
Simplified51.3%
Taylor expanded in B around 0 56.7%
Final simplification56.9%
(FPCore (A B C)
:precision binary64
(if (<= C -1.45e-34)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= C -5.2e-217)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C -6.5e-279)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= C 4.5e-177)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.45e-34) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (C <= -5.2e-217) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= -6.5e-279) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (C <= 4.5e-177) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.45e-34) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (C <= -5.2e-217) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= -6.5e-279) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (C <= 4.5e-177) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.45e-34: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif C <= -5.2e-217: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= -6.5e-279: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif C <= 4.5e-177: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.45e-34) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (C <= -5.2e-217) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= -6.5e-279) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (C <= 4.5e-177) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.45e-34) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (C <= -5.2e-217) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= -6.5e-279) tmp = 180.0 * (atan((-A / B)) / pi); elseif (C <= 4.5e-177) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.45e-34], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -5.2e-217], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -6.5e-279], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.5e-177], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.45 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5.2 \cdot 10^{-217}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq -6.5 \cdot 10^{-279}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.5 \cdot 10^{-177}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.4500000000000001e-34Initial program 73.4%
associate-*l/73.4%
*-lft-identity73.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-def92.3%
Simplified92.3%
Taylor expanded in C around -inf 68.7%
if -1.4500000000000001e-34 < C < -5.19999999999999986e-217Initial program 49.2%
associate-*l/49.2%
*-lft-identity49.2%
+-commutative49.2%
unpow249.2%
unpow249.2%
hypot-def84.7%
Simplified84.7%
Taylor expanded in B around inf 34.9%
if -5.19999999999999986e-217 < C < -6.4999999999999997e-279Initial program 89.8%
associate-*l/89.8%
*-lft-identity89.8%
+-commutative89.8%
unpow289.8%
unpow289.8%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around -inf 87.7%
Taylor expanded in A around inf 73.1%
associate-*r/73.1%
neg-mul-173.1%
Simplified73.1%
if -6.4999999999999997e-279 < C < 4.5000000000000003e-177Initial program 55.7%
associate-*l/55.7%
*-lft-identity55.7%
+-commutative55.7%
unpow255.7%
unpow255.7%
hypot-def76.1%
Simplified76.1%
Taylor expanded in A around -inf 45.1%
if 4.5000000000000003e-177 < C Initial program 33.1%
associate-*l/33.1%
*-lft-identity33.1%
+-commutative33.1%
unpow233.1%
unpow233.1%
hypot-def64.3%
Simplified64.3%
Taylor expanded in C around inf 35.6%
fma-def35.6%
associate--l+41.2%
unpow241.2%
fma-def41.2%
unpow241.2%
unpow241.2%
difference-of-squares51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
mul-1-neg51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
metadata-eval51.3%
Simplified51.3%
Taylor expanded in B around 0 56.7%
Final simplification56.9%
(FPCore (A B C)
:precision binary64
(if (<= C -1.3e-35)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= C -2.4e-211)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C -1.9e-278)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(if (<= C 1.5e-183)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-35) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (C <= -2.4e-211) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= -1.9e-278) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else if (C <= 1.5e-183) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-35) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (C <= -2.4e-211) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= -1.9e-278) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else if (C <= 1.5e-183) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.3e-35: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif C <= -2.4e-211: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= -1.9e-278: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) elif C <= 1.5e-183: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.3e-35) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (C <= -2.4e-211) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= -1.9e-278) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); elseif (C <= 1.5e-183) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.3e-35) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (C <= -2.4e-211) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= -1.9e-278) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); elseif (C <= 1.5e-183) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.3e-35], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.4e-211], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.9e-278], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.5e-183], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.3 \cdot 10^{-35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.4 \cdot 10^{-211}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq -1.9 \cdot 10^{-278}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.5 \cdot 10^{-183}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.30000000000000002e-35Initial program 73.4%
associate-*l/73.4%
*-lft-identity73.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-def92.3%
Simplified92.3%
Taylor expanded in C around -inf 68.7%
if -1.30000000000000002e-35 < C < -2.4000000000000002e-211Initial program 49.2%
associate-*l/49.2%
*-lft-identity49.2%
+-commutative49.2%
unpow249.2%
unpow249.2%
hypot-def84.7%
Simplified84.7%
Taylor expanded in B around inf 34.9%
if -2.4000000000000002e-211 < C < -1.8999999999999999e-278Initial program 89.8%
associate-*l/89.8%
*-lft-identity89.8%
+-commutative89.8%
unpow289.8%
unpow289.8%
hypot-def100.0%
Simplified100.0%
Taylor expanded in A around inf 73.3%
*-commutative73.3%
Simplified73.3%
if -1.8999999999999999e-278 < C < 1.4999999999999999e-183Initial program 55.7%
associate-*l/55.7%
*-lft-identity55.7%
+-commutative55.7%
unpow255.7%
unpow255.7%
hypot-def76.1%
Simplified76.1%
Taylor expanded in A around -inf 45.1%
if 1.4999999999999999e-183 < C Initial program 33.1%
associate-*l/33.1%
*-lft-identity33.1%
+-commutative33.1%
unpow233.1%
unpow233.1%
hypot-def64.3%
Simplified64.3%
Taylor expanded in C around inf 35.6%
fma-def35.6%
associate--l+41.2%
unpow241.2%
fma-def41.2%
unpow241.2%
unpow241.2%
difference-of-squares51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
mul-1-neg51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
metadata-eval51.3%
Simplified51.3%
Taylor expanded in B around 0 56.7%
Final simplification56.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- B A) B)) PI))))
(if (<= C -4.7e-5)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= C -1e-127)
t_0
(if (<= C -3.3e-195)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= C 4.5e-21) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
double tmp;
if (C <= -4.7e-5) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (C <= -1e-127) {
tmp = t_0;
} else if (C <= -3.3e-195) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (C <= 4.5e-21) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
double tmp;
if (C <= -4.7e-5) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (C <= -1e-127) {
tmp = t_0;
} else if (C <= -3.3e-195) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (C <= 4.5e-21) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B - A) / B)) / math.pi) tmp = 0 if C <= -4.7e-5: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif C <= -1e-127: tmp = t_0 elif C <= -3.3e-195: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif C <= 4.5e-21: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)) tmp = 0.0 if (C <= -4.7e-5) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (C <= -1e-127) tmp = t_0; elseif (C <= -3.3e-195) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (C <= 4.5e-21) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B - A) / B)) / pi); tmp = 0.0; if (C <= -4.7e-5) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (C <= -1e-127) tmp = t_0; elseif (C <= -3.3e-195) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (C <= 4.5e-21) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -4.7e-5], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1e-127], t$95$0, If[LessEqual[C, -3.3e-195], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.5e-21], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -4.7 \cdot 10^{-5}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1 \cdot 10^{-127}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq -3.3 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.5 \cdot 10^{-21}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.69999999999999972e-5Initial program 74.2%
associate-*l/74.2%
*-lft-identity74.2%
+-commutative74.2%
unpow274.2%
unpow274.2%
hypot-def91.9%
Simplified91.9%
Taylor expanded in C around -inf 69.7%
if -4.69999999999999972e-5 < C < -1e-127 or -3.3e-195 < C < 4.49999999999999968e-21Initial program 61.5%
associate-*l/61.5%
*-lft-identity61.5%
+-commutative61.5%
unpow261.5%
unpow261.5%
hypot-def82.8%
Simplified82.8%
Taylor expanded in B around -inf 52.9%
Taylor expanded in C around 0 52.6%
if -1e-127 < C < -3.3e-195Initial program 56.3%
associate-*l/56.3%
*-lft-identity56.3%
+-commutative56.3%
unpow256.3%
unpow256.3%
hypot-def82.5%
Simplified82.5%
Taylor expanded in A around -inf 50.9%
if 4.49999999999999968e-21 < C Initial program 18.3%
associate-*l/18.3%
*-lft-identity18.3%
+-commutative18.3%
unpow218.3%
unpow218.3%
hypot-def57.9%
Simplified57.9%
Taylor expanded in C around inf 42.6%
fma-def42.6%
associate--l+47.1%
unpow247.1%
fma-def47.1%
unpow247.1%
unpow247.1%
difference-of-squares57.4%
distribute-rgt1-in57.4%
metadata-eval57.4%
mul0-lft57.4%
mul-1-neg57.4%
distribute-rgt1-in57.4%
metadata-eval57.4%
mul0-lft57.4%
metadata-eval57.4%
Simplified57.4%
Taylor expanded in B around 0 64.9%
Final simplification61.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- B A) B)) PI))))
(if (<= C -5.1e-8)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= C -1.25e-130)
t_0
(if (<= C -3.8e-195)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= C 2.6e-23) t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
double tmp;
if (C <= -5.1e-8) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (C <= -1.25e-130) {
tmp = t_0;
} else if (C <= -3.8e-195) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (C <= 2.6e-23) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
double tmp;
if (C <= -5.1e-8) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (C <= -1.25e-130) {
tmp = t_0;
} else if (C <= -3.8e-195) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (C <= 2.6e-23) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B - A) / B)) / math.pi) tmp = 0 if C <= -5.1e-8: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif C <= -1.25e-130: tmp = t_0 elif C <= -3.8e-195: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif C <= 2.6e-23: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)) tmp = 0.0 if (C <= -5.1e-8) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (C <= -1.25e-130) tmp = t_0; elseif (C <= -3.8e-195) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (C <= 2.6e-23) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B - A) / B)) / pi); tmp = 0.0; if (C <= -5.1e-8) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (C <= -1.25e-130) tmp = t_0; elseif (C <= -3.8e-195) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (C <= 2.6e-23) tmp = t_0; else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5.1e-8], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.25e-130], t$95$0, If[LessEqual[C, -3.8e-195], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.6e-23], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -5.1 \cdot 10^{-8}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.25 \cdot 10^{-130}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq -3.8 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.6 \cdot 10^{-23}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -5.10000000000000001e-8Initial program 74.2%
associate-*l/74.2%
*-lft-identity74.2%
+-commutative74.2%
unpow274.2%
unpow274.2%
hypot-def91.9%
Simplified91.9%
Taylor expanded in C around -inf 69.7%
if -5.10000000000000001e-8 < C < -1.2499999999999999e-130 or -3.80000000000000013e-195 < C < 2.6e-23Initial program 61.5%
associate-*l/61.5%
*-lft-identity61.5%
+-commutative61.5%
unpow261.5%
unpow261.5%
hypot-def82.8%
Simplified82.8%
Taylor expanded in B around -inf 52.9%
Taylor expanded in C around 0 52.6%
if -1.2499999999999999e-130 < C < -3.80000000000000013e-195Initial program 56.3%
associate-*l/56.3%
*-lft-identity56.3%
+-commutative56.3%
unpow256.3%
unpow256.3%
hypot-def82.5%
Simplified82.5%
Taylor expanded in A around -inf 50.9%
if 2.6e-23 < C Initial program 18.3%
associate-*r/18.3%
associate-*l/18.3%
associate-*l/18.3%
*-lft-identity18.3%
sub-neg18.3%
associate-+l-18.2%
sub-neg18.2%
remove-double-neg18.2%
+-commutative18.2%
unpow218.2%
unpow218.2%
hypot-def56.5%
Simplified56.5%
Taylor expanded in A around 0 14.1%
unpow214.1%
unpow214.1%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around inf 64.9%
Final simplification61.2%
(FPCore (A B C)
:precision binary64
(if (<= C -1.25e-91)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= C -3.2e-289)
(* 180.0 (/ (atan (- (/ (+ A B) B))) PI))
(if (<= C 1.25e-268)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= C 3.65e-25)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.25e-91) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (C <= -3.2e-289) {
tmp = 180.0 * (atan(-((A + B) / B)) / ((double) M_PI));
} else if (C <= 1.25e-268) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (C <= 3.65e-25) {
tmp = 180.0 * (atan(((B - A) / 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 (C <= -1.25e-91) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (C <= -3.2e-289) {
tmp = 180.0 * (Math.atan(-((A + B) / B)) / Math.PI);
} else if (C <= 1.25e-268) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (C <= 3.65e-25) {
tmp = 180.0 * (Math.atan(((B - A) / 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 C <= -1.25e-91: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif C <= -3.2e-289: tmp = 180.0 * (math.atan(-((A + B) / B)) / math.pi) elif C <= 1.25e-268: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif C <= 3.65e-25: tmp = 180.0 * (math.atan(((B - A) / 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 (C <= -1.25e-91) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (C <= -3.2e-289) tmp = Float64(180.0 * Float64(atan(Float64(-Float64(Float64(A + B) / B))) / pi)); elseif (C <= 1.25e-268) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (C <= 3.65e-25) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.25e-91) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (C <= -3.2e-289) tmp = 180.0 * (atan(-((A + B) / B)) / pi); elseif (C <= 1.25e-268) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (C <= 3.65e-25) tmp = 180.0 * (atan(((B - A) / B)) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.25e-91], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.2e-289], N[(180.0 * N[(N[ArcTan[(-N[(N[(A + B), $MachinePrecision] / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.25e-268], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.65e-25], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.25 \cdot 10^{-91}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;C \leq -3.2 \cdot 10^{-289}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A + B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.25 \cdot 10^{-268}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.65 \cdot 10^{-25}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -1.24999999999999999e-91Initial program 68.6%
associate-*r/68.6%
associate-*l/68.6%
associate-*l/68.6%
*-lft-identity68.6%
sub-neg68.6%
associate-+l-67.8%
sub-neg67.8%
remove-double-neg67.8%
+-commutative67.8%
unpow267.8%
unpow267.8%
hypot-def87.0%
Simplified87.0%
Taylor expanded in A around 0 67.8%
unpow267.8%
unpow267.8%
hypot-def86.2%
Simplified86.2%
Taylor expanded in B around -inf 73.4%
if -1.24999999999999999e-91 < C < -3.2000000000000002e-289Initial program 67.2%
associate-*l/67.2%
*-lft-identity67.2%
+-commutative67.2%
unpow267.2%
unpow267.2%
hypot-def92.9%
Simplified92.9%
Taylor expanded in C around 0 60.2%
mul-1-neg60.2%
+-commutative60.2%
unpow260.2%
unpow260.2%
hypot-def86.1%
Simplified86.1%
Taylor expanded in A around 0 63.6%
+-commutative63.6%
Simplified63.6%
if -3.2000000000000002e-289 < C < 1.25e-268Initial program 47.6%
associate-*l/47.6%
*-lft-identity47.6%
+-commutative47.6%
unpow247.6%
unpow247.6%
hypot-def68.2%
Simplified68.2%
Taylor expanded in A around -inf 51.9%
if 1.25e-268 < C < 3.65000000000000023e-25Initial program 67.3%
associate-*l/67.3%
*-lft-identity67.3%
+-commutative67.3%
unpow267.3%
unpow267.3%
hypot-def81.0%
Simplified81.0%
Taylor expanded in B around -inf 52.8%
Taylor expanded in C around 0 53.0%
if 3.65000000000000023e-25 < C Initial program 18.3%
associate-*r/18.3%
associate-*l/18.3%
associate-*l/18.3%
*-lft-identity18.3%
sub-neg18.3%
associate-+l-18.2%
sub-neg18.2%
remove-double-neg18.2%
+-commutative18.2%
unpow218.2%
unpow218.2%
hypot-def56.5%
Simplified56.5%
Taylor expanded in A around 0 14.1%
unpow214.1%
unpow214.1%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around inf 64.9%
Final simplification64.9%
(FPCore (A B C)
:precision binary64
(if (<= B -1.05e+50)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.5e-200)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 4.6e-151)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1e-59)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e+50) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.5e-200) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 4.6e-151) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1e-59) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e+50) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.5e-200) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 4.6e-151) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1e-59) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.05e+50: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.5e-200: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 4.6e-151: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1e-59: tmp = 180.0 * (math.atan((-A / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.05e+50) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.5e-200) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 4.6e-151) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1e-59) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.05e+50) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.5e-200) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 4.6e-151) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1e-59) tmp = 180.0 * (atan((-A / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.05e+50], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.5e-200], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.6e-151], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1e-59], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.05 \cdot 10^{+50}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-200}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-151}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 10^{-59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.05e50Initial program 44.6%
associate-*l/44.6%
*-lft-identity44.6%
+-commutative44.6%
unpow244.6%
unpow244.6%
hypot-def90.5%
Simplified90.5%
Taylor expanded in B around -inf 76.4%
if -1.05e50 < B < 4.5000000000000002e-200Initial program 57.6%
associate-*l/57.6%
*-lft-identity57.6%
+-commutative57.6%
unpow257.6%
unpow257.6%
hypot-def76.9%
Simplified76.9%
Taylor expanded in B around -inf 52.1%
Taylor expanded in C around inf 40.3%
if 4.5000000000000002e-200 < B < 4.59999999999999992e-151Initial program 19.3%
associate-*l/19.3%
*-lft-identity19.3%
+-commutative19.3%
unpow219.3%
unpow219.3%
hypot-def69.0%
Simplified69.0%
Taylor expanded in C around inf 52.8%
distribute-rgt1-in52.8%
metadata-eval52.8%
mul0-lft52.8%
metadata-eval52.8%
Simplified52.8%
if 4.59999999999999992e-151 < B < 1e-59Initial program 57.7%
associate-*l/57.7%
*-lft-identity57.7%
+-commutative57.7%
unpow257.7%
unpow257.7%
hypot-def58.2%
Simplified58.2%
Taylor expanded in B around -inf 54.3%
Taylor expanded in A around inf 34.0%
associate-*r/34.0%
neg-mul-134.0%
Simplified34.0%
if 1e-59 < B Initial program 50.0%
associate-*l/50.0%
*-lft-identity50.0%
+-commutative50.0%
unpow250.0%
unpow250.0%
hypot-def77.5%
Simplified77.5%
Taylor expanded in B around inf 59.8%
Final simplification52.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -2.1e+51)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7.5e-206)
t_0
(if (<= B 6e-154)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.05e-78) 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.1e+51) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7.5e-206) {
tmp = t_0;
} else if (B <= 6e-154) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.05e-78) {
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.1e+51) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7.5e-206) {
tmp = t_0;
} else if (B <= 6e-154) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.05e-78) {
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.1e+51: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7.5e-206: tmp = t_0 elif B <= 6e-154: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.05e-78: 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.1e+51) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7.5e-206) tmp = t_0; elseif (B <= 6e-154) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.05e-78) 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.1e+51) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7.5e-206) tmp = t_0; elseif (B <= 6e-154) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.05e-78) 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.1e+51], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.5e-206], t$95$0, If[LessEqual[B, 6e-154], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.05e-78], 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.1 \cdot 10^{+51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{-206}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.1000000000000001e51Initial program 44.6%
associate-*l/44.6%
*-lft-identity44.6%
+-commutative44.6%
unpow244.6%
unpow244.6%
hypot-def90.5%
Simplified90.5%
Taylor expanded in B around -inf 76.4%
if -2.1000000000000001e51 < B < 7.5e-206 or 6.0000000000000005e-154 < B < 2.0499999999999999e-78Initial program 57.8%
associate-*l/57.8%
*-lft-identity57.8%
+-commutative57.8%
unpow257.8%
unpow257.8%
hypot-def73.8%
Simplified73.8%
Taylor expanded in B around -inf 52.6%
Taylor expanded in C around inf 39.7%
if 7.5e-206 < B < 6.0000000000000005e-154Initial program 19.3%
associate-*l/19.3%
*-lft-identity19.3%
+-commutative19.3%
unpow219.3%
unpow219.3%
hypot-def69.0%
Simplified69.0%
Taylor expanded in C around inf 52.8%
distribute-rgt1-in52.8%
metadata-eval52.8%
mul0-lft52.8%
metadata-eval52.8%
Simplified52.8%
if 2.0499999999999999e-78 < B Initial program 50.2%
associate-*l/50.2%
*-lft-identity50.2%
+-commutative50.2%
unpow250.2%
unpow250.2%
hypot-def76.3%
Simplified76.3%
Taylor expanded in B around inf 57.3%
Final simplification52.6%
(FPCore (A B C)
:precision binary64
(if (<= B 2.55e-198)
(* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))
(if (<= B 6.8e-160)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* (/ 180.0 PI) (atan (/ (- C (+ A B)) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2.55e-198) {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
} else if (B <= 6.8e-160) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + B)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 2.55e-198) {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
} else if (B <= 6.8e-160) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + B)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2.55e-198: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) elif B <= 6.8e-160: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + B)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2.55e-198) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); elseif (B <= 6.8e-160) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + B)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2.55e-198) tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); elseif (B <= 6.8e-160) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = (180.0 / pi) * atan(((C - (A + B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2.55e-198], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.8e-160], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.55 \cdot 10^{-198}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-160}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\
\end{array}
\end{array}
if B < 2.5499999999999998e-198Initial program 53.3%
associate-*l/53.3%
*-lft-identity53.3%
+-commutative53.3%
unpow253.3%
unpow253.3%
hypot-def81.5%
Simplified81.5%
Taylor expanded in B around -inf 64.6%
if 2.5499999999999998e-198 < B < 6.80000000000000043e-160Initial program 14.3%
associate-*l/14.3%
*-lft-identity14.3%
+-commutative14.3%
unpow214.3%
unpow214.3%
hypot-def62.8%
Simplified62.8%
Taylor expanded in C around inf 43.1%
fma-def43.1%
associate--l+43.1%
unpow243.1%
fma-def43.1%
unpow243.1%
unpow243.1%
difference-of-squares53.1%
distribute-rgt1-in53.1%
metadata-eval53.1%
mul0-lft53.1%
mul-1-neg53.1%
distribute-rgt1-in53.1%
metadata-eval53.1%
mul0-lft53.1%
metadata-eval53.1%
Simplified53.1%
Taylor expanded in B around 0 61.6%
if 6.80000000000000043e-160 < B Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
associate-*l/51.8%
*-lft-identity51.8%
sub-neg51.8%
associate-+l-51.9%
sub-neg51.9%
remove-double-neg51.9%
+-commutative51.9%
unpow251.9%
unpow251.9%
hypot-def73.0%
Simplified73.0%
Taylor expanded in B around inf 70.3%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(if (<= C -5e-160)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= C 6.8e-22)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5e-160) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (C <= 6.8e-22) {
tmp = 180.0 * (atan(((B - A) / 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 (C <= -5e-160) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (C <= 6.8e-22) {
tmp = 180.0 * (Math.atan(((B - A) / 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 C <= -5e-160: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif C <= 6.8e-22: tmp = 180.0 * (math.atan(((B - A) / 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 (C <= -5e-160) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (C <= 6.8e-22) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5e-160) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (C <= 6.8e-22) tmp = 180.0 * (atan(((B - A) / B)) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5e-160], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.8e-22], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5 \cdot 10^{-160}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;C \leq 6.8 \cdot 10^{-22}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -4.99999999999999994e-160Initial program 67.1%
associate-*r/67.1%
associate-*l/67.1%
associate-*l/67.1%
*-lft-identity67.1%
sub-neg67.1%
associate-+l-66.4%
sub-neg66.4%
remove-double-neg66.4%
+-commutative66.4%
unpow266.4%
unpow266.4%
hypot-def85.7%
Simplified85.7%
Taylor expanded in A around 0 66.4%
unpow266.4%
unpow266.4%
hypot-def85.0%
Simplified85.0%
Taylor expanded in B around -inf 69.2%
if -4.99999999999999994e-160 < C < 6.7999999999999997e-22Initial program 65.4%
associate-*l/65.4%
*-lft-identity65.4%
+-commutative65.4%
unpow265.4%
unpow265.4%
hypot-def81.1%
Simplified81.1%
Taylor expanded in B around -inf 50.1%
Taylor expanded in C around 0 50.0%
if 6.7999999999999997e-22 < C Initial program 18.3%
associate-*r/18.3%
associate-*l/18.3%
associate-*l/18.3%
*-lft-identity18.3%
sub-neg18.3%
associate-+l-18.2%
sub-neg18.2%
remove-double-neg18.2%
+-commutative18.2%
unpow218.2%
unpow218.2%
hypot-def56.5%
Simplified56.5%
Taylor expanded in A around 0 14.1%
unpow214.1%
unpow214.1%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around inf 64.9%
Final simplification62.3%
(FPCore (A B C)
:precision binary64
(if (<= C -1.3e-220)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(if (<= C 1.9e-22)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-220) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else if (C <= 1.9e-22) {
tmp = 180.0 * (atan(((B - A) / 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 (C <= -1.3e-220) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else if (C <= 1.9e-22) {
tmp = 180.0 * (Math.atan(((B - A) / 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 C <= -1.3e-220: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) elif C <= 1.9e-22: tmp = 180.0 * (math.atan(((B - A) / 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 (C <= -1.3e-220) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); elseif (C <= 1.9e-22) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.3e-220) tmp = (180.0 / pi) * atan(((C - B) / B)); elseif (C <= 1.9e-22) tmp = 180.0 * (atan(((B - A) / B)) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.3e-220], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.9e-22], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.3 \cdot 10^{-220}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{elif}\;C \leq 1.9 \cdot 10^{-22}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -1.3e-220Initial program 66.7%
associate-*r/66.7%
associate-*l/66.7%
associate-*l/66.7%
*-lft-identity66.7%
sub-neg66.7%
associate-+l-65.2%
sub-neg65.2%
remove-double-neg65.2%
+-commutative65.2%
unpow265.2%
unpow265.2%
hypot-def84.9%
Simplified84.9%
Taylor expanded in A around 0 64.4%
unpow264.4%
unpow264.4%
hypot-def83.4%
Simplified83.4%
Taylor expanded in C around 0 68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
if -1.3e-220 < C < 1.90000000000000012e-22Initial program 65.8%
associate-*l/65.8%
*-lft-identity65.8%
+-commutative65.8%
unpow265.8%
unpow265.8%
hypot-def80.6%
Simplified80.6%
Taylor expanded in B around -inf 52.2%
Taylor expanded in C around 0 52.4%
if 1.90000000000000012e-22 < C Initial program 18.3%
associate-*r/18.3%
associate-*l/18.3%
associate-*l/18.3%
*-lft-identity18.3%
sub-neg18.3%
associate-+l-18.2%
sub-neg18.2%
remove-double-neg18.2%
+-commutative18.2%
unpow218.2%
unpow218.2%
hypot-def56.5%
Simplified56.5%
Taylor expanded in A around 0 14.1%
unpow214.1%
unpow214.1%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around inf 64.9%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= B -5.8e-57)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.8e-157)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.8e-57) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.8e-157) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.8e-57) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.8e-157) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.8e-57: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.8e-157: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.8e-57) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.8e-157) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.8e-57) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.8e-157) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.8e-57], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-157], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.8 \cdot 10^{-57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-157}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.8000000000000005e-57Initial program 47.3%
associate-*l/47.3%
*-lft-identity47.3%
+-commutative47.3%
unpow247.3%
unpow247.3%
hypot-def76.6%
Simplified76.6%
Taylor expanded in B around -inf 56.0%
if -5.8000000000000005e-57 < B < 1.8e-157Initial program 54.1%
associate-*l/54.1%
*-lft-identity54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-def83.8%
Simplified83.8%
Taylor expanded in C around inf 37.8%
distribute-rgt1-in37.8%
metadata-eval37.8%
mul0-lft37.8%
metadata-eval37.8%
Simplified37.8%
if 1.8e-157 < B Initial program 51.8%
associate-*l/51.8%
*-lft-identity51.8%
+-commutative51.8%
unpow251.8%
unpow251.8%
hypot-def73.3%
Simplified73.3%
Taylor expanded in B around inf 48.1%
Final simplification47.3%
(FPCore (A B C) :precision binary64 (if (<= B -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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 <= -2e-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, -2e-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 -2 \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 < -1.999999999999994e-310Initial program 50.2%
associate-*l/50.2%
*-lft-identity50.2%
+-commutative50.2%
unpow250.2%
unpow250.2%
hypot-def79.3%
Simplified79.3%
Taylor expanded in B around -inf 39.7%
if -1.999999999999994e-310 < B Initial program 52.0%
associate-*l/52.0%
*-lft-identity52.0%
+-commutative52.0%
unpow252.0%
unpow252.0%
hypot-def75.8%
Simplified75.8%
Taylor expanded in B around inf 39.2%
Final simplification39.4%
(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 51.2%
associate-*l/51.2%
*-lft-identity51.2%
+-commutative51.2%
unpow251.2%
unpow251.2%
hypot-def77.5%
Simplified77.5%
Taylor expanded in B around inf 21.3%
Final simplification21.3%
herbie shell --seed 2023187
(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)))