
(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 26 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
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -2e-35) (not (<= t_0 0.0)))
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(* (/ 180.0 PI) (atan (* B (/ 0.5 A)))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -2e-35) || !(t_0 <= 0.0)) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -2e-35) || !(t_0 <= 0.0)) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -2e-35) or not (t_0 <= 0.0): tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -2e-35) || !(t_0 <= 0.0)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -2e-35) || ~((t_0 <= 0.0))) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = (180.0 / pi) * atan((B * (0.5 / A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[t$95$0, -2e-35], N[Not[LessEqual[t$95$0, 0.0]], $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], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{-35} \lor \neg \left(t\_0 \leq 0\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -2.00000000000000002e-35 or -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 62.0%
associate-*l/62.0%
*-lft-identity62.0%
+-commutative62.0%
unpow262.0%
unpow262.0%
hypot-define90.5%
Simplified90.5%
if -2.00000000000000002e-35 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0Initial program 20.6%
Taylor expanded in B around 0 7.0%
Simplified7.0%
Taylor expanded in A around -inf 46.0%
Taylor expanded in B around 0 54.7%
associate-*r/54.8%
*-rgt-identity54.8%
times-frac54.8%
/-rgt-identity54.8%
Simplified54.8%
*-un-lft-identity54.8%
Applied egg-rr54.8%
*-lft-identity54.8%
metadata-eval54.8%
times-frac54.8%
*-commutative54.8%
times-frac54.8%
/-rgt-identity54.8%
Simplified54.8%
Final simplification85.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (+ A (hypot B A))))
(if (<= C -1.25e-117)
(* 180.0 (/ (atan (/ (- C t_0) B)) PI))
(if (<= C 6.6e+151)
(* 180.0 (/ (atan (/ t_0 (- B))) PI))
(* (/ 180.0 PI) (atan (* B (/ -0.5 C))))))))
double code(double A, double B, double C) {
double t_0 = A + hypot(B, A);
double tmp;
if (C <= -1.25e-117) {
tmp = 180.0 * (atan(((C - t_0) / B)) / ((double) M_PI));
} else if (C <= 6.6e+151) {
tmp = 180.0 * (atan((t_0 / -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 = A + Math.hypot(B, A);
double tmp;
if (C <= -1.25e-117) {
tmp = 180.0 * (Math.atan(((C - t_0) / B)) / Math.PI);
} else if (C <= 6.6e+151) {
tmp = 180.0 * (Math.atan((t_0 / -B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / C)));
}
return tmp;
}
def code(A, B, C): t_0 = A + math.hypot(B, A) tmp = 0 if C <= -1.25e-117: tmp = 180.0 * (math.atan(((C - t_0) / B)) / math.pi) elif C <= 6.6e+151: tmp = 180.0 * (math.atan((t_0 / -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(A + hypot(B, A)) tmp = 0.0 if (C <= -1.25e-117) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - t_0) / B)) / pi)); elseif (C <= 6.6e+151) tmp = Float64(180.0 * Float64(atan(Float64(t_0 / Float64(-B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = A + hypot(B, A); tmp = 0.0; if (C <= -1.25e-117) tmp = 180.0 * (atan(((C - t_0) / B)) / pi); elseif (C <= 6.6e+151) tmp = 180.0 * (atan((t_0 / -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[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.25e-117], N[(180.0 * N[(N[ArcTan[N[(N[(C - t$95$0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.6e+151], N[(180.0 * N[(N[ArcTan[N[(t$95$0 / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := A + \mathsf{hypot}\left(B, A\right)\\
\mathbf{if}\;C \leq -1.25 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - t\_0}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.6 \cdot 10^{+151}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{t\_0}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\
\end{array}
\end{array}
if C < -1.25e-117Initial program 78.7%
Simplified89.7%
Taylor expanded in C around 0 74.4%
+-commutative74.4%
unpow274.4%
unpow274.4%
hypot-define87.9%
Simplified87.9%
if -1.25e-117 < C < 6.60000000000000049e151Initial program 51.7%
Taylor expanded in C around 0 49.0%
mul-1-neg49.0%
distribute-neg-frac249.0%
+-commutative49.0%
unpow249.0%
unpow249.0%
hypot-define73.5%
Simplified73.5%
if 6.60000000000000049e151 < C Initial program 9.2%
Applied egg-rr67.5%
Taylor expanded in C around inf 83.9%
metadata-eval83.9%
cancel-sign-sub-inv83.9%
distribute-rgt1-in83.9%
metadata-eval83.9%
mul0-lft83.9%
div083.9%
metadata-eval83.9%
neg-sub083.9%
distribute-lft-neg-in83.9%
metadata-eval83.9%
Simplified83.9%
Taylor expanded in B around 0 85.9%
*-commutative85.9%
associate-*r/85.9%
associate-*l/86.1%
associate-/l*86.2%
associate-*r/86.2%
*-commutative86.2%
associate-*l/86.2%
associate-*r/86.2%
Simplified86.2%
Final simplification80.3%
(FPCore (A B C)
:precision binary64
(if (<= A -2.5e+233)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 4e-151)
(* 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 <= -2.5e+233) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 4e-151) {
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 <= -2.5e+233) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 4e-151) {
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 <= -2.5e+233: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 4e-151: 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 <= -2.5e+233) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 4e-151) 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 <= -2.5e+233) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 4e-151) 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, -2.5e+233], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4e-151], 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 -2.5 \cdot 10^{+233}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 4 \cdot 10^{-151}:\\
\;\;\;\;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 < -2.50000000000000004e233Initial program 6.5%
Taylor expanded in B around 0 6.5%
Simplified11.8%
Taylor expanded in A around -inf 47.7%
Taylor expanded in B around 0 92.5%
associate-*r/92.6%
*-rgt-identity92.6%
times-frac92.8%
/-rgt-identity92.8%
Simplified92.8%
if -2.50000000000000004e233 < A < 3.9999999999999998e-151Initial program 48.1%
Taylor expanded in A around 0 44.9%
unpow244.9%
unpow244.9%
hypot-define74.7%
Simplified74.7%
if 3.9999999999999998e-151 < A Initial program 71.4%
Taylor expanded in C around 0 67.9%
mul-1-neg67.9%
distribute-neg-frac267.9%
+-commutative67.9%
unpow267.9%
unpow267.9%
hypot-define81.8%
Simplified81.8%
(FPCore (A B C)
:precision binary64
(if (<= A -2.5e+233)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 1.05e-39)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e+233) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 1.05e-39) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e+233) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 1.05e-39) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.5e+233: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 1.05e-39: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.5e+233) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 1.05e-39) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.5e+233) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 1.05e-39) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.5e+233], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.05e-39], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.5 \cdot 10^{+233}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{-39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if A < -2.50000000000000004e233Initial program 6.5%
Taylor expanded in B around 0 6.5%
Simplified11.8%
Taylor expanded in A around -inf 47.7%
Taylor expanded in B around 0 92.5%
associate-*r/92.6%
*-rgt-identity92.6%
times-frac92.8%
/-rgt-identity92.8%
Simplified92.8%
if -2.50000000000000004e233 < A < 1.04999999999999997e-39Initial program 48.8%
Taylor expanded in A around 0 44.5%
unpow244.5%
unpow244.5%
hypot-define74.1%
Simplified74.1%
if 1.04999999999999997e-39 < A Initial program 78.4%
Simplified91.7%
Taylor expanded in C around 0 77.5%
+-commutative77.5%
unpow277.5%
unpow277.5%
hypot-define88.3%
Simplified88.3%
associate-*r/88.3%
Applied egg-rr88.3%
Taylor expanded in A around 0 80.6%
Taylor expanded in C around -inf 80.6%
associate-*r/80.6%
*-commutative80.6%
associate-/l*80.6%
mul-1-neg80.6%
distribute-neg-frac280.6%
associate-+r+80.6%
mul-1-neg80.6%
unsub-neg80.6%
Simplified80.6%
Final simplification77.0%
(FPCore (A B C) :precision binary64 (if (<= A -2.5e+233) (* (/ 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 <= -2.5e+233) {
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 <= -2.5e+233) {
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 <= -2.5e+233: 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 <= -2.5e+233) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.5e+233) 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, -2.5e+233], 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[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.5 \cdot 10^{+233}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.50000000000000004e233Initial program 6.5%
Taylor expanded in B around 0 6.5%
Simplified11.8%
Taylor expanded in A around -inf 47.7%
Taylor expanded in B around 0 92.5%
associate-*r/92.6%
*-rgt-identity92.6%
times-frac92.8%
/-rgt-identity92.8%
Simplified92.8%
if -2.50000000000000004e233 < A Initial program 58.6%
Simplified80.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI)))
(t_1 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= C -2.1e-115)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 1.5e-212)
t_0
(if (<= C 3.5e-77)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= C 17000000000.0)
t_1
(if (<= C 2.4e+29)
(* 180.0 (/ (atan 1.0) PI))
(if (or (<= C 3.9e+99) (not (<= C 2.1e+100))) t_1 t_0))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double t_1 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (C <= -2.1e-115) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 1.5e-212) {
tmp = t_0;
} else if (C <= 3.5e-77) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (C <= 17000000000.0) {
tmp = t_1;
} else if (C <= 2.4e+29) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if ((C <= 3.9e+99) || !(C <= 2.1e+100)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double t_1 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (C <= -2.1e-115) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 1.5e-212) {
tmp = t_0;
} else if (C <= 3.5e-77) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (C <= 17000000000.0) {
tmp = t_1;
} else if (C <= 2.4e+29) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if ((C <= 3.9e+99) || !(C <= 2.1e+100)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) t_1 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if C <= -2.1e-115: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 1.5e-212: tmp = t_0 elif C <= 3.5e-77: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif C <= 17000000000.0: tmp = t_1 elif C <= 2.4e+29: tmp = 180.0 * (math.atan(1.0) / math.pi) elif (C <= 3.9e+99) or not (C <= 2.1e+100): tmp = t_1 else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (C <= -2.1e-115) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 1.5e-212) tmp = t_0; elseif (C <= 3.5e-77) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (C <= 17000000000.0) tmp = t_1; elseif (C <= 2.4e+29) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif ((C <= 3.9e+99) || !(C <= 2.1e+100)) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); t_1 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (C <= -2.1e-115) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 1.5e-212) tmp = t_0; elseif (C <= 3.5e-77) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (C <= 17000000000.0) tmp = t_1; elseif (C <= 2.4e+29) tmp = 180.0 * (atan(1.0) / pi); elseif ((C <= 3.9e+99) || ~((C <= 2.1e+100))) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.1e-115], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.5e-212], t$95$0, If[LessEqual[C, 3.5e-77], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 17000000000.0], t$95$1, If[LessEqual[C, 2.4e+29], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 3.9e+99], N[Not[LessEqual[C, 2.1e+100]], $MachinePrecision]], t$95$1, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;C \leq -2.1 \cdot 10^{-115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.5 \cdot 10^{-212}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;C \leq 17000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;C \leq 2.4 \cdot 10^{+29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 3.9 \cdot 10^{+99} \lor \neg \left(C \leq 2.1 \cdot 10^{+100}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if C < -2.10000000000000002e-115Initial program 78.7%
Taylor expanded in C around -inf 64.4%
if -2.10000000000000002e-115 < C < 1.5000000000000001e-212 or 3.89999999999999995e99 < C < 2.0999999999999999e100Initial program 54.6%
Taylor expanded in B around inf 37.1%
if 1.5000000000000001e-212 < C < 3.50000000000000013e-77Initial program 68.0%
Taylor expanded in A around inf 42.9%
if 3.50000000000000013e-77 < C < 1.7e10 or 2.4000000000000001e29 < C < 3.89999999999999995e99 or 2.0999999999999999e100 < C Initial program 23.0%
Taylor expanded in C around inf 62.9%
Taylor expanded in A around inf 62.9%
if 1.7e10 < C < 2.4000000000000001e29Initial program 72.9%
Taylor expanded in B around -inf 53.6%
Final simplification55.4%
(FPCore (A B C)
:precision binary64
(if (<= C -4.7e-15)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 5.2e-255)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(if (<= C 2.35e-216)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 8.2e+35)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (or (<= C 6.1e+115) (not (<= C 6.2e+115)))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(/ (* -180.0 (atan (/ A B))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.7e-15) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 5.2e-255) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 2.35e-216) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 8.2e+35) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if ((C <= 6.1e+115) || !(C <= 6.2e+115)) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = (-180.0 * atan((A / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.7e-15) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 5.2e-255) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else if (C <= 2.35e-216) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 8.2e+35) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if ((C <= 6.1e+115) || !(C <= 6.2e+115)) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = (-180.0 * Math.atan((A / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.7e-15: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 5.2e-255: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) elif C <= 2.35e-216: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 8.2e+35: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif (C <= 6.1e+115) or not (C <= 6.2e+115): tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = (-180.0 * math.atan((A / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.7e-15) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 5.2e-255) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); elseif (C <= 2.35e-216) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 8.2e+35) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif ((C <= 6.1e+115) || !(C <= 6.2e+115)) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(A / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.7e-15) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 5.2e-255) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); elseif (C <= 2.35e-216) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 8.2e+35) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif ((C <= 6.1e+115) || ~((C <= 6.2e+115))) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = (-180.0 * atan((A / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.7e-15], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.2e-255], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.35e-216], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.2e+35], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 6.1e+115], N[Not[LessEqual[C, 6.2e+115]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.7 \cdot 10^{-15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-255}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.35 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.2 \cdot 10^{+35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.1 \cdot 10^{+115} \lor \neg \left(C \leq 6.2 \cdot 10^{+115}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.6999999999999999e-15Initial program 82.9%
Simplified94.4%
Taylor expanded in C around 0 80.1%
+-commutative80.1%
unpow280.1%
unpow280.1%
hypot-define93.7%
Simplified93.7%
Taylor expanded in A around 0 86.1%
if -4.6999999999999999e-15 < C < 5.20000000000000041e-255Initial program 62.1%
Taylor expanded in C around 0 53.4%
mul-1-neg53.4%
distribute-neg-frac253.4%
+-commutative53.4%
unpow253.4%
unpow253.4%
hypot-define76.5%
Simplified76.5%
Taylor expanded in A around 0 56.5%
sub-neg56.5%
metadata-eval56.5%
+-commutative56.5%
mul-1-neg56.5%
unsub-neg56.5%
Simplified56.5%
if 5.20000000000000041e-255 < C < 2.35e-216Initial program 37.9%
Taylor expanded in A around -inf 67.0%
associate-*r/67.0%
Simplified67.0%
if 2.35e-216 < C < 8.1999999999999997e35Initial program 56.4%
Taylor expanded in C around 0 56.4%
mul-1-neg56.4%
distribute-neg-frac256.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-define82.8%
Simplified82.8%
Taylor expanded in B around -inf 64.4%
mul-1-neg64.4%
unsub-neg64.4%
Simplified64.4%
if 8.1999999999999997e35 < C < 6.09999999999999966e115 or 6.2000000000000001e115 < C Initial program 19.9%
Taylor expanded in C around inf 69.5%
Taylor expanded in A around inf 69.5%
if 6.09999999999999966e115 < C < 6.2000000000000001e115Initial program 100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in A around inf 100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
associate-*r/100.0%
distribute-frac-neg100.0%
atan-neg100.0%
Applied egg-rr100.0%
distribute-rgt-neg-out100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(if (<= C -5.6e-16)
(* (/ 180.0 PI) (atan (+ -1.0 (/ C B))))
(if (<= C 4.6e-255)
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)
(if (<= C 2.3e-216)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 1.22e+36)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= C 6.1e+115)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= C 6.2e+115)
(/ (* -180.0 (atan (/ A B))) PI)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C))))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.6e-16) {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 + (C / B)));
} else if (C <= 4.6e-255) {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
} else if (C <= 2.3e-216) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 1.22e+36) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 6.1e+115) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (C <= 6.2e+115) {
tmp = (-180.0 * atan((A / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -5.6e-16) {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 + (C / B)));
} else if (C <= 4.6e-255) {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
} else if (C <= 2.3e-216) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 1.22e+36) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (C <= 6.1e+115) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (C <= 6.2e+115) {
tmp = (-180.0 * Math.atan((A / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5.6e-16: tmp = (180.0 / math.pi) * math.atan((-1.0 + (C / B))) elif C <= 4.6e-255: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi elif C <= 2.3e-216: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 1.22e+36: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif C <= 6.1e+115: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif C <= 6.2e+115: tmp = (-180.0 * math.atan((A / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5.6e-16) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 + Float64(C / B)))); elseif (C <= 4.6e-255) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); elseif (C <= 2.3e-216) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 1.22e+36) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (C <= 6.1e+115) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (C <= 6.2e+115) tmp = Float64(Float64(-180.0 * atan(Float64(A / 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) tmp = 0.0; if (C <= -5.6e-16) tmp = (180.0 / pi) * atan((-1.0 + (C / B))); elseif (C <= 4.6e-255) tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; elseif (C <= 2.3e-216) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 1.22e+36) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (C <= 6.1e+115) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (C <= 6.2e+115) tmp = (-180.0 * atan((A / B))) / pi; else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5.6e-16], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.6e-255], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.3e-216], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.22e+36], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.1e+115], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.2e+115], N[(N[(-180.0 * N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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}
\mathbf{if}\;C \leq -5.6 \cdot 10^{-16}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)\\
\mathbf{elif}\;C \leq 4.6 \cdot 10^{-255}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.3 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.22 \cdot 10^{+36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.1 \cdot 10^{+115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.2 \cdot 10^{+115}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A}{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 < -5.6000000000000003e-16Initial program 82.9%
Simplified94.4%
Taylor expanded in C around 0 80.1%
+-commutative80.1%
unpow280.1%
unpow280.1%
hypot-define93.7%
Simplified93.7%
Taylor expanded in A around 0 86.1%
associate-*r/86.1%
div-sub86.1%
pow186.1%
pow186.1%
pow-div86.1%
metadata-eval86.1%
metadata-eval86.1%
Applied egg-rr86.1%
*-commutative86.1%
associate-/l*86.2%
sub-neg86.2%
metadata-eval86.2%
+-commutative86.2%
Simplified86.2%
if -5.6000000000000003e-16 < C < 4.5999999999999997e-255Initial program 62.1%
Simplified80.3%
Taylor expanded in C around 0 59.2%
+-commutative59.2%
unpow259.2%
unpow259.2%
hypot-define78.7%
Simplified78.7%
associate-*r/78.7%
Applied egg-rr78.7%
Taylor expanded in A around 0 63.1%
Taylor expanded in C around 0 56.5%
associate-*r/56.5%
distribute-lft-in56.5%
mul-1-neg56.5%
sub-neg56.5%
div-sub56.5%
associate-*r/56.5%
*-inverses56.5%
sub-neg56.5%
mul-1-neg56.5%
distribute-neg-in56.5%
+-commutative56.5%
distribute-neg-in56.5%
metadata-eval56.5%
sub-neg56.5%
Simplified56.5%
if 4.5999999999999997e-255 < C < 2.29999999999999997e-216Initial program 37.9%
Taylor expanded in A around -inf 67.0%
associate-*r/67.0%
Simplified67.0%
if 2.29999999999999997e-216 < C < 1.21999999999999995e36Initial program 56.4%
Taylor expanded in C around 0 56.4%
mul-1-neg56.4%
distribute-neg-frac256.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-define82.8%
Simplified82.8%
Taylor expanded in B around -inf 64.4%
mul-1-neg64.4%
unsub-neg64.4%
Simplified64.4%
if 1.21999999999999995e36 < C < 6.09999999999999966e115Initial program 35.5%
Taylor expanded in C around inf 56.6%
Taylor expanded in A around inf 56.6%
if 6.09999999999999966e115 < C < 6.2000000000000001e115Initial program 100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in A around inf 100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
associate-*r/100.0%
distribute-frac-neg100.0%
atan-neg100.0%
Applied egg-rr100.0%
distribute-rgt-neg-out100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
if 6.2000000000000001e115 < C Initial program 13.5%
Applied egg-rr64.0%
Taylor expanded in C around inf 73.1%
metadata-eval73.1%
cancel-sign-sub-inv73.1%
distribute-rgt1-in73.1%
metadata-eval73.1%
mul0-lft73.1%
div073.1%
metadata-eval73.1%
neg-sub073.1%
distribute-lft-neg-in73.1%
metadata-eval73.1%
Simplified73.1%
inv-pow73.1%
add-sqr-sqrt39.2%
unpow-prod-down39.1%
associate-*r/39.1%
associate-*r/39.1%
Applied egg-rr39.1%
pow-sqr39.3%
associate-/r*39.3%
associate-*r/39.3%
*-commutative39.3%
associate-*l/39.3%
metadata-eval39.3%
Simplified39.3%
Taylor expanded in B around 0 74.9%
*-commutative74.9%
unpow274.9%
rem-square-sqrt74.9%
*-commutative74.9%
associate-*l/74.9%
associate-*r/74.8%
*-lft-identity74.8%
times-frac74.7%
metadata-eval74.7%
associate-/l*74.8%
associate-*l/74.9%
associate-*r/74.9%
Simplified74.9%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(if (<= C -2.6e-12)
(* (/ 180.0 PI) (atan (+ -1.0 (/ C B))))
(if (<= C 3.2e-256)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(if (<= C 2.1e-216)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 8.2e+35)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= C 6.1e+115)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= C 6.2e+115)
(/ (* -180.0 (atan (/ A B))) PI)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C))))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.6e-12) {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 + (C / B)));
} else if (C <= 3.2e-256) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 2.1e-216) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 8.2e+35) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 6.1e+115) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (C <= 6.2e+115) {
tmp = (-180.0 * atan((A / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.6e-12) {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 + (C / B)));
} else if (C <= 3.2e-256) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else if (C <= 2.1e-216) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 8.2e+35) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (C <= 6.1e+115) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (C <= 6.2e+115) {
tmp = (-180.0 * Math.atan((A / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.6e-12: tmp = (180.0 / math.pi) * math.atan((-1.0 + (C / B))) elif C <= 3.2e-256: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) elif C <= 2.1e-216: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 8.2e+35: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif C <= 6.1e+115: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif C <= 6.2e+115: tmp = (-180.0 * math.atan((A / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.6e-12) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 + Float64(C / B)))); elseif (C <= 3.2e-256) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); elseif (C <= 2.1e-216) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 8.2e+35) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (C <= 6.1e+115) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (C <= 6.2e+115) tmp = Float64(Float64(-180.0 * atan(Float64(A / 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) tmp = 0.0; if (C <= -2.6e-12) tmp = (180.0 / pi) * atan((-1.0 + (C / B))); elseif (C <= 3.2e-256) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); elseif (C <= 2.1e-216) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 8.2e+35) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (C <= 6.1e+115) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (C <= 6.2e+115) tmp = (-180.0 * atan((A / B))) / pi; else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.6e-12], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.2e-256], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.1e-216], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.2e+35], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.1e+115], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.2e+115], N[(N[(-180.0 * N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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}
\mathbf{if}\;C \leq -2.6 \cdot 10^{-12}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)\\
\mathbf{elif}\;C \leq 3.2 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.1 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.2 \cdot 10^{+35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.1 \cdot 10^{+115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.2 \cdot 10^{+115}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A}{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 < -2.59999999999999983e-12Initial program 82.9%
Simplified94.4%
Taylor expanded in C around 0 80.1%
+-commutative80.1%
unpow280.1%
unpow280.1%
hypot-define93.7%
Simplified93.7%
Taylor expanded in A around 0 86.1%
associate-*r/86.1%
div-sub86.1%
pow186.1%
pow186.1%
pow-div86.1%
metadata-eval86.1%
metadata-eval86.1%
Applied egg-rr86.1%
*-commutative86.1%
associate-/l*86.2%
sub-neg86.2%
metadata-eval86.2%
+-commutative86.2%
Simplified86.2%
if -2.59999999999999983e-12 < C < 3.1999999999999999e-256Initial program 62.1%
Taylor expanded in C around 0 53.4%
mul-1-neg53.4%
distribute-neg-frac253.4%
+-commutative53.4%
unpow253.4%
unpow253.4%
hypot-define76.5%
Simplified76.5%
Taylor expanded in A around 0 56.5%
sub-neg56.5%
metadata-eval56.5%
+-commutative56.5%
mul-1-neg56.5%
unsub-neg56.5%
Simplified56.5%
if 3.1999999999999999e-256 < C < 2.1000000000000002e-216Initial program 37.9%
Taylor expanded in A around -inf 67.0%
associate-*r/67.0%
Simplified67.0%
if 2.1000000000000002e-216 < C < 8.1999999999999997e35Initial program 56.4%
Taylor expanded in C around 0 56.4%
mul-1-neg56.4%
distribute-neg-frac256.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-define82.8%
Simplified82.8%
Taylor expanded in B around -inf 64.4%
mul-1-neg64.4%
unsub-neg64.4%
Simplified64.4%
if 8.1999999999999997e35 < C < 6.09999999999999966e115Initial program 35.5%
Taylor expanded in C around inf 56.6%
Taylor expanded in A around inf 56.6%
if 6.09999999999999966e115 < C < 6.2000000000000001e115Initial program 100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in A around inf 100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
associate-*r/100.0%
distribute-frac-neg100.0%
atan-neg100.0%
Applied egg-rr100.0%
distribute-rgt-neg-out100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
if 6.2000000000000001e115 < C Initial program 13.5%
Applied egg-rr64.0%
Taylor expanded in C around inf 73.1%
metadata-eval73.1%
cancel-sign-sub-inv73.1%
distribute-rgt1-in73.1%
metadata-eval73.1%
mul0-lft73.1%
div073.1%
metadata-eval73.1%
neg-sub073.1%
distribute-lft-neg-in73.1%
metadata-eval73.1%
Simplified73.1%
inv-pow73.1%
add-sqr-sqrt39.2%
unpow-prod-down39.1%
associate-*r/39.1%
associate-*r/39.1%
Applied egg-rr39.1%
pow-sqr39.3%
associate-/r*39.3%
associate-*r/39.3%
*-commutative39.3%
associate-*l/39.3%
metadata-eval39.3%
Simplified39.3%
Taylor expanded in B around 0 74.9%
*-commutative74.9%
unpow274.9%
rem-square-sqrt74.9%
*-commutative74.9%
associate-*l/74.9%
associate-*r/74.8%
*-lft-identity74.8%
times-frac74.7%
metadata-eval74.7%
associate-/l*74.8%
associate-*l/74.9%
associate-*r/74.9%
Simplified74.9%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(if (<= C -1.38e-17)
(* (/ 180.0 PI) (atan (+ -1.0 (/ C B))))
(if (<= C 3.6e-255)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(if (<= C 1.9e-216)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 7.6e+35)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= C 6.1e+115)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= C 6.2e+115)
(/ (* -180.0 (atan (/ A B))) PI)
(* (/ 180.0 PI) (atan (* B (/ -0.5 C)))))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.38e-17) {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 + (C / B)));
} else if (C <= 3.6e-255) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 1.9e-216) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 7.6e+35) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 6.1e+115) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (C <= 6.2e+115) {
tmp = (-180.0 * atan((A / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.38e-17) {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 + (C / B)));
} else if (C <= 3.6e-255) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else if (C <= 1.9e-216) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 7.6e+35) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (C <= 6.1e+115) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (C <= 6.2e+115) {
tmp = (-180.0 * Math.atan((A / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / C)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.38e-17: tmp = (180.0 / math.pi) * math.atan((-1.0 + (C / B))) elif C <= 3.6e-255: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) elif C <= 1.9e-216: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 7.6e+35: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif C <= 6.1e+115: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif C <= 6.2e+115: tmp = (-180.0 * math.atan((A / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / C))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.38e-17) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 + Float64(C / B)))); elseif (C <= 3.6e-255) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); elseif (C <= 1.9e-216) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 7.6e+35) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (C <= 6.1e+115) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (C <= 6.2e+115) tmp = Float64(Float64(-180.0 * atan(Float64(A / B))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.38e-17) tmp = (180.0 / pi) * atan((-1.0 + (C / B))); elseif (C <= 3.6e-255) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); elseif (C <= 1.9e-216) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 7.6e+35) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (C <= 6.1e+115) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (C <= 6.2e+115) tmp = (-180.0 * atan((A / B))) / pi; else tmp = (180.0 / pi) * atan((B * (-0.5 / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.38e-17], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.6e-255], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.9e-216], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.6e+35], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.1e+115], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.2e+115], N[(N[(-180.0 * N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.38 \cdot 10^{-17}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 + \frac{C}{B}\right)\\
\mathbf{elif}\;C \leq 3.6 \cdot 10^{-255}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.9 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.6 \cdot 10^{+35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.1 \cdot 10^{+115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.2 \cdot 10^{+115}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\
\end{array}
\end{array}
if C < -1.3800000000000001e-17Initial program 82.9%
Simplified94.4%
Taylor expanded in C around 0 80.1%
+-commutative80.1%
unpow280.1%
unpow280.1%
hypot-define93.7%
Simplified93.7%
Taylor expanded in A around 0 86.1%
associate-*r/86.1%
div-sub86.1%
pow186.1%
pow186.1%
pow-div86.1%
metadata-eval86.1%
metadata-eval86.1%
Applied egg-rr86.1%
*-commutative86.1%
associate-/l*86.2%
sub-neg86.2%
metadata-eval86.2%
+-commutative86.2%
Simplified86.2%
if -1.3800000000000001e-17 < C < 3.6000000000000002e-255Initial program 62.1%
Taylor expanded in C around 0 53.4%
mul-1-neg53.4%
distribute-neg-frac253.4%
+-commutative53.4%
unpow253.4%
unpow253.4%
hypot-define76.5%
Simplified76.5%
Taylor expanded in A around 0 56.5%
sub-neg56.5%
metadata-eval56.5%
+-commutative56.5%
mul-1-neg56.5%
unsub-neg56.5%
Simplified56.5%
if 3.6000000000000002e-255 < C < 1.9e-216Initial program 37.9%
Taylor expanded in A around -inf 67.0%
associate-*r/67.0%
Simplified67.0%
if 1.9e-216 < C < 7.5999999999999999e35Initial program 56.4%
Taylor expanded in C around 0 56.4%
mul-1-neg56.4%
distribute-neg-frac256.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-define82.8%
Simplified82.8%
Taylor expanded in B around -inf 64.4%
mul-1-neg64.4%
unsub-neg64.4%
Simplified64.4%
if 7.5999999999999999e35 < C < 6.09999999999999966e115Initial program 35.5%
Taylor expanded in C around inf 56.6%
Taylor expanded in A around inf 56.6%
if 6.09999999999999966e115 < C < 6.2000000000000001e115Initial program 100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in A around inf 100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
associate-*r/100.0%
distribute-frac-neg100.0%
atan-neg100.0%
Applied egg-rr100.0%
distribute-rgt-neg-out100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
if 6.2000000000000001e115 < C Initial program 13.5%
Applied egg-rr64.0%
Taylor expanded in C around inf 73.1%
metadata-eval73.1%
cancel-sign-sub-inv73.1%
distribute-rgt1-in73.1%
metadata-eval73.1%
mul0-lft73.1%
div073.1%
metadata-eval73.1%
neg-sub073.1%
distribute-lft-neg-in73.1%
metadata-eval73.1%
Simplified73.1%
Taylor expanded in B around 0 74.8%
*-commutative74.8%
associate-*r/74.8%
associate-*l/74.9%
associate-/l*74.9%
associate-*r/74.9%
*-commutative74.9%
associate-*l/74.9%
associate-*r/74.9%
Simplified74.9%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(if (<= C -2.7e-16)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 6.4e-260)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(if (<= C 4.2e-216)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 7.6e+35)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= C 1.46e+115)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= C 6.2e+115)
(/ (* -180.0 (atan (/ A B))) PI)
(* (/ 180.0 PI) (atan (* B (/ -0.5 C)))))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-16) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 6.4e-260) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 4.2e-216) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 7.6e+35) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 1.46e+115) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (C <= 6.2e+115) {
tmp = (-180.0 * atan((A / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-16) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 6.4e-260) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else if (C <= 4.2e-216) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 7.6e+35) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (C <= 1.46e+115) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (C <= 6.2e+115) {
tmp = (-180.0 * Math.atan((A / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / C)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.7e-16: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 6.4e-260: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) elif C <= 4.2e-216: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 7.6e+35: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif C <= 1.46e+115: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif C <= 6.2e+115: tmp = (-180.0 * math.atan((A / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / C))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.7e-16) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 6.4e-260) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); elseif (C <= 4.2e-216) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 7.6e+35) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (C <= 1.46e+115) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (C <= 6.2e+115) tmp = Float64(Float64(-180.0 * atan(Float64(A / B))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.7e-16) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 6.4e-260) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); elseif (C <= 4.2e-216) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 7.6e+35) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (C <= 1.46e+115) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (C <= 6.2e+115) tmp = (-180.0 * atan((A / B))) / pi; else tmp = (180.0 / pi) * atan((B * (-0.5 / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.7e-16], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.4e-260], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.2e-216], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.6e+35], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.46e+115], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.2e+115], N[(N[(-180.0 * N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.7 \cdot 10^{-16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.4 \cdot 10^{-260}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.2 \cdot 10^{-216}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.6 \cdot 10^{+35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.46 \cdot 10^{+115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.2 \cdot 10^{+115}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\
\end{array}
\end{array}
if C < -2.69999999999999999e-16Initial program 82.9%
Simplified94.4%
Taylor expanded in C around 0 80.1%
+-commutative80.1%
unpow280.1%
unpow280.1%
hypot-define93.7%
Simplified93.7%
Taylor expanded in A around 0 86.1%
if -2.69999999999999999e-16 < C < 6.3999999999999999e-260Initial program 62.1%
Taylor expanded in C around 0 53.4%
mul-1-neg53.4%
distribute-neg-frac253.4%
+-commutative53.4%
unpow253.4%
unpow253.4%
hypot-define76.5%
Simplified76.5%
Taylor expanded in A around 0 56.5%
sub-neg56.5%
metadata-eval56.5%
+-commutative56.5%
mul-1-neg56.5%
unsub-neg56.5%
Simplified56.5%
if 6.3999999999999999e-260 < C < 4.2000000000000003e-216Initial program 37.9%
Taylor expanded in A around -inf 67.0%
associate-*r/67.0%
Simplified67.0%
if 4.2000000000000003e-216 < C < 7.5999999999999999e35Initial program 56.4%
Taylor expanded in C around 0 56.4%
mul-1-neg56.4%
distribute-neg-frac256.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-define82.8%
Simplified82.8%
Taylor expanded in B around -inf 64.4%
mul-1-neg64.4%
unsub-neg64.4%
Simplified64.4%
if 7.5999999999999999e35 < C < 1.46e115Initial program 35.5%
Taylor expanded in C around inf 56.6%
Taylor expanded in A around inf 56.6%
if 1.46e115 < C < 6.2000000000000001e115Initial program 100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in A around inf 100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
associate-*r/100.0%
distribute-frac-neg100.0%
atan-neg100.0%
Applied egg-rr100.0%
distribute-rgt-neg-out100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
if 6.2000000000000001e115 < C Initial program 13.5%
Applied egg-rr64.0%
Taylor expanded in C around inf 73.1%
metadata-eval73.1%
cancel-sign-sub-inv73.1%
distribute-rgt1-in73.1%
metadata-eval73.1%
mul0-lft73.1%
div073.1%
metadata-eval73.1%
neg-sub073.1%
distribute-lft-neg-in73.1%
metadata-eval73.1%
Simplified73.1%
Taylor expanded in B around 0 74.8%
*-commutative74.8%
associate-*r/74.8%
associate-*l/74.9%
associate-/l*74.9%
associate-*r/74.9%
*-commutative74.9%
associate-*l/74.9%
associate-*r/74.9%
Simplified74.9%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(if (<= C -2.05e-32)
(* 180.0 (/ (atan (+ (/ C B) 1.0)) PI))
(if (<= C 4e-219)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(if (<= C 1e-54)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (or (<= C 1.6e+140) (not (<= C 6.6e+151)))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.05e-32) {
tmp = 180.0 * (atan(((C / B) + 1.0)) / ((double) M_PI));
} else if (C <= 4e-219) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 1e-54) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if ((C <= 1.6e+140) || !(C <= 6.6e+151)) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.05e-32) {
tmp = 180.0 * (Math.atan(((C / B) + 1.0)) / Math.PI);
} else if (C <= 4e-219) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else if (C <= 1e-54) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if ((C <= 1.6e+140) || !(C <= 6.6e+151)) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.05e-32: tmp = 180.0 * (math.atan(((C / B) + 1.0)) / math.pi) elif C <= 4e-219: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) elif C <= 1e-54: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif (C <= 1.6e+140) or not (C <= 6.6e+151): tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.05e-32) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 1.0)) / pi)); elseif (C <= 4e-219) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); elseif (C <= 1e-54) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif ((C <= 1.6e+140) || !(C <= 6.6e+151)) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.05e-32) tmp = 180.0 * (atan(((C / B) + 1.0)) / pi); elseif (C <= 4e-219) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); elseif (C <= 1e-54) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif ((C <= 1.6e+140) || ~((C <= 6.6e+151))) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.05e-32], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4e-219], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1e-54], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 1.6e+140], N[Not[LessEqual[C, 6.6e+151]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $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}\;C \leq -2.05 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;C \leq 4 \cdot 10^{-219}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 10^{-54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.6 \cdot 10^{+140} \lor \neg \left(C \leq 6.6 \cdot 10^{+151}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if C < -2.04999999999999988e-32Initial program 81.7%
Taylor expanded in A around 0 77.5%
unpow277.5%
unpow277.5%
hypot-define88.5%
Simplified88.5%
Taylor expanded in B around -inf 74.8%
if -2.04999999999999988e-32 < C < 4.0000000000000001e-219Initial program 59.4%
Taylor expanded in C around 0 52.0%
mul-1-neg52.0%
distribute-neg-frac252.0%
+-commutative52.0%
unpow252.0%
unpow252.0%
hypot-define75.5%
Simplified75.5%
Taylor expanded in A around 0 56.1%
sub-neg56.1%
metadata-eval56.1%
+-commutative56.1%
mul-1-neg56.1%
unsub-neg56.1%
Simplified56.1%
if 4.0000000000000001e-219 < C < 1e-54Initial program 62.1%
Taylor expanded in C around 0 62.1%
mul-1-neg62.1%
distribute-neg-frac262.1%
+-commutative62.1%
unpow262.1%
unpow262.1%
hypot-define83.6%
Simplified83.6%
Taylor expanded in B around -inf 65.8%
mul-1-neg65.8%
unsub-neg65.8%
Simplified65.8%
if 1e-54 < C < 1.60000000000000005e140 or 6.60000000000000049e151 < C Initial program 24.8%
Taylor expanded in C around inf 63.8%
Taylor expanded in A around inf 63.8%
if 1.60000000000000005e140 < C < 6.60000000000000049e151Initial program 35.6%
Taylor expanded in B around inf 50.8%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -1e+89)
(* 180.0 (/ (atan (+ (/ C B) 1.0)) PI))
(if (<= C 5.2e-255)
t_0
(if (<= C 7.1e-214)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C 1e-194)
t_0
(if (<= C 1.36e-39)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B 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 <= -1e+89) {
tmp = 180.0 * (atan(((C / B) + 1.0)) / ((double) M_PI));
} else if (C <= 5.2e-255) {
tmp = t_0;
} else if (C <= 7.1e-214) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= 1e-194) {
tmp = t_0;
} else if (C <= 1.36e-39) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -1e+89) {
tmp = 180.0 * (Math.atan(((C / B) + 1.0)) / Math.PI);
} else if (C <= 5.2e-255) {
tmp = t_0;
} else if (C <= 7.1e-214) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= 1e-194) {
tmp = t_0;
} else if (C <= 1.36e-39) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} 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((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -1e+89: tmp = 180.0 * (math.atan(((C / B) + 1.0)) / math.pi) elif C <= 5.2e-255: tmp = t_0 elif C <= 7.1e-214: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= 1e-194: tmp = t_0 elif C <= 1.36e-39: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) 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(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -1e+89) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 1.0)) / pi)); elseif (C <= 5.2e-255) tmp = t_0; elseif (C <= 7.1e-214) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= 1e-194) tmp = t_0; elseif (C <= 1.36e-39) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -1e+89) tmp = 180.0 * (atan(((C / B) + 1.0)) / pi); elseif (C <= 5.2e-255) tmp = t_0; elseif (C <= 7.1e-214) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= 1e-194) tmp = t_0; elseif (C <= 1.36e-39) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); 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[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1e+89], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.2e-255], t$95$0, If[LessEqual[C, 7.1e-214], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1e-194], t$95$0, If[LessEqual[C, 1.36e-39], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-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(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1 \cdot 10^{+89}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-255}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 7.1 \cdot 10^{-214}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 10^{-194}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 1.36 \cdot 10^{-39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -9.99999999999999995e88Initial program 82.5%
Taylor expanded in A around 0 82.5%
unpow282.5%
unpow282.5%
hypot-define96.3%
Simplified96.3%
Taylor expanded in B around -inf 82.7%
if -9.99999999999999995e88 < C < 5.20000000000000041e-255 or 7.1000000000000001e-214 < C < 1.00000000000000002e-194Initial program 66.1%
Taylor expanded in C around 0 55.3%
mul-1-neg55.3%
distribute-neg-frac255.3%
+-commutative55.3%
unpow255.3%
unpow255.3%
hypot-define76.3%
Simplified76.3%
Taylor expanded in A around 0 58.5%
sub-neg58.5%
metadata-eval58.5%
+-commutative58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
if 5.20000000000000041e-255 < C < 7.1000000000000001e-214Initial program 36.0%
Taylor expanded in A around -inf 62.2%
associate-*r/62.2%
Simplified62.2%
if 1.00000000000000002e-194 < C < 1.35999999999999994e-39Initial program 65.0%
Taylor expanded in C around 0 65.1%
mul-1-neg65.1%
distribute-neg-frac265.1%
+-commutative65.1%
unpow265.1%
unpow265.1%
hypot-define84.3%
Simplified84.3%
Taylor expanded in B around -inf 69.9%
mul-1-neg69.9%
unsub-neg69.9%
Simplified69.9%
if 1.35999999999999994e-39 < C Initial program 25.7%
Taylor expanded in C around inf 62.5%
Taylor expanded in A around inf 62.5%
Final simplification65.7%
(FPCore (A B C)
:precision binary64
(if (<= C -4.2e-116)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C -5e-252)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 4.6e-62)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= C 3.5e+14)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 4e+78)
(/ (* -180.0 (atan (/ A B))) PI)
(* 180.0 (/ (atan (/ 0.0 B)) PI))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.2e-116) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= -5e-252) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 4.6e-62) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (C <= 3.5e+14) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 4e+78) {
tmp = (-180.0 * atan((A / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.2e-116) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= -5e-252) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 4.6e-62) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (C <= 3.5e+14) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 4e+78) {
tmp = (-180.0 * Math.atan((A / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.2e-116: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= -5e-252: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 4.6e-62: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif C <= 3.5e+14: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 4e+78: tmp = (-180.0 * math.atan((A / B))) / math.pi else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.2e-116) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= -5e-252) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 4.6e-62) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (C <= 3.5e+14) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 4e+78) tmp = Float64(Float64(-180.0 * atan(Float64(A / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.2e-116) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= -5e-252) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 4.6e-62) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (C <= 3.5e+14) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 4e+78) tmp = (-180.0 * atan((A / B))) / pi; else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.2e-116], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -5e-252], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.6e-62], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.5e+14], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4e+78], N[(N[(-180.0 * N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.2 \cdot 10^{-116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5 \cdot 10^{-252}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 4.6 \cdot 10^{-62}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{+14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 4 \cdot 10^{+78}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.1999999999999998e-116Initial program 78.7%
Simplified89.7%
Taylor expanded in C around 0 74.4%
+-commutative74.4%
unpow274.4%
unpow274.4%
hypot-define87.9%
Simplified87.9%
Taylor expanded in C around inf 63.2%
if -4.1999999999999998e-116 < C < -5.00000000000000008e-252Initial program 55.9%
Taylor expanded in B around inf 40.4%
if -5.00000000000000008e-252 < C < 4.60000000000000001e-62Initial program 60.7%
Taylor expanded in A around inf 34.6%
if 4.60000000000000001e-62 < C < 3.5e14Initial program 26.3%
Taylor expanded in B around -inf 41.7%
if 3.5e14 < C < 4.00000000000000003e78Initial program 51.3%
Taylor expanded in B around inf 41.2%
Taylor expanded in A around inf 35.6%
associate-*r/35.6%
mul-1-neg35.6%
Simplified35.6%
associate-*r/35.6%
distribute-frac-neg35.6%
atan-neg35.6%
Applied egg-rr35.6%
distribute-rgt-neg-out35.6%
distribute-lft-neg-in35.6%
metadata-eval35.6%
Simplified35.6%
if 4.00000000000000003e78 < C Initial program 18.5%
Taylor expanded in C around inf 37.1%
associate-*r/37.1%
distribute-rgt1-in37.1%
metadata-eval37.1%
mul0-lft37.1%
metadata-eval37.1%
Simplified37.1%
Final simplification46.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* -180.0 (atan (/ A B))) PI)))
(if (<= C -1.36e-118)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 4.8e-203)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 1.7e-75)
t_0
(if (<= C 195000000000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 8.2e+73) t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (-180.0 * atan((A / B))) / ((double) M_PI);
double tmp;
if (C <= -1.36e-118) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 4.8e-203) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 1.7e-75) {
tmp = t_0;
} else if (C <= 195000000000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 8.2e+73) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((0.0 / B)) / ((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 tmp;
if (C <= -1.36e-118) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 4.8e-203) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 1.7e-75) {
tmp = t_0;
} else if (C <= 195000000000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 8.2e+73) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (-180.0 * math.atan((A / B))) / math.pi tmp = 0 if C <= -1.36e-118: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 4.8e-203: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 1.7e-75: tmp = t_0 elif C <= 195000000000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 8.2e+73: tmp = t_0 else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(-180.0 * atan(Float64(A / B))) / pi) tmp = 0.0 if (C <= -1.36e-118) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 4.8e-203) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 1.7e-75) tmp = t_0; elseif (C <= 195000000000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 8.2e+73) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (-180.0 * atan((A / B))) / pi; tmp = 0.0; if (C <= -1.36e-118) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 4.8e-203) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 1.7e-75) tmp = t_0; elseif (C <= 195000000000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 8.2e+73) tmp = t_0; else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(-180.0 * N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[C, -1.36e-118], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.8e-203], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.7e-75], t$95$0, If[LessEqual[C, 195000000000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.2e+73], t$95$0, N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-180 \cdot \tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.36 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.8 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 1.7 \cdot 10^{-75}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 195000000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 8.2 \cdot 10^{+73}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.36000000000000009e-118Initial program 78.7%
Simplified89.7%
Taylor expanded in C around 0 74.4%
+-commutative74.4%
unpow274.4%
unpow274.4%
hypot-define87.9%
Simplified87.9%
Taylor expanded in C around inf 63.2%
if -1.36000000000000009e-118 < C < 4.7999999999999997e-203Initial program 54.3%
Taylor expanded in B around inf 35.4%
if 4.7999999999999997e-203 < C < 1.70000000000000008e-75 or 1.95e11 < C < 8.1999999999999996e73Initial program 62.5%
Taylor expanded in B around inf 48.6%
Taylor expanded in A around inf 39.8%
associate-*r/39.8%
mul-1-neg39.8%
Simplified39.8%
associate-*r/39.8%
distribute-frac-neg39.8%
atan-neg39.8%
Applied egg-rr39.8%
distribute-rgt-neg-out39.8%
distribute-lft-neg-in39.8%
metadata-eval39.8%
Simplified39.8%
if 1.70000000000000008e-75 < C < 1.95e11Initial program 34.1%
Taylor expanded in B around -inf 35.7%
if 8.1999999999999996e73 < C Initial program 18.5%
Taylor expanded in C around inf 37.1%
associate-*r/37.1%
distribute-rgt1-in37.1%
metadata-eval37.1%
mul0-lft37.1%
metadata-eval37.1%
Simplified37.1%
(FPCore (A B C)
:precision binary64
(if (<= C -3.55e-34)
(* 180.0 (/ (atan (+ (/ C B) 1.0)) PI))
(if (or (<= C 8e+28) (and (not (<= C 3.9e+99)) (<= C 1.2e+102)))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.55e-34) {
tmp = 180.0 * (atan(((C / B) + 1.0)) / ((double) M_PI));
} else if ((C <= 8e+28) || (!(C <= 3.9e+99) && (C <= 1.2e+102))) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -3.55e-34) {
tmp = 180.0 * (Math.atan(((C / B) + 1.0)) / Math.PI);
} else if ((C <= 8e+28) || (!(C <= 3.9e+99) && (C <= 1.2e+102))) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.55e-34: tmp = 180.0 * (math.atan(((C / B) + 1.0)) / math.pi) elif (C <= 8e+28) or (not (C <= 3.9e+99) and (C <= 1.2e+102)): tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.55e-34) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 1.0)) / pi)); elseif ((C <= 8e+28) || (!(C <= 3.9e+99) && (C <= 1.2e+102))) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.55e-34) tmp = 180.0 * (atan(((C / B) + 1.0)) / pi); elseif ((C <= 8e+28) || (~((C <= 3.9e+99)) && (C <= 1.2e+102))) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.55e-34], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 8e+28], And[N[Not[LessEqual[C, 3.9e+99]], $MachinePrecision], LessEqual[C, 1.2e+102]]], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.55 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;C \leq 8 \cdot 10^{+28} \lor \neg \left(C \leq 3.9 \cdot 10^{+99}\right) \land C \leq 1.2 \cdot 10^{+102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.55000000000000018e-34Initial program 81.7%
Taylor expanded in A around 0 77.5%
unpow277.5%
unpow277.5%
hypot-define88.5%
Simplified88.5%
Taylor expanded in B around -inf 74.8%
if -3.55000000000000018e-34 < C < 7.99999999999999967e28 or 3.89999999999999995e99 < C < 1.19999999999999997e102Initial program 57.7%
Taylor expanded in C around 0 53.4%
mul-1-neg53.4%
distribute-neg-frac253.4%
+-commutative53.4%
unpow253.4%
unpow253.4%
hypot-define77.9%
Simplified77.9%
Taylor expanded in A around 0 52.6%
sub-neg52.6%
metadata-eval52.6%
+-commutative52.6%
mul-1-neg52.6%
unsub-neg52.6%
Simplified52.6%
if 7.99999999999999967e28 < C < 3.89999999999999995e99 or 1.19999999999999997e102 < C Initial program 21.2%
Taylor expanded in C around inf 70.0%
Taylor expanded in A around inf 70.0%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= C -1.65e-114)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 2.1e-292)
(* 180.0 (/ (atan -1.0) PI))
(if (or (<= C 4.5e-214) (not (<= C 1.95e-153)))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(/ (* -180.0 (atan (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.65e-114) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 2.1e-292) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if ((C <= 4.5e-214) || !(C <= 1.95e-153)) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = (-180.0 * atan((A / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.65e-114) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 2.1e-292) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if ((C <= 4.5e-214) || !(C <= 1.95e-153)) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = (-180.0 * Math.atan((A / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.65e-114: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 2.1e-292: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif (C <= 4.5e-214) or not (C <= 1.95e-153): tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = (-180.0 * math.atan((A / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.65e-114) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 2.1e-292) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif ((C <= 4.5e-214) || !(C <= 1.95e-153)) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(A / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.65e-114) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 2.1e-292) tmp = 180.0 * (atan(-1.0) / pi); elseif ((C <= 4.5e-214) || ~((C <= 1.95e-153))) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = (-180.0 * atan((A / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.65e-114], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.1e-292], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 4.5e-214], N[Not[LessEqual[C, 1.95e-153]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(A / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.65 \cdot 10^{-114}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.1 \cdot 10^{-292}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 4.5 \cdot 10^{-214} \lor \neg \left(C \leq 1.95 \cdot 10^{-153}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.65000000000000017e-114Initial program 78.7%
Simplified89.7%
Taylor expanded in C around 0 74.4%
+-commutative74.4%
unpow274.4%
unpow274.4%
hypot-define87.9%
Simplified87.9%
Taylor expanded in C around inf 63.2%
if -1.65000000000000017e-114 < C < 2.09999999999999989e-292Initial program 54.8%
Taylor expanded in B around inf 40.5%
if 2.09999999999999989e-292 < C < 4.5000000000000001e-214 or 1.9500000000000001e-153 < C Initial program 37.8%
Taylor expanded in C around inf 50.6%
Taylor expanded in A around inf 50.6%
if 4.5000000000000001e-214 < C < 1.9500000000000001e-153Initial program 58.9%
Taylor expanded in B around inf 52.3%
Taylor expanded in A around inf 40.0%
associate-*r/40.0%
mul-1-neg40.0%
Simplified40.0%
associate-*r/40.0%
distribute-frac-neg40.0%
atan-neg40.0%
Applied egg-rr40.0%
distribute-rgt-neg-out40.0%
distribute-lft-neg-in40.0%
metadata-eval40.0%
Simplified40.0%
Final simplification53.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI))))
(if (<= B -6.8e-208)
t_0
(if (<= B -4.3e-254)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 1.15e-43)
t_0
(if (<= B 8e+125)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
double tmp;
if (B <= -6.8e-208) {
tmp = t_0;
} else if (B <= -4.3e-254) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 1.15e-43) {
tmp = t_0;
} else if (B <= 8e+125) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
double tmp;
if (B <= -6.8e-208) {
tmp = t_0;
} else if (B <= -4.3e-254) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 1.15e-43) {
tmp = t_0;
} else if (B <= 8e+125) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} 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((((C - A) / B) + 1.0)) / math.pi) tmp = 0 if B <= -6.8e-208: tmp = t_0 elif B <= -4.3e-254: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 1.15e-43: tmp = t_0 elif B <= 8e+125: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) 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(Float64(Float64(C - A) / B) + 1.0)) / pi)) tmp = 0.0 if (B <= -6.8e-208) tmp = t_0; elseif (B <= -4.3e-254) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 1.15e-43) tmp = t_0; elseif (B <= 8e+125) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((((C - A) / B) + 1.0)) / pi); tmp = 0.0; if (B <= -6.8e-208) tmp = t_0; elseif (B <= -4.3e-254) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 1.15e-43) tmp = t_0; elseif (B <= 8e+125) tmp = 180.0 * (atan(((C - B) / B)) / pi); 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[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.8e-208], t$95$0, If[LessEqual[B, -4.3e-254], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.15e-43], t$95$0, If[LessEqual[B, 8e+125], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{if}\;B \leq -6.8 \cdot 10^{-208}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -4.3 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-43}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 8 \cdot 10^{+125}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.8e-208 or -4.2999999999999997e-254 < B < 1.1499999999999999e-43Initial program 58.0%
Taylor expanded in B around -inf 61.6%
associate--l+61.6%
div-sub64.5%
Simplified64.5%
if -6.8e-208 < B < -4.2999999999999997e-254Initial program 28.6%
Taylor expanded in C around inf 65.0%
Taylor expanded in A around inf 65.0%
if 1.1499999999999999e-43 < B < 7.9999999999999994e125Initial program 79.5%
Simplified79.6%
Taylor expanded in C around 0 77.7%
+-commutative77.7%
unpow277.7%
unpow277.7%
hypot-define77.7%
Simplified77.7%
Taylor expanded in A around 0 71.1%
if 7.9999999999999994e125 < B Initial program 35.0%
Taylor expanded in C around 0 35.0%
mul-1-neg35.0%
distribute-neg-frac235.0%
+-commutative35.0%
unpow235.0%
unpow235.0%
hypot-define85.2%
Simplified85.2%
Taylor expanded in A around 0 85.1%
sub-neg85.1%
metadata-eval85.1%
+-commutative85.1%
mul-1-neg85.1%
unsub-neg85.1%
Simplified85.1%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(if (<= B -8.6e-120)
(* 180.0 (/ (atan 1.0) PI))
(if (or (<= B 6.4e-223) (and (not (<= B 2.3e-158)) (<= B 9.5e-54)))
(* 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 <= -8.6e-120) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if ((B <= 6.4e-223) || (!(B <= 2.3e-158) && (B <= 9.5e-54))) {
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 <= -8.6e-120) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if ((B <= 6.4e-223) || (!(B <= 2.3e-158) && (B <= 9.5e-54))) {
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 <= -8.6e-120: tmp = 180.0 * (math.atan(1.0) / math.pi) elif (B <= 6.4e-223) or (not (B <= 2.3e-158) and (B <= 9.5e-54)): 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 <= -8.6e-120) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif ((B <= 6.4e-223) || (!(B <= 2.3e-158) && (B <= 9.5e-54))) 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 <= -8.6e-120) tmp = 180.0 * (atan(1.0) / pi); elseif ((B <= 6.4e-223) || (~((B <= 2.3e-158)) && (B <= 9.5e-54))) 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, -8.6e-120], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 6.4e-223], And[N[Not[LessEqual[B, 2.3e-158]], $MachinePrecision], LessEqual[B, 9.5e-54]]], 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 -8.6 \cdot 10^{-120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6.4 \cdot 10^{-223} \lor \neg \left(B \leq 2.3 \cdot 10^{-158}\right) \land B \leq 9.5 \cdot 10^{-54}:\\
\;\;\;\;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 < -8.59999999999999964e-120Initial program 44.0%
Taylor expanded in B around -inf 48.9%
if -8.59999999999999964e-120 < B < 6.4000000000000001e-223 or 2.2999999999999999e-158 < B < 9.4999999999999994e-54Initial program 67.8%
Taylor expanded in C around inf 26.9%
associate-*r/26.9%
distribute-rgt1-in26.9%
metadata-eval26.9%
mul0-lft26.9%
metadata-eval26.9%
Simplified26.9%
if 6.4000000000000001e-223 < B < 2.2999999999999999e-158 or 9.4999999999999994e-54 < B Initial program 55.0%
Taylor expanded in B around inf 53.3%
Final simplification42.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= C -7.6e-115)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 8e-293)
t_0
(if (<= C 3e+38)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 6.6e+151) t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (C <= -7.6e-115) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 8e-293) {
tmp = t_0;
} else if (C <= 3e+38) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 6.6e+151) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((0.0 / 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) / Math.PI);
double tmp;
if (C <= -7.6e-115) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 8e-293) {
tmp = t_0;
} else if (C <= 3e+38) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 6.6e+151) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if C <= -7.6e-115: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 8e-293: tmp = t_0 elif C <= 3e+38: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 6.6e+151: tmp = t_0 else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (C <= -7.6e-115) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 8e-293) tmp = t_0; elseif (C <= 3e+38) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 6.6e+151) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (C <= -7.6e-115) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 8e-293) tmp = t_0; elseif (C <= 3e+38) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 6.6e+151) tmp = t_0; else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -7.6e-115], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8e-293], t$95$0, If[LessEqual[C, 3e+38], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.6e+151], t$95$0, N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;C \leq -7.6 \cdot 10^{-115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8 \cdot 10^{-293}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3 \cdot 10^{+38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 6.6 \cdot 10^{+151}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.59999999999999984e-115Initial program 78.7%
Simplified89.7%
Taylor expanded in C around 0 74.4%
+-commutative74.4%
unpow274.4%
unpow274.4%
hypot-define87.9%
Simplified87.9%
Taylor expanded in C around inf 63.2%
if -7.59999999999999984e-115 < C < 8.0000000000000004e-293 or 3.0000000000000001e38 < C < 6.60000000000000049e151Initial program 46.3%
Taylor expanded in B around inf 31.3%
if 8.0000000000000004e-293 < C < 3.0000000000000001e38Initial program 57.0%
Taylor expanded in B around -inf 30.4%
if 6.60000000000000049e151 < C Initial program 9.2%
Taylor expanded in C around inf 52.4%
associate-*r/52.4%
distribute-rgt1-in52.4%
metadata-eval52.4%
mul0-lft52.4%
metadata-eval52.4%
Simplified52.4%
(FPCore (A B C)
:precision binary64
(if (<= B -7e-209)
(* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI))
(if (<= B -4.3e-254)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (* (+ B (- A C)) (/ -1.0 B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7e-209) {
tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
} else if (B <= -4.3e-254) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B + (A - C)) * (-1.0 / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -7e-209) {
tmp = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
} else if (B <= -4.3e-254) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B + (A - C)) * (-1.0 / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7e-209: tmp = 180.0 * (math.atan((((C - A) / B) + 1.0)) / math.pi) elif B <= -4.3e-254: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((B + (A - C)) * (-1.0 / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7e-209) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + 1.0)) / pi)); elseif (B <= -4.3e-254) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + Float64(A - C)) * Float64(-1.0 / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -7e-209) tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / pi); elseif (B <= -4.3e-254) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((B + (A - C)) * (-1.0 / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7e-209], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.3e-254], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B + N[(A - C), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -7 \cdot 10^{-209}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq -4.3 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(B + \left(A - C\right)\right) \cdot \frac{-1}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -7.00000000000000004e-209Initial program 48.2%
Taylor expanded in B around -inf 64.2%
associate--l+64.2%
div-sub66.3%
Simplified66.3%
if -7.00000000000000004e-209 < B < -4.2999999999999997e-254Initial program 28.6%
Taylor expanded in C around inf 65.0%
Taylor expanded in A around inf 65.0%
if -4.2999999999999997e-254 < B Initial program 62.5%
Taylor expanded in B around inf 73.8%
Final simplification70.7%
(FPCore (A B C)
:precision binary64
(if (<= B -7e-209)
(* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI))
(if (<= B -4.8e-257)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7e-209) {
tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
} else if (B <= -4.8e-257) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -7e-209) {
tmp = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
} else if (B <= -4.8e-257) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7e-209: tmp = 180.0 * (math.atan((((C - A) / B) + 1.0)) / math.pi) elif B <= -4.8e-257: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7e-209) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + 1.0)) / pi)); elseif (B <= -4.8e-257) 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(B + A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -7e-209) tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / pi); elseif (B <= -4.8e-257) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7e-209], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.8e-257], 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[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -7 \cdot 10^{-209}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq -4.8 \cdot 10^{-257}:\\
\;\;\;\;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(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < -7.00000000000000004e-209Initial program 48.2%
Taylor expanded in B around -inf 64.2%
associate--l+64.2%
div-sub66.3%
Simplified66.3%
if -7.00000000000000004e-209 < B < -4.80000000000000033e-257Initial program 28.6%
Taylor expanded in C around inf 65.0%
Taylor expanded in A around inf 65.0%
if -4.80000000000000033e-257 < B Initial program 62.5%
Simplified82.6%
Taylor expanded in C around 0 58.4%
+-commutative58.4%
unpow258.4%
unpow258.4%
hypot-define74.4%
Simplified74.4%
associate-*r/74.4%
Applied egg-rr74.4%
Taylor expanded in A around 0 73.8%
Taylor expanded in C around -inf 73.8%
associate-*r/73.8%
*-commutative73.8%
associate-/l*73.8%
mul-1-neg73.8%
distribute-neg-frac273.8%
associate-+r+73.8%
mul-1-neg73.8%
unsub-neg73.8%
Simplified73.8%
Final simplification70.7%
(FPCore (A B C)
:precision binary64
(if (<= B -7e-209)
(* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI))
(if (<= B -4.3e-254)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7e-209) {
tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
} else if (B <= -4.3e-254) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -7e-209) {
tmp = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
} else if (B <= -4.3e-254) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7e-209: tmp = 180.0 * (math.atan((((C - A) / B) + 1.0)) / math.pi) elif B <= -4.3e-254: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7e-209) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + 1.0)) / pi)); elseif (B <= -4.3e-254) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -7e-209) tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / pi); elseif (B <= -4.3e-254) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7e-209], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.3e-254], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -7 \cdot 10^{-209}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq -4.3 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -7.00000000000000004e-209Initial program 48.2%
Taylor expanded in B around -inf 64.2%
associate--l+64.2%
div-sub66.3%
Simplified66.3%
if -7.00000000000000004e-209 < B < -4.2999999999999997e-254Initial program 28.6%
Taylor expanded in C around inf 65.0%
Taylor expanded in A around inf 65.0%
if -4.2999999999999997e-254 < B Initial program 62.5%
Simplified82.6%
Taylor expanded in C around 0 58.4%
+-commutative58.4%
unpow258.4%
unpow258.4%
hypot-define74.4%
Simplified74.4%
Taylor expanded in A around 0 73.8%
Final simplification70.7%
(FPCore (A B C)
:precision binary64
(if (<= C -3.9e-120)
(* 180.0 (/ (atan (+ (/ C B) 1.0)) PI))
(if (<= C 3.8e-265)
(* 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 <= -3.9e-120) {
tmp = 180.0 * (atan(((C / B) + 1.0)) / ((double) M_PI));
} else if (C <= 3.8e-265) {
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 <= -3.9e-120) {
tmp = 180.0 * (Math.atan(((C / B) + 1.0)) / Math.PI);
} else if (C <= 3.8e-265) {
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 <= -3.9e-120: tmp = 180.0 * (math.atan(((C / B) + 1.0)) / math.pi) elif C <= 3.8e-265: 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 <= -3.9e-120) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 1.0)) / pi)); elseif (C <= 3.8e-265) 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 <= -3.9e-120) tmp = 180.0 * (atan(((C / B) + 1.0)) / pi); elseif (C <= 3.8e-265) 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, -3.9e-120], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.8e-265], 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 -3.9 \cdot 10^{-120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.8 \cdot 10^{-265}:\\
\;\;\;\;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 < -3.9000000000000002e-120Initial program 78.7%
Taylor expanded in A around 0 74.5%
unpow274.5%
unpow274.5%
hypot-define84.6%
Simplified84.6%
Taylor expanded in B around -inf 68.8%
if -3.9000000000000002e-120 < C < 3.7999999999999998e-265Initial program 58.9%
Taylor expanded in B around inf 40.0%
if 3.7999999999999998e-265 < C Initial program 37.8%
Taylor expanded in C around inf 48.8%
Taylor expanded in A around inf 48.8%
Final simplification54.6%
(FPCore (A B C) :precision binary64 (if (<= B -4.4e-120) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.4e-120) {
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 <= -4.4e-120) {
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 <= -4.4e-120: 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 <= -4.4e-120) 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 <= -4.4e-120) 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, -4.4e-120], 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 -4.4 \cdot 10^{-120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.40000000000000025e-120Initial program 44.0%
Taylor expanded in B around -inf 48.9%
if -4.40000000000000025e-120 < B Initial program 61.3%
Taylor expanded in B around inf 31.2%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 56.2%
Taylor expanded in B around inf 22.4%
herbie shell --seed 2024107
(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)))