
(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 22 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 (<= t_0 -0.5)
(* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI))
(if (<= t_0 0.0)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(/ (* 180.0 (atan (* (/ 1.0 B) (- (- C A) (hypot (- A C) B))))) PI)))))
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 <= -0.5) {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * atan(((1.0 / B) * ((C - A) - hypot((A - C), B))))) / ((double) M_PI);
}
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 <= -0.5) {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
} else if (t_0 <= 0.0) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * Math.atan(((1.0 / B) * ((C - A) - Math.hypot((A - C), B))))) / Math.PI;
}
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 <= -0.5: tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) elif t_0 <= 0.0: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 * math.atan(((1.0 / B) * ((C - A) - math.hypot((A - C), B))))) / math.pi 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 <= -0.5) tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - hypot(Float64(A - C), B))))) / pi); 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 <= -0.5) tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); elseif (t_0 <= 0.0) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 * atan(((1.0 / B) * ((C - A) - hypot((A - C), B))))) / pi; 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[LessEqual[t$95$0, -0.5], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -0.5:\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5Initial program 62.3%
associate-*r/62.3%
associate-*l/62.3%
*-commutative62.3%
Simplified89.8%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 20.4%
associate-*r/20.4%
associate-*l/20.4%
*-commutative20.4%
Simplified20.4%
Taylor expanded in B around 0 99.4%
associate-*r/99.4%
Simplified99.4%
if 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 57.8%
associate-*r/57.8%
unpow257.8%
Simplified57.8%
unpow257.8%
hypot-def81.9%
Applied egg-rr81.9%
Final simplification87.8%
(FPCore (A B C) :precision binary64 (if (<= C 1.65e-27) (* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI)) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.65e-27) {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.65e-27) {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.65e-27: tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.65e-27) tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.65e-27) tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.65e-27], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.65 \cdot 10^{-27}:\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if C < 1.64999999999999999e-27Initial program 66.1%
associate-*r/66.1%
associate-*l/66.1%
*-commutative66.1%
Simplified85.7%
if 1.64999999999999999e-27 < C Initial program 16.5%
associate-*r/16.5%
associate-*l/16.5%
*-commutative16.5%
Simplified47.6%
Taylor expanded in B around 0 79.1%
associate-*r/79.1%
Simplified79.1%
Final simplification84.2%
(FPCore (A B C)
:precision binary64
(if (<= C -1.25e+51)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(if (<= C 2e-27)
(* (/ 180.0 PI) (atan (/ (- (- A) (hypot A B)) B)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.25e+51) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else if (C <= 2e-27) {
tmp = (180.0 / ((double) M_PI)) * atan(((-A - hypot(A, B)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.25e+51) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else if (C <= 2e-27) {
tmp = (180.0 / Math.PI) * Math.atan(((-A - Math.hypot(A, B)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.25e+51: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) elif C <= 2e-27: tmp = (180.0 / math.pi) * math.atan(((-A - math.hypot(A, B)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.25e+51) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); elseif (C <= 2e-27) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.25e+51) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); elseif (C <= 2e-27) tmp = (180.0 / pi) * atan(((-A - hypot(A, B)) / B)); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.25e+51], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2e-27], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.25 \cdot 10^{+51}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{elif}\;C \leq 2 \cdot 10^{-27}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if C < -1.25e51Initial program 79.7%
associate-*r/79.7%
associate-*l/79.7%
associate-*l/79.7%
*-lft-identity79.7%
sub-neg79.7%
associate-+l-78.1%
sub-neg78.1%
remove-double-neg78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-def89.6%
Simplified89.6%
Taylor expanded in A around 0 78.1%
unpow278.1%
unpow278.1%
hypot-def89.6%
Simplified89.6%
if -1.25e51 < C < 2.0000000000000001e-27Initial program 59.6%
associate-*r/59.6%
associate-*l/59.6%
*-commutative59.6%
Simplified82.5%
Taylor expanded in C around 0 55.8%
mul-1-neg55.8%
+-commutative55.8%
unpow255.8%
unpow255.8%
hypot-def78.9%
Simplified78.9%
if 2.0000000000000001e-27 < C Initial program 16.5%
associate-*r/16.5%
associate-*l/16.5%
*-commutative16.5%
Simplified47.6%
Taylor expanded in B around 0 79.1%
associate-*r/79.1%
Simplified79.1%
Final simplification81.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.3e+29)
(/ (* 180.0 (atan (/ (* B -0.5) (- C A)))) PI)
(if (<= A 4.8e+90)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (- 1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.3e+29) {
tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / ((double) M_PI);
} else if (A <= 4.8e+90) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.3e+29) {
tmp = (180.0 * Math.atan(((B * -0.5) / (C - A)))) / Math.PI;
} else if (A <= 4.8e+90) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.3e+29: tmp = (180.0 * math.atan(((B * -0.5) / (C - A)))) / math.pi elif A <= 4.8e+90: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.3e+29) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) / pi); elseif (A <= 4.8e+90) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.3e+29) tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / pi; elseif (A <= 4.8e+90) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.3e+29], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 4.8e+90], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.3 \cdot 10^{+29}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.8 \cdot 10^{+90}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -1.3e29Initial program 27.9%
associate-*r/27.9%
associate-*l/27.9%
*-commutative27.9%
Simplified57.8%
Taylor expanded in B around 0 57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in B around 0 73.2%
*-commutative73.2%
associate-*l/73.3%
associate-*r/73.3%
Simplified73.3%
if -1.3e29 < A < 4.8000000000000002e90Initial program 56.4%
associate-*r/56.4%
associate-*l/56.4%
associate-*l/56.4%
*-lft-identity56.4%
sub-neg56.4%
associate-+l-56.4%
sub-neg56.4%
remove-double-neg56.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-def78.8%
Simplified78.8%
Taylor expanded in A around 0 54.5%
unpow254.5%
unpow254.5%
hypot-def77.1%
Simplified77.1%
if 4.8000000000000002e90 < A Initial program 89.6%
associate-*r/89.6%
associate-*l/89.6%
*-commutative89.6%
Simplified100.0%
Taylor expanded in C around 0 89.6%
mul-1-neg89.6%
+-commutative89.6%
unpow289.6%
unpow289.6%
hypot-def97.5%
Simplified97.5%
Taylor expanded in B around -inf 90.7%
mul-1-neg90.7%
unsub-neg90.7%
Simplified90.7%
Final simplification78.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.25e+29)
(/ (* 180.0 (atan (/ (* B -0.5) (- C A)))) PI)
(if (<= A 1.82e+90)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* (/ 180.0 PI) (atan (- 1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+29) {
tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / ((double) M_PI);
} else if (A <= 1.82e+90) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e+29) {
tmp = (180.0 * Math.atan(((B * -0.5) / (C - A)))) / Math.PI;
} else if (A <= 1.82e+90) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.25e+29: tmp = (180.0 * math.atan(((B * -0.5) / (C - A)))) / math.pi elif A <= 1.82e+90: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.25e+29) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) / pi); elseif (A <= 1.82e+90) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.25e+29) tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / pi; elseif (A <= 1.82e+90) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e+29], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.82e+90], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{+29}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.82 \cdot 10^{+90}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -1.25e29Initial program 27.9%
associate-*r/27.9%
associate-*l/27.9%
*-commutative27.9%
Simplified57.8%
Taylor expanded in B around 0 57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in B around 0 73.2%
*-commutative73.2%
associate-*l/73.3%
associate-*r/73.3%
Simplified73.3%
if -1.25e29 < A < 1.81999999999999994e90Initial program 56.4%
associate-*r/56.4%
unpow256.4%
Simplified56.4%
unpow256.4%
hypot-def78.7%
Applied egg-rr78.7%
Taylor expanded in A around 0 54.6%
unpow254.6%
unpow254.6%
hypot-def77.2%
Simplified77.2%
if 1.81999999999999994e90 < A Initial program 89.6%
associate-*r/89.6%
associate-*l/89.6%
*-commutative89.6%
Simplified100.0%
Taylor expanded in C around 0 89.6%
mul-1-neg89.6%
+-commutative89.6%
unpow289.6%
unpow289.6%
hypot-def97.5%
Simplified97.5%
Taylor expanded in B around -inf 90.7%
mul-1-neg90.7%
unsub-neg90.7%
Simplified90.7%
Final simplification78.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI))
(t_1 (* (/ 180.0 PI) (atan (/ 0.0 B))))
(t_2 (* (/ 180.0 PI) (atan (- (/ A B))))))
(if (<= B -1.3e+48)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -3.5e-23)
t_0
(if (<= B -5.5e-128)
t_2
(if (<= B -1.35e-195)
t_0
(if (<= B -3.4e-239)
t_1
(if (<= B -6.2e-298)
t_2
(if (<= B 7e-197)
t_1
(if (<= B 102.0) t_0 (* (/ 180.0 PI) (atan -1.0))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((C / B))) / ((double) M_PI);
double t_1 = (180.0 / ((double) M_PI)) * atan((0.0 / B));
double t_2 = (180.0 / ((double) M_PI)) * atan(-(A / B));
double tmp;
if (B <= -1.3e+48) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -3.5e-23) {
tmp = t_0;
} else if (B <= -5.5e-128) {
tmp = t_2;
} else if (B <= -1.35e-195) {
tmp = t_0;
} else if (B <= -3.4e-239) {
tmp = t_1;
} else if (B <= -6.2e-298) {
tmp = t_2;
} else if (B <= 7e-197) {
tmp = t_1;
} else if (B <= 102.0) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((C / B))) / Math.PI;
double t_1 = (180.0 / Math.PI) * Math.atan((0.0 / B));
double t_2 = (180.0 / Math.PI) * Math.atan(-(A / B));
double tmp;
if (B <= -1.3e+48) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -3.5e-23) {
tmp = t_0;
} else if (B <= -5.5e-128) {
tmp = t_2;
} else if (B <= -1.35e-195) {
tmp = t_0;
} else if (B <= -3.4e-239) {
tmp = t_1;
} else if (B <= -6.2e-298) {
tmp = t_2;
} else if (B <= 7e-197) {
tmp = t_1;
} else if (B <= 102.0) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((C / B))) / math.pi t_1 = (180.0 / math.pi) * math.atan((0.0 / B)) t_2 = (180.0 / math.pi) * math.atan(-(A / B)) tmp = 0 if B <= -1.3e+48: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -3.5e-23: tmp = t_0 elif B <= -5.5e-128: tmp = t_2 elif B <= -1.35e-195: tmp = t_0 elif B <= -3.4e-239: tmp = t_1 elif B <= -6.2e-298: tmp = t_2 elif B <= 7e-197: tmp = t_1 elif B <= 102.0: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))) t_2 = Float64(Float64(180.0 / pi) * atan(Float64(-Float64(A / B)))) tmp = 0.0 if (B <= -1.3e+48) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -3.5e-23) tmp = t_0; elseif (B <= -5.5e-128) tmp = t_2; elseif (B <= -1.35e-195) tmp = t_0; elseif (B <= -3.4e-239) tmp = t_1; elseif (B <= -6.2e-298) tmp = t_2; elseif (B <= 7e-197) tmp = t_1; elseif (B <= 102.0) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((C / B))) / pi; t_1 = (180.0 / pi) * atan((0.0 / B)); t_2 = (180.0 / pi) * atan(-(A / B)); tmp = 0.0; if (B <= -1.3e+48) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -3.5e-23) tmp = t_0; elseif (B <= -5.5e-128) tmp = t_2; elseif (B <= -1.35e-195) tmp = t_0; elseif (B <= -3.4e-239) tmp = t_1; elseif (B <= -6.2e-298) tmp = t_2; elseif (B <= 7e-197) tmp = t_1; elseif (B <= 102.0) tmp = t_0; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.3e+48], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.5e-23], t$95$0, If[LessEqual[B, -5.5e-128], t$95$2, If[LessEqual[B, -1.35e-195], t$95$0, If[LessEqual[B, -3.4e-239], t$95$1, If[LessEqual[B, -6.2e-298], t$95$2, If[LessEqual[B, 7e-197], t$95$1, If[LessEqual[B, 102.0], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
t_2 := \frac{180}{\pi} \cdot \tan^{-1} \left(-\frac{A}{B}\right)\\
\mathbf{if}\;B \leq -1.3 \cdot 10^{+48}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -3.5 \cdot 10^{-23}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -5.5 \cdot 10^{-128}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -1.35 \cdot 10^{-195}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.4 \cdot 10^{-239}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-298}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 102:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.29999999999999998e48Initial program 47.0%
associate-*r/47.0%
associate-*l/47.0%
*-commutative47.0%
Simplified75.7%
Taylor expanded in B around -inf 62.4%
if -1.29999999999999998e48 < B < -3.49999999999999993e-23 or -5.5000000000000004e-128 < B < -1.35e-195 or 6.9999999999999996e-197 < B < 102Initial program 66.1%
associate-*r/66.1%
unpow266.1%
Simplified66.1%
unpow266.1%
hypot-def74.9%
Applied egg-rr74.9%
Taylor expanded in B around -inf 60.0%
Taylor expanded in C around inf 48.0%
if -3.49999999999999993e-23 < B < -5.5000000000000004e-128 or -3.4e-239 < B < -6.2000000000000003e-298Initial program 56.6%
associate-*r/56.6%
associate-*l/56.6%
*-commutative56.6%
Simplified66.3%
Taylor expanded in C around 0 51.5%
mul-1-neg51.5%
+-commutative51.5%
unpow251.5%
unpow251.5%
hypot-def57.6%
Simplified57.6%
Taylor expanded in A around 0 43.8%
Taylor expanded in A around inf 44.8%
associate-*r/44.8%
neg-mul-144.8%
Simplified44.8%
if -1.35e-195 < B < -3.4e-239 or -6.2000000000000003e-298 < B < 6.9999999999999996e-197Initial program 38.1%
associate-*r/38.1%
associate-*l/38.1%
*-commutative38.1%
Simplified76.3%
Taylor expanded in C around inf 52.1%
distribute-rgt1-in52.1%
metadata-eval52.1%
mul0-lft52.1%
metadata-eval52.1%
Simplified52.1%
if 102 < B Initial program 55.1%
associate-*r/55.1%
associate-*l/55.1%
*-commutative55.1%
Simplified85.1%
Taylor expanded in B around inf 66.2%
Final simplification56.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI))
(t_1 (* (/ 180.0 PI) (atan (/ 0.0 B)))))
(if (<= B -1.36e+48)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -2.35e-195)
t_0
(if (<= B -3.1e-239)
t_1
(if (<= B -3.8e-297)
t_0
(if (<= B 7e-197)
t_1
(if (<= B 650.0) t_0 (* (/ 180.0 PI) (atan -1.0))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((C / B))) / ((double) M_PI);
double t_1 = (180.0 / ((double) M_PI)) * atan((0.0 / B));
double tmp;
if (B <= -1.36e+48) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -2.35e-195) {
tmp = t_0;
} else if (B <= -3.1e-239) {
tmp = t_1;
} else if (B <= -3.8e-297) {
tmp = t_0;
} else if (B <= 7e-197) {
tmp = t_1;
} else if (B <= 650.0) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((C / B))) / Math.PI;
double t_1 = (180.0 / Math.PI) * Math.atan((0.0 / B));
double tmp;
if (B <= -1.36e+48) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -2.35e-195) {
tmp = t_0;
} else if (B <= -3.1e-239) {
tmp = t_1;
} else if (B <= -3.8e-297) {
tmp = t_0;
} else if (B <= 7e-197) {
tmp = t_1;
} else if (B <= 650.0) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((C / B))) / math.pi t_1 = (180.0 / math.pi) * math.atan((0.0 / B)) tmp = 0 if B <= -1.36e+48: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -2.35e-195: tmp = t_0 elif B <= -3.1e-239: tmp = t_1 elif B <= -3.8e-297: tmp = t_0 elif B <= 7e-197: tmp = t_1 elif B <= 650.0: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))) tmp = 0.0 if (B <= -1.36e+48) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -2.35e-195) tmp = t_0; elseif (B <= -3.1e-239) tmp = t_1; elseif (B <= -3.8e-297) tmp = t_0; elseif (B <= 7e-197) tmp = t_1; elseif (B <= 650.0) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((C / B))) / pi; t_1 = (180.0 / pi) * atan((0.0 / B)); tmp = 0.0; if (B <= -1.36e+48) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -2.35e-195) tmp = t_0; elseif (B <= -3.1e-239) tmp = t_1; elseif (B <= -3.8e-297) tmp = t_0; elseif (B <= 7e-197) tmp = t_1; elseif (B <= 650.0) tmp = t_0; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.36e+48], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.35e-195], t$95$0, If[LessEqual[B, -3.1e-239], t$95$1, If[LessEqual[B, -3.8e-297], t$95$0, If[LessEqual[B, 7e-197], t$95$1, If[LessEqual[B, 650.0], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{if}\;B \leq -1.36 \cdot 10^{+48}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -2.35 \cdot 10^{-195}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.1 \cdot 10^{-239}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -3.8 \cdot 10^{-297}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 650:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.3599999999999999e48Initial program 47.0%
associate-*r/47.0%
associate-*l/47.0%
*-commutative47.0%
Simplified75.7%
Taylor expanded in B around -inf 62.4%
if -1.3599999999999999e48 < B < -2.35000000000000005e-195 or -3.09999999999999985e-239 < B < -3.80000000000000005e-297 or 6.9999999999999996e-197 < B < 650Initial program 63.0%
associate-*r/63.0%
unpow263.0%
Simplified63.0%
unpow263.0%
hypot-def72.1%
Applied egg-rr72.1%
Taylor expanded in B around -inf 57.7%
Taylor expanded in C around inf 41.1%
if -2.35000000000000005e-195 < B < -3.09999999999999985e-239 or -3.80000000000000005e-297 < B < 6.9999999999999996e-197Initial program 38.1%
associate-*r/38.1%
associate-*l/38.1%
*-commutative38.1%
Simplified76.3%
Taylor expanded in C around inf 52.1%
distribute-rgt1-in52.1%
metadata-eval52.1%
mul0-lft52.1%
metadata-eval52.1%
Simplified52.1%
if 650 < B Initial program 55.1%
associate-*r/55.1%
associate-*l/55.1%
*-commutative55.1%
Simplified85.1%
Taylor expanded in B around inf 66.2%
Final simplification53.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -2e+55)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C -2.15e-221)
t_0
(if (<= C 9.5e-231)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 6.5e-51) t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -2e+55) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= -2.15e-221) {
tmp = t_0;
} else if (C <= 9.5e-231) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 6.5e-51) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -2e+55) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= -2.15e-221) {
tmp = t_0;
} else if (C <= 9.5e-231) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 6.5e-51) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -2e+55: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= -2.15e-221: tmp = t_0 elif C <= 9.5e-231: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 6.5e-51: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -2e+55) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= -2.15e-221) tmp = t_0; elseif (C <= 9.5e-231) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 6.5e-51) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -2e+55) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= -2.15e-221) tmp = t_0; elseif (C <= 9.5e-231) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 6.5e-51) tmp = t_0; else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2e+55], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -2.15e-221], t$95$0, If[LessEqual[C, 9.5e-231], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.5e-51], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -2 \cdot 10^{+55}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.15 \cdot 10^{-221}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 9.5 \cdot 10^{-231}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 6.5 \cdot 10^{-51}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -2.00000000000000002e55Initial program 80.3%
associate-*r/80.3%
unpow280.3%
Simplified80.3%
unpow280.3%
hypot-def92.3%
Applied egg-rr92.3%
Taylor expanded in B around -inf 82.6%
Taylor expanded in C around inf 72.8%
if -2.00000000000000002e55 < C < -2.1499999999999999e-221 or 9.4999999999999995e-231 < C < 6.5000000000000003e-51Initial program 66.3%
associate-*r/66.3%
associate-*l/66.3%
*-commutative66.3%
Simplified86.6%
Taylor expanded in C around 0 60.1%
mul-1-neg60.1%
+-commutative60.1%
unpow260.1%
unpow260.1%
hypot-def80.7%
Simplified80.7%
Taylor expanded in A around 0 59.3%
Taylor expanded in A around 0 59.3%
neg-mul-159.3%
distribute-frac-neg59.3%
distribute-neg-in59.3%
neg-mul-159.3%
sub-neg59.3%
sub-neg59.3%
neg-mul-159.3%
distribute-neg-in59.3%
+-commutative59.3%
distribute-neg-in59.3%
mul-1-neg59.3%
sub-neg59.3%
Simplified59.3%
if -2.1499999999999999e-221 < C < 9.4999999999999995e-231Initial program 43.9%
associate-*r/43.8%
associate-*l/43.9%
*-commutative43.9%
Simplified74.0%
Taylor expanded in A around -inf 49.2%
if 6.5000000000000003e-51 < C Initial program 17.7%
associate-*r/17.7%
associate-*l/17.7%
*-commutative17.7%
Simplified48.6%
Taylor expanded in B around 0 57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in C around inf 74.6%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -2.5e+55)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= C -8.6e-223)
t_0
(if (<= C 1.2e-230)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 1.9e-52) t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -2.5e+55) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (C <= -8.6e-223) {
tmp = t_0;
} else if (C <= 1.2e-230) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 1.9e-52) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -2.5e+55) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (C <= -8.6e-223) {
tmp = t_0;
} else if (C <= 1.2e-230) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 1.9e-52) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -2.5e+55: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif C <= -8.6e-223: tmp = t_0 elif C <= 1.2e-230: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 1.9e-52: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -2.5e+55) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (C <= -8.6e-223) tmp = t_0; elseif (C <= 1.2e-230) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 1.9e-52) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -2.5e+55) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (C <= -8.6e-223) tmp = t_0; elseif (C <= 1.2e-230) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 1.9e-52) tmp = t_0; else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.5e+55], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -8.6e-223], t$95$0, If[LessEqual[C, 1.2e-230], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.9e-52], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -2.5 \cdot 10^{+55}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;C \leq -8.6 \cdot 10^{-223}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.2 \cdot 10^{-230}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 1.9 \cdot 10^{-52}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -2.50000000000000023e55Initial program 80.3%
associate-*r/80.3%
associate-*l/80.3%
*-commutative80.3%
Simplified92.3%
Taylor expanded in C around -inf 72.8%
if -2.50000000000000023e55 < C < -8.5999999999999998e-223 or 1.2000000000000001e-230 < C < 1.9000000000000002e-52Initial program 66.3%
associate-*r/66.3%
associate-*l/66.3%
*-commutative66.3%
Simplified86.6%
Taylor expanded in C around 0 60.1%
mul-1-neg60.1%
+-commutative60.1%
unpow260.1%
unpow260.1%
hypot-def80.7%
Simplified80.7%
Taylor expanded in A around 0 59.3%
Taylor expanded in A around 0 59.3%
neg-mul-159.3%
distribute-frac-neg59.3%
distribute-neg-in59.3%
neg-mul-159.3%
sub-neg59.3%
sub-neg59.3%
neg-mul-159.3%
distribute-neg-in59.3%
+-commutative59.3%
distribute-neg-in59.3%
mul-1-neg59.3%
sub-neg59.3%
Simplified59.3%
if -8.5999999999999998e-223 < C < 1.2000000000000001e-230Initial program 43.9%
associate-*r/43.8%
associate-*l/43.9%
*-commutative43.9%
Simplified74.0%
Taylor expanded in A around -inf 49.2%
if 1.9000000000000002e-52 < C Initial program 17.7%
associate-*r/17.7%
associate-*l/17.7%
*-commutative17.7%
Simplified48.6%
Taylor expanded in B around 0 57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in C around inf 74.6%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -2.3e+55)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= C -5.2e-223)
t_0
(if (<= C 3.15e-229)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 1.4e-53) t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -2.3e+55) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (C <= -5.2e-223) {
tmp = t_0;
} else if (C <= 3.15e-229) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 1.4e-53) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -2.3e+55) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (C <= -5.2e-223) {
tmp = t_0;
} else if (C <= 3.15e-229) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 1.4e-53) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -2.3e+55: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif C <= -5.2e-223: tmp = t_0 elif C <= 3.15e-229: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 1.4e-53: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -2.3e+55) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (C <= -5.2e-223) tmp = t_0; elseif (C <= 3.15e-229) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 1.4e-53) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -2.3e+55) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (C <= -5.2e-223) tmp = t_0; elseif (C <= 3.15e-229) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 1.4e-53) tmp = t_0; else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.3e+55], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -5.2e-223], t$95$0, If[LessEqual[C, 3.15e-229], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.4e-53], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -2.3 \cdot 10^{+55}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5.2 \cdot 10^{-223}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 3.15 \cdot 10^{-229}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 1.4 \cdot 10^{-53}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -2.29999999999999987e55Initial program 80.3%
associate-*r/80.3%
unpow280.3%
Simplified80.3%
unpow280.3%
hypot-def92.3%
Applied egg-rr92.3%
Taylor expanded in A around 0 78.7%
unpow278.7%
unpow278.7%
hypot-def89.2%
Simplified89.2%
Taylor expanded in B around -inf 82.8%
if -2.29999999999999987e55 < C < -5.2e-223 or 3.14999999999999993e-229 < C < 1.39999999999999993e-53Initial program 66.3%
associate-*r/66.3%
associate-*l/66.3%
*-commutative66.3%
Simplified86.6%
Taylor expanded in C around 0 60.1%
mul-1-neg60.1%
+-commutative60.1%
unpow260.1%
unpow260.1%
hypot-def80.7%
Simplified80.7%
Taylor expanded in A around 0 59.3%
Taylor expanded in A around 0 59.3%
neg-mul-159.3%
distribute-frac-neg59.3%
distribute-neg-in59.3%
neg-mul-159.3%
sub-neg59.3%
sub-neg59.3%
neg-mul-159.3%
distribute-neg-in59.3%
+-commutative59.3%
distribute-neg-in59.3%
mul-1-neg59.3%
sub-neg59.3%
Simplified59.3%
if -5.2e-223 < C < 3.14999999999999993e-229Initial program 43.9%
associate-*r/43.8%
associate-*l/43.9%
*-commutative43.9%
Simplified74.0%
Taylor expanded in A around -inf 49.2%
if 1.39999999999999993e-53 < C Initial program 17.7%
associate-*r/17.7%
associate-*l/17.7%
*-commutative17.7%
Simplified48.6%
Taylor expanded in B around 0 57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in C around inf 74.6%
Final simplification67.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -2.8e+55)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= C -5.2e-223)
t_0
(if (<= C 1.05e-230)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= C 5.5e-53) t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -2.8e+55) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (C <= -5.2e-223) {
tmp = t_0;
} else if (C <= 1.05e-230) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (C <= 5.5e-53) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -2.8e+55) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (C <= -5.2e-223) {
tmp = t_0;
} else if (C <= 1.05e-230) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (C <= 5.5e-53) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -2.8e+55: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif C <= -5.2e-223: tmp = t_0 elif C <= 1.05e-230: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif C <= 5.5e-53: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -2.8e+55) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (C <= -5.2e-223) tmp = t_0; elseif (C <= 1.05e-230) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (C <= 5.5e-53) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -2.8e+55) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (C <= -5.2e-223) tmp = t_0; elseif (C <= 1.05e-230) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (C <= 5.5e-53) tmp = t_0; else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.8e+55], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -5.2e-223], t$95$0, If[LessEqual[C, 1.05e-230], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 5.5e-53], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -2.8 \cdot 10^{+55}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5.2 \cdot 10^{-223}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.05 \cdot 10^{-230}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.5 \cdot 10^{-53}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -2.8000000000000001e55Initial program 80.3%
associate-*r/80.3%
unpow280.3%
Simplified80.3%
unpow280.3%
hypot-def92.3%
Applied egg-rr92.3%
Taylor expanded in A around 0 78.7%
unpow278.7%
unpow278.7%
hypot-def89.2%
Simplified89.2%
Taylor expanded in B around -inf 82.8%
if -2.8000000000000001e55 < C < -5.2e-223 or 1.0499999999999999e-230 < C < 5.50000000000000023e-53Initial program 66.3%
associate-*r/66.3%
associate-*l/66.3%
*-commutative66.3%
Simplified86.6%
Taylor expanded in C around 0 60.1%
mul-1-neg60.1%
+-commutative60.1%
unpow260.1%
unpow260.1%
hypot-def80.7%
Simplified80.7%
Taylor expanded in A around 0 59.3%
Taylor expanded in A around 0 59.3%
neg-mul-159.3%
distribute-frac-neg59.3%
distribute-neg-in59.3%
neg-mul-159.3%
sub-neg59.3%
sub-neg59.3%
neg-mul-159.3%
distribute-neg-in59.3%
+-commutative59.3%
distribute-neg-in59.3%
mul-1-neg59.3%
sub-neg59.3%
Simplified59.3%
if -5.2e-223 < C < 1.0499999999999999e-230Initial program 43.9%
associate-*r/43.8%
unpow243.8%
Simplified43.8%
unpow243.8%
hypot-def74.0%
Applied egg-rr74.0%
Taylor expanded in A around -inf 49.2%
associate-*r/49.2%
Simplified49.2%
if 5.50000000000000023e-53 < C Initial program 17.7%
associate-*r/17.7%
associate-*l/17.7%
*-commutative17.7%
Simplified48.6%
Taylor expanded in B around 0 57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in C around inf 74.6%
Final simplification67.2%
(FPCore (A B C)
:precision binary64
(if (<= C -1.3e-222)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (or (<= C 2.7e-214) (not (<= C 1.7e-36)))
(* 180.0 (/ (atan (/ (* B 0.5) (- A C))) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-222) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if ((C <= 2.7e-214) || !(C <= 1.7e-36)) {
tmp = 180.0 * (atan(((B * 0.5) / (A - C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-222) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if ((C <= 2.7e-214) || !(C <= 1.7e-36)) {
tmp = 180.0 * (Math.atan(((B * 0.5) / (A - C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.3e-222: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif (C <= 2.7e-214) or not (C <= 1.7e-36): tmp = 180.0 * (math.atan(((B * 0.5) / (A - C))) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.3e-222) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif ((C <= 2.7e-214) || !(C <= 1.7e-36)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / Float64(A - C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.3e-222) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif ((C <= 2.7e-214) || ~((C <= 1.7e-36))) tmp = 180.0 * (atan(((B * 0.5) / (A - C))) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.3e-222], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[C, 2.7e-214], N[Not[LessEqual[C, 1.7e-36]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.3 \cdot 10^{-222}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.7 \cdot 10^{-214} \lor \neg \left(C \leq 1.7 \cdot 10^{-36}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.2999999999999999e-222Initial program 76.5%
associate-*r/76.5%
unpow276.5%
Simplified76.5%
unpow276.5%
hypot-def91.2%
Applied egg-rr91.2%
Taylor expanded in A around 0 71.4%
unpow271.4%
unpow271.4%
hypot-def82.9%
Simplified82.9%
Taylor expanded in C around 0 67.9%
mul-1-neg67.9%
unsub-neg67.9%
Simplified67.9%
if -1.2999999999999999e-222 < C < 2.7000000000000001e-214 or 1.7000000000000001e-36 < C Initial program 28.1%
associate-*r/28.1%
associate-*l/28.1%
*-commutative28.1%
Simplified57.8%
Taylor expanded in B around 0 48.9%
unpow248.9%
Simplified48.9%
Taylor expanded in C around -inf 65.9%
associate-*r/65.9%
mul-1-neg65.9%
sub-neg65.9%
Simplified65.9%
if 2.7000000000000001e-214 < C < 1.7000000000000001e-36Initial program 63.2%
associate-*r/63.2%
associate-*l/63.2%
*-commutative63.2%
Simplified87.5%
Taylor expanded in C around 0 63.2%
mul-1-neg63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
hypot-def87.5%
Simplified87.5%
Taylor expanded in A around 0 71.3%
Taylor expanded in A around 0 71.3%
neg-mul-171.3%
distribute-frac-neg71.3%
distribute-neg-in71.3%
neg-mul-171.3%
sub-neg71.3%
sub-neg71.3%
neg-mul-171.3%
distribute-neg-in71.3%
+-commutative71.3%
distribute-neg-in71.3%
mul-1-neg71.3%
sub-neg71.3%
Simplified71.3%
Final simplification67.6%
(FPCore (A B C)
:precision binary64
(if (<= C -6e-223)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (or (<= C 1.85e-214) (not (<= C 1e-31)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -6e-223) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if ((C <= 1.85e-214) || !(C <= 1e-31)) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -6e-223) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if ((C <= 1.85e-214) || !(C <= 1e-31)) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -6e-223: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif (C <= 1.85e-214) or not (C <= 1e-31): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -6e-223) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif ((C <= 1.85e-214) || !(C <= 1e-31)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -6e-223) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif ((C <= 1.85e-214) || ~((C <= 1e-31))) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -6e-223], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[C, 1.85e-214], N[Not[LessEqual[C, 1e-31]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6 \cdot 10^{-223}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.85 \cdot 10^{-214} \lor \neg \left(C \leq 10^{-31}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.99999999999999983e-223Initial program 76.5%
associate-*r/76.5%
unpow276.5%
Simplified76.5%
unpow276.5%
hypot-def91.2%
Applied egg-rr91.2%
Taylor expanded in A around 0 71.4%
unpow271.4%
unpow271.4%
hypot-def82.9%
Simplified82.9%
Taylor expanded in C around 0 67.9%
mul-1-neg67.9%
unsub-neg67.9%
Simplified67.9%
if -5.99999999999999983e-223 < C < 1.8500000000000001e-214 or 1e-31 < C Initial program 28.1%
associate-*r/28.1%
associate-*l/28.1%
*-commutative28.1%
Simplified57.8%
Taylor expanded in B around 0 66.0%
associate-*r/66.0%
Simplified66.0%
if 1.8500000000000001e-214 < C < 1e-31Initial program 63.2%
associate-*r/63.2%
associate-*l/63.2%
*-commutative63.2%
Simplified87.5%
Taylor expanded in C around 0 63.2%
mul-1-neg63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
hypot-def87.5%
Simplified87.5%
Taylor expanded in A around 0 71.3%
Taylor expanded in A around 0 71.3%
neg-mul-171.3%
distribute-frac-neg71.3%
distribute-neg-in71.3%
neg-mul-171.3%
sub-neg71.3%
sub-neg71.3%
neg-mul-171.3%
distribute-neg-in71.3%
+-commutative71.3%
distribute-neg-in71.3%
mul-1-neg71.3%
sub-neg71.3%
Simplified71.3%
Final simplification67.6%
(FPCore (A B C)
:precision binary64
(if (<= C -2.55e-222)
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
(if (or (<= C 2.9e-214) (not (<= C 1.1e-31)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.55e-222) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
} else if ((C <= 2.9e-214) || !(C <= 1.1e-31)) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.55e-222) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
} else if ((C <= 2.9e-214) || !(C <= 1.1e-31)) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.55e-222: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) elif (C <= 2.9e-214) or not (C <= 1.1e-31): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.55e-222) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); elseif ((C <= 2.9e-214) || !(C <= 1.1e-31)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.55e-222) tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); elseif ((C <= 2.9e-214) || ~((C <= 1.1e-31))) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.55e-222], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 2.9e-214], N[Not[LessEqual[C, 1.1e-31]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.55 \cdot 10^{-222}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{elif}\;C \leq 2.9 \cdot 10^{-214} \lor \neg \left(C \leq 1.1 \cdot 10^{-31}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.5500000000000001e-222Initial program 76.5%
associate-*r/76.5%
associate-*l/76.5%
associate-*l/76.5%
*-lft-identity76.5%
sub-neg76.5%
associate-+l-74.3%
sub-neg74.3%
remove-double-neg74.3%
+-commutative74.3%
unpow274.3%
unpow274.3%
hypot-def86.5%
Simplified86.5%
Taylor expanded in B around inf 71.0%
if -2.5500000000000001e-222 < C < 2.89999999999999985e-214 or 1.10000000000000005e-31 < C Initial program 28.1%
associate-*r/28.1%
associate-*l/28.1%
*-commutative28.1%
Simplified57.8%
Taylor expanded in B around 0 66.0%
associate-*r/66.0%
Simplified66.0%
if 2.89999999999999985e-214 < C < 1.10000000000000005e-31Initial program 63.2%
associate-*r/63.2%
associate-*l/63.2%
*-commutative63.2%
Simplified87.5%
Taylor expanded in C around 0 63.2%
mul-1-neg63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
hypot-def87.5%
Simplified87.5%
Taylor expanded in A around 0 71.3%
Taylor expanded in A around 0 71.3%
neg-mul-171.3%
distribute-frac-neg71.3%
distribute-neg-in71.3%
neg-mul-171.3%
sub-neg71.3%
sub-neg71.3%
neg-mul-171.3%
distribute-neg-in71.3%
+-commutative71.3%
distribute-neg-in71.3%
mul-1-neg71.3%
sub-neg71.3%
Simplified71.3%
Final simplification69.0%
(FPCore (A B C)
:precision binary64
(if (<= C -1.85e-222)
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI)
(if (or (<= C 1.35e-202) (not (<= C 3.8e-42)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.85e-222) {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
} else if ((C <= 1.35e-202) || !(C <= 3.8e-42)) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.85e-222) {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
} else if ((C <= 1.35e-202) || !(C <= 3.8e-42)) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.85e-222: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi elif (C <= 1.35e-202) or not (C <= 3.8e-42): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.85e-222) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); elseif ((C <= 1.35e-202) || !(C <= 3.8e-42)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.85e-222) tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; elseif ((C <= 1.35e-202) || ~((C <= 3.8e-42))) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.85e-222], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[C, 1.35e-202], N[Not[LessEqual[C, 3.8e-42]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.85 \cdot 10^{-222}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.35 \cdot 10^{-202} \lor \neg \left(C \leq 3.8 \cdot 10^{-42}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.8499999999999999e-222Initial program 76.5%
associate-*r/76.5%
unpow276.5%
Simplified76.5%
unpow276.5%
hypot-def91.2%
Applied egg-rr91.2%
Taylor expanded in B around inf 70.1%
+-commutative70.1%
associate--r+70.1%
div-sub71.0%
Simplified71.0%
if -1.8499999999999999e-222 < C < 1.3499999999999999e-202 or 3.80000000000000017e-42 < C Initial program 28.1%
associate-*r/28.1%
associate-*l/28.1%
*-commutative28.1%
Simplified57.8%
Taylor expanded in B around 0 66.0%
associate-*r/66.0%
Simplified66.0%
if 1.3499999999999999e-202 < C < 3.80000000000000017e-42Initial program 63.2%
associate-*r/63.2%
associate-*l/63.2%
*-commutative63.2%
Simplified87.5%
Taylor expanded in C around 0 63.2%
mul-1-neg63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
hypot-def87.5%
Simplified87.5%
Taylor expanded in A around 0 71.3%
Taylor expanded in A around 0 71.3%
neg-mul-171.3%
distribute-frac-neg71.3%
distribute-neg-in71.3%
neg-mul-171.3%
sub-neg71.3%
sub-neg71.3%
neg-mul-171.3%
distribute-neg-in71.3%
+-commutative71.3%
distribute-neg-in71.3%
mul-1-neg71.3%
sub-neg71.3%
Simplified71.3%
Final simplification69.0%
(FPCore (A B C)
:precision binary64
(if (<= C -1.15e-222)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= C 6.4e-230)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= C 7.5e-51)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.15e-222) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (C <= 6.4e-230) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (C <= 7.5e-51) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.15e-222) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (C <= 6.4e-230) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (C <= 7.5e-51) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.15e-222: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif C <= 6.4e-230: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif C <= 7.5e-51: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.15e-222) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (C <= 6.4e-230) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (C <= 7.5e-51) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.15e-222) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (C <= 6.4e-230) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (C <= 7.5e-51) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.15e-222], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 6.4e-230], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 7.5e-51], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.15 \cdot 10^{-222}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.4 \cdot 10^{-230}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -1.1500000000000001e-222Initial program 76.5%
associate-*r/76.5%
unpow276.5%
Simplified76.5%
unpow276.5%
hypot-def91.2%
Applied egg-rr91.2%
Taylor expanded in A around 0 71.4%
unpow271.4%
unpow271.4%
hypot-def82.9%
Simplified82.9%
Taylor expanded in C around 0 67.9%
mul-1-neg67.9%
unsub-neg67.9%
Simplified67.9%
if -1.1500000000000001e-222 < C < 6.3999999999999999e-230Initial program 43.9%
associate-*r/43.8%
unpow243.8%
Simplified43.8%
unpow243.8%
hypot-def74.0%
Applied egg-rr74.0%
Taylor expanded in A around -inf 49.2%
associate-*r/49.2%
Simplified49.2%
if 6.3999999999999999e-230 < C < 7.49999999999999976e-51Initial program 59.8%
associate-*r/59.8%
associate-*l/59.8%
*-commutative59.8%
Simplified82.7%
Taylor expanded in C around 0 60.0%
mul-1-neg60.0%
+-commutative60.0%
unpow260.0%
unpow260.0%
hypot-def82.8%
Simplified82.8%
Taylor expanded in A around 0 66.4%
Taylor expanded in A around 0 66.4%
neg-mul-166.4%
distribute-frac-neg66.4%
distribute-neg-in66.4%
neg-mul-166.4%
sub-neg66.4%
sub-neg66.4%
neg-mul-166.4%
distribute-neg-in66.4%
+-commutative66.4%
distribute-neg-in66.4%
mul-1-neg66.4%
sub-neg66.4%
Simplified66.4%
if 7.49999999999999976e-51 < C Initial program 17.7%
associate-*r/17.7%
associate-*l/17.7%
*-commutative17.7%
Simplified48.6%
Taylor expanded in B around 0 57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in C around inf 74.6%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(if (<= C -2.3e+56)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 5.8e+140)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* (/ 180.0 PI) (atan (/ 0.0 B))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.3e+56) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 5.8e+140) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.3e+56) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 5.8e+140) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.3e+56: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 5.8e+140: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.3e+56) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 5.8e+140) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.3e+56) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 5.8e+140) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = (180.0 / pi) * atan((0.0 / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.3e+56], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 5.8e+140], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.3 \cdot 10^{+56}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.8 \cdot 10^{+140}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\end{array}
\end{array}
if C < -2.30000000000000015e56Initial program 80.3%
associate-*r/80.3%
unpow280.3%
Simplified80.3%
unpow280.3%
hypot-def92.3%
Applied egg-rr92.3%
Taylor expanded in B around -inf 82.6%
Taylor expanded in C around inf 72.8%
if -2.30000000000000015e56 < C < 5.7999999999999998e140Initial program 55.0%
associate-*r/55.0%
associate-*l/55.0%
*-commutative55.0%
Simplified77.1%
Taylor expanded in C around 0 50.7%
mul-1-neg50.7%
+-commutative50.7%
unpow250.7%
unpow250.7%
hypot-def73.6%
Simplified73.6%
Taylor expanded in A around 0 48.3%
Taylor expanded in A around 0 48.3%
neg-mul-148.3%
distribute-frac-neg48.3%
distribute-neg-in48.3%
neg-mul-148.3%
sub-neg48.3%
sub-neg48.3%
neg-mul-148.3%
distribute-neg-in48.3%
+-commutative48.3%
distribute-neg-in48.3%
mul-1-neg48.3%
sub-neg48.3%
Simplified48.3%
if 5.7999999999999998e140 < C Initial program 6.5%
associate-*r/6.5%
associate-*l/6.5%
*-commutative6.5%
Simplified48.2%
Taylor expanded in C around inf 33.4%
distribute-rgt1-in33.4%
metadata-eval33.4%
mul0-lft33.4%
metadata-eval33.4%
Simplified33.4%
Final simplification52.3%
(FPCore (A B C)
:precision binary64
(if (<= C -8.2e+55)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 3.8e-52)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* 180.0 (/ (atan (/ B (/ C -0.5))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8.2e+55) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 3.8e-52) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -8.2e+55) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 3.8e-52) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B / (C / -0.5))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -8.2e+55: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 3.8e-52: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan((B / (C / -0.5))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -8.2e+55) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 3.8e-52) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(C / -0.5))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8.2e+55) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 3.8e-52) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = 180.0 * (atan((B / (C / -0.5))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8.2e+55], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.8e-52], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8.2 \cdot 10^{+55}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.8 \cdot 10^{-52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\end{array}
\end{array}
if C < -8.19999999999999962e55Initial program 80.3%
associate-*r/80.3%
unpow280.3%
Simplified80.3%
unpow280.3%
hypot-def92.3%
Applied egg-rr92.3%
Taylor expanded in B around -inf 82.6%
Taylor expanded in C around inf 72.8%
if -8.19999999999999962e55 < C < 3.8000000000000003e-52Initial program 60.0%
associate-*r/60.0%
associate-*l/60.0%
*-commutative60.0%
Simplified83.1%
Taylor expanded in C around 0 55.5%
mul-1-neg55.5%
+-commutative55.5%
unpow255.5%
unpow255.5%
hypot-def78.8%
Simplified78.8%
Taylor expanded in A around 0 51.4%
Taylor expanded in A around 0 51.4%
neg-mul-151.4%
distribute-frac-neg51.4%
distribute-neg-in51.4%
neg-mul-151.4%
sub-neg51.4%
sub-neg51.4%
neg-mul-151.4%
distribute-neg-in51.4%
+-commutative51.4%
distribute-neg-in51.4%
mul-1-neg51.4%
sub-neg51.4%
Simplified51.4%
if 3.8000000000000003e-52 < C Initial program 17.7%
associate-*r/17.7%
unpow217.7%
Simplified17.7%
unpow217.7%
hypot-def48.7%
Applied egg-rr48.7%
Taylor expanded in A around 0 11.7%
unpow211.7%
unpow211.7%
hypot-def38.8%
Simplified38.8%
Taylor expanded in C around inf 74.5%
associate-*r/74.5%
Simplified74.5%
Taylor expanded in B around 0 74.4%
*-commutative74.4%
associate-/r/74.4%
Simplified74.4%
Final simplification62.1%
(FPCore (A B C)
:precision binary64
(if (<= C -2.2e+56)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 2.75e-52)
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.2e+56) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 2.75e-52) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.2e+56) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 2.75e-52) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.2e+56: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 2.75e-52: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.2e+56) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 2.75e-52) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.2e+56) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 2.75e-52) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.2e+56], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.75e-52], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.2 \cdot 10^{+56}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.75 \cdot 10^{-52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -2.20000000000000016e56Initial program 80.3%
associate-*r/80.3%
unpow280.3%
Simplified80.3%
unpow280.3%
hypot-def92.3%
Applied egg-rr92.3%
Taylor expanded in B around -inf 82.6%
Taylor expanded in C around inf 72.8%
if -2.20000000000000016e56 < C < 2.75e-52Initial program 60.0%
associate-*r/60.0%
associate-*l/60.0%
*-commutative60.0%
Simplified83.1%
Taylor expanded in C around 0 55.5%
mul-1-neg55.5%
+-commutative55.5%
unpow255.5%
unpow255.5%
hypot-def78.8%
Simplified78.8%
Taylor expanded in A around 0 51.4%
Taylor expanded in A around 0 51.4%
neg-mul-151.4%
distribute-frac-neg51.4%
distribute-neg-in51.4%
neg-mul-151.4%
sub-neg51.4%
sub-neg51.4%
neg-mul-151.4%
distribute-neg-in51.4%
+-commutative51.4%
distribute-neg-in51.4%
mul-1-neg51.4%
sub-neg51.4%
Simplified51.4%
if 2.75e-52 < C Initial program 17.7%
associate-*r/17.7%
associate-*l/17.7%
*-commutative17.7%
Simplified48.6%
Taylor expanded in B around 0 57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in C around inf 74.6%
Final simplification62.2%
(FPCore (A B C)
:precision binary64
(if (<= B -7.2e-163)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 1.6e-158)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7.2e-163) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 1.6e-158) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -7.2e-163) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 1.6e-158) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7.2e-163: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 1.6e-158: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7.2e-163) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 1.6e-158) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -7.2e-163) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 1.6e-158) tmp = (180.0 / pi) * atan((0.0 / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7.2e-163], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e-158], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -7.2 \cdot 10^{-163}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-158}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -7.1999999999999996e-163Initial program 49.2%
associate-*r/49.2%
associate-*l/49.2%
*-commutative49.2%
Simplified68.5%
Taylor expanded in B around -inf 42.1%
if -7.1999999999999996e-163 < B < 1.59999999999999998e-158Initial program 55.4%
associate-*r/55.4%
associate-*l/55.4%
*-commutative55.4%
Simplified79.3%
Taylor expanded in C around inf 36.4%
distribute-rgt1-in36.4%
metadata-eval36.4%
mul0-lft36.4%
metadata-eval36.4%
Simplified36.4%
if 1.59999999999999998e-158 < B Initial program 59.8%
associate-*r/59.8%
associate-*l/59.8%
*-commutative59.8%
Simplified84.1%
Taylor expanded in B around inf 54.6%
Final simplification45.5%
(FPCore (A B C) :precision binary64 (if (<= B -4.6e-300) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.6e-300) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.6e-300) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.6e-300: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.6e-300) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.6e-300) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.6e-300], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.6 \cdot 10^{-300}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -4.60000000000000002e-300Initial program 53.8%
associate-*r/53.8%
associate-*l/53.8%
*-commutative53.8%
Simplified73.1%
Taylor expanded in B around -inf 36.0%
if -4.60000000000000002e-300 < B Initial program 55.5%
associate-*r/55.5%
associate-*l/55.5%
*-commutative55.5%
Simplified80.5%
Taylor expanded in B around inf 42.3%
Final simplification39.3%
(FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
double code(double A, double B, double C) {
return (180.0 / ((double) M_PI)) * atan(-1.0);
}
public static double code(double A, double B, double C) {
return (180.0 / Math.PI) * Math.atan(-1.0);
}
def code(A, B, C): return (180.0 / math.pi) * math.atan(-1.0)
function code(A, B, C) return Float64(Float64(180.0 / pi) * atan(-1.0)) end
function tmp = code(A, B, C) tmp = (180.0 / pi) * atan(-1.0); end
code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{180}{\pi} \cdot \tan^{-1} -1
\end{array}
Initial program 54.7%
associate-*r/54.7%
associate-*l/54.7%
*-commutative54.7%
Simplified77.0%
Taylor expanded in B around inf 22.9%
Final simplification22.9%
herbie shell --seed 2023199
(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)))