
(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 (or (<= t_0 -5e-5) (not (<= t_0 0.0)))
(/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))
(* 180.0 (/ (atan (/ B (+ (* C -2.0) (* A 2.0)))) 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 <= -5e-5) || !(t_0 <= 0.0)) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else {
tmp = 180.0 * (atan((B / ((C * -2.0) + (A * 2.0)))) / ((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 <= -5e-5) || !(t_0 <= 0.0)) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = 180.0 * (Math.atan((B / ((C * -2.0) + (A * 2.0)))) / 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 <= -5e-5) or not (t_0 <= 0.0): tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = 180.0 * (math.atan((B / ((C * -2.0) + (A * 2.0)))) / 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 <= -5e-5) || !(t_0 <= 0.0)) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(Float64(C * -2.0) + Float64(A * 2.0)))) / 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 <= -5e-5) || ~((t_0 <= 0.0))) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = 180.0 * (atan((B / ((C * -2.0) + (A * 2.0)))) / 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[Or[LessEqual[t$95$0, -5e-5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B / N[(N[(C * -2.0), $MachinePrecision] + N[(A * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $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 -5 \cdot 10^{-5} \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C \cdot -2 + A \cdot 2}\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))))) < -5.00000000000000024e-5 or -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 60.0%
Applied egg-rr87.8%
if -5.00000000000000024e-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 23.4%
+-commutative23.4%
unpow223.4%
unpow223.4%
hypot-udef23.4%
associate--r+8.9%
associate-/r/8.9%
associate--r+23.4%
hypot-udef23.4%
unpow223.4%
unpow223.4%
+-commutative23.4%
unpow223.4%
unpow223.4%
hypot-def23.4%
Applied egg-rr23.4%
Taylor expanded in A around -inf 96.1%
Taylor expanded in B around 0 99.0%
Final simplification89.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.8e+125)
(* (/ 180.0 PI) (atan (/ 0.5 (/ A B))))
(if (<= A 1.5e+57)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e+125) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
} else if (A <= 1.5e+57) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} 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 <= -1.8e+125) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
} else if (A <= 1.5e+57) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} 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 <= -1.8e+125: tmp = (180.0 / math.pi) * math.atan((0.5 / (A / B))) elif A <= 1.5e+57: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) 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 <= -1.8e+125) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))); elseif (A <= 1.5e+57) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.8e+125) tmp = (180.0 / pi) * atan((0.5 / (A / B))); elseif (A <= 1.5e+57) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.8e+125], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.5e+57], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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 -1.8 \cdot 10^{+125}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{+57}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.8000000000000002e125Initial program 15.7%
Applied egg-rr49.2%
Taylor expanded in A around -inf 86.4%
associate-*r/86.4%
Simplified86.4%
associate-/r/86.5%
associate-/l*86.5%
Applied egg-rr86.5%
if -1.8000000000000002e125 < A < 1.5e57Initial program 55.6%
Applied egg-rr80.3%
Taylor expanded in A around 0 52.6%
unpow252.6%
unpow252.6%
hypot-def77.2%
Simplified77.2%
if 1.5e57 < A Initial program 80.9%
Taylor expanded in C around 0 80.9%
associate-*r/80.9%
mul-1-neg80.9%
+-commutative80.9%
unpow280.9%
unpow280.9%
hypot-def90.7%
Simplified90.7%
Final simplification81.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.8e+131)
(* (/ 180.0 PI) (atan (/ 0.5 (/ A B))))
(if (<= A 9e+59)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+131) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
} else if (A <= 9e+59) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+131) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
} else if (A <= 9e+59) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.8e+131: tmp = (180.0 / math.pi) * math.atan((0.5 / (A / B))) elif A <= 9e+59: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.8e+131) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))); elseif (A <= 9e+59) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.8e+131) tmp = (180.0 / pi) * atan((0.5 / (A / B))); elseif (A <= 9e+59) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 / (pi / atan((((B + C) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.8e+131], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e+59], 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[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.8 \cdot 10^{+131}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.8000000000000001e131Initial program 15.7%
Applied egg-rr49.2%
Taylor expanded in A around -inf 86.4%
associate-*r/86.4%
Simplified86.4%
associate-/r/86.5%
associate-/l*86.5%
Applied egg-rr86.5%
if -2.8000000000000001e131 < A < 8.99999999999999919e59Initial program 55.6%
Taylor expanded in A around 0 52.6%
unpow252.6%
unpow252.6%
hypot-def77.2%
Simplified77.2%
if 8.99999999999999919e59 < A Initial program 80.9%
Applied egg-rr96.5%
Taylor expanded in B around -inf 83.8%
Final simplification80.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1e+115)
(* (/ 180.0 PI) (atan (/ 0.5 (/ A B))))
(if (<= A 7e+60)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1e+115) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
} else if (A <= 7e+60) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1e+115) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
} else if (A <= 7e+60) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1e+115: tmp = (180.0 / math.pi) * math.atan((0.5 / (A / B))) elif A <= 7e+60: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1e+115) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))); elseif (A <= 7e+60) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1e+115) tmp = (180.0 / pi) * atan((0.5 / (A / B))); elseif (A <= 7e+60) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 / (pi / atan((((B + C) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1e+115], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7e+60], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1 \cdot 10^{+115}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\
\mathbf{elif}\;A \leq 7 \cdot 10^{+60}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -1e115Initial program 15.7%
Applied egg-rr49.2%
Taylor expanded in A around -inf 86.4%
associate-*r/86.4%
Simplified86.4%
associate-/r/86.5%
associate-/l*86.5%
Applied egg-rr86.5%
if -1e115 < A < 7.0000000000000004e60Initial program 55.6%
Applied egg-rr80.3%
Taylor expanded in A around 0 52.6%
unpow252.6%
unpow252.6%
hypot-def77.2%
Simplified77.2%
if 7.0000000000000004e60 < A Initial program 80.9%
Applied egg-rr96.5%
Taylor expanded in B around -inf 83.8%
Final simplification80.0%
(FPCore (A B C) :precision binary64 (if (<= A -2.3e+115) (* (/ 180.0 PI) (atan (/ 0.5 (/ A B)))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e+115) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
} 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.3e+115) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
} 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.3e+115: tmp = (180.0 / math.pi) * math.atan((0.5 / (A / B))) 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.3e+115) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))); 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.3e+115) tmp = (180.0 / pi) * atan((0.5 / (A / B))); 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.3e+115], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $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.3 \cdot 10^{+115}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\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.30000000000000004e115Initial program 15.7%
Applied egg-rr49.2%
Taylor expanded in A around -inf 86.4%
associate-*r/86.4%
Simplified86.4%
associate-/r/86.5%
associate-/l*86.5%
Applied egg-rr86.5%
if -2.30000000000000004e115 < A Initial program 62.0%
Simplified83.0%
Final simplification83.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -5.6e-51)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -8.5e-198)
t_0
(if (<= B 1.12e-243)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.15e-161)
t_0
(if (<= B 1.25e-145)
(* 180.0 (/ (atan (/ B A)) PI))
(if (<= B 1.6e+15)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -5.6e-51) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -8.5e-198) {
tmp = t_0;
} else if (B <= 1.12e-243) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.15e-161) {
tmp = t_0;
} else if (B <= 1.25e-145) {
tmp = 180.0 * (atan((B / A)) / ((double) M_PI));
} else if (B <= 1.6e+15) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -5.6e-51) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -8.5e-198) {
tmp = t_0;
} else if (B <= 1.12e-243) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.15e-161) {
tmp = t_0;
} else if (B <= 1.25e-145) {
tmp = 180.0 * (Math.atan((B / A)) / Math.PI);
} else if (B <= 1.6e+15) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -5.6e-51: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -8.5e-198: tmp = t_0 elif B <= 1.12e-243: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.15e-161: tmp = t_0 elif B <= 1.25e-145: tmp = 180.0 * (math.atan((B / A)) / math.pi) elif B <= 1.6e+15: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -5.6e-51) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -8.5e-198) tmp = t_0; elseif (B <= 1.12e-243) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.15e-161) tmp = t_0; elseif (B <= 1.25e-145) tmp = Float64(180.0 * Float64(atan(Float64(B / A)) / pi)); elseif (B <= 1.6e+15) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -5.6e-51) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -8.5e-198) tmp = t_0; elseif (B <= 1.12e-243) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.15e-161) tmp = t_0; elseif (B <= 1.25e-145) tmp = 180.0 * (atan((B / A)) / pi); elseif (B <= 1.6e+15) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.6e-51], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.5e-198], t$95$0, If[LessEqual[B, 1.12e-243], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.15e-161], t$95$0, If[LessEqual[B, 1.25e-145], N[(180.0 * N[(N[ArcTan[N[(B / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e+15], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -5.6 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-198}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.12 \cdot 10^{-243}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-161}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{+15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.6e-51Initial program 46.1%
Taylor expanded in B around -inf 51.8%
if -5.6e-51 < B < -8.4999999999999994e-198 or 1.12000000000000005e-243 < B < 1.15e-161Initial program 66.9%
associate--l-66.7%
add-cube-cbrt66.6%
+-commutative66.6%
unpow266.6%
unpow266.6%
hypot-udef68.5%
fma-neg66.6%
*-un-lft-identity66.6%
*-commutative66.6%
pow266.6%
*-commutative66.6%
*-un-lft-identity66.6%
hypot-udef66.6%
unpow266.6%
unpow266.6%
+-commutative66.6%
unpow266.6%
unpow266.6%
Applied egg-rr66.6%
Taylor expanded in C around -inf 56.6%
if -8.4999999999999994e-198 < B < 1.12000000000000005e-243Initial program 51.4%
Taylor expanded in C around inf 51.5%
associate-*r/51.5%
distribute-rgt1-in51.5%
metadata-eval51.5%
mul0-lft51.5%
metadata-eval51.5%
Simplified51.5%
if 1.15e-161 < B < 1.2499999999999999e-145Initial program 34.9%
+-commutative34.9%
unpow234.9%
unpow234.9%
hypot-udef99.5%
associate--r+35.6%
associate-/r/35.6%
associate--r+99.5%
hypot-udef34.9%
unpow234.9%
unpow234.9%
+-commutative34.9%
unpow234.9%
unpow234.9%
hypot-def99.5%
Applied egg-rr99.5%
Taylor expanded in B around -inf 67.2%
mul-1-neg67.2%
unsub-neg67.2%
Simplified67.2%
Taylor expanded in A around inf 72.9%
if 1.2499999999999999e-145 < B < 1.6e15Initial program 65.1%
Taylor expanded in A around inf 40.3%
if 1.6e15 < B Initial program 52.0%
Taylor expanded in B around inf 68.4%
Final simplification55.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -6e-51)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -8.5e-198)
t_0
(if (<= B 1.5e-238)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 3.1e-162)
t_0
(if (<= B 1.3e-145)
(* 180.0 (/ (atan (/ B A)) PI))
(if (<= B 1.05e+15)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double tmp;
if (B <= -6e-51) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -8.5e-198) {
tmp = t_0;
} else if (B <= 1.5e-238) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 3.1e-162) {
tmp = t_0;
} else if (B <= 1.3e-145) {
tmp = 180.0 * (atan((B / A)) / ((double) M_PI));
} else if (B <= 1.05e+15) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -6e-51) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -8.5e-198) {
tmp = t_0;
} else if (B <= 1.5e-238) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 3.1e-162) {
tmp = t_0;
} else if (B <= 1.3e-145) {
tmp = 180.0 * (Math.atan((B / A)) / Math.PI);
} else if (B <= 1.05e+15) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -6e-51: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -8.5e-198: tmp = t_0 elif B <= 1.5e-238: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 3.1e-162: tmp = t_0 elif B <= 1.3e-145: tmp = 180.0 * (math.atan((B / A)) / math.pi) elif B <= 1.05e+15: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -6e-51) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -8.5e-198) tmp = t_0; elseif (B <= 1.5e-238) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 3.1e-162) tmp = t_0; elseif (B <= 1.3e-145) tmp = Float64(180.0 * Float64(atan(Float64(B / A)) / pi)); elseif (B <= 1.05e+15) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((2.0 * (C / B))) / pi); tmp = 0.0; if (B <= -6e-51) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -8.5e-198) tmp = t_0; elseif (B <= 1.5e-238) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 3.1e-162) tmp = t_0; elseif (B <= 1.3e-145) tmp = 180.0 * (atan((B / A)) / pi); elseif (B <= 1.05e+15) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6e-51], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.5e-198], t$95$0, If[LessEqual[B, 1.5e-238], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-162], t$95$0, If[LessEqual[B, 1.3e-145], N[(180.0 * N[(N[ArcTan[N[(B / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.05e+15], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -6 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-198}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-238}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-162}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{+15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.00000000000000005e-51Initial program 46.1%
Taylor expanded in B around -inf 51.8%
if -6.00000000000000005e-51 < B < -8.4999999999999994e-198 or 1.5e-238 < B < 3.0999999999999999e-162Initial program 66.9%
Taylor expanded in C around -inf 56.7%
if -8.4999999999999994e-198 < B < 1.5e-238Initial program 51.4%
Taylor expanded in C around inf 51.5%
associate-*r/51.5%
distribute-rgt1-in51.5%
metadata-eval51.5%
mul0-lft51.5%
metadata-eval51.5%
Simplified51.5%
if 3.0999999999999999e-162 < B < 1.3e-145Initial program 34.9%
+-commutative34.9%
unpow234.9%
unpow234.9%
hypot-udef99.5%
associate--r+35.6%
associate-/r/35.6%
associate--r+99.5%
hypot-udef34.9%
unpow234.9%
unpow234.9%
+-commutative34.9%
unpow234.9%
unpow234.9%
hypot-def99.5%
Applied egg-rr99.5%
Taylor expanded in B around -inf 67.2%
mul-1-neg67.2%
unsub-neg67.2%
Simplified67.2%
Taylor expanded in A around inf 72.9%
if 1.3e-145 < B < 1.05e15Initial program 65.1%
Taylor expanded in A around inf 40.3%
if 1.05e15 < B Initial program 52.0%
Taylor expanded in B around inf 68.4%
Final simplification55.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= C -3.5e+39)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -1e-30)
t_0
(if (<= C -2.95e-120)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= C -1.9e-253)
t_0
(if (<= C 5.6e-202)
(* 180.0 (/ (atan 1.0) 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) / ((double) M_PI));
double tmp;
if (C <= -3.5e+39) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -1e-30) {
tmp = t_0;
} else if (C <= -2.95e-120) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (C <= -1.9e-253) {
tmp = t_0;
} else if (C <= 5.6e-202) {
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 t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (C <= -3.5e+39) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -1e-30) {
tmp = t_0;
} else if (C <= -2.95e-120) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (C <= -1.9e-253) {
tmp = t_0;
} else if (C <= 5.6e-202) {
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): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if C <= -3.5e+39: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -1e-30: tmp = t_0 elif C <= -2.95e-120: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif C <= -1.9e-253: tmp = t_0 elif C <= 5.6e-202: 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) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (C <= -3.5e+39) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -1e-30) tmp = t_0; elseif (C <= -2.95e-120) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (C <= -1.9e-253) tmp = t_0; elseif (C <= 5.6e-202) 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) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (C <= -3.5e+39) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -1e-30) tmp = t_0; elseif (C <= -2.95e-120) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (C <= -1.9e-253) tmp = t_0; elseif (C <= 5.6e-202) 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_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.5e+39], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1e-30], t$95$0, If[LessEqual[C, -2.95e-120], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.9e-253], t$95$0, If[LessEqual[C, 5.6e-202], 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}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;C \leq -3.5 \cdot 10^{+39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1 \cdot 10^{-30}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq -2.95 \cdot 10^{-120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.9 \cdot 10^{-253}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 5.6 \cdot 10^{-202}:\\
\;\;\;\;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.5000000000000002e39Initial program 82.1%
Taylor expanded in C around -inf 79.1%
if -3.5000000000000002e39 < C < -1e-30 or -2.94999999999999989e-120 < C < -1.90000000000000006e-253Initial program 61.7%
Taylor expanded in B around inf 43.7%
if -1e-30 < C < -2.94999999999999989e-120Initial program 72.5%
Taylor expanded in A around inf 42.8%
if -1.90000000000000006e-253 < C < 5.6000000000000002e-202Initial program 59.5%
Taylor expanded in B around -inf 47.8%
if 5.6000000000000002e-202 < C Initial program 32.4%
+-commutative32.4%
unpow232.4%
unpow232.4%
hypot-udef63.7%
associate--r+56.3%
associate-/r/56.3%
associate--r+63.7%
hypot-udef32.4%
unpow232.4%
unpow232.4%
+-commutative32.4%
unpow232.4%
unpow232.4%
hypot-def63.7%
Applied egg-rr63.7%
Taylor expanded in A around 0 23.0%
unpow223.0%
unpow223.0%
hypot-def49.8%
Simplified49.8%
Taylor expanded in B around 0 56.9%
*-commutative56.9%
Simplified56.9%
Final simplification58.3%
(FPCore (A B C)
:precision binary64
(if (<= C -9.5e-160)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(if (<= C -2.4e-226)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= C -4.7e-253)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 1.4e-195)
(* 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 <= -9.5e-160) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else if (C <= -2.4e-226) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (C <= -4.7e-253) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 1.4e-195) {
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 <= -9.5e-160) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else if (C <= -2.4e-226) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (C <= -4.7e-253) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 1.4e-195) {
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 <= -9.5e-160: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) elif C <= -2.4e-226: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif C <= -4.7e-253: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 1.4e-195: 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 <= -9.5e-160) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); elseif (C <= -2.4e-226) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (C <= -4.7e-253) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 1.4e-195) 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 <= -9.5e-160) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); elseif (C <= -2.4e-226) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (C <= -4.7e-253) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 1.4e-195) 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, -9.5e-160], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.4e-226], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.7e-253], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.4e-195], 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 -9.5 \cdot 10^{-160}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.4 \cdot 10^{-226}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.7 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 1.4 \cdot 10^{-195}:\\
\;\;\;\;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 < -9.5000000000000002e-160Initial program 72.3%
+-commutative72.3%
unpow272.3%
unpow272.3%
hypot-udef89.8%
associate--r+88.1%
associate-/r/88.1%
associate--r+89.8%
hypot-udef72.3%
unpow272.3%
unpow272.3%
+-commutative72.3%
unpow272.3%
unpow272.3%
hypot-def89.8%
Applied egg-rr89.8%
Taylor expanded in A around 0 68.3%
unpow268.3%
unpow268.3%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around inf 73.3%
if -9.5000000000000002e-160 < C < -2.4e-226Initial program 100.0%
Taylor expanded in A around inf 84.1%
if -2.4e-226 < C < -4.69999999999999981e-253Initial program 83.8%
Taylor expanded in B around inf 64.4%
if -4.69999999999999981e-253 < C < 1.40000000000000002e-195Initial program 59.5%
Taylor expanded in B around -inf 47.8%
if 1.40000000000000002e-195 < C Initial program 32.4%
+-commutative32.4%
unpow232.4%
unpow232.4%
hypot-udef63.7%
associate--r+56.3%
associate-/r/56.3%
associate--r+63.7%
hypot-udef32.4%
unpow232.4%
unpow232.4%
+-commutative32.4%
unpow232.4%
unpow232.4%
hypot-def63.7%
Applied egg-rr63.7%
Taylor expanded in A around 0 23.0%
unpow223.0%
unpow223.0%
hypot-def49.8%
Simplified49.8%
Taylor expanded in B around 0 56.9%
*-commutative56.9%
Simplified56.9%
Final simplification64.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))
(if (<= A -3.6e+70)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 4.6e-78)
t_0
(if (<= A 9e-56)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 0.86) t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
double tmp;
if (A <= -3.6e+70) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 4.6e-78) {
tmp = t_0;
} else if (A <= 9e-56) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 0.86) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-2.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 / B) + -1.0)) / Math.PI);
double tmp;
if (A <= -3.6e+70) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 4.6e-78) {
tmp = t_0;
} else if (A <= 9e-56) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 0.86) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) tmp = 0 if A <= -3.6e+70: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 4.6e-78: tmp = t_0 elif A <= 9e-56: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 0.86: tmp = t_0 else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)) tmp = 0.0 if (A <= -3.6e+70) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 4.6e-78) tmp = t_0; elseif (A <= 9e-56) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 0.86) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C / B) + -1.0)) / pi); tmp = 0.0; if (A <= -3.6e+70) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 4.6e-78) tmp = t_0; elseif (A <= 9e-56) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 0.86) tmp = t_0; else tmp = 180.0 * (atan((-2.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[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.6e+70], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.6e-78], t$95$0, If[LessEqual[A, 9e-56], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 0.86], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-2.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}{B} + -1\right)}{\pi}\\
\mathbf{if}\;A \leq -3.6 \cdot 10^{+70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.6 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 9 \cdot 10^{-56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 0.86:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.6e70Initial program 20.6%
Taylor expanded in A around -inf 75.6%
associate-*r/75.6%
Simplified75.6%
if -3.6e70 < A < 4.6000000000000004e-78 or 9.0000000000000001e-56 < A < 0.859999999999999987Initial program 58.6%
+-commutative58.6%
unpow258.6%
unpow258.6%
hypot-udef79.9%
associate--r+79.8%
associate-/r/79.8%
associate--r+79.9%
hypot-udef58.6%
unpow258.6%
unpow258.6%
+-commutative58.6%
unpow258.6%
unpow258.6%
hypot-def79.9%
Applied egg-rr79.9%
Taylor expanded in A around 0 57.7%
unpow257.7%
unpow257.7%
hypot-def79.1%
Simplified79.1%
Taylor expanded in B around inf 58.4%
if 4.6000000000000004e-78 < A < 9.0000000000000001e-56Initial program 6.8%
+-commutative6.8%
unpow26.8%
unpow26.8%
hypot-udef24.6%
associate--r+24.6%
associate-/r/24.6%
associate--r+24.6%
hypot-udef6.8%
unpow26.8%
unpow26.8%
+-commutative6.8%
unpow26.8%
unpow26.8%
hypot-def24.6%
Applied egg-rr24.6%
Taylor expanded in A around 0 6.8%
unpow26.8%
unpow26.8%
hypot-def24.6%
Simplified24.6%
Taylor expanded in B around 0 83.1%
*-commutative83.1%
Simplified83.1%
if 0.859999999999999987 < A Initial program 77.9%
Taylor expanded in A around inf 72.4%
Final simplification66.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))
(if (<= A -5.6e+68)
(* (/ 180.0 PI) (atan (/ 0.5 (/ A B))))
(if (<= A 6.2e-80)
t_0
(if (<= A 8.5e-56)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 34.0) t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
double tmp;
if (A <= -5.6e+68) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
} else if (A <= 6.2e-80) {
tmp = t_0;
} else if (A <= 8.5e-56) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 34.0) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-2.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 / B) + -1.0)) / Math.PI);
double tmp;
if (A <= -5.6e+68) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
} else if (A <= 6.2e-80) {
tmp = t_0;
} else if (A <= 8.5e-56) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 34.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) tmp = 0 if A <= -5.6e+68: tmp = (180.0 / math.pi) * math.atan((0.5 / (A / B))) elif A <= 6.2e-80: tmp = t_0 elif A <= 8.5e-56: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 34.0: tmp = t_0 else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)) tmp = 0.0 if (A <= -5.6e+68) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))); elseif (A <= 6.2e-80) tmp = t_0; elseif (A <= 8.5e-56) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 34.0) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C / B) + -1.0)) / pi); tmp = 0.0; if (A <= -5.6e+68) tmp = (180.0 / pi) * atan((0.5 / (A / B))); elseif (A <= 6.2e-80) tmp = t_0; elseif (A <= 8.5e-56) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 34.0) tmp = t_0; else tmp = 180.0 * (atan((-2.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[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.6e+68], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.2e-80], t$95$0, If[LessEqual[A, 8.5e-56], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 34.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-2.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}{B} + -1\right)}{\pi}\\
\mathbf{if}\;A \leq -5.6 \cdot 10^{+68}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\
\mathbf{elif}\;A \leq 6.2 \cdot 10^{-80}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 8.5 \cdot 10^{-56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 34:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.6e68Initial program 21.7%
Applied egg-rr58.0%
Taylor expanded in A around -inf 74.7%
associate-*r/74.7%
Simplified74.7%
associate-/r/74.8%
associate-/l*74.8%
Applied egg-rr74.8%
if -5.6e68 < A < 6.20000000000000032e-80 or 8.49999999999999932e-56 < A < 34Initial program 58.7%
+-commutative58.7%
unpow258.7%
unpow258.7%
hypot-udef80.4%
associate--r+80.3%
associate-/r/80.3%
associate--r+80.4%
hypot-udef58.7%
unpow258.7%
unpow258.7%
+-commutative58.7%
unpow258.7%
unpow258.7%
hypot-def80.4%
Applied egg-rr80.4%
Taylor expanded in A around 0 57.8%
unpow257.8%
unpow257.8%
hypot-def79.5%
Simplified79.5%
Taylor expanded in B around inf 58.5%
if 6.20000000000000032e-80 < A < 8.49999999999999932e-56Initial program 6.8%
+-commutative6.8%
unpow26.8%
unpow26.8%
hypot-udef24.6%
associate--r+24.6%
associate-/r/24.6%
associate--r+24.6%
hypot-udef6.8%
unpow26.8%
unpow26.8%
+-commutative6.8%
unpow26.8%
unpow26.8%
hypot-def24.6%
Applied egg-rr24.6%
Taylor expanded in A around 0 6.8%
unpow26.8%
unpow26.8%
hypot-def24.6%
Simplified24.6%
Taylor expanded in B around 0 83.1%
*-commutative83.1%
Simplified83.1%
if 34 < A Initial program 77.9%
Taylor expanded in A around inf 72.4%
Final simplification66.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))
(if (<= A -1.7e+68)
(* (/ 180.0 PI) (atan (/ 0.5 (/ A B))))
(if (<= A 1.25e-80)
t_0
(if (<= A 1.38e-55)
(/ 180.0 (/ PI (atan (* -0.5 (/ B C)))))
(if (<= A 34.0) t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
double tmp;
if (A <= -1.7e+68) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
} else if (A <= 1.25e-80) {
tmp = t_0;
} else if (A <= 1.38e-55) {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
} else if (A <= 34.0) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-2.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 / B) + -1.0)) / Math.PI);
double tmp;
if (A <= -1.7e+68) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
} else if (A <= 1.25e-80) {
tmp = t_0;
} else if (A <= 1.38e-55) {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
} else if (A <= 34.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) tmp = 0 if A <= -1.7e+68: tmp = (180.0 / math.pi) * math.atan((0.5 / (A / B))) elif A <= 1.25e-80: tmp = t_0 elif A <= 1.38e-55: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) elif A <= 34.0: tmp = t_0 else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)) tmp = 0.0 if (A <= -1.7e+68) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))); elseif (A <= 1.25e-80) tmp = t_0; elseif (A <= 1.38e-55) tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); elseif (A <= 34.0) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C / B) + -1.0)) / pi); tmp = 0.0; if (A <= -1.7e+68) tmp = (180.0 / pi) * atan((0.5 / (A / B))); elseif (A <= 1.25e-80) tmp = t_0; elseif (A <= 1.38e-55) tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); elseif (A <= 34.0) tmp = t_0; else tmp = 180.0 * (atan((-2.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[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.7e+68], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.25e-80], t$95$0, If[LessEqual[A, 1.38e-55], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 34.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-2.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}{B} + -1\right)}{\pi}\\
\mathbf{if}\;A \leq -1.7 \cdot 10^{+68}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{-80}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.38 \cdot 10^{-55}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\mathbf{elif}\;A \leq 34:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.70000000000000008e68Initial program 21.7%
Applied egg-rr58.0%
Taylor expanded in A around -inf 74.7%
associate-*r/74.7%
Simplified74.7%
associate-/r/74.8%
associate-/l*74.8%
Applied egg-rr74.8%
if -1.70000000000000008e68 < A < 1.25e-80 or 1.3799999999999999e-55 < A < 34Initial program 58.7%
+-commutative58.7%
unpow258.7%
unpow258.7%
hypot-udef80.4%
associate--r+80.3%
associate-/r/80.3%
associate--r+80.4%
hypot-udef58.7%
unpow258.7%
unpow258.7%
+-commutative58.7%
unpow258.7%
unpow258.7%
hypot-def80.4%
Applied egg-rr80.4%
Taylor expanded in A around 0 57.8%
unpow257.8%
unpow257.8%
hypot-def79.5%
Simplified79.5%
Taylor expanded in B around inf 58.5%
if 1.25e-80 < A < 1.3799999999999999e-55Initial program 6.8%
Applied egg-rr24.6%
Taylor expanded in A around 0 6.8%
unpow26.8%
unpow26.8%
hypot-def24.6%
Simplified24.6%
Taylor expanded in C around inf 83.4%
if 34 < A Initial program 77.9%
Taylor expanded in A around inf 72.4%
Final simplification66.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -6.2e-51)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -9e-198)
t_0
(if (<= B 4.2e-233)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.4e-65) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -6.2e-51) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -9e-198) {
tmp = t_0;
} else if (B <= 4.2e-233) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.4e-65) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -6.2e-51) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -9e-198) {
tmp = t_0;
} else if (B <= 4.2e-233) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.4e-65) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -6.2e-51: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -9e-198: tmp = t_0 elif B <= 4.2e-233: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.4e-65: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -6.2e-51) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -9e-198) tmp = t_0; elseif (B <= 4.2e-233) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.4e-65) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -6.2e-51) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -9e-198) tmp = t_0; elseif (B <= 4.2e-233) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.4e-65) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.2e-51], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9e-198], t$95$0, If[LessEqual[B, 4.2e-233], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-65], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -6.2 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -9 \cdot 10^{-198}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-233}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-65}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.1999999999999995e-51Initial program 46.1%
Taylor expanded in B around -inf 51.8%
if -6.1999999999999995e-51 < B < -8.9999999999999996e-198 or 4.1999999999999997e-233 < B < 2.4000000000000002e-65Initial program 65.8%
associate--l-65.5%
add-cube-cbrt65.4%
+-commutative65.4%
unpow265.4%
unpow265.4%
hypot-udef68.2%
fma-neg65.5%
*-un-lft-identity65.5%
*-commutative65.5%
pow265.5%
*-commutative65.5%
*-un-lft-identity65.5%
hypot-udef65.4%
unpow265.4%
unpow265.4%
+-commutative65.4%
unpow265.4%
unpow265.4%
Applied egg-rr65.5%
Taylor expanded in C around -inf 49.7%
if -8.9999999999999996e-198 < B < 4.1999999999999997e-233Initial program 51.4%
Taylor expanded in C around inf 51.5%
associate-*r/51.5%
distribute-rgt1-in51.5%
metadata-eval51.5%
mul0-lft51.5%
metadata-eval51.5%
Simplified51.5%
if 2.4000000000000002e-65 < B Initial program 54.4%
Taylor expanded in B around inf 57.9%
Final simplification53.2%
(FPCore (A B C)
:precision binary64
(if (<= B -1e-29)
(/ 180.0 (/ PI (atan (/ (+ B C) B))))
(if (or (<= B -1.42e-244) (not (<= B 2.3e-233)))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))
(* 180.0 (/ (atan (/ 0.0 B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-29) {
tmp = 180.0 / (((double) M_PI) / atan(((B + C) / B)));
} else if ((B <= -1.42e-244) || !(B <= 2.3e-233)) {
tmp = 180.0 * (atan(((C - (B + 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 (B <= -1e-29) {
tmp = 180.0 / (Math.PI / Math.atan(((B + C) / B)));
} else if ((B <= -1.42e-244) || !(B <= 2.3e-233)) {
tmp = 180.0 * (Math.atan(((C - (B + 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 B <= -1e-29: tmp = 180.0 / (math.pi / math.atan(((B + C) / B))) elif (B <= -1.42e-244) or not (B <= 2.3e-233): tmp = 180.0 * (math.atan(((C - (B + 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 (B <= -1e-29) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B + C) / B)))); elseif ((B <= -1.42e-244) || !(B <= 2.3e-233)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + 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 (B <= -1e-29) tmp = 180.0 / (pi / atan(((B + C) / B))); elseif ((B <= -1.42e-244) || ~((B <= 2.3e-233))) tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-29], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, -1.42e-244], N[Not[LessEqual[B, 2.3e-233]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-29}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B + C}{B}\right)}}\\
\mathbf{elif}\;B \leq -1.42 \cdot 10^{-244} \lor \neg \left(B \leq 2.3 \cdot 10^{-233}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -9.99999999999999943e-30Initial program 44.5%
Applied egg-rr71.6%
Taylor expanded in A around 0 37.5%
unpow237.5%
unpow237.5%
hypot-def64.5%
Simplified64.5%
Taylor expanded in B around -inf 64.1%
+-commutative64.1%
Simplified64.1%
if -9.99999999999999943e-30 < B < -1.42000000000000003e-244 or 2.3000000000000002e-233 < B Initial program 59.6%
Simplified77.5%
Taylor expanded in B around inf 70.1%
+-commutative70.1%
Simplified70.1%
if -1.42000000000000003e-244 < B < 2.3000000000000002e-233Initial program 49.2%
Taylor expanded in C around inf 55.7%
associate-*r/55.7%
distribute-rgt1-in55.7%
metadata-eval55.7%
mul0-lft55.7%
metadata-eval55.7%
Simplified55.7%
Final simplification67.0%
(FPCore (A B C)
:precision binary64
(if (<= C -3.5e-117)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C -2.15e-253)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 1.05e-198)
(* 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.5e-117) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= -2.15e-253) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 1.05e-198) {
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.5e-117) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= -2.15e-253) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 1.05e-198) {
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.5e-117: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= -2.15e-253: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 1.05e-198: 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.5e-117) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= -2.15e-253) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 1.05e-198) 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.5e-117) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= -2.15e-253) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 1.05e-198) 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.5e-117], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.15e-253], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.05e-198], 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.5 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.15 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 1.05 \cdot 10^{-198}:\\
\;\;\;\;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.4999999999999998e-117Initial program 73.2%
+-commutative73.2%
unpow273.2%
unpow273.2%
hypot-udef90.1%
associate--r+88.3%
associate-/r/88.3%
associate--r+90.1%
hypot-udef73.2%
unpow273.2%
unpow273.2%
+-commutative73.2%
unpow273.2%
unpow273.2%
hypot-def90.1%
Applied egg-rr90.1%
Taylor expanded in A around 0 68.9%
unpow268.9%
unpow268.9%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around -inf 67.9%
if -3.4999999999999998e-117 < C < -2.1500000000000001e-253Initial program 80.0%
Taylor expanded in B around inf 46.5%
if -2.1500000000000001e-253 < C < 1.04999999999999996e-198Initial program 59.5%
Taylor expanded in B around -inf 47.8%
if 1.04999999999999996e-198 < C Initial program 32.4%
+-commutative32.4%
unpow232.4%
unpow232.4%
hypot-udef63.7%
associate--r+56.3%
associate-/r/56.3%
associate--r+63.7%
hypot-udef32.4%
unpow232.4%
unpow232.4%
+-commutative32.4%
unpow232.4%
unpow232.4%
hypot-def63.7%
Applied egg-rr63.7%
Taylor expanded in A around 0 23.0%
unpow223.0%
unpow223.0%
hypot-def49.8%
Simplified49.8%
Taylor expanded in B around 0 56.9%
*-commutative56.9%
Simplified56.9%
Final simplification59.9%
(FPCore (A B C)
:precision binary64
(if (<= B -3.8e-244)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B 1.4e-237)
(* 180.0 (/ (atan (/ 1.0 (+ 1.0 (/ (- A C) B)))) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-244) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= 1.4e-237) {
tmp = 180.0 * (atan((1.0 / (1.0 + ((A - C) / B)))) / ((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 <= -3.8e-244) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= 1.4e-237) {
tmp = 180.0 * (Math.atan((1.0 / (1.0 + ((A - C) / B)))) / 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 <= -3.8e-244: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= 1.4e-237: tmp = 180.0 * (math.atan((1.0 / (1.0 + ((A - C) / B)))) / 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 <= -3.8e-244) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= 1.4e-237) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(1.0 + Float64(Float64(A - C) / B)))) / 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 <= -3.8e-244) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= 1.4e-237) tmp = 180.0 * (atan((1.0 / (1.0 + ((A - C) / B)))) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.8e-244], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-237], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(1.0 + N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $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 -3.8 \cdot 10^{-244}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-237}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{1 + \frac{A - C}{B}}\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 < -3.8000000000000001e-244Initial program 53.9%
Applied egg-rr72.0%
Taylor expanded in B around -inf 64.8%
if -3.8000000000000001e-244 < B < 1.39999999999999999e-237Initial program 49.2%
+-commutative49.2%
unpow249.2%
unpow249.2%
hypot-udef84.7%
associate--r+55.5%
associate-/r/55.5%
associate--r+84.7%
hypot-udef49.2%
unpow249.2%
unpow249.2%
+-commutative49.2%
unpow249.2%
unpow249.2%
hypot-def84.7%
Applied egg-rr84.7%
Taylor expanded in B around -inf 57.4%
mul-1-neg57.4%
unsub-neg57.4%
Simplified57.4%
if 1.39999999999999999e-237 < B Initial program 57.6%
Simplified82.7%
Taylor expanded in B around inf 75.9%
+-commutative75.9%
Simplified75.9%
Final simplification68.8%
(FPCore (A B C)
:precision binary64
(if (<= B -8.5e-198)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B 2.7e-240)
(* 180.0 (/ (atan (/ B (+ (* C -2.0) (* A 2.0)))) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.5e-198) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= 2.7e-240) {
tmp = 180.0 * (atan((B / ((C * -2.0) + (A * 2.0)))) / ((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 <= -8.5e-198) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= 2.7e-240) {
tmp = 180.0 * (Math.atan((B / ((C * -2.0) + (A * 2.0)))) / 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 <= -8.5e-198: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= 2.7e-240: tmp = 180.0 * (math.atan((B / ((C * -2.0) + (A * 2.0)))) / 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 <= -8.5e-198) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= 2.7e-240) tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(Float64(C * -2.0) + Float64(A * 2.0)))) / 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 <= -8.5e-198) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= 2.7e-240) tmp = 180.0 * (atan((B / ((C * -2.0) + (A * 2.0)))) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.5e-198], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-240], N[(180.0 * N[(N[ArcTan[N[(B / N[(N[(C * -2.0), $MachinePrecision] + N[(A * 2.0), $MachinePrecision]), $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 -8.5 \cdot 10^{-198}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{C \cdot -2 + A \cdot 2}\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 < -8.4999999999999994e-198Initial program 53.5%
Applied egg-rr72.0%
Taylor expanded in B around -inf 66.7%
if -8.4999999999999994e-198 < B < 2.70000000000000018e-240Initial program 51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-udef82.1%
associate--r+56.3%
associate-/r/56.3%
associate--r+82.1%
hypot-udef51.4%
unpow251.4%
unpow251.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-def82.1%
Applied egg-rr82.1%
Taylor expanded in A around -inf 58.3%
Taylor expanded in B around 0 68.9%
if 2.70000000000000018e-240 < B Initial program 57.6%
Simplified82.7%
Taylor expanded in B around inf 75.9%
+-commutative75.9%
Simplified75.9%
Final simplification71.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.15e-244)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 1.2e-238)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e-244) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 1.2e-238) {
tmp = 180.0 * (atan((0.0 / B)) / ((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 <= -1.15e-244) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 1.2e-238) {
tmp = 180.0 * (Math.atan((0.0 / B)) / 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 <= -1.15e-244: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 1.2e-238: tmp = 180.0 * (math.atan((0.0 / B)) / 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 <= -1.15e-244) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 1.2e-238) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / 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 <= -1.15e-244) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 1.2e-238) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.15e-244], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.2e-238], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $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 -1.15 \cdot 10^{-244}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-238}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\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 < -1.15e-244Initial program 53.9%
Simplified69.2%
Taylor expanded in B around -inf 64.8%
neg-mul-164.8%
unsub-neg64.8%
Simplified64.8%
if -1.15e-244 < B < 1.1999999999999999e-238Initial program 49.2%
Taylor expanded in C around inf 55.7%
associate-*r/55.7%
distribute-rgt1-in55.7%
metadata-eval55.7%
mul0-lft55.7%
metadata-eval55.7%
Simplified55.7%
if 1.1999999999999999e-238 < B Initial program 57.6%
Simplified82.7%
Taylor expanded in B around inf 75.9%
+-commutative75.9%
Simplified75.9%
Final simplification68.6%
(FPCore (A B C)
:precision binary64
(if (<= B -5.4e-243)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B 6.4e-242)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.4e-243) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= 6.4e-242) {
tmp = 180.0 * (atan((0.0 / B)) / ((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 <= -5.4e-243) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= 6.4e-242) {
tmp = 180.0 * (Math.atan((0.0 / B)) / 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 <= -5.4e-243: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= 6.4e-242: tmp = 180.0 * (math.atan((0.0 / B)) / 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 <= -5.4e-243) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= 6.4e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / 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 <= -5.4e-243) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= 6.4e-242) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.4e-243], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.4e-242], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $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 -5.4 \cdot 10^{-243}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 6.4 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\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 < -5.40000000000000021e-243Initial program 53.9%
Applied egg-rr72.0%
Taylor expanded in B around -inf 64.8%
if -5.40000000000000021e-243 < B < 6.39999999999999997e-242Initial program 49.2%
Taylor expanded in C around inf 55.7%
associate-*r/55.7%
distribute-rgt1-in55.7%
metadata-eval55.7%
mul0-lft55.7%
metadata-eval55.7%
Simplified55.7%
if 6.39999999999999997e-242 < B Initial program 57.6%
Simplified82.7%
Taylor expanded in B around inf 75.9%
+-commutative75.9%
Simplified75.9%
Final simplification68.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.75e-147)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.6e-52)
(* 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 <= -1.75e-147) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.6e-52) {
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 <= -1.75e-147) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.6e-52) {
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 <= -1.75e-147: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.6e-52: 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 <= -1.75e-147) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.6e-52) 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 <= -1.75e-147) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.6e-52) 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, -1.75e-147], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e-52], 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 -1.75 \cdot 10^{-147}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-52}:\\
\;\;\;\;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 < -1.75000000000000002e-147Initial program 52.6%
Taylor expanded in B around -inf 40.1%
if -1.75000000000000002e-147 < B < 1.60000000000000005e-52Initial program 57.7%
Taylor expanded in C around inf 37.9%
associate-*r/37.9%
distribute-rgt1-in37.9%
metadata-eval37.9%
mul0-lft37.9%
metadata-eval37.9%
Simplified37.9%
if 1.60000000000000005e-52 < B Initial program 55.0%
Taylor expanded in B around inf 60.3%
Final simplification45.7%
(FPCore (A B C) :precision binary64 (if (<= B -2e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.999999999999994e-310Initial program 53.8%
Taylor expanded in B around -inf 32.2%
if -1.999999999999994e-310 < B Initial program 56.2%
Taylor expanded in B around inf 43.6%
Final simplification37.8%
(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 55.0%
Taylor expanded in B around inf 22.6%
Final simplification22.6%
herbie shell --seed 2024017
(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)))