
(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 23 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))))))
(t_1 (- (- C A) (hypot (- A C) B))))
(if (<= t_0 -5e-46)
(/ 180.0 (/ PI (atan (/ t_1 B))))
(if (<= t_0 0.0)
(/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI)
(/ (* 180.0 (atan (/ 1.0 (/ B t_1)))) 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 t_1 = (C - A) - hypot((A - C), B);
double tmp;
if (t_0 <= -5e-46) {
tmp = 180.0 / (((double) M_PI) / atan((t_1 / B)));
} else if (t_0 <= 0.0) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((1.0 / (B / t_1)))) / ((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 t_1 = (C - A) - Math.hypot((A - C), B);
double tmp;
if (t_0 <= -5e-46) {
tmp = 180.0 / (Math.PI / Math.atan((t_1 / B)));
} else if (t_0 <= 0.0) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((1.0 / (B / t_1)))) / 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)))) t_1 = (C - A) - math.hypot((A - C), B) tmp = 0 if t_0 <= -5e-46: tmp = 180.0 / (math.pi / math.atan((t_1 / B))) elif t_0 <= 0.0: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi else: tmp = (180.0 * math.atan((1.0 / (B / t_1)))) / 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))))) t_1 = Float64(Float64(C - A) - hypot(Float64(A - C), B)) tmp = 0.0 if (t_0 <= -5e-46) tmp = Float64(180.0 / Float64(pi / atan(Float64(t_1 / B)))); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(B / t_1)))) / 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)))); t_1 = (C - A) - hypot((A - C), B); tmp = 0.0; if (t_0 <= -5e-46) tmp = 180.0 / (pi / atan((t_1 / B))); elseif (t_0 <= 0.0) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; else tmp = (180.0 * atan((1.0 / (B / t_1)))) / 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]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-46], N[(180.0 / N[(Pi / N[ArcTan[N[(t$95$1 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(B / t$95$1), $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)\\
t_1 := \left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{-46}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{t_1}{B}\right)}}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{B}{t_1}}\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))))) < -4.99999999999999992e-46Initial program 56.4%
Applied egg-rr87.8%
if -4.99999999999999992e-46 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0Initial program 12.1%
associate-*r/12.1%
associate-*l/12.1%
*-un-lft-identity12.1%
unpow212.1%
unpow212.1%
hypot-def12.1%
Applied egg-rr12.1%
clear-num12.1%
inv-pow12.1%
associate--l-12.1%
Applied egg-rr12.1%
unpow-112.1%
associate--r+12.1%
Simplified12.1%
Taylor expanded in A around -inf 99.0%
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 63.4%
associate-*r/63.4%
associate-*l/63.4%
*-un-lft-identity63.4%
unpow263.4%
unpow263.4%
hypot-def89.5%
Applied egg-rr89.5%
clear-num89.5%
inv-pow89.5%
associate--l-86.0%
Applied egg-rr86.0%
unpow-186.0%
associate--r+89.5%
Simplified89.5%
Final simplification89.6%
(FPCore (A B C) :precision binary64 (if (<= A -9e+109) (/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9e+109) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9e+109) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9e+109: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9e+109) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9e+109) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9e+109], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -9 \cdot 10^{+109}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.9999999999999992e109Initial program 11.8%
associate-*r/11.8%
associate-*l/11.8%
*-un-lft-identity11.8%
unpow211.8%
unpow211.8%
hypot-def49.9%
Applied egg-rr49.9%
clear-num49.9%
inv-pow49.9%
associate--l-27.8%
Applied egg-rr27.8%
unpow-127.8%
associate--r+49.9%
Simplified49.9%
Taylor expanded in A around -inf 79.2%
if -8.9999999999999992e109 < A Initial program 62.8%
Simplified86.5%
Final simplification85.4%
(FPCore (A B C) :precision binary64 (if (<= A -1.35e+109) (/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI) (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+109) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+109) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.35e+109: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi else: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.35e+109) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.35e+109) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; else tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.35e+109], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.35 \cdot 10^{+109}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.35000000000000001e109Initial program 11.8%
associate-*r/11.8%
associate-*l/11.8%
*-un-lft-identity11.8%
unpow211.8%
unpow211.8%
hypot-def49.9%
Applied egg-rr49.9%
clear-num49.9%
inv-pow49.9%
associate--l-27.8%
Applied egg-rr27.8%
unpow-127.8%
associate--r+49.9%
Simplified49.9%
Taylor expanded in A around -inf 79.2%
if -1.35000000000000001e109 < A Initial program 62.8%
associate-*r/62.8%
associate-*l/62.8%
*-un-lft-identity62.8%
unpow262.8%
unpow262.8%
hypot-def86.5%
Applied egg-rr86.5%
Final simplification85.4%
(FPCore (A B C)
:precision binary64
(if (<= A -3e+109)
(/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI)
(if (<= A 1.8e+80)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3e+109) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else if (A <= 1.8e+80) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3e+109) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else if (A <= 1.8e+80) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3e+109: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi elif A <= 1.8e+80: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3e+109) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); elseif (A <= 1.8e+80) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); 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 <= -3e+109) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; elseif (A <= 1.8e+80) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3e+109], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.8e+80], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -3 \cdot 10^{+109}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{+80}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\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 < -3.00000000000000015e109Initial program 11.8%
associate-*r/11.8%
associate-*l/11.8%
*-un-lft-identity11.8%
unpow211.8%
unpow211.8%
hypot-def49.9%
Applied egg-rr49.9%
clear-num49.9%
inv-pow49.9%
associate--l-27.8%
Applied egg-rr27.8%
unpow-127.8%
associate--r+49.9%
Simplified49.9%
Taylor expanded in A around -inf 79.2%
if -3.00000000000000015e109 < A < 1.79999999999999997e80Initial program 56.4%
associate-*r/56.3%
associate-*l/56.3%
*-un-lft-identity56.3%
unpow256.3%
unpow256.3%
hypot-def83.5%
Applied egg-rr83.5%
Taylor expanded in A around 0 52.2%
unpow252.2%
unpow252.2%
hypot-def79.6%
Simplified79.6%
if 1.79999999999999997e80 < A Initial program 83.5%
Taylor expanded in C around 0 83.6%
associate-*r/83.6%
mul-1-neg83.6%
+-commutative83.6%
unpow283.6%
unpow283.6%
hypot-def95.9%
Simplified95.9%
Final simplification82.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.05e+110)
(/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI)
(if (<= A 1.2e+89)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e+110) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else if (A <= 1.2e+89) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e+110) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else if (A <= 1.2e+89) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.05e+110: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi elif A <= 1.2e+89: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.05e+110) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); elseif (A <= 1.2e+89) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.05e+110) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; elseif (A <= 1.2e+89) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.05e+110], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.2e+89], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.05 \cdot 10^{+110}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{+89}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.05000000000000007e110Initial program 11.8%
associate-*r/11.8%
associate-*l/11.8%
*-un-lft-identity11.8%
unpow211.8%
unpow211.8%
hypot-def49.9%
Applied egg-rr49.9%
clear-num49.9%
inv-pow49.9%
associate--l-27.8%
Applied egg-rr27.8%
unpow-127.8%
associate--r+49.9%
Simplified49.9%
Taylor expanded in A around -inf 79.2%
if -1.05000000000000007e110 < A < 1.20000000000000002e89Initial program 56.4%
Taylor expanded in A around 0 52.2%
unpow252.2%
unpow252.2%
hypot-def79.6%
Simplified79.6%
if 1.20000000000000002e89 < A Initial program 83.5%
Taylor expanded in C around 0 83.6%
associate-*r/83.6%
mul-1-neg83.6%
+-commutative83.6%
unpow283.6%
unpow283.6%
hypot-def95.9%
Simplified95.9%
Taylor expanded in B around -inf 89.7%
mul-1-neg89.7%
unsub-neg89.7%
Simplified89.7%
Final simplification81.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.1e+109)
(/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI)
(if (<= A 1.35e+81)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.1e+109) {
tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
} else if (A <= 1.35e+81) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.1e+109) {
tmp = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
} else if (A <= 1.35e+81) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.1e+109: tmp = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi elif A <= 1.35e+81: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.1e+109) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi); elseif (A <= 1.35e+81) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.1e+109) tmp = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; elseif (A <= 1.35e+81) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.1e+109], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.35e+81], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.1 \cdot 10^{+109}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.35 \cdot 10^{+81}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.1e109Initial program 11.8%
associate-*r/11.8%
associate-*l/11.8%
*-un-lft-identity11.8%
unpow211.8%
unpow211.8%
hypot-def49.9%
Applied egg-rr49.9%
clear-num49.9%
inv-pow49.9%
associate--l-27.8%
Applied egg-rr27.8%
unpow-127.8%
associate--r+49.9%
Simplified49.9%
Taylor expanded in A around -inf 79.2%
if -1.1e109 < A < 1.35e81Initial program 56.4%
associate-*r/56.3%
associate-*l/56.3%
*-un-lft-identity56.3%
unpow256.3%
unpow256.3%
hypot-def83.5%
Applied egg-rr83.5%
Taylor expanded in A around 0 52.2%
unpow252.2%
unpow252.2%
hypot-def79.6%
Simplified79.6%
if 1.35e81 < A Initial program 83.5%
Taylor expanded in C around 0 83.6%
associate-*r/83.6%
mul-1-neg83.6%
+-commutative83.6%
unpow283.6%
unpow283.6%
hypot-def95.9%
Simplified95.9%
Taylor expanded in B around -inf 89.7%
mul-1-neg89.7%
unsub-neg89.7%
Simplified89.7%
Final simplification81.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))
(t_1
(/ (* 180.0 (atan (/ 1.0 (+ (* -2.0 (/ C B)) (* 2.0 (/ A B)))))) PI)))
(if (<= B -1.9e-127)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B -3e-173)
t_1
(if (<= B 1.34e-291)
t_0
(if (<= B 7.8e-275)
(/ (* 180.0 (atan (/ 1.0 (+ 1.0 (/ (- A C) B))))) PI)
(if (<= B 3.3e-169)
t_0
(if (<= B 1.55e-138)
t_1
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
double t_1 = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / ((double) M_PI);
double tmp;
if (B <= -1.9e-127) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= -3e-173) {
tmp = t_1;
} else if (B <= 1.34e-291) {
tmp = t_0;
} else if (B <= 7.8e-275) {
tmp = (180.0 * atan((1.0 / (1.0 + ((A - C) / B))))) / ((double) M_PI);
} else if (B <= 3.3e-169) {
tmp = t_0;
} else if (B <= 1.55e-138) {
tmp = t_1;
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
double t_1 = (180.0 * Math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / Math.PI;
double tmp;
if (B <= -1.9e-127) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= -3e-173) {
tmp = t_1;
} else if (B <= 1.34e-291) {
tmp = t_0;
} else if (B <= 7.8e-275) {
tmp = (180.0 * Math.atan((1.0 / (1.0 + ((A - C) / B))))) / Math.PI;
} else if (B <= 3.3e-169) {
tmp = t_0;
} else if (B <= 1.55e-138) {
tmp = t_1;
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) t_1 = (180.0 * math.atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / math.pi tmp = 0 if B <= -1.9e-127: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= -3e-173: tmp = t_1 elif B <= 1.34e-291: tmp = t_0 elif B <= 7.8e-275: tmp = (180.0 * math.atan((1.0 / (1.0 + ((A - C) / B))))) / math.pi elif B <= 3.3e-169: tmp = t_0 elif B <= 1.55e-138: tmp = t_1 else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)) t_1 = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(-2.0 * Float64(C / B)) + Float64(2.0 * Float64(A / B)))))) / pi) tmp = 0.0 if (B <= -1.9e-127) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= -3e-173) tmp = t_1; elseif (B <= 1.34e-291) tmp = t_0; elseif (B <= 7.8e-275) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(1.0 + Float64(Float64(A - C) / B))))) / pi); elseif (B <= 3.3e-169) tmp = t_0; elseif (B <= 1.55e-138) tmp = t_1; else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - (B + A)) / B)) / pi); t_1 = (180.0 * atan((1.0 / ((-2.0 * (C / B)) + (2.0 * (A / B)))))) / pi; tmp = 0.0; if (B <= -1.9e-127) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= -3e-173) tmp = t_1; elseif (B <= 1.34e-291) tmp = t_0; elseif (B <= 7.8e-275) tmp = (180.0 * atan((1.0 / (1.0 + ((A - C) / B))))) / pi; elseif (B <= 3.3e-169) tmp = t_0; elseif (B <= 1.55e-138) tmp = t_1; else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -1.9e-127], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3e-173], t$95$1, If[LessEqual[B, 1.34e-291], t$95$0, If[LessEqual[B, 7.8e-275], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(1.0 + N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 3.3e-169], t$95$0, If[LessEqual[B, 1.55e-138], t$95$1, N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{1}{-2 \cdot \frac{C}{B} + 2 \cdot \frac{A}{B}}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.9 \cdot 10^{-127}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -3 \cdot 10^{-173}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.34 \cdot 10^{-291}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-275}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{1 + \frac{A - C}{B}}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.3 \cdot 10^{-169}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.55 \cdot 10^{-138}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -1.90000000000000001e-127Initial program 60.1%
Simplified82.0%
Taylor expanded in B around -inf 76.5%
neg-mul-176.5%
unsub-neg76.5%
Simplified76.5%
if -1.90000000000000001e-127 < B < -3.0000000000000001e-173 or 3.30000000000000026e-169 < B < 1.5499999999999999e-138Initial program 17.1%
associate-*r/17.1%
associate-*l/17.1%
*-un-lft-identity17.1%
unpow217.1%
unpow217.1%
hypot-def54.8%
Applied egg-rr54.8%
clear-num54.8%
inv-pow54.8%
associate--l-36.9%
Applied egg-rr36.9%
unpow-136.9%
associate--r+54.8%
Simplified54.8%
Taylor expanded in A around -inf 83.9%
if -3.0000000000000001e-173 < B < 1.34e-291 or 7.79999999999999945e-275 < B < 3.30000000000000026e-169Initial program 69.7%
Simplified87.6%
Taylor expanded in B around inf 75.2%
+-commutative75.2%
Simplified75.2%
if 1.34e-291 < B < 7.79999999999999945e-275Initial program 44.5%
associate-*r/44.5%
associate-*l/44.5%
*-un-lft-identity44.5%
unpow244.5%
unpow244.5%
hypot-def86.3%
Applied egg-rr86.3%
clear-num86.3%
inv-pow86.3%
associate--l-86.6%
Applied egg-rr86.6%
unpow-186.6%
associate--r+86.3%
Simplified86.3%
Taylor expanded in B around -inf 74.6%
associate-*r/74.6%
neg-mul-174.6%
sub-neg74.6%
distribute-neg-in74.6%
mul-1-neg74.6%
remove-double-neg74.6%
+-commutative74.6%
mul-1-neg74.6%
sub-neg74.6%
Simplified74.6%
if 1.5499999999999999e-138 < B Initial program 52.2%
Applied egg-rr78.9%
Taylor expanded in B around inf 76.1%
mul-1-neg76.1%
unsub-neg76.1%
Simplified76.1%
Final simplification76.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (* (/ B C) -0.5))) PI))
(t_1 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -1.02e-128)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B -2.25e-191)
t_0
(if (<= B 7.4e-298)
t_1
(if (<= B 9.5e-275)
t_0
(if (<= B 4.6e-228)
t_1
(if (or (<= B 1.8e-74) (not (<= B 1.4e-18)))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(/ 180.0 (/ PI (atan (/ (* B 0.5) A))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((B / C) * -0.5))) / ((double) M_PI);
double t_1 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double tmp;
if (B <= -1.02e-128) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= -2.25e-191) {
tmp = t_0;
} else if (B <= 7.4e-298) {
tmp = t_1;
} else if (B <= 9.5e-275) {
tmp = t_0;
} else if (B <= 4.6e-228) {
tmp = t_1;
} else if ((B <= 1.8e-74) || !(B <= 1.4e-18)) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((B * 0.5) / A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((B / C) * -0.5))) / Math.PI;
double t_1 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -1.02e-128) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= -2.25e-191) {
tmp = t_0;
} else if (B <= 7.4e-298) {
tmp = t_1;
} else if (B <= 9.5e-275) {
tmp = t_0;
} else if (B <= 4.6e-228) {
tmp = t_1;
} else if ((B <= 1.8e-74) || !(B <= 1.4e-18)) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan(((B * 0.5) / A)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((B / C) * -0.5))) / math.pi t_1 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -1.02e-128: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= -2.25e-191: tmp = t_0 elif B <= 7.4e-298: tmp = t_1 elif B <= 9.5e-275: tmp = t_0 elif B <= 4.6e-228: tmp = t_1 elif (B <= 1.8e-74) or not (B <= 1.4e-18): tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan(((B * 0.5) / A))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(B / C) * -0.5))) / pi) t_1 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -1.02e-128) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= -2.25e-191) tmp = t_0; elseif (B <= 7.4e-298) tmp = t_1; elseif (B <= 9.5e-275) tmp = t_0; elseif (B <= 4.6e-228) tmp = t_1; elseif ((B <= 1.8e-74) || !(B <= 1.4e-18)) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B * 0.5) / A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((B / C) * -0.5))) / pi; t_1 = 180.0 * (atan((2.0 * (C / B))) / pi); tmp = 0.0; if (B <= -1.02e-128) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= -2.25e-191) tmp = t_0; elseif (B <= 7.4e-298) tmp = t_1; elseif (B <= 9.5e-275) tmp = t_0; elseif (B <= 4.6e-228) tmp = t_1; elseif ((B <= 1.8e-74) || ~((B <= 1.4e-18))) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = 180.0 / (pi / atan(((B * 0.5) / A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.02e-128], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.25e-191], t$95$0, If[LessEqual[B, 7.4e-298], t$95$1, If[LessEqual[B, 9.5e-275], t$95$0, If[LessEqual[B, 4.6e-228], t$95$1, If[Or[LessEqual[B, 1.8e-74], N[Not[LessEqual[B, 1.4e-18]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.02 \cdot 10^{-128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.25 \cdot 10^{-191}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 7.4 \cdot 10^{-298}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-275}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-74} \lor \neg \left(B \leq 1.4 \cdot 10^{-18}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}}\\
\end{array}
\end{array}
if B < -1.02e-128Initial program 60.1%
Taylor expanded in C around 0 50.9%
associate-*r/50.9%
mul-1-neg50.9%
+-commutative50.9%
unpow250.9%
unpow250.9%
hypot-def71.9%
Simplified71.9%
Taylor expanded in B around -inf 66.7%
mul-1-neg66.7%
unsub-neg66.7%
Simplified66.7%
if -1.02e-128 < B < -2.25000000000000004e-191 or 7.3999999999999996e-298 < B < 9.49999999999999961e-275Initial program 33.0%
associate-*r/33.0%
associate-*l/33.0%
*-un-lft-identity33.0%
unpow233.0%
unpow233.0%
hypot-def64.5%
Applied egg-rr64.5%
Taylor expanded in C around inf 42.7%
+-commutative42.7%
associate-*r/42.7%
associate--l+42.7%
unpow242.7%
mul-1-neg42.7%
mul-1-neg42.7%
sqr-neg42.7%
unpow242.7%
distribute-rgt1-in42.7%
metadata-eval42.7%
mul0-lft42.7%
metadata-eval42.7%
Simplified42.7%
Taylor expanded in A around 0 58.7%
*-commutative58.7%
Simplified58.7%
if -2.25000000000000004e-191 < B < 7.3999999999999996e-298 or 9.49999999999999961e-275 < B < 4.5999999999999998e-228Initial program 76.7%
Taylor expanded in C around -inf 70.6%
if 4.5999999999999998e-228 < B < 1.8000000000000001e-74 or 1.40000000000000006e-18 < B Initial program 49.6%
Taylor expanded in C around 0 44.3%
associate-*r/44.3%
mul-1-neg44.3%
+-commutative44.3%
unpow244.3%
unpow244.3%
hypot-def70.9%
Simplified70.9%
Taylor expanded in A around 0 65.8%
Taylor expanded in B around -inf 65.8%
div-sub65.8%
neg-mul-165.8%
neg-sub065.8%
div-sub65.8%
div065.8%
*-inverses65.8%
metadata-eval65.8%
Simplified65.8%
if 1.8000000000000001e-74 < B < 1.40000000000000006e-18Initial program 44.0%
Applied egg-rr45.4%
Taylor expanded in A around -inf 68.1%
associate-*r/68.1%
Simplified68.1%
Final simplification66.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (* (/ B C) -0.5))) PI))
(t_1 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -1.55e-128)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(if (<= B -5e-175)
t_0
(if (<= B 1.45e-299)
t_1
(if (<= B 1.12e-274)
t_0
(if (<= B 4e-229)
t_1
(if (or (<= B 3.5e-74) (not (<= B 1.4e-18)))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(/ 180.0 (/ PI (atan (/ (* B 0.5) A))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((B / C) * -0.5))) / ((double) M_PI);
double t_1 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double tmp;
if (B <= -1.55e-128) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else if (B <= -5e-175) {
tmp = t_0;
} else if (B <= 1.45e-299) {
tmp = t_1;
} else if (B <= 1.12e-274) {
tmp = t_0;
} else if (B <= 4e-229) {
tmp = t_1;
} else if ((B <= 3.5e-74) || !(B <= 1.4e-18)) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((B * 0.5) / A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((B / C) * -0.5))) / Math.PI;
double t_1 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -1.55e-128) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else if (B <= -5e-175) {
tmp = t_0;
} else if (B <= 1.45e-299) {
tmp = t_1;
} else if (B <= 1.12e-274) {
tmp = t_0;
} else if (B <= 4e-229) {
tmp = t_1;
} else if ((B <= 3.5e-74) || !(B <= 1.4e-18)) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan(((B * 0.5) / A)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((B / C) * -0.5))) / math.pi t_1 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -1.55e-128: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) elif B <= -5e-175: tmp = t_0 elif B <= 1.45e-299: tmp = t_1 elif B <= 1.12e-274: tmp = t_0 elif B <= 4e-229: tmp = t_1 elif (B <= 3.5e-74) or not (B <= 1.4e-18): tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan(((B * 0.5) / A))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(B / C) * -0.5))) / pi) t_1 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -1.55e-128) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); elseif (B <= -5e-175) tmp = t_0; elseif (B <= 1.45e-299) tmp = t_1; elseif (B <= 1.12e-274) tmp = t_0; elseif (B <= 4e-229) tmp = t_1; elseif ((B <= 3.5e-74) || !(B <= 1.4e-18)) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B * 0.5) / A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((B / C) * -0.5))) / pi; t_1 = 180.0 * (atan((2.0 * (C / B))) / pi); tmp = 0.0; if (B <= -1.55e-128) tmp = 180.0 * (atan(((B - A) / B)) / pi); elseif (B <= -5e-175) tmp = t_0; elseif (B <= 1.45e-299) tmp = t_1; elseif (B <= 1.12e-274) tmp = t_0; elseif (B <= 4e-229) tmp = t_1; elseif ((B <= 3.5e-74) || ~((B <= 1.4e-18))) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = 180.0 / (pi / atan(((B * 0.5) / A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.55e-128], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5e-175], t$95$0, If[LessEqual[B, 1.45e-299], t$95$1, If[LessEqual[B, 1.12e-274], t$95$0, If[LessEqual[B, 4e-229], t$95$1, If[Or[LessEqual[B, 3.5e-74], N[Not[LessEqual[B, 1.4e-18]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.55 \cdot 10^{-128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -5 \cdot 10^{-175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-299}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.12 \cdot 10^{-274}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-229}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-74} \lor \neg \left(B \leq 1.4 \cdot 10^{-18}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}}\\
\end{array}
\end{array}
if B < -1.55000000000000001e-128Initial program 60.1%
Taylor expanded in C around 0 50.9%
associate-*r/50.9%
mul-1-neg50.9%
+-commutative50.9%
unpow250.9%
unpow250.9%
hypot-def71.9%
Simplified71.9%
Taylor expanded in B around -inf 66.7%
mul-1-neg66.7%
unsub-neg66.7%
Simplified66.7%
if -1.55000000000000001e-128 < B < -5e-175 or 1.45000000000000013e-299 < B < 1.11999999999999998e-274Initial program 33.0%
associate-*r/33.0%
associate-*l/33.0%
*-un-lft-identity33.0%
unpow233.0%
unpow233.0%
hypot-def64.5%
Applied egg-rr64.5%
Taylor expanded in C around inf 42.7%
+-commutative42.7%
associate-*r/42.7%
associate--l+42.7%
unpow242.7%
mul-1-neg42.7%
mul-1-neg42.7%
sqr-neg42.7%
unpow242.7%
distribute-rgt1-in42.7%
metadata-eval42.7%
mul0-lft42.7%
metadata-eval42.7%
Simplified42.7%
Taylor expanded in A around 0 58.7%
*-commutative58.7%
Simplified58.7%
if -5e-175 < B < 1.45000000000000013e-299 or 1.11999999999999998e-274 < B < 4.00000000000000028e-229Initial program 76.7%
Taylor expanded in C around -inf 70.6%
if 4.00000000000000028e-229 < B < 3.50000000000000015e-74 or 1.40000000000000006e-18 < B Initial program 49.6%
Taylor expanded in C around 0 44.3%
associate-*r/44.3%
mul-1-neg44.3%
+-commutative44.3%
unpow244.3%
unpow244.3%
hypot-def70.9%
Simplified70.9%
Taylor expanded in A around 0 65.8%
Taylor expanded in B around -inf 65.8%
div-sub65.8%
neg-mul-165.8%
neg-sub065.8%
div-sub65.8%
div065.8%
*-inverses65.8%
metadata-eval65.8%
Simplified65.8%
if 3.50000000000000015e-74 < B < 1.40000000000000006e-18Initial program 44.0%
Applied egg-rr45.4%
Taylor expanded in A around -inf 68.1%
associate-*r/68.1%
Simplified68.1%
Final simplification66.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -2.45e-166)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 6e-299)
t_0
(if (<= B 3.6e-274)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 2e-229)
t_0
(if (or (<= B 1.15e-74) (not (<= B 1.4e-18)))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(* 180.0 (/ (atan (* 0.5 (/ B A))) 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 <= -2.45e-166) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 6e-299) {
tmp = t_0;
} else if (B <= 3.6e-274) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 2e-229) {
tmp = t_0;
} else if ((B <= 1.15e-74) || !(B <= 1.4e-18)) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((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 <= -2.45e-166) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 6e-299) {
tmp = t_0;
} else if (B <= 3.6e-274) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 2e-229) {
tmp = t_0;
} else if ((B <= 1.15e-74) || !(B <= 1.4e-18)) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / 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 <= -2.45e-166: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 6e-299: tmp = t_0 elif B <= 3.6e-274: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 2e-229: tmp = t_0 elif (B <= 1.15e-74) or not (B <= 1.4e-18): tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan((0.5 * (B / A))) / 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 <= -2.45e-166) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 6e-299) tmp = t_0; elseif (B <= 3.6e-274) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 2e-229) tmp = t_0; elseif ((B <= 1.15e-74) || !(B <= 1.4e-18)) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / 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 <= -2.45e-166) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 6e-299) tmp = t_0; elseif (B <= 3.6e-274) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 2e-229) tmp = t_0; elseif ((B <= 1.15e-74) || ~((B <= 1.4e-18))) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = 180.0 * (atan((0.5 * (B / A))) / 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, -2.45e-166], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e-299], t$95$0, If[LessEqual[B, 3.6e-274], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2e-229], t$95$0, If[Or[LessEqual[B, 1.15e-74], N[Not[LessEqual[B, 1.4e-18]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $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 -2.45 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-299}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-274}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-229}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-74} \lor \neg \left(B \leq 1.4 \cdot 10^{-18}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.4499999999999999e-166Initial program 54.6%
Taylor expanded in C around 0 46.6%
associate-*r/46.6%
mul-1-neg46.6%
+-commutative46.6%
unpow246.6%
unpow246.6%
hypot-def67.1%
Simplified67.1%
Taylor expanded in B around -inf 60.5%
mul-1-neg60.5%
unsub-neg60.5%
Simplified60.5%
if -2.4499999999999999e-166 < B < 5.99999999999999969e-299 or 3.59999999999999983e-274 < B < 2.00000000000000014e-229Initial program 73.4%
Taylor expanded in C around -inf 67.6%
if 5.99999999999999969e-299 < B < 3.59999999999999983e-274Initial program 56.8%
associate-*r/56.8%
associate-*l/56.8%
*-un-lft-identity56.8%
unpow256.8%
unpow256.8%
hypot-def89.3%
Applied egg-rr89.3%
clear-num89.3%
inv-pow89.3%
associate--l-89.5%
Applied egg-rr89.5%
unpow-189.5%
associate--r+89.3%
Simplified89.3%
Taylor expanded in C around inf 57.0%
distribute-rgt1-in57.0%
metadata-eval57.0%
mul0-lft57.0%
div057.0%
metadata-eval57.0%
Simplified57.0%
if 2.00000000000000014e-229 < B < 1.1499999999999999e-74 or 1.40000000000000006e-18 < B Initial program 49.6%
Taylor expanded in C around 0 44.3%
associate-*r/44.3%
mul-1-neg44.3%
+-commutative44.3%
unpow244.3%
unpow244.3%
hypot-def70.9%
Simplified70.9%
Taylor expanded in A around 0 65.8%
Taylor expanded in B around -inf 65.8%
div-sub65.8%
neg-mul-165.8%
neg-sub065.8%
div-sub65.8%
div065.8%
*-inverses65.8%
metadata-eval65.8%
Simplified65.8%
if 1.1499999999999999e-74 < B < 1.40000000000000006e-18Initial program 44.0%
Taylor expanded in A around -inf 68.0%
Final simplification63.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -2.35e-166)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 5.6e-298)
t_0
(if (<= B 1.02e-274)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 5.2e-229)
t_0
(if (or (<= B 3.7e-76) (not (<= B 1.4e-18)))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI))
(/ 180.0 (/ PI (atan (/ (* B 0.5) A)))))))))))
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 <= -2.35e-166) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 5.6e-298) {
tmp = t_0;
} else if (B <= 1.02e-274) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 5.2e-229) {
tmp = t_0;
} else if ((B <= 3.7e-76) || !(B <= 1.4e-18)) {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((B * 0.5) / A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -2.35e-166) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 5.6e-298) {
tmp = t_0;
} else if (B <= 1.02e-274) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 5.2e-229) {
tmp = t_0;
} else if ((B <= 3.7e-76) || !(B <= 1.4e-18)) {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan(((B * 0.5) / A)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -2.35e-166: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 5.6e-298: tmp = t_0 elif B <= 1.02e-274: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 5.2e-229: tmp = t_0 elif (B <= 3.7e-76) or not (B <= 1.4e-18): tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan(((B * 0.5) / A))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -2.35e-166) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 5.6e-298) tmp = t_0; elseif (B <= 1.02e-274) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 5.2e-229) tmp = t_0; elseif ((B <= 3.7e-76) || !(B <= 1.4e-18)) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B * 0.5) / A)))); 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 <= -2.35e-166) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 5.6e-298) tmp = t_0; elseif (B <= 1.02e-274) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 5.2e-229) tmp = t_0; elseif ((B <= 3.7e-76) || ~((B <= 1.4e-18))) tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); else tmp = 180.0 / (pi / atan(((B * 0.5) / A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.35e-166], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.6e-298], t$95$0, If[LessEqual[B, 1.02e-274], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5.2e-229], t$95$0, If[Or[LessEqual[B, 3.7e-76], N[Not[LessEqual[B, 1.4e-18]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $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 -2.35 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.6 \cdot 10^{-298}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.02 \cdot 10^{-274}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-229}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-76} \lor \neg \left(B \leq 1.4 \cdot 10^{-18}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}}\\
\end{array}
\end{array}
if B < -2.35000000000000007e-166Initial program 54.6%
Taylor expanded in C around 0 46.6%
associate-*r/46.6%
mul-1-neg46.6%
+-commutative46.6%
unpow246.6%
unpow246.6%
hypot-def67.1%
Simplified67.1%
Taylor expanded in B around -inf 60.5%
mul-1-neg60.5%
unsub-neg60.5%
Simplified60.5%
if -2.35000000000000007e-166 < B < 5.59999999999999985e-298 or 1.01999999999999997e-274 < B < 5.2000000000000003e-229Initial program 73.4%
Taylor expanded in C around -inf 67.6%
if 5.59999999999999985e-298 < B < 1.01999999999999997e-274Initial program 56.8%
associate-*r/56.8%
associate-*l/56.8%
*-un-lft-identity56.8%
unpow256.8%
unpow256.8%
hypot-def89.3%
Applied egg-rr89.3%
clear-num89.3%
inv-pow89.3%
associate--l-89.5%
Applied egg-rr89.5%
unpow-189.5%
associate--r+89.3%
Simplified89.3%
Taylor expanded in C around inf 57.0%
distribute-rgt1-in57.0%
metadata-eval57.0%
mul0-lft57.0%
div057.0%
metadata-eval57.0%
Simplified57.0%
if 5.2000000000000003e-229 < B < 3.70000000000000011e-76 or 1.40000000000000006e-18 < B Initial program 49.6%
Taylor expanded in C around 0 44.3%
associate-*r/44.3%
mul-1-neg44.3%
+-commutative44.3%
unpow244.3%
unpow244.3%
hypot-def70.9%
Simplified70.9%
Taylor expanded in A around 0 65.8%
Taylor expanded in B around -inf 65.8%
div-sub65.8%
neg-mul-165.8%
neg-sub065.8%
div-sub65.8%
div065.8%
*-inverses65.8%
metadata-eval65.8%
Simplified65.8%
if 3.70000000000000011e-76 < B < 1.40000000000000006e-18Initial program 44.0%
Applied egg-rr45.4%
Taylor expanded in A around -inf 68.1%
associate-*r/68.1%
Simplified68.1%
Final simplification63.9%
(FPCore (A B C)
:precision binary64
(if (<= B -2.05e-129)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B -1.5e-174)
(/ (* 180.0 (atan (* (/ B C) -0.5))) PI)
(if (<= B 5e-292)
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))
(if (<= B 7e-274)
(/ (* 180.0 (atan (/ 1.0 (+ 1.0 (/ (- A C) B))))) PI)
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B)))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.05e-129) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= -1.5e-174) {
tmp = (180.0 * atan(((B / C) * -0.5))) / ((double) M_PI);
} else if (B <= 5e-292) {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
} else if (B <= 7e-274) {
tmp = (180.0 * atan((1.0 / (1.0 + ((A - C) / B))))) / ((double) M_PI);
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.05e-129) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= -1.5e-174) {
tmp = (180.0 * Math.atan(((B / C) * -0.5))) / Math.PI;
} else if (B <= 5e-292) {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
} else if (B <= 7e-274) {
tmp = (180.0 * Math.atan((1.0 / (1.0 + ((A - C) / B))))) / Math.PI;
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.05e-129: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= -1.5e-174: tmp = (180.0 * math.atan(((B / C) * -0.5))) / math.pi elif B <= 5e-292: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) elif B <= 7e-274: tmp = (180.0 * math.atan((1.0 / (1.0 + ((A - C) / B))))) / math.pi else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.05e-129) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= -1.5e-174) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / C) * -0.5))) / pi); elseif (B <= 5e-292) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); elseif (B <= 7e-274) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(1.0 + Float64(Float64(A - C) / B))))) / pi); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.05e-129) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= -1.5e-174) tmp = (180.0 * atan(((B / C) * -0.5))) / pi; elseif (B <= 5e-292) tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); elseif (B <= 7e-274) tmp = (180.0 * atan((1.0 / (1.0 + ((A - C) / B))))) / pi; else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.05e-129], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.5e-174], N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5e-292], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-274], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(1.0 + N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.05 \cdot 10^{-129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.5 \cdot 10^{-174}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-292}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-274}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{1 + \frac{A - C}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -2.05e-129Initial program 60.1%
Simplified82.0%
Taylor expanded in B around -inf 76.5%
neg-mul-176.5%
unsub-neg76.5%
Simplified76.5%
if -2.05e-129 < B < -1.50000000000000011e-174Initial program 17.6%
associate-*r/17.6%
associate-*l/17.6%
*-un-lft-identity17.6%
unpow217.6%
unpow217.6%
hypot-def48.6%
Applied egg-rr48.6%
Taylor expanded in C around inf 33.9%
+-commutative33.9%
associate-*r/33.9%
associate--l+33.9%
unpow233.9%
mul-1-neg33.9%
mul-1-neg33.9%
sqr-neg33.9%
unpow233.9%
distribute-rgt1-in33.9%
metadata-eval33.9%
mul0-lft33.9%
metadata-eval33.9%
Simplified33.9%
Taylor expanded in A around 0 59.5%
*-commutative59.5%
Simplified59.5%
if -1.50000000000000011e-174 < B < 4.99999999999999981e-292Initial program 84.5%
Simplified96.1%
Taylor expanded in B around inf 84.5%
+-commutative84.5%
Simplified84.5%
if 4.99999999999999981e-292 < B < 6.99999999999999963e-274Initial program 44.5%
associate-*r/44.5%
associate-*l/44.5%
*-un-lft-identity44.5%
unpow244.5%
unpow244.5%
hypot-def86.3%
Applied egg-rr86.3%
clear-num86.3%
inv-pow86.3%
associate--l-86.6%
Applied egg-rr86.6%
unpow-186.6%
associate--r+86.3%
Simplified86.3%
Taylor expanded in B around -inf 74.6%
associate-*r/74.6%
neg-mul-174.6%
sub-neg74.6%
distribute-neg-in74.6%
mul-1-neg74.6%
remove-double-neg74.6%
+-commutative74.6%
mul-1-neg74.6%
sub-neg74.6%
Simplified74.6%
if 6.99999999999999963e-274 < B Initial program 50.0%
Applied egg-rr78.8%
Taylor expanded in B around inf 70.2%
mul-1-neg70.2%
unsub-neg70.2%
Simplified70.2%
Final simplification73.2%
(FPCore (A B C)
:precision binary64
(if (<= A -8.5e-154)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (or (<= A -1.26e-225) (and (not (<= A 4e-133)) (<= A 4e-48)))
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e-154) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if ((A <= -1.26e-225) || (!(A <= 4e-133) && (A <= 4e-48))) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e-154) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if ((A <= -1.26e-225) || (!(A <= 4e-133) && (A <= 4e-48))) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.5e-154: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif (A <= -1.26e-225) or (not (A <= 4e-133) and (A <= 4e-48)): tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.5e-154) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif ((A <= -1.26e-225) || (!(A <= 4e-133) && (A <= 4e-48))) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.5e-154) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif ((A <= -1.26e-225) || (~((A <= 4e-133)) && (A <= 4e-48))) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.5e-154], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -1.26e-225], And[N[Not[LessEqual[A, 4e-133]], $MachinePrecision], LessEqual[A, 4e-48]]], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.5 \cdot 10^{-154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.26 \cdot 10^{-225} \lor \neg \left(A \leq 4 \cdot 10^{-133}\right) \land A \leq 4 \cdot 10^{-48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.4999999999999996e-154Initial program 35.9%
Taylor expanded in A around -inf 53.2%
if -8.4999999999999996e-154 < A < -1.2599999999999999e-225 or 4.0000000000000003e-133 < A < 3.9999999999999999e-48Initial program 76.8%
Taylor expanded in C around -inf 56.8%
if -1.2599999999999999e-225 < A < 4.0000000000000003e-133 or 3.9999999999999999e-48 < A Initial program 62.0%
Taylor expanded in C around 0 58.2%
associate-*r/58.2%
mul-1-neg58.2%
+-commutative58.2%
unpow258.2%
unpow258.2%
hypot-def82.2%
Simplified82.2%
Taylor expanded in A around 0 67.8%
Taylor expanded in B around -inf 67.8%
div-sub67.8%
neg-mul-167.8%
neg-sub067.8%
div-sub67.8%
div067.8%
*-inverses67.8%
metadata-eval67.8%
Simplified67.8%
Final simplification61.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -8.6e-54)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 8.5e-292)
t_0
(if (<= B 6.1e-264)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 11.5) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double tmp;
if (B <= -8.6e-54) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 8.5e-292) {
tmp = t_0;
} else if (B <= 6.1e-264) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 11.5) {
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((-2.0 * (A / B))) / Math.PI);
double tmp;
if (B <= -8.6e-54) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 8.5e-292) {
tmp = t_0;
} else if (B <= 6.1e-264) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 11.5) {
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((-2.0 * (A / B))) / math.pi) tmp = 0 if B <= -8.6e-54: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 8.5e-292: tmp = t_0 elif B <= 6.1e-264: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 11.5: 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(-2.0 * Float64(A / B))) / pi)) tmp = 0.0 if (B <= -8.6e-54) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 8.5e-292) tmp = t_0; elseif (B <= 6.1e-264) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 11.5) 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((-2.0 * (A / B))) / pi); tmp = 0.0; if (B <= -8.6e-54) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 8.5e-292) tmp = t_0; elseif (B <= 6.1e-264) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 11.5) 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[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8.6e-54], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-292], t$95$0, If[LessEqual[B, 6.1e-264], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 11.5], 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(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -8.6 \cdot 10^{-54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-292}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 6.1 \cdot 10^{-264}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 11.5:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.5999999999999999e-54Initial program 53.6%
Taylor expanded in B around -inf 57.7%
if -8.5999999999999999e-54 < B < 8.50000000000000066e-292 or 6.10000000000000025e-264 < B < 11.5Initial program 63.1%
Taylor expanded in A around inf 40.6%
if 8.50000000000000066e-292 < B < 6.10000000000000025e-264Initial program 46.0%
associate-*r/46.0%
associate-*l/46.0%
*-un-lft-identity46.0%
unpow246.0%
unpow246.0%
hypot-def89.3%
Applied egg-rr89.3%
clear-num89.3%
inv-pow89.3%
associate--l-89.5%
Applied egg-rr89.5%
unpow-189.5%
associate--r+89.3%
Simplified89.3%
Taylor expanded in C around inf 67.8%
distribute-rgt1-in67.8%
metadata-eval67.8%
mul0-lft67.8%
div067.8%
metadata-eval67.8%
Simplified67.8%
if 11.5 < B Initial program 42.6%
Taylor expanded in B around inf 63.3%
Final simplification51.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= A -5.5e-154)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.3e-218)
t_0
(if (<= A 7.2e-189)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 3.05e+32) t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) 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 (A <= -5.5e-154) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.3e-218) {
tmp = t_0;
} else if (A <= 7.2e-189) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 3.05e+32) {
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((2.0 * (C / B))) / Math.PI);
double tmp;
if (A <= -5.5e-154) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.3e-218) {
tmp = t_0;
} else if (A <= 7.2e-189) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 3.05e+32) {
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((2.0 * (C / B))) / math.pi) tmp = 0 if A <= -5.5e-154: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.3e-218: tmp = t_0 elif A <= 7.2e-189: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 3.05e+32: 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(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (A <= -5.5e-154) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.3e-218) tmp = t_0; elseif (A <= 7.2e-189) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 3.05e+32) 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((2.0 * (C / B))) / pi); tmp = 0.0; if (A <= -5.5e-154) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.3e-218) tmp = t_0; elseif (A <= 7.2e-189) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 3.05e+32) 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[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.5e-154], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.3e-218], t$95$0, If[LessEqual[A, 7.2e-189], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.05e+32], 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(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.5 \cdot 10^{-154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-218}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 7.2 \cdot 10^{-189}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 3.05 \cdot 10^{+32}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.50000000000000002e-154Initial program 35.9%
Taylor expanded in A around -inf 53.2%
if -5.50000000000000002e-154 < A < -1.29999999999999992e-218 or 7.20000000000000034e-189 < A < 3.05000000000000014e32Initial program 67.1%
Taylor expanded in C around -inf 46.1%
if -1.29999999999999992e-218 < A < 7.20000000000000034e-189Initial program 40.6%
Taylor expanded in B around inf 56.0%
if 3.05000000000000014e32 < A Initial program 80.0%
Taylor expanded in A around inf 76.6%
Final simplification56.8%
(FPCore (A B C)
:precision binary64
(if (<= A -4.7e-95)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (or (<= A 6.3e+35) (not (<= A 2.25e+191)))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.7e-95) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if ((A <= 6.3e+35) || !(A <= 2.25e+191)) {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.7e-95) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if ((A <= 6.3e+35) || !(A <= 2.25e+191)) {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.7e-95: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif (A <= 6.3e+35) or not (A <= 2.25e+191): tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.7e-95) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif ((A <= 6.3e+35) || !(A <= 2.25e+191)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.7e-95) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif ((A <= 6.3e+35) || ~((A <= 2.25e+191))) tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.7e-95], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[A, 6.3e+35], N[Not[LessEqual[A, 2.25e+191]], $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[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.3 \cdot 10^{+35} \lor \neg \left(A \leq 2.25 \cdot 10^{+191}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.6999999999999998e-95Initial program 30.6%
associate-*r/30.6%
associate-*l/30.6%
*-un-lft-identity30.6%
unpow230.6%
unpow230.6%
hypot-def56.6%
Applied egg-rr56.6%
Taylor expanded in A around -inf 58.8%
associate-*r/58.7%
Simplified58.8%
if -4.6999999999999998e-95 < A < 6.29999999999999969e35 or 2.2500000000000001e191 < A Initial program 64.8%
Simplified91.3%
Taylor expanded in B around inf 70.1%
+-commutative70.1%
Simplified70.1%
if 6.29999999999999969e35 < A < 2.2500000000000001e191Initial program 69.9%
Taylor expanded in C around 0 70.0%
associate-*r/70.0%
mul-1-neg70.0%
+-commutative70.0%
unpow270.0%
unpow270.0%
hypot-def86.8%
Simplified86.8%
Taylor expanded in B around -inf 83.4%
mul-1-neg83.4%
unsub-neg83.4%
Simplified83.4%
Final simplification68.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- A) B)) PI))))
(if (<= B -4.8e-53)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 8.5e-294)
t_0
(if (<= B 1.25e-266)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 19.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-A / B)) / ((double) M_PI));
double tmp;
if (B <= -4.8e-53) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 8.5e-294) {
tmp = t_0;
} else if (B <= 1.25e-266) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 19.0) {
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((-A / B)) / Math.PI);
double tmp;
if (B <= -4.8e-53) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 8.5e-294) {
tmp = t_0;
} else if (B <= 1.25e-266) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 19.0) {
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((-A / B)) / math.pi) tmp = 0 if B <= -4.8e-53: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 8.5e-294: tmp = t_0 elif B <= 1.25e-266: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 19.0: 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(Float64(-A) / B)) / pi)) tmp = 0.0 if (B <= -4.8e-53) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 8.5e-294) tmp = t_0; elseif (B <= 1.25e-266) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 19.0) 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((-A / B)) / pi); tmp = 0.0; if (B <= -4.8e-53) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 8.5e-294) tmp = t_0; elseif (B <= 1.25e-266) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 19.0) 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[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.8e-53], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-294], t$95$0, If[LessEqual[B, 1.25e-266], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 19.0], 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{-A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -4.8 \cdot 10^{-53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-294}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-266}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 19:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.80000000000000015e-53Initial program 53.6%
Taylor expanded in B around -inf 57.7%
if -4.80000000000000015e-53 < B < 8.4999999999999999e-294 or 1.24999999999999998e-266 < B < 19Initial program 63.1%
Taylor expanded in C around 0 49.6%
associate-*r/49.6%
mul-1-neg49.6%
+-commutative49.6%
unpow249.6%
unpow249.6%
hypot-def59.1%
Simplified59.1%
Taylor expanded in A around 0 46.9%
Taylor expanded in A around inf 40.5%
associate-*r/40.5%
neg-mul-140.5%
Simplified40.5%
if 8.4999999999999999e-294 < B < 1.24999999999999998e-266Initial program 46.0%
associate-*r/46.0%
associate-*l/46.0%
*-un-lft-identity46.0%
unpow246.0%
unpow246.0%
hypot-def89.3%
Applied egg-rr89.3%
clear-num89.3%
inv-pow89.3%
associate--l-89.5%
Applied egg-rr89.5%
unpow-189.5%
associate--r+89.3%
Simplified89.3%
Taylor expanded in C around inf 67.8%
distribute-rgt1-in67.8%
metadata-eval67.8%
mul0-lft67.8%
div067.8%
metadata-eval67.8%
Simplified67.8%
if 19 < B Initial program 42.6%
Taylor expanded in B around inf 63.3%
Final simplification51.8%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-129)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B -6.2e-169)
(/ (* 180.0 (atan (* (/ B C) -0.5))) PI)
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-129) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= -6.2e-169) {
tmp = (180.0 * atan(((B / C) * -0.5))) / ((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 <= -2.6e-129) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= -6.2e-169) {
tmp = (180.0 * Math.atan(((B / C) * -0.5))) / 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 <= -2.6e-129: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= -6.2e-169: tmp = (180.0 * math.atan(((B / C) * -0.5))) / 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 <= -2.6e-129) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= -6.2e-169) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / C) * -0.5))) / 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 <= -2.6e-129) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= -6.2e-169) tmp = (180.0 * atan(((B / C) * -0.5))) / pi; else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-129], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.2e-169], N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -2.6 \cdot 10^{-129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-169}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\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 < -2.6000000000000001e-129Initial program 60.1%
Simplified82.0%
Taylor expanded in B around -inf 76.5%
neg-mul-176.5%
unsub-neg76.5%
Simplified76.5%
if -2.6000000000000001e-129 < B < -6.2000000000000004e-169Initial program 17.6%
associate-*r/17.6%
associate-*l/17.6%
*-un-lft-identity17.6%
unpow217.6%
unpow217.6%
hypot-def48.6%
Applied egg-rr48.6%
Taylor expanded in C around inf 33.9%
+-commutative33.9%
associate-*r/33.9%
associate--l+33.9%
unpow233.9%
mul-1-neg33.9%
mul-1-neg33.9%
sqr-neg33.9%
unpow233.9%
distribute-rgt1-in33.9%
metadata-eval33.9%
mul0-lft33.9%
metadata-eval33.9%
Simplified33.9%
Taylor expanded in A around 0 59.5%
*-commutative59.5%
Simplified59.5%
if -6.2000000000000004e-169 < B Initial program 55.3%
Simplified78.7%
Taylor expanded in B around inf 70.1%
+-commutative70.1%
Simplified70.1%
Final simplification71.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.8e-129)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B -3.3e-169)
(/ (* 180.0 (atan (* (/ B C) -0.5))) PI)
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-129) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= -3.3e-169) {
tmp = (180.0 * atan(((B / C) * -0.5))) / ((double) M_PI);
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-129) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= -3.3e-169) {
tmp = (180.0 * Math.atan(((B / C) * -0.5))) / Math.PI;
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.8e-129: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= -3.3e-169: tmp = (180.0 * math.atan(((B / C) * -0.5))) / math.pi else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.8e-129) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= -3.3e-169) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B / C) * -0.5))) / pi); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.8e-129) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= -3.3e-169) tmp = (180.0 * atan(((B / C) * -0.5))) / pi; else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.8e-129], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.3e-169], N[(N[(180.0 * N[ArcTan[N[(N[(B / C), $MachinePrecision] * -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.8 \cdot 10^{-129}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -3.3 \cdot 10^{-169}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B}{C} \cdot -0.5\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -1.8e-129Initial program 60.1%
Simplified82.0%
Taylor expanded in B around -inf 76.5%
neg-mul-176.5%
unsub-neg76.5%
Simplified76.5%
if -1.8e-129 < B < -3.30000000000000026e-169Initial program 17.6%
associate-*r/17.6%
associate-*l/17.6%
*-un-lft-identity17.6%
unpow217.6%
unpow217.6%
hypot-def48.6%
Applied egg-rr48.6%
Taylor expanded in C around inf 33.9%
+-commutative33.9%
associate-*r/33.9%
associate--l+33.9%
unpow233.9%
mul-1-neg33.9%
mul-1-neg33.9%
sqr-neg33.9%
unpow233.9%
distribute-rgt1-in33.9%
metadata-eval33.9%
mul0-lft33.9%
metadata-eval33.9%
Simplified33.9%
Taylor expanded in A around 0 59.5%
*-commutative59.5%
Simplified59.5%
if -3.30000000000000026e-169 < B Initial program 55.3%
Applied egg-rr82.5%
Taylor expanded in B around inf 70.1%
mul-1-neg70.1%
unsub-neg70.1%
Simplified70.1%
Final simplification71.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.25e-94)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 5e-190)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e-94) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 5e-190) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} 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 tmp;
if (A <= -1.25e-94) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 5e-190) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.25e-94: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 5e-190: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.25e-94) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 5e-190) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); 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) tmp = 0.0; if (A <= -1.25e-94) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 5e-190) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e-94], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5e-190], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{-94}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-190}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.2499999999999999e-94Initial program 30.9%
Taylor expanded in A around -inf 59.4%
if -1.2499999999999999e-94 < A < 5.00000000000000034e-190Initial program 52.5%
Taylor expanded in B around inf 42.7%
if 5.00000000000000034e-190 < A Initial program 73.6%
Taylor expanded in A around inf 55.3%
Final simplification53.1%
(FPCore (A B C)
:precision binary64
(if (<= B -2.3e-134)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.25e-136)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.3e-134) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.25e-136) {
tmp = (180.0 * atan(0.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 <= -2.3e-134) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.25e-136) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.3e-134: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.25e-136: tmp = (180.0 * math.atan(0.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 <= -2.3e-134) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.25e-136) tmp = Float64(Float64(180.0 * atan(0.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 <= -2.3e-134) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.25e-136) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.3e-134], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e-136], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.3 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-136}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.3e-134Initial program 58.2%
Taylor expanded in B around -inf 49.5%
if -2.3e-134 < B < 1.25e-136Initial program 54.1%
associate-*r/54.1%
associate-*l/54.1%
*-un-lft-identity54.1%
unpow254.1%
unpow254.1%
hypot-def83.9%
Applied egg-rr83.9%
clear-num83.9%
inv-pow83.9%
associate--l-75.7%
Applied egg-rr75.7%
unpow-175.7%
associate--r+83.9%
Simplified83.9%
Taylor expanded in C around inf 32.1%
distribute-rgt1-in32.1%
metadata-eval32.1%
mul0-lft32.1%
div032.1%
metadata-eval32.1%
Simplified32.1%
if 1.25e-136 < B Initial program 52.2%
Taylor expanded in B around inf 51.2%
Final simplification45.2%
(FPCore (A B C) :precision binary64 (if (<= B -1e-309) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-309) {
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 <= -1e-309) {
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 <= -1e-309: 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 <= -1e-309) 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 <= -1e-309) 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, -1e-309], 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 -1 \cdot 10^{-309}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.000000000000002e-309Initial program 57.8%
Taylor expanded in B around -inf 40.2%
if -1.000000000000002e-309 < B Initial program 52.3%
Taylor expanded in B around inf 40.4%
Final simplification40.3%
(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 54.8%
Taylor expanded in B around inf 22.7%
Final simplification22.7%
herbie shell --seed 2023334
(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)))