
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -7.6e+177) (* (atan (* 0.5 (/ B A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.6e+177) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.6e+177) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.6e+177: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.6e+177) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.6e+177) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.6e+177], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.6 \cdot 10^{+177}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.5999999999999996e177Initial program 9.6%
Taylor expanded in A around -inf 86.4%
associate-*r/86.4%
Simplified86.4%
Taylor expanded in B around 0 86.4%
associate-*r/86.5%
*-commutative86.5%
associate-/l*86.6%
Simplified86.6%
if -7.5999999999999996e177 < A Initial program 58.1%
associate-*l/58.1%
*-lft-identity58.1%
+-commutative58.1%
unpow258.1%
unpow258.1%
hypot-define82.8%
Simplified82.8%
Final simplification83.2%
(FPCore (A B C)
:precision binary64
(if (<= A -6.8e+177)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 4.4e-96)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e+177) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 4.4e-96) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e+177) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 4.4e-96) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.8e+177: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 4.4e-96: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.8e+177) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 4.4e-96) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.8e+177) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 4.4e-96) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.8e+177], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e-96], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.8 \cdot 10^{+177}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{-96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.7999999999999996e177Initial program 9.6%
Taylor expanded in A around -inf 86.4%
associate-*r/86.4%
Simplified86.4%
Taylor expanded in B around 0 86.4%
associate-*r/86.5%
*-commutative86.5%
associate-/l*86.6%
Simplified86.6%
if -6.7999999999999996e177 < A < 4.39999999999999959e-96Initial program 49.3%
Taylor expanded in A around 0 47.7%
unpow247.7%
unpow247.7%
hypot-define75.8%
Simplified75.8%
if 4.39999999999999959e-96 < A Initial program 75.8%
Taylor expanded in C around 0 74.7%
mul-1-neg74.7%
distribute-neg-frac274.7%
+-commutative74.7%
unpow274.7%
unpow274.7%
hypot-define87.0%
Simplified87.0%
Final simplification80.2%
(FPCore (A B C)
:precision binary64
(if (<= A -6.8e+177)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 1.25e+106)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (+ A B) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e+177) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 1.25e+106) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A + B) / -B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e+177) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 1.25e+106) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A + B) / -B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.8e+177: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 1.25e+106: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((A + B) / -B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.8e+177) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 1.25e+106) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + B) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.8e+177) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 1.25e+106) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((A + B) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.8e+177], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.25e+106], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A + B), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.8 \cdot 10^{+177}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{+106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + B}{-B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.7999999999999996e177Initial program 9.6%
Taylor expanded in A around -inf 86.4%
associate-*r/86.4%
Simplified86.4%
Taylor expanded in B around 0 86.4%
associate-*r/86.5%
*-commutative86.5%
associate-/l*86.6%
Simplified86.6%
if -6.7999999999999996e177 < A < 1.25e106Initial program 53.8%
Taylor expanded in A around 0 49.5%
unpow249.5%
unpow249.5%
hypot-define76.1%
Simplified76.1%
if 1.25e106 < A Initial program 82.1%
Taylor expanded in C around 0 82.1%
mul-1-neg82.1%
distribute-neg-frac282.1%
+-commutative82.1%
unpow282.1%
unpow282.1%
hypot-define89.1%
Simplified89.1%
Taylor expanded in A around 0 86.3%
+-commutative86.3%
Simplified86.3%
Final simplification78.5%
(FPCore (A B C) :precision binary64 (if (<= A -6.8e+177) (* (atan (* 0.5 (/ B A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e+177) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e+177) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.8e+177: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.8e+177) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.8e+177) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.8e+177], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.8 \cdot 10^{+177}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.7999999999999996e177Initial program 9.6%
Taylor expanded in A around -inf 86.4%
associate-*r/86.4%
Simplified86.4%
Taylor expanded in B around 0 86.4%
associate-*r/86.5%
*-commutative86.5%
associate-/l*86.6%
Simplified86.6%
if -6.7999999999999996e177 < A Initial program 58.1%
Simplified81.5%
Final simplification82.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))
(t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI)))
(t_2 (* 180.0 (/ (atan (* (/ C B) 2.0)) PI))))
(if (<= B -5.1e-59)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.85e-125)
t_0
(if (<= B 2.25e-276)
t_2
(if (<= B 1.8e-233)
t_1
(if (<= B 1e-179)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 4e-131)
t_1
(if (<= B 3.75e-109)
t_0
(if (<= B 1.4e+40) t_2 (* 180.0 (/ (atan -1.0) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double t_2 = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
double tmp;
if (B <= -5.1e-59) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.85e-125) {
tmp = t_0;
} else if (B <= 2.25e-276) {
tmp = t_2;
} else if (B <= 1.8e-233) {
tmp = t_1;
} else if (B <= 1e-179) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 4e-131) {
tmp = t_1;
} else if (B <= 3.75e-109) {
tmp = t_0;
} else if (B <= 1.4e+40) {
tmp = t_2;
} 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(((A / B) * -2.0)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double t_2 = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
double tmp;
if (B <= -5.1e-59) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.85e-125) {
tmp = t_0;
} else if (B <= 2.25e-276) {
tmp = t_2;
} else if (B <= 1.8e-233) {
tmp = t_1;
} else if (B <= 1e-179) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 4e-131) {
tmp = t_1;
} else if (B <= 3.75e-109) {
tmp = t_0;
} else if (B <= 1.4e+40) {
tmp = t_2;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi) t_2 = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) tmp = 0 if B <= -5.1e-59: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.85e-125: tmp = t_0 elif B <= 2.25e-276: tmp = t_2 elif B <= 1.8e-233: tmp = t_1 elif B <= 1e-179: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 4e-131: tmp = t_1 elif B <= 3.75e-109: tmp = t_0 elif B <= 1.4e+40: tmp = t_2 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(Float64(A / B) * -2.0)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) t_2 = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)) tmp = 0.0 if (B <= -5.1e-59) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.85e-125) tmp = t_0; elseif (B <= 2.25e-276) tmp = t_2; elseif (B <= 1.8e-233) tmp = t_1; elseif (B <= 1e-179) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 4e-131) tmp = t_1; elseif (B <= 3.75e-109) tmp = t_0; elseif (B <= 1.4e+40) tmp = t_2; 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(((A / B) * -2.0)) / pi); t_1 = 180.0 * (atan((0.0 / B)) / pi); t_2 = 180.0 * (atan(((C / B) * 2.0)) / pi); tmp = 0.0; if (B <= -5.1e-59) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.85e-125) tmp = t_0; elseif (B <= 2.25e-276) tmp = t_2; elseif (B <= 1.8e-233) tmp = t_1; elseif (B <= 1e-179) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 4e-131) tmp = t_1; elseif (B <= 3.75e-109) tmp = t_0; elseif (B <= 1.4e+40) tmp = t_2; 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[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.1e-59], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.85e-125], t$95$0, If[LessEqual[B, 2.25e-276], t$95$2, If[LessEqual[B, 1.8e-233], t$95$1, If[LessEqual[B, 1e-179], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-131], t$95$1, If[LessEqual[B, 3.75e-109], t$95$0, If[LessEqual[B, 1.4e+40], t$95$2, 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{A}{B} \cdot -2\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{if}\;B \leq -5.1 \cdot 10^{-59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.85 \cdot 10^{-125}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.25 \cdot 10^{-276}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-233}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 10^{-179}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 3.75 \cdot 10^{-109}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.0999999999999996e-59Initial program 49.4%
Taylor expanded in B around -inf 69.4%
if -5.0999999999999996e-59 < B < -1.85e-125 or 3.9999999999999999e-131 < B < 3.74999999999999991e-109Initial program 67.0%
Taylor expanded in A around inf 47.6%
if -1.85e-125 < B < 2.24999999999999981e-276 or 3.74999999999999991e-109 < B < 1.4000000000000001e40Initial program 64.7%
Taylor expanded in C around -inf 46.4%
if 2.24999999999999981e-276 < B < 1.80000000000000004e-233 or 1e-179 < B < 3.9999999999999999e-131Initial program 31.6%
Taylor expanded in C around inf 53.2%
associate-*r/53.2%
distribute-rgt1-in53.2%
metadata-eval53.2%
mul0-lft53.2%
metadata-eval53.2%
Simplified53.2%
if 1.80000000000000004e-233 < B < 1e-179Initial program 73.2%
Taylor expanded in B around -inf 72.2%
associate--l+72.2%
div-sub72.2%
Simplified72.2%
Taylor expanded in C around inf 72.2%
if 1.4000000000000001e40 < B Initial program 42.5%
Taylor expanded in B around inf 73.8%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ A (- B))) PI)))
(t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI)))
(t_2 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -9.8e-61)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.65e-125)
t_0
(if (<= B 3.1e-274)
t_2
(if (<= B 5.2e-230)
t_1
(if (<= B 1.02e-172)
t_2
(if (<= B 4.5e-133)
t_1
(if (<= B 2.55e-105)
t_0
(if (<= B 1.25e+40) t_2 (* 180.0 (/ (atan -1.0) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((A / -B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double t_2 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -9.8e-61) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.65e-125) {
tmp = t_0;
} else if (B <= 3.1e-274) {
tmp = t_2;
} else if (B <= 5.2e-230) {
tmp = t_1;
} else if (B <= 1.02e-172) {
tmp = t_2;
} else if (B <= 4.5e-133) {
tmp = t_1;
} else if (B <= 2.55e-105) {
tmp = t_0;
} else if (B <= 1.25e+40) {
tmp = t_2;
} 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((A / -B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double t_2 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -9.8e-61) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.65e-125) {
tmp = t_0;
} else if (B <= 3.1e-274) {
tmp = t_2;
} else if (B <= 5.2e-230) {
tmp = t_1;
} else if (B <= 1.02e-172) {
tmp = t_2;
} else if (B <= 4.5e-133) {
tmp = t_1;
} else if (B <= 2.55e-105) {
tmp = t_0;
} else if (B <= 1.25e+40) {
tmp = t_2;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((A / -B)) / math.pi) t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi) t_2 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -9.8e-61: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.65e-125: tmp = t_0 elif B <= 3.1e-274: tmp = t_2 elif B <= 5.2e-230: tmp = t_1 elif B <= 1.02e-172: tmp = t_2 elif B <= 4.5e-133: tmp = t_1 elif B <= 2.55e-105: tmp = t_0 elif B <= 1.25e+40: tmp = t_2 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(A / Float64(-B))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) t_2 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -9.8e-61) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.65e-125) tmp = t_0; elseif (B <= 3.1e-274) tmp = t_2; elseif (B <= 5.2e-230) tmp = t_1; elseif (B <= 1.02e-172) tmp = t_2; elseif (B <= 4.5e-133) tmp = t_1; elseif (B <= 2.55e-105) tmp = t_0; elseif (B <= 1.25e+40) tmp = t_2; 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((A / -B)) / pi); t_1 = 180.0 * (atan((0.0 / B)) / pi); t_2 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -9.8e-61) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.65e-125) tmp = t_0; elseif (B <= 3.1e-274) tmp = t_2; elseif (B <= 5.2e-230) tmp = t_1; elseif (B <= 1.02e-172) tmp = t_2; elseif (B <= 4.5e-133) tmp = t_1; elseif (B <= 2.55e-105) tmp = t_0; elseif (B <= 1.25e+40) tmp = t_2; 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[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9.8e-61], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.65e-125], t$95$0, If[LessEqual[B, 3.1e-274], t$95$2, If[LessEqual[B, 5.2e-230], t$95$1, If[LessEqual[B, 1.02e-172], t$95$2, If[LessEqual[B, 4.5e-133], t$95$1, If[LessEqual[B, 2.55e-105], t$95$0, If[LessEqual[B, 1.25e+40], t$95$2, 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{A}{-B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -9.8 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.65 \cdot 10^{-125}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.02 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 2.55 \cdot 10^{-105}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.80000000000000004e-61Initial program 49.4%
Taylor expanded in B around -inf 69.4%
if -9.80000000000000004e-61 < B < -1.65e-125 or 4.50000000000000009e-133 < B < 2.55000000000000004e-105Initial program 67.0%
Taylor expanded in B around -inf 63.7%
associate--l+63.7%
div-sub63.7%
Simplified63.7%
Taylor expanded in A around inf 47.5%
mul-1-neg47.5%
distribute-neg-frac247.5%
Simplified47.5%
if -1.65e-125 < B < 3.09999999999999978e-274 or 5.2000000000000003e-230 < B < 1.02e-172 or 2.55000000000000004e-105 < B < 1.25000000000000001e40Initial program 65.4%
Taylor expanded in B around -inf 56.2%
associate--l+56.2%
div-sub60.9%
Simplified60.9%
Taylor expanded in C around inf 48.4%
if 3.09999999999999978e-274 < B < 5.2000000000000003e-230 or 1.02e-172 < B < 4.50000000000000009e-133Initial program 31.6%
Taylor expanded in C around inf 53.2%
associate-*r/53.2%
distribute-rgt1-in53.2%
metadata-eval53.2%
mul0-lft53.2%
metadata-eval53.2%
Simplified53.2%
if 1.25000000000000001e40 < B Initial program 42.5%
Taylor expanded in B around inf 73.8%
Final simplification59.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))
(t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI)))
(t_2 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -1.92e-59)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.5e-127)
t_0
(if (<= B 3.3e-275)
t_2
(if (<= B 1.02e-232)
t_1
(if (<= B 1.25e-172)
t_2
(if (<= B 2.3e-132)
t_1
(if (<= B 1e-107)
t_0
(if (<= B 2.05e+40) t_2 (* 180.0 (/ (atan -1.0) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double t_2 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -1.92e-59) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.5e-127) {
tmp = t_0;
} else if (B <= 3.3e-275) {
tmp = t_2;
} else if (B <= 1.02e-232) {
tmp = t_1;
} else if (B <= 1.25e-172) {
tmp = t_2;
} else if (B <= 2.3e-132) {
tmp = t_1;
} else if (B <= 1e-107) {
tmp = t_0;
} else if (B <= 2.05e+40) {
tmp = t_2;
} 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(((A / B) * -2.0)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double t_2 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -1.92e-59) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.5e-127) {
tmp = t_0;
} else if (B <= 3.3e-275) {
tmp = t_2;
} else if (B <= 1.02e-232) {
tmp = t_1;
} else if (B <= 1.25e-172) {
tmp = t_2;
} else if (B <= 2.3e-132) {
tmp = t_1;
} else if (B <= 1e-107) {
tmp = t_0;
} else if (B <= 2.05e+40) {
tmp = t_2;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi) t_2 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -1.92e-59: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.5e-127: tmp = t_0 elif B <= 3.3e-275: tmp = t_2 elif B <= 1.02e-232: tmp = t_1 elif B <= 1.25e-172: tmp = t_2 elif B <= 2.3e-132: tmp = t_1 elif B <= 1e-107: tmp = t_0 elif B <= 2.05e+40: tmp = t_2 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(Float64(A / B) * -2.0)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) t_2 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -1.92e-59) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.5e-127) tmp = t_0; elseif (B <= 3.3e-275) tmp = t_2; elseif (B <= 1.02e-232) tmp = t_1; elseif (B <= 1.25e-172) tmp = t_2; elseif (B <= 2.3e-132) tmp = t_1; elseif (B <= 1e-107) tmp = t_0; elseif (B <= 2.05e+40) tmp = t_2; 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(((A / B) * -2.0)) / pi); t_1 = 180.0 * (atan((0.0 / B)) / pi); t_2 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -1.92e-59) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.5e-127) tmp = t_0; elseif (B <= 3.3e-275) tmp = t_2; elseif (B <= 1.02e-232) tmp = t_1; elseif (B <= 1.25e-172) tmp = t_2; elseif (B <= 2.3e-132) tmp = t_1; elseif (B <= 1e-107) tmp = t_0; elseif (B <= 2.05e+40) tmp = t_2; 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[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.92e-59], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.5e-127], t$95$0, If[LessEqual[B, 3.3e-275], t$95$2, If[LessEqual[B, 1.02e-232], t$95$1, If[LessEqual[B, 1.25e-172], t$95$2, If[LessEqual[B, 2.3e-132], t$95$1, If[LessEqual[B, 1e-107], t$95$0, If[LessEqual[B, 2.05e+40], t$95$2, 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{A}{B} \cdot -2\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.92 \cdot 10^{-59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.5 \cdot 10^{-127}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.3 \cdot 10^{-275}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq 1.02 \cdot 10^{-232}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 10^{-107}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.92000000000000008e-59Initial program 49.4%
Taylor expanded in B around -inf 69.4%
if -1.92000000000000008e-59 < B < -5.50000000000000036e-127 or 2.30000000000000003e-132 < B < 1e-107Initial program 67.0%
Taylor expanded in A around inf 47.6%
if -5.50000000000000036e-127 < B < 3.3e-275 or 1.0200000000000001e-232 < B < 1.25e-172 or 1e-107 < B < 2.0500000000000001e40Initial program 65.4%
Taylor expanded in B around -inf 56.2%
associate--l+56.2%
div-sub60.9%
Simplified60.9%
Taylor expanded in C around inf 48.4%
if 3.3e-275 < B < 1.0200000000000001e-232 or 1.25e-172 < B < 2.30000000000000003e-132Initial program 31.6%
Taylor expanded in C around inf 53.2%
associate-*r/53.2%
distribute-rgt1-in53.2%
metadata-eval53.2%
mul0-lft53.2%
metadata-eval53.2%
Simplified53.2%
if 2.0500000000000001e40 < B Initial program 42.5%
Taylor expanded in B around inf 73.8%
Final simplification59.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -90000000000000.0)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 3.5e-250)
t_0
(if (<= C 2.6e-181)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= C 1.95e-89)
t_0
(if (<= C 5.5e-11)
(* 180.0 (/ (atan (/ (+ A B) (- B))) PI))
(* (/ 180.0 PI) (atan (/ (* B -0.5) C))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -90000000000000.0) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 3.5e-250) {
tmp = t_0;
} else if (C <= 2.6e-181) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (C <= 1.95e-89) {
tmp = t_0;
} else if (C <= 5.5e-11) {
tmp = 180.0 * (atan(((A + B) / -B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -90000000000000.0) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 3.5e-250) {
tmp = t_0;
} else if (C <= 2.6e-181) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (C <= 1.95e-89) {
tmp = t_0;
} else if (C <= 5.5e-11) {
tmp = 180.0 * (Math.atan(((A + B) / -B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -90000000000000.0: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 3.5e-250: tmp = t_0 elif C <= 2.6e-181: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif C <= 1.95e-89: tmp = t_0 elif C <= 5.5e-11: tmp = 180.0 * (math.atan(((A + B) / -B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -90000000000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 3.5e-250) tmp = t_0; elseif (C <= 2.6e-181) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (C <= 1.95e-89) tmp = t_0; elseif (C <= 5.5e-11) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + B) / Float64(-B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -90000000000000.0) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 3.5e-250) tmp = t_0; elseif (C <= 2.6e-181) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (C <= 1.95e-89) tmp = t_0; elseif (C <= 5.5e-11) tmp = 180.0 * (atan(((A + B) / -B)) / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -90000000000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.5e-250], t$95$0, If[LessEqual[C, 2.6e-181], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.95e-89], t$95$0, If[LessEqual[C, 5.5e-11], N[(180.0 * N[(N[ArcTan[N[(N[(A + B), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -90000000000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{-250}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 2.6 \cdot 10^{-181}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.95 \cdot 10^{-89}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 5.5 \cdot 10^{-11}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + B}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if C < -9e13Initial program 80.1%
Taylor expanded in A around 0 78.8%
unpow278.8%
unpow278.8%
hypot-define90.8%
Simplified90.8%
Taylor expanded in C around 0 85.8%
if -9e13 < C < 3.4999999999999999e-250 or 2.59999999999999999e-181 < C < 1.94999999999999989e-89Initial program 62.7%
Taylor expanded in B around -inf 62.3%
associate--l+62.3%
div-sub62.3%
Simplified62.3%
Taylor expanded in C around 0 57.1%
if 3.4999999999999999e-250 < C < 2.59999999999999999e-181Initial program 21.1%
Taylor expanded in A around -inf 75.0%
associate-*r/75.0%
Simplified75.0%
if 1.94999999999999989e-89 < C < 5.49999999999999975e-11Initial program 47.2%
Taylor expanded in C around 0 47.2%
mul-1-neg47.2%
distribute-neg-frac247.2%
+-commutative47.2%
unpow247.2%
unpow247.2%
hypot-define89.9%
Simplified89.9%
Taylor expanded in A around 0 67.5%
+-commutative67.5%
Simplified67.5%
if 5.49999999999999975e-11 < C Initial program 16.4%
Taylor expanded in A around 0 14.8%
unpow214.8%
unpow214.8%
hypot-define53.9%
Simplified53.9%
Taylor expanded in C around inf 69.5%
associate-*r/69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in B around 0 69.5%
*-commutative69.5%
associate-*l/69.5%
associate-*r/69.5%
associate-*r/69.6%
associate-*l/69.7%
associate-*r/69.8%
Simplified69.8%
Final simplification68.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)))
(t_1 (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))))
(if (<= A -2.9e+138)
t_1
(if (<= A -4e+28)
t_0
(if (<= A -5.8e-39)
t_1
(if (<= A 7.2e-93) t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double t_1 = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
double tmp;
if (A <= -2.9e+138) {
tmp = t_1;
} else if (A <= -4e+28) {
tmp = t_0;
} else if (A <= -5.8e-39) {
tmp = t_1;
} else if (A <= 7.2e-93) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
double t_1 = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
double tmp;
if (A <= -2.9e+138) {
tmp = t_1;
} else if (A <= -4e+28) {
tmp = t_0;
} else if (A <= -5.8e-39) {
tmp = t_1;
} else if (A <= 7.2e-93) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) t_1 = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) tmp = 0 if A <= -2.9e+138: tmp = t_1 elif A <= -4e+28: tmp = t_0 elif A <= -5.8e-39: tmp = t_1 elif A <= 7.2e-93: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)) tmp = 0.0 if (A <= -2.9e+138) tmp = t_1; elseif (A <= -4e+28) tmp = t_0; elseif (A <= -5.8e-39) tmp = t_1; elseif (A <= 7.2e-93) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + (C / B))) / pi); t_1 = 180.0 * (atan(((0.5 * B) / A)) / pi); tmp = 0.0; if (A <= -2.9e+138) tmp = t_1; elseif (A <= -4e+28) tmp = t_0; elseif (A <= -5.8e-39) tmp = t_1; elseif (A <= 7.2e-93) tmp = t_0; else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.9e+138], t$95$1, If[LessEqual[A, -4e+28], t$95$0, If[LessEqual[A, -5.8e-39], t$95$1, If[LessEqual[A, 7.2e-93], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -2.9 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -4 \cdot 10^{+28}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -5.8 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 7.2 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.9000000000000001e138 or -3.99999999999999983e28 < A < -5.79999999999999975e-39Initial program 22.1%
Taylor expanded in A around -inf 70.2%
associate-*r/70.2%
Simplified70.2%
if -2.9000000000000001e138 < A < -3.99999999999999983e28 or -5.79999999999999975e-39 < A < 7.2000000000000003e-93Initial program 51.8%
Taylor expanded in A around 0 49.8%
unpow249.8%
unpow249.8%
hypot-define79.8%
Simplified79.8%
Taylor expanded in B around -inf 54.1%
if 7.2000000000000003e-93 < A Initial program 75.8%
Taylor expanded in B around -inf 72.8%
associate--l+72.8%
div-sub72.9%
Simplified72.9%
Taylor expanded in C around 0 71.7%
Final simplification62.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -5.6e-78)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 1.75e-248)
t_0
(if (<= C 1.1e-180)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= C 1.4e-16) t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -5.6e-78) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 1.75e-248) {
tmp = t_0;
} else if (C <= 1.1e-180) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (C <= 1.4e-16) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -5.6e-78) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 1.75e-248) {
tmp = t_0;
} else if (C <= 1.1e-180) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (C <= 1.4e-16) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -5.6e-78: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 1.75e-248: tmp = t_0 elif C <= 1.1e-180: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif C <= 1.4e-16: tmp = t_0 else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -5.6e-78) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 1.75e-248) tmp = t_0; elseif (C <= 1.1e-180) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (C <= 1.4e-16) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -5.6e-78) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 1.75e-248) tmp = t_0; elseif (C <= 1.1e-180) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (C <= 1.4e-16) tmp = t_0; else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5.6e-78], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.75e-248], t$95$0, If[LessEqual[C, 1.1e-180], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.4e-16], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -5.6 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.75 \cdot 10^{-248}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 1.1 \cdot 10^{-180}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.4 \cdot 10^{-16}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.60000000000000047e-78Initial program 73.7%
Taylor expanded in A around 0 70.6%
unpow270.6%
unpow270.6%
hypot-define87.1%
Simplified87.1%
Taylor expanded in B around -inf 75.2%
if -5.60000000000000047e-78 < C < 1.74999999999999991e-248 or 1.10000000000000007e-180 < C < 1.4000000000000001e-16Initial program 62.9%
Taylor expanded in B around -inf 60.0%
associate--l+60.0%
div-sub60.0%
Simplified60.0%
Taylor expanded in C around 0 57.4%
if 1.74999999999999991e-248 < C < 1.10000000000000007e-180Initial program 21.1%
Taylor expanded in A around -inf 75.0%
associate-*r/75.0%
Simplified75.0%
if 1.4000000000000001e-16 < C Initial program 17.8%
Taylor expanded in A around 0 16.3%
unpow216.3%
unpow216.3%
hypot-define56.9%
Simplified56.9%
Taylor expanded in C around inf 66.3%
associate-*r/66.3%
*-commutative66.3%
Simplified66.3%
Final simplification65.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -48000000000.0)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 2.45e-248)
t_0
(if (<= C 6e-180)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= C 4.5e-17) t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -48000000000.0) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 2.45e-248) {
tmp = t_0;
} else if (C <= 6e-180) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (C <= 4.5e-17) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -48000000000.0) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 2.45e-248) {
tmp = t_0;
} else if (C <= 6e-180) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (C <= 4.5e-17) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -48000000000.0: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 2.45e-248: tmp = t_0 elif C <= 6e-180: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif C <= 4.5e-17: tmp = t_0 else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -48000000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 2.45e-248) tmp = t_0; elseif (C <= 6e-180) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (C <= 4.5e-17) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -48000000000.0) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 2.45e-248) tmp = t_0; elseif (C <= 6e-180) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (C <= 4.5e-17) tmp = t_0; else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -48000000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.45e-248], t$95$0, If[LessEqual[C, 6e-180], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.5e-17], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -48000000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.45 \cdot 10^{-248}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 6 \cdot 10^{-180}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.5 \cdot 10^{-17}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.8e10Initial program 80.1%
Taylor expanded in A around 0 78.8%
unpow278.8%
unpow278.8%
hypot-define90.8%
Simplified90.8%
Taylor expanded in C around 0 85.8%
if -4.8e10 < C < 2.4499999999999998e-248 or 6.0000000000000001e-180 < C < 4.49999999999999978e-17Initial program 61.2%
Taylor expanded in B around -inf 61.0%
associate--l+61.0%
div-sub61.0%
Simplified61.0%
Taylor expanded in C around 0 56.4%
if 2.4499999999999998e-248 < C < 6.0000000000000001e-180Initial program 21.1%
Taylor expanded in A around -inf 75.0%
associate-*r/75.0%
Simplified75.0%
if 4.49999999999999978e-17 < C Initial program 17.8%
Taylor expanded in A around 0 16.3%
unpow216.3%
unpow216.3%
hypot-define56.9%
Simplified56.9%
Taylor expanded in C around inf 66.3%
associate-*r/66.3%
*-commutative66.3%
Simplified66.3%
Final simplification66.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -92000000000000.0)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 7e-249)
t_0
(if (<= C 6e-183)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= C 1.25e-16) t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) C)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -92000000000000.0) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 7e-249) {
tmp = t_0;
} else if (C <= 6e-183) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (C <= 1.25e-16) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -92000000000000.0) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 7e-249) {
tmp = t_0;
} else if (C <= 6e-183) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (C <= 1.25e-16) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -92000000000000.0: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 7e-249: tmp = t_0 elif C <= 6e-183: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif C <= 1.25e-16: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -92000000000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 7e-249) tmp = t_0; elseif (C <= 6e-183) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (C <= 1.25e-16) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -92000000000000.0) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 7e-249) tmp = t_0; elseif (C <= 6e-183) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (C <= 1.25e-16) tmp = t_0; else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -92000000000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7e-249], t$95$0, If[LessEqual[C, 6e-183], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.25e-16], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -92000000000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7 \cdot 10^{-249}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 6 \cdot 10^{-183}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.25 \cdot 10^{-16}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if C < -9.2e13Initial program 80.1%
Taylor expanded in A around 0 78.8%
unpow278.8%
unpow278.8%
hypot-define90.8%
Simplified90.8%
Taylor expanded in C around 0 85.8%
if -9.2e13 < C < 7.00000000000000025e-249 or 5.9999999999999996e-183 < C < 1.2500000000000001e-16Initial program 61.2%
Taylor expanded in B around -inf 61.0%
associate--l+61.0%
div-sub61.0%
Simplified61.0%
Taylor expanded in C around 0 56.4%
if 7.00000000000000025e-249 < C < 5.9999999999999996e-183Initial program 21.1%
Taylor expanded in A around -inf 75.0%
associate-*r/75.0%
Simplified75.0%
if 1.2500000000000001e-16 < C Initial program 17.8%
Taylor expanded in A around 0 16.3%
unpow216.3%
unpow216.3%
hypot-define56.9%
Simplified56.9%
Taylor expanded in C around inf 66.3%
associate-*r/66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in B around 0 66.3%
*-commutative66.3%
associate-*l/66.3%
associate-*r/66.3%
associate-*r/66.4%
associate-*l/66.4%
associate-*r/66.5%
Simplified66.5%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -7e-106)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.4e-278)
t_0
(if (<= B 1.5e-231)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.4e+40) 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 <= -7e-106) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.4e-278) {
tmp = t_0;
} else if (B <= 1.5e-231) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.4e+40) {
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 <= -7e-106) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.4e-278) {
tmp = t_0;
} else if (B <= 1.5e-231) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.4e+40) {
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 <= -7e-106: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.4e-278: tmp = t_0 elif B <= 1.5e-231: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.4e+40: 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 <= -7e-106) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.4e-278) tmp = t_0; elseif (B <= 1.5e-231) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.4e+40) 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 <= -7e-106) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.4e-278) tmp = t_0; elseif (B <= 1.5e-231) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.4e+40) 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, -7e-106], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-278], t$95$0, If[LessEqual[B, 1.5e-231], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e+40], 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 -7 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-278}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-231}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{+40}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -7e-106Initial program 53.0%
Taylor expanded in B around -inf 63.6%
if -7e-106 < B < 1.40000000000000004e-278 or 1.5000000000000001e-231 < B < 1.4000000000000001e40Initial program 63.1%
Taylor expanded in B around -inf 55.3%
associate--l+55.3%
div-sub58.9%
Simplified58.9%
Taylor expanded in C around inf 42.1%
if 1.40000000000000004e-278 < B < 1.5000000000000001e-231Initial program 11.4%
Taylor expanded in C around inf 56.2%
associate-*r/56.2%
distribute-rgt1-in56.2%
metadata-eval56.2%
mul0-lft56.2%
metadata-eval56.2%
Simplified56.2%
if 1.4000000000000001e40 < B Initial program 42.5%
Taylor expanded in B around inf 73.8%
Final simplification55.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B 1.05e-277)
t_0
(if (<= B 1.6e-233)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.22e+53) t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= 1.05e-277) {
tmp = t_0;
} else if (B <= 1.6e-233) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.22e+53) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= 1.05e-277) {
tmp = t_0;
} else if (B <= 1.6e-233) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.22e+53) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= 1.05e-277: tmp = t_0 elif B <= 1.6e-233: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.22e+53: tmp = t_0 else: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= 1.05e-277) tmp = t_0; elseif (B <= 1.6e-233) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.22e+53) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= 1.05e-277) tmp = t_0; elseif (B <= 1.6e-233) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.22e+53) tmp = t_0; else tmp = 180.0 * (atan(((C - B) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.05e-277], t$95$0, If[LessEqual[B, 1.6e-233], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.22e+53], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq 1.05 \cdot 10^{-277}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-233}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.22 \cdot 10^{+53}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.04999999999999997e-277 or 1.5999999999999999e-233 < B < 1.21999999999999999e53Initial program 59.7%
Taylor expanded in B around -inf 65.5%
associate--l+65.5%
div-sub67.6%
Simplified67.6%
if 1.04999999999999997e-277 < B < 1.5999999999999999e-233Initial program 11.4%
Taylor expanded in C around inf 56.2%
associate-*r/56.2%
distribute-rgt1-in56.2%
metadata-eval56.2%
mul0-lft56.2%
metadata-eval56.2%
Simplified56.2%
if 1.21999999999999999e53 < B Initial program 39.1%
Taylor expanded in A around 0 37.0%
unpow237.0%
unpow237.0%
hypot-define81.8%
Simplified81.8%
Taylor expanded in C around 0 81.0%
Final simplification69.7%
(FPCore (A B C)
:precision binary64
(if (<= B 3.4e-274)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 3e-233)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.4e-274) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 3e-233) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.4e-274) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 3e-233) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.4e-274: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 3e-233: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 3.4e-274) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 3e-233) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.4e-274) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 3e-233) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.4e-274], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3e-233], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.4 \cdot 10^{-274}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3 \cdot 10^{-233}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 3.39999999999999981e-274Initial program 57.5%
Taylor expanded in B around -inf 70.5%
associate--l+70.5%
div-sub73.7%
Simplified73.7%
if 3.39999999999999981e-274 < B < 2.99999999999999999e-233Initial program 11.4%
Taylor expanded in C around inf 56.2%
associate-*r/56.2%
distribute-rgt1-in56.2%
metadata-eval56.2%
mul0-lft56.2%
metadata-eval56.2%
Simplified56.2%
if 2.99999999999999999e-233 < B Initial program 53.2%
Taylor expanded in B around inf 70.8%
Final simplification71.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.6e+143)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= A 7.7e+102)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e+143) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (A <= 7.7e+102) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e+143) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (A <= 7.7e+102) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.6e+143: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif A <= 7.7e+102: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.6e+143) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (A <= 7.7e+102) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.6e+143) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (A <= 7.7e+102) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.6e+143], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.7e+102], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.6 \cdot 10^{+143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.7 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.5999999999999999e143Initial program 15.1%
Taylor expanded in C around inf 37.2%
associate-*r/37.2%
distribute-rgt1-in37.2%
metadata-eval37.2%
mul0-lft37.2%
metadata-eval37.2%
Simplified37.2%
if -2.5999999999999999e143 < A < 7.70000000000000013e102Initial program 54.2%
Taylor expanded in A around 0 49.8%
unpow249.8%
unpow249.8%
hypot-define76.2%
Simplified76.2%
Taylor expanded in B around -inf 51.1%
if 7.70000000000000013e102 < A Initial program 82.1%
Taylor expanded in A around inf 81.3%
Final simplification53.5%
(FPCore (A B C)
:precision binary64
(if (<= A -8e+143)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= A 1e-96)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8e+143) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (A <= 1e-96) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8e+143) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (A <= 1e-96) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8e+143: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif A <= 1e-96: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8e+143) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (A <= 1e-96) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8e+143) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (A <= 1e-96) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8e+143], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1e-96], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8 \cdot 10^{+143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 10^{-96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.0000000000000002e143Initial program 15.1%
Taylor expanded in C around inf 37.2%
associate-*r/37.2%
distribute-rgt1-in37.2%
metadata-eval37.2%
mul0-lft37.2%
metadata-eval37.2%
Simplified37.2%
if -8.0000000000000002e143 < A < 9.9999999999999991e-97Initial program 49.7%
Taylor expanded in A around 0 47.9%
unpow247.9%
unpow247.9%
hypot-define76.0%
Simplified76.0%
Taylor expanded in B around -inf 51.2%
if 9.9999999999999991e-97 < A Initial program 75.8%
Taylor expanded in B around -inf 72.8%
associate--l+72.8%
div-sub72.9%
Simplified72.9%
Taylor expanded in C around 0 71.7%
Final simplification55.5%
(FPCore (A B C)
:precision binary64
(if (<= B -7.5e-123)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.6e-117)
(* 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 <= -7.5e-123) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.6e-117) {
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 <= -7.5e-123) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.6e-117) {
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 <= -7.5e-123: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.6e-117: 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 <= -7.5e-123) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.6e-117) 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 <= -7.5e-123) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.6e-117) 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, -7.5e-123], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e-117], 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 -7.5 \cdot 10^{-123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-117}:\\
\;\;\;\;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 < -7.50000000000000011e-123Initial program 54.1%
Taylor expanded in B around -inf 60.0%
if -7.50000000000000011e-123 < B < 1.59999999999999998e-117Initial program 52.8%
Taylor expanded in C around inf 30.1%
associate-*r/30.1%
distribute-rgt1-in30.1%
metadata-eval30.1%
mul0-lft30.1%
metadata-eval30.1%
Simplified30.1%
if 1.59999999999999998e-117 < B Initial program 52.6%
Taylor expanded in B around inf 50.8%
Final simplification47.2%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 57.6%
Taylor expanded in B around -inf 45.7%
if -4.999999999999985e-310 < B Initial program 49.3%
Taylor expanded in B around inf 37.8%
Final simplification41.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 53.2%
Taylor expanded in B around inf 21.1%
Final simplification21.1%
herbie shell --seed 2024067
(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)))