
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(if (<= A -1.15e+90)
(/
(* 180.0 (atan (/ 1.0 (* A (- (* 2.0 (/ 1.0 B)) (* 2.0 (/ C (* 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.15e+90) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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.15e+90) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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.15e+90: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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.15e+90) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 * Float64(1.0 / B)) - Float64(2.0 * Float64(C / 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.15e+90) tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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.15e+90], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 * N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(C / N[(A * B), $MachinePrecision]), $MachinePrecision]), $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.15 \cdot 10^{+90}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(2 \cdot \frac{1}{B} - 2 \cdot \frac{C}{A \cdot B}\right)}\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.15e90Initial program 19.9%
associate-*r/19.9%
associate-*l/19.9%
*-un-lft-identity19.9%
unpow219.9%
unpow219.9%
hypot-define42.9%
Applied egg-rr42.9%
clear-num42.9%
inv-pow42.9%
associate--l-22.5%
Applied egg-rr22.5%
unpow-122.5%
Simplified22.5%
Taylor expanded in A around -inf 86.8%
if -1.15e90 < A Initial program 59.4%
associate-*r/59.4%
associate-*l/59.4%
*-un-lft-identity59.4%
unpow259.4%
unpow259.4%
hypot-define84.1%
Applied egg-rr84.1%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -4e+88)
(/
(* 180.0 (atan (/ 1.0 (* A (- (* 2.0 (/ 1.0 B)) (* 2.0 (/ C (* A B))))))))
PI)
(if (<= A 4.6e-48)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ (* 180.0 (atan (/ -1.0 (/ B (+ A (hypot B A)))))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4e+88) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / ((double) M_PI);
} else if (A <= 4.6e-48) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((-1.0 / (B / (A + hypot(B, A)))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4e+88) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / Math.PI;
} else if (A <= 4.6e-48) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((-1.0 / (B / (A + Math.hypot(B, A)))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4e+88: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / math.pi elif A <= 4.6e-48: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = (180.0 * math.atan((-1.0 / (B / (A + math.hypot(B, A)))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4e+88) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 * Float64(1.0 / B)) - Float64(2.0 * Float64(C / Float64(A * B)))))))) / pi); elseif (A <= 4.6e-48) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 / Float64(B / Float64(A + hypot(B, A)))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4e+88) tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / pi; elseif (A <= 4.6e-48) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = (180.0 * atan((-1.0 / (B / (A + hypot(B, A)))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4e+88], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 * N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(C / N[(A * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 4.6e-48], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 / N[(B / N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{+88}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(2 \cdot \frac{1}{B} - 2 \cdot \frac{C}{A \cdot B}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.6 \cdot 10^{-48}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-1}{\frac{B}{A + \mathsf{hypot}\left(B, A\right)}}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.99999999999999984e88Initial program 19.9%
associate-*r/19.9%
associate-*l/19.9%
*-un-lft-identity19.9%
unpow219.9%
unpow219.9%
hypot-define42.9%
Applied egg-rr42.9%
clear-num42.9%
inv-pow42.9%
associate--l-22.5%
Applied egg-rr22.5%
unpow-122.5%
Simplified22.5%
Taylor expanded in A around -inf 86.8%
if -3.99999999999999984e88 < A < 4.6000000000000001e-48Initial program 53.1%
associate-*r/53.1%
associate-*l/53.1%
*-un-lft-identity53.1%
unpow253.1%
unpow253.1%
hypot-define77.6%
Applied egg-rr77.6%
Taylor expanded in A around 0 51.5%
unpow251.5%
unpow251.5%
hypot-undefine76.1%
Simplified76.1%
if 4.6000000000000001e-48 < A Initial program 70.2%
associate-*r/70.2%
associate-*l/70.2%
*-un-lft-identity70.2%
unpow270.2%
unpow270.2%
hypot-define95.2%
Applied egg-rr95.2%
clear-num95.2%
inv-pow95.2%
associate--l-95.2%
Applied egg-rr95.2%
unpow-195.2%
Simplified95.2%
Taylor expanded in C around 0 69.2%
associate-*r/69.2%
neg-mul-169.2%
+-commutative69.2%
unpow269.2%
unpow269.2%
hypot-define88.4%
Simplified88.4%
Final simplification81.7%
(FPCore (A B C)
:precision binary64
(if (<= A -2e+90)
(/
(* 180.0 (atan (/ 1.0 (* A (- (* 2.0 (/ 1.0 B)) (* 2.0 (/ C (* A B))))))))
PI)
(if (<= A 4.1e-47)
(/ (* 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 <= -2e+90) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / ((double) M_PI);
} else if (A <= 4.1e-47) {
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 <= -2e+90) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / Math.PI;
} else if (A <= 4.1e-47) {
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 <= -2e+90: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / math.pi elif A <= 4.1e-47: 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 <= -2e+90) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 * Float64(1.0 / B)) - Float64(2.0 * Float64(C / Float64(A * B)))))))) / pi); elseif (A <= 4.1e-47) 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 <= -2e+90) tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / pi; elseif (A <= 4.1e-47) 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, -2e+90], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 * N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(C / N[(A * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 4.1e-47], 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 -2 \cdot 10^{+90}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(2 \cdot \frac{1}{B} - 2 \cdot \frac{C}{A \cdot B}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.1 \cdot 10^{-47}:\\
\;\;\;\;\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 < -1.99999999999999993e90Initial program 19.9%
associate-*r/19.9%
associate-*l/19.9%
*-un-lft-identity19.9%
unpow219.9%
unpow219.9%
hypot-define42.9%
Applied egg-rr42.9%
clear-num42.9%
inv-pow42.9%
associate--l-22.5%
Applied egg-rr22.5%
unpow-122.5%
Simplified22.5%
Taylor expanded in A around -inf 86.8%
if -1.99999999999999993e90 < A < 4.10000000000000002e-47Initial program 53.1%
associate-*r/53.1%
associate-*l/53.1%
*-un-lft-identity53.1%
unpow253.1%
unpow253.1%
hypot-define77.6%
Applied egg-rr77.6%
Taylor expanded in A around 0 51.5%
unpow251.5%
unpow251.5%
hypot-undefine76.1%
Simplified76.1%
if 4.10000000000000002e-47 < A Initial program 70.2%
Taylor expanded in C around 0 69.2%
mul-1-neg69.2%
distribute-neg-frac269.2%
+-commutative69.2%
unpow269.2%
unpow269.2%
hypot-define88.4%
Simplified88.4%
Final simplification81.7%
(FPCore (A B C)
:precision binary64
(if (<= A -2.8e+90)
(/
(* 180.0 (atan (/ 1.0 (* A (- (* 2.0 (/ 1.0 B)) (* 2.0 (/ C (* A B))))))))
PI)
(if (<= A 9e+82)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+90) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / ((double) M_PI);
} else if (A <= 9e+82) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e+90) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / Math.PI;
} else if (A <= 9e+82) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.8e+90: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / math.pi elif A <= 9e+82: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.8e+90) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 * Float64(1.0 / B)) - Float64(2.0 * Float64(C / Float64(A * B)))))))) / pi); elseif (A <= 9e+82) 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(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.8e+90) tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / pi; elseif (A <= 9e+82) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.8e+90], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 * N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(C / N[(A * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 9e+82], 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[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.8 \cdot 10^{+90}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(2 \cdot \frac{1}{B} - 2 \cdot \frac{C}{A \cdot B}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+82}:\\
\;\;\;\;\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{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.8e90Initial program 19.9%
associate-*r/19.9%
associate-*l/19.9%
*-un-lft-identity19.9%
unpow219.9%
unpow219.9%
hypot-define42.9%
Applied egg-rr42.9%
clear-num42.9%
inv-pow42.9%
associate--l-22.5%
Applied egg-rr22.5%
unpow-122.5%
Simplified22.5%
Taylor expanded in A around -inf 86.8%
if -2.8e90 < A < 8.9999999999999993e82Initial program 53.1%
associate-*r/53.1%
associate-*l/53.1%
*-un-lft-identity53.1%
unpow253.1%
unpow253.1%
hypot-define80.5%
Applied egg-rr80.5%
Taylor expanded in A around 0 48.0%
unpow248.0%
unpow248.0%
hypot-undefine75.6%
Simplified75.6%
if 8.9999999999999993e82 < A Initial program 80.3%
Taylor expanded in B around -inf 79.5%
associate--l+79.5%
div-sub85.8%
Simplified85.8%
Final simplification79.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.4e+90)
(/
(* 180.0 (atan (/ 1.0 (* A (- (* 2.0 (/ 1.0 B)) (* 2.0 (/ C (* A B))))))))
PI)
(if (<= A 1e+80)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+90) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / ((double) M_PI);
} else if (A <= 1e+80) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e+90) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / Math.PI;
} else if (A <= 1e+80) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.4e+90: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / math.pi elif A <= 1e+80: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.4e+90) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 * Float64(1.0 / B)) - Float64(2.0 * Float64(C / Float64(A * B)))))))) / pi); elseif (A <= 1e+80) 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(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e+90) tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (A * B)))))))) / pi; elseif (A <= 1e+80) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e+90], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 * N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(C / N[(A * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1e+80], 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[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{+90}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(2 \cdot \frac{1}{B} - 2 \cdot \frac{C}{A \cdot B}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq 10^{+80}:\\
\;\;\;\;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{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.4000000000000001e90Initial program 19.9%
associate-*r/19.9%
associate-*l/19.9%
*-un-lft-identity19.9%
unpow219.9%
unpow219.9%
hypot-define42.9%
Applied egg-rr42.9%
clear-num42.9%
inv-pow42.9%
associate--l-22.5%
Applied egg-rr22.5%
unpow-122.5%
Simplified22.5%
Taylor expanded in A around -inf 86.8%
if -2.4000000000000001e90 < A < 1e80Initial program 53.1%
Taylor expanded in A around 0 48.0%
unpow248.0%
unpow248.0%
hypot-define75.6%
Simplified75.6%
if 1e80 < A Initial program 80.3%
Taylor expanded in B around -inf 79.5%
associate--l+79.5%
div-sub85.8%
Simplified85.8%
Final simplification79.5%
(FPCore (A B C)
:precision binary64
(if (<= A -3.8e+85)
(/
(* 180.0 (atan (/ 1.0 (* A (- (* 2.0 (/ 1.0 B)) (* 2.0 (/ C (* 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 <= -3.8e+85) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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 <= -3.8e+85) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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 <= -3.8e+85: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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 <= -3.8e+85) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 * Float64(1.0 / B)) - Float64(2.0 * Float64(C / Float64(A * B)))))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e+85) tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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, -3.8e+85], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 * N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(C / N[(A * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{+85}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(2 \cdot \frac{1}{B} - 2 \cdot \frac{C}{A \cdot B}\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.79999999999999992e85Initial program 19.9%
associate-*r/19.9%
associate-*l/19.9%
*-un-lft-identity19.9%
unpow219.9%
unpow219.9%
hypot-define42.9%
Applied egg-rr42.9%
clear-num42.9%
inv-pow42.9%
associate--l-22.5%
Applied egg-rr22.5%
unpow-122.5%
Simplified22.5%
Taylor expanded in A around -inf 86.8%
if -3.79999999999999992e85 < A Initial program 59.4%
associate-*l/59.4%
*-lft-identity59.4%
+-commutative59.4%
unpow259.4%
unpow259.4%
hypot-define84.1%
Simplified84.1%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.35e+85)
(/
(* 180.0 (atan (/ 1.0 (* A (- (* 2.0 (/ 1.0 B)) (* 2.0 (/ C (* 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 <= -1.35e+85) {
tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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 <= -1.35e+85) {
tmp = (180.0 * Math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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 <= -1.35e+85: tmp = (180.0 * math.atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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 <= -1.35e+85) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 * Float64(1.0 / B)) - Float64(2.0 * Float64(C / 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 <= -1.35e+85) tmp = (180.0 * atan((1.0 / (A * ((2.0 * (1.0 / B)) - (2.0 * (C / (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, -1.35e+85], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 * N[(1.0 / B), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(C / N[(A * B), $MachinePrecision]), $MachinePrecision]), $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 -1.35 \cdot 10^{+85}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{A \cdot \left(2 \cdot \frac{1}{B} - 2 \cdot \frac{C}{A \cdot B}\right)}\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 < -1.34999999999999992e85Initial program 19.9%
associate-*r/19.9%
associate-*l/19.9%
*-un-lft-identity19.9%
unpow219.9%
unpow219.9%
hypot-define42.9%
Applied egg-rr42.9%
clear-num42.9%
inv-pow42.9%
associate--l-22.5%
Applied egg-rr22.5%
unpow-122.5%
Simplified22.5%
Taylor expanded in A around -inf 86.8%
if -1.34999999999999992e85 < A Initial program 59.4%
Simplified83.6%
Final simplification84.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (* -0.5 (/ B C)))))
(if (<= A -2.8e-95)
(/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
(if (<= A -1.12e-126)
(* 180.0 (/ t_0 PI))
(if (<= A -5.5e-193)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 2.05e-294)
(/ (* 180.0 t_0) PI)
(if (<= A 1.45e+78)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / C)));
double tmp;
if (A <= -2.8e-95) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else if (A <= -1.12e-126) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -5.5e-193) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 2.05e-294) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else if (A <= 1.45e+78) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((-0.5 * (B / C)));
double tmp;
if (A <= -2.8e-95) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else if (A <= -1.12e-126) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -5.5e-193) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 2.05e-294) {
tmp = (180.0 * t_0) / Math.PI;
} else if (A <= 1.45e+78) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / C))) tmp = 0 if A <= -2.8e-95: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi elif A <= -1.12e-126: tmp = 180.0 * (t_0 / math.pi) elif A <= -5.5e-193: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 2.05e-294: tmp = (180.0 * t_0) / math.pi elif A <= 1.45e+78: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(-0.5 * Float64(B / C))) tmp = 0.0 if (A <= -2.8e-95) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi); elseif (A <= -1.12e-126) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -5.5e-193) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 2.05e-294) tmp = Float64(Float64(180.0 * t_0) / pi); elseif (A <= 1.45e+78) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((-0.5 * (B / C))); tmp = 0.0; if (A <= -2.8e-95) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; elseif (A <= -1.12e-126) tmp = 180.0 * (t_0 / pi); elseif (A <= -5.5e-193) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 2.05e-294) tmp = (180.0 * t_0) / pi; elseif (A <= 1.45e+78) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -2.8e-95], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1.12e-126], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.5e-193], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.05e-294], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.45e+78], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{if}\;A \leq -2.8 \cdot 10^{-95}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.12 \cdot 10^{-126}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;A \leq -5.5 \cdot 10^{-193}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 2.05 \cdot 10^{-294}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{+78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.7999999999999999e-95Initial program 34.2%
associate-*r/34.2%
associate-*l/34.2%
*-un-lft-identity34.2%
unpow234.2%
unpow234.2%
hypot-define58.6%
Applied egg-rr58.6%
Taylor expanded in A around -inf 59.4%
associate-*r/59.4%
*-commutative59.4%
associate-*r/59.4%
Simplified59.4%
if -2.7999999999999999e-95 < A < -1.12e-126Initial program 44.0%
Taylor expanded in A around 0 44.0%
unpow244.0%
unpow244.0%
hypot-define60.5%
Simplified60.5%
Taylor expanded in C around inf 60.5%
if -1.12e-126 < A < -5.50000000000000014e-193Initial program 65.3%
Taylor expanded in B around -inf 49.7%
if -5.50000000000000014e-193 < A < 2.0499999999999999e-294Initial program 43.6%
associate-*r/43.6%
associate-*l/43.6%
*-un-lft-identity43.6%
unpow243.6%
unpow243.6%
hypot-define58.0%
Applied egg-rr58.0%
Taylor expanded in A around 0 43.6%
unpow243.6%
unpow243.6%
hypot-undefine58.0%
Simplified58.0%
Taylor expanded in C around inf 52.6%
if 2.0499999999999999e-294 < A < 1.45000000000000008e78Initial program 55.5%
Taylor expanded in A around 0 46.1%
unpow246.1%
unpow246.1%
hypot-define78.8%
Simplified78.8%
Taylor expanded in C around 0 54.9%
if 1.45000000000000008e78 < A Initial program 80.3%
Taylor expanded in A around inf 76.8%
Final simplification60.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (* -0.5 (/ B C)))))
(if (<= A -1.3e-93)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -1.35e-126)
(* 180.0 (/ t_0 PI))
(if (<= A -5.1e-197)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 1.2e-300)
(/ (* 180.0 t_0) PI)
(if (<= A 3.4e+76)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / C)));
double tmp;
if (A <= -1.3e-93) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -1.35e-126) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -5.1e-197) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 1.2e-300) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else if (A <= 3.4e+76) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((-0.5 * (B / C)));
double tmp;
if (A <= -1.3e-93) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -1.35e-126) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -5.1e-197) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 1.2e-300) {
tmp = (180.0 * t_0) / Math.PI;
} else if (A <= 3.4e+76) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / C))) tmp = 0 if A <= -1.3e-93: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -1.35e-126: tmp = 180.0 * (t_0 / math.pi) elif A <= -5.1e-197: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 1.2e-300: tmp = (180.0 * t_0) / math.pi elif A <= 3.4e+76: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(-0.5 * Float64(B / C))) tmp = 0.0 if (A <= -1.3e-93) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -1.35e-126) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -5.1e-197) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 1.2e-300) tmp = Float64(Float64(180.0 * t_0) / pi); elseif (A <= 3.4e+76) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((-0.5 * (B / C))); tmp = 0.0; if (A <= -1.3e-93) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -1.35e-126) tmp = 180.0 * (t_0 / pi); elseif (A <= -5.1e-197) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 1.2e-300) tmp = (180.0 * t_0) / pi; elseif (A <= 3.4e+76) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -1.3e-93], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.35e-126], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.1e-197], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.2e-300], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 3.4e+76], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{if}\;A \leq -1.3 \cdot 10^{-93}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.35 \cdot 10^{-126}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;A \leq -5.1 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{-300}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\
\mathbf{elif}\;A \leq 3.4 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.2999999999999999e-93Initial program 34.2%
Taylor expanded in A around -inf 59.3%
associate-*r/59.3%
Simplified59.3%
if -1.2999999999999999e-93 < A < -1.34999999999999998e-126Initial program 44.0%
Taylor expanded in A around 0 44.0%
unpow244.0%
unpow244.0%
hypot-define60.5%
Simplified60.5%
Taylor expanded in C around inf 60.5%
if -1.34999999999999998e-126 < A < -5.1000000000000003e-197Initial program 65.3%
Taylor expanded in B around -inf 49.7%
if -5.1000000000000003e-197 < A < 1.2e-300Initial program 43.6%
associate-*r/43.6%
associate-*l/43.6%
*-un-lft-identity43.6%
unpow243.6%
unpow243.6%
hypot-define58.0%
Applied egg-rr58.0%
Taylor expanded in A around 0 43.6%
unpow243.6%
unpow243.6%
hypot-undefine58.0%
Simplified58.0%
Taylor expanded in C around inf 52.6%
if 1.2e-300 < A < 3.3999999999999997e76Initial program 55.5%
Taylor expanded in A around 0 46.1%
unpow246.1%
unpow246.1%
hypot-define78.8%
Simplified78.8%
Taylor expanded in C around 0 54.9%
if 3.3999999999999997e76 < A Initial program 80.3%
Taylor expanded in A around inf 76.8%
Final simplification60.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= A -3.7e-91)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -8.5e-127)
t_0
(if (<= A -8.8e-194)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 1.4e-300)
t_0
(if (<= A 1.45e+78)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (A <= -3.7e-91) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -8.5e-127) {
tmp = t_0;
} else if (A <= -8.8e-194) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 1.4e-300) {
tmp = t_0;
} else if (A <= 1.45e+78) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (A <= -3.7e-91) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -8.5e-127) {
tmp = t_0;
} else if (A <= -8.8e-194) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 1.4e-300) {
tmp = t_0;
} else if (A <= 1.45e+78) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if A <= -3.7e-91: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -8.5e-127: tmp = t_0 elif A <= -8.8e-194: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 1.4e-300: tmp = t_0 elif A <= 1.45e+78: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (A <= -3.7e-91) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -8.5e-127) tmp = t_0; elseif (A <= -8.8e-194) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 1.4e-300) tmp = t_0; elseif (A <= 1.45e+78) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (A <= -3.7e-91) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -8.5e-127) tmp = t_0; elseif (A <= -8.8e-194) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 1.4e-300) tmp = t_0; elseif (A <= 1.45e+78) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.7e-91], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.5e-127], t$95$0, If[LessEqual[A, -8.8e-194], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.4e-300], t$95$0, If[LessEqual[A, 1.45e+78], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;A \leq -3.7 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8.5 \cdot 10^{-127}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -8.8 \cdot 10^{-194}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 1.4 \cdot 10^{-300}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{+78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.7000000000000002e-91Initial program 34.2%
Taylor expanded in A around -inf 59.3%
associate-*r/59.3%
Simplified59.3%
if -3.7000000000000002e-91 < A < -8.5e-127 or -8.8000000000000005e-194 < A < 1.39999999999999997e-300Initial program 43.8%
Taylor expanded in A around 0 43.8%
unpow243.8%
unpow243.8%
hypot-define58.9%
Simplified58.9%
Taylor expanded in C around inf 55.7%
if -8.5e-127 < A < -8.8000000000000005e-194Initial program 65.3%
Taylor expanded in B around -inf 49.7%
if 1.39999999999999997e-300 < A < 1.45000000000000008e78Initial program 55.5%
Taylor expanded in A around 0 46.1%
unpow246.1%
unpow246.1%
hypot-define78.8%
Simplified78.8%
Taylor expanded in C around 0 54.9%
if 1.45000000000000008e78 < A Initial program 80.3%
Taylor expanded in A around inf 76.8%
Final simplification60.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= C -2.6e-20)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -4.8e-87)
t_0
(if (<= C -1.15e-234)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= C 1.68e-295)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 1.95e-235)
t_0
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (C <= -2.6e-20) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -4.8e-87) {
tmp = t_0;
} else if (C <= -1.15e-234) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (C <= 1.68e-295) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 1.95e-235) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (C <= -2.6e-20) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -4.8e-87) {
tmp = t_0;
} else if (C <= -1.15e-234) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (C <= 1.68e-295) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 1.95e-235) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if C <= -2.6e-20: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -4.8e-87: tmp = t_0 elif C <= -1.15e-234: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif C <= 1.68e-295: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 1.95e-235: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (C <= -2.6e-20) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -4.8e-87) tmp = t_0; elseif (C <= -1.15e-234) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (C <= 1.68e-295) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 1.95e-235) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (C <= -2.6e-20) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -4.8e-87) tmp = t_0; elseif (C <= -1.15e-234) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (C <= 1.68e-295) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 1.95e-235) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.6e-20], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.8e-87], t$95$0, If[LessEqual[C, -1.15e-234], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.68e-295], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.95e-235], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;C \leq -2.6 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.8 \cdot 10^{-87}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -1.15 \cdot 10^{-234}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.68 \cdot 10^{-295}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 1.95 \cdot 10^{-235}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.59999999999999995e-20Initial program 79.9%
Taylor expanded in C around -inf 71.9%
if -2.59999999999999995e-20 < C < -4.7999999999999999e-87 or 1.6799999999999999e-295 < C < 1.94999999999999985e-235Initial program 48.5%
Taylor expanded in B around inf 44.8%
if -4.7999999999999999e-87 < C < -1.14999999999999995e-234Initial program 67.4%
Taylor expanded in A around inf 43.4%
if -1.14999999999999995e-234 < C < 1.6799999999999999e-295Initial program 40.6%
Taylor expanded in B around -inf 54.6%
if 1.94999999999999985e-235 < C Initial program 32.6%
Taylor expanded in A around 0 21.5%
unpow221.5%
unpow221.5%
hypot-define48.8%
Simplified48.8%
Taylor expanded in C around inf 53.8%
Final simplification57.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= C -1.65e-19)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C -1.1e-86)
t_0
(if (<= C -6.1e-235)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= C 1.85e-295)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 2.3e-235)
t_0
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (C <= -1.65e-19) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= -1.1e-86) {
tmp = t_0;
} else if (C <= -6.1e-235) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (C <= 1.85e-295) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 2.3e-235) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (C <= -1.65e-19) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= -1.1e-86) {
tmp = t_0;
} else if (C <= -6.1e-235) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (C <= 1.85e-295) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 2.3e-235) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if C <= -1.65e-19: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= -1.1e-86: tmp = t_0 elif C <= -6.1e-235: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif C <= 1.85e-295: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 2.3e-235: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (C <= -1.65e-19) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= -1.1e-86) tmp = t_0; elseif (C <= -6.1e-235) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (C <= 1.85e-295) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 2.3e-235) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (C <= -1.65e-19) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= -1.1e-86) tmp = t_0; elseif (C <= -6.1e-235) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (C <= 1.85e-295) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 2.3e-235) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.65e-19], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -1.1e-86], t$95$0, If[LessEqual[C, -6.1e-235], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.85e-295], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.3e-235], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;C \leq -1.65 \cdot 10^{-19}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.1 \cdot 10^{-86}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -6.1 \cdot 10^{-235}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.85 \cdot 10^{-295}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 2.3 \cdot 10^{-235}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.6499999999999999e-19Initial program 79.9%
associate-*r/79.9%
associate-*l/79.9%
*-un-lft-identity79.9%
unpow279.9%
unpow279.9%
hypot-define93.8%
Applied egg-rr93.8%
Taylor expanded in A around 0 78.6%
unpow278.6%
unpow278.6%
hypot-undefine89.6%
Simplified89.6%
Taylor expanded in C around 0 76.8%
Taylor expanded in C around inf 71.4%
if -1.6499999999999999e-19 < C < -1.1000000000000001e-86 or 1.85e-295 < C < 2.29999999999999997e-235Initial program 48.5%
Taylor expanded in B around inf 44.8%
if -1.1000000000000001e-86 < C < -6.09999999999999988e-235Initial program 67.4%
Taylor expanded in A around inf 43.4%
if -6.09999999999999988e-235 < C < 1.85e-295Initial program 40.6%
Taylor expanded in B around -inf 54.6%
if 2.29999999999999997e-235 < C Initial program 32.6%
Taylor expanded in A around 0 21.5%
unpow221.5%
unpow221.5%
hypot-define48.8%
Simplified48.8%
Taylor expanded in C around inf 53.8%
Final simplification56.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI)))
(if (<= B -1.42e+19)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.6e-106)
t_0
(if (<= B 7.6e-180)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.2e-175)
t_0
(if (<= B 450000.0)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((C / B))) / ((double) M_PI);
double tmp;
if (B <= -1.42e+19) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.6e-106) {
tmp = t_0;
} else if (B <= 7.6e-180) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.2e-175) {
tmp = t_0;
} else if (B <= 450000.0) {
tmp = 180.0 * (atan(((A / B) * -2.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 t_0 = (180.0 * Math.atan((C / B))) / Math.PI;
double tmp;
if (B <= -1.42e+19) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.6e-106) {
tmp = t_0;
} else if (B <= 7.6e-180) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.2e-175) {
tmp = t_0;
} else if (B <= 450000.0) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((C / B))) / math.pi tmp = 0 if B <= -1.42e+19: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.6e-106: tmp = t_0 elif B <= 7.6e-180: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.2e-175: tmp = t_0 elif B <= 450000.0: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi) tmp = 0.0 if (B <= -1.42e+19) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.6e-106) tmp = t_0; elseif (B <= 7.6e-180) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.2e-175) tmp = t_0; elseif (B <= 450000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((C / B))) / pi; tmp = 0.0; if (B <= -1.42e+19) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.6e-106) tmp = t_0; elseif (B <= 7.6e-180) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.2e-175) tmp = t_0; elseif (B <= 450000.0) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -1.42e+19], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-106], t$95$0, If[LessEqual[B, 7.6e-180], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.2e-175], t$95$0, If[LessEqual[B, 450000.0], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.42 \cdot 10^{+19}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-106}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 7.6 \cdot 10^{-180}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-175}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 450000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.42e19Initial program 48.3%
Taylor expanded in B around -inf 68.3%
if -1.42e19 < B < -1.6e-106 or 7.59999999999999999e-180 < B < 1.2e-175Initial program 63.3%
associate-*r/63.2%
associate-*l/63.2%
*-un-lft-identity63.2%
unpow263.2%
unpow263.2%
hypot-define69.3%
Applied egg-rr69.3%
Taylor expanded in A around 0 53.5%
unpow253.5%
unpow253.5%
hypot-undefine59.2%
Simplified59.2%
Taylor expanded in C around 0 45.4%
Taylor expanded in C around inf 46.1%
if -1.6e-106 < B < 7.59999999999999999e-180Initial program 53.0%
Taylor expanded in C around inf 35.7%
associate-*r/35.7%
distribute-rgt1-in35.7%
metadata-eval35.7%
mul0-lft35.7%
metadata-eval35.7%
Simplified35.7%
if 1.2e-175 < B < 4.5e5Initial program 63.1%
Taylor expanded in A around inf 42.3%
if 4.5e5 < B Initial program 42.7%
Taylor expanded in B around inf 59.7%
Final simplification50.8%
(FPCore (A B C)
:precision binary64
(if (<= C -1.8e-122)
(* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))
(if (<= C -3.05e-235)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= C 1.95e-295)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 2.5e-235)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.8e-122) {
tmp = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
} else if (C <= -3.05e-235) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (C <= 1.95e-295) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 2.5e-235) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.8e-122) {
tmp = 180.0 * (Math.atan((-1.0 + (C / B))) / Math.PI);
} else if (C <= -3.05e-235) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (C <= 1.95e-295) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 2.5e-235) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.8e-122: tmp = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) elif C <= -3.05e-235: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif C <= 1.95e-295: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 2.5e-235: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.8e-122) tmp = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)); elseif (C <= -3.05e-235) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (C <= 1.95e-295) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 2.5e-235) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.8e-122) tmp = 180.0 * (atan((-1.0 + (C / B))) / pi); elseif (C <= -3.05e-235) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (C <= 1.95e-295) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 2.5e-235) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.8e-122], N[(180.0 * N[(N[ArcTan[N[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.05e-235], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.95e-295], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.5e-235], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.8 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -3.05 \cdot 10^{-235}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.95 \cdot 10^{-295}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 2.5 \cdot 10^{-235}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.79999999999999997e-122Initial program 72.8%
Taylor expanded in A around 0 69.1%
unpow269.1%
unpow269.1%
hypot-define83.0%
Simplified83.0%
Taylor expanded in C around 0 69.5%
if -1.79999999999999997e-122 < C < -3.04999999999999994e-235Initial program 68.6%
Taylor expanded in A around inf 45.0%
if -3.04999999999999994e-235 < C < 1.95e-295Initial program 40.6%
Taylor expanded in B around -inf 54.6%
if 1.95e-295 < C < 2.4999999999999999e-235Initial program 61.8%
Taylor expanded in B around inf 46.4%
if 2.4999999999999999e-235 < C Initial program 32.6%
Taylor expanded in A around 0 21.5%
unpow221.5%
unpow221.5%
hypot-define48.8%
Simplified48.8%
Taylor expanded in C around inf 53.8%
Final simplification58.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ C B))) PI)))
(if (<= B -7e+16)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -9.5e-107)
t_0
(if (<= B 5.7e-180)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 8e-114) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((C / B))) / ((double) M_PI);
double tmp;
if (B <= -7e+16) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -9.5e-107) {
tmp = t_0;
} else if (B <= 5.7e-180) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 8e-114) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((C / B))) / Math.PI;
double tmp;
if (B <= -7e+16) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -9.5e-107) {
tmp = t_0;
} else if (B <= 5.7e-180) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 8e-114) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((C / B))) / math.pi tmp = 0 if B <= -7e+16: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -9.5e-107: tmp = t_0 elif B <= 5.7e-180: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 8e-114: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi) tmp = 0.0 if (B <= -7e+16) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -9.5e-107) tmp = t_0; elseif (B <= 5.7e-180) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 8e-114) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((C / B))) / pi; tmp = 0.0; if (B <= -7e+16) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -9.5e-107) tmp = t_0; elseif (B <= 5.7e-180) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 8e-114) 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[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -7e+16], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-107], t$95$0, If[LessEqual[B, 5.7e-180], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8e-114], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -7 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -9.5 \cdot 10^{-107}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 5.7 \cdot 10^{-180}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-114}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -7e16Initial program 48.3%
Taylor expanded in B around -inf 68.3%
if -7e16 < B < -9.4999999999999999e-107 or 5.69999999999999977e-180 < B < 8.0000000000000004e-114Initial program 66.7%
associate-*r/66.7%
associate-*l/66.7%
*-un-lft-identity66.7%
unpow266.7%
unpow266.7%
hypot-define71.2%
Applied egg-rr71.2%
Taylor expanded in A around 0 53.2%
unpow253.2%
unpow253.2%
hypot-undefine55.7%
Simplified55.7%
Taylor expanded in C around 0 45.1%
Taylor expanded in C around inf 45.4%
if -9.4999999999999999e-107 < B < 5.69999999999999977e-180Initial program 53.0%
Taylor expanded in C around inf 35.7%
associate-*r/35.7%
distribute-rgt1-in35.7%
metadata-eval35.7%
mul0-lft35.7%
metadata-eval35.7%
Simplified35.7%
if 8.0000000000000004e-114 < B Initial program 47.0%
Taylor expanded in B around inf 48.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= C -7.5e-56)
t_0
(if (<= C -1.7e-86)
(/ (* 180.0 (atan (/ 1.0 (+ (/ A B) (- -1.0 (/ C B)))))) PI)
(if (<= C 8.6e-76) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (C <= -7.5e-56) {
tmp = t_0;
} else if (C <= -1.7e-86) {
tmp = (180.0 * atan((1.0 / ((A / B) + (-1.0 - (C / B)))))) / ((double) M_PI);
} else if (C <= 8.6e-76) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (C <= -7.5e-56) {
tmp = t_0;
} else if (C <= -1.7e-86) {
tmp = (180.0 * Math.atan((1.0 / ((A / B) + (-1.0 - (C / B)))))) / Math.PI;
} else if (C <= 8.6e-76) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if C <= -7.5e-56: tmp = t_0 elif C <= -1.7e-86: tmp = (180.0 * math.atan((1.0 / ((A / B) + (-1.0 - (C / B)))))) / math.pi elif C <= 8.6e-76: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (C <= -7.5e-56) tmp = t_0; elseif (C <= -1.7e-86) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(A / B) + Float64(-1.0 - Float64(C / B)))))) / pi); elseif (C <= 8.6e-76) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (C <= -7.5e-56) tmp = t_0; elseif (C <= -1.7e-86) tmp = (180.0 * atan((1.0 / ((A / B) + (-1.0 - (C / B)))))) / pi; elseif (C <= 8.6e-76) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -7.5e-56], t$95$0, If[LessEqual[C, -1.7e-86], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(A / B), $MachinePrecision] + N[(-1.0 - N[(C / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 8.6e-76], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -7.5 \cdot 10^{-56}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -1.7 \cdot 10^{-86}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{A}{B} + \left(-1 - \frac{C}{B}\right)}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.6 \cdot 10^{-76}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.50000000000000041e-56 or -1.7e-86 < C < 8.5999999999999998e-76Initial program 67.9%
Taylor expanded in B around -inf 64.9%
associate--l+64.9%
div-sub66.1%
Simplified66.1%
if -7.50000000000000041e-56 < C < -1.7e-86Initial program 40.6%
associate-*r/40.6%
associate-*l/40.6%
*-un-lft-identity40.6%
unpow240.6%
unpow240.6%
hypot-define100.0%
Applied egg-rr100.0%
clear-num100.0%
inv-pow100.0%
associate--l-51.6%
Applied egg-rr51.6%
unpow-151.6%
Simplified51.6%
Taylor expanded in B around inf 100.0%
if 8.5999999999999998e-76 < C Initial program 20.6%
Taylor expanded in A around 0 15.0%
unpow215.0%
unpow215.0%
hypot-define49.7%
Simplified49.7%
Taylor expanded in C around inf 65.7%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= C -3.4e+25)
t_0
(if (<= C -1e-206)
(/ (* 180.0 (atan (+ (/ C B) (- -1.0 (/ A B))))) PI)
(if (<= C 8.2e-75) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (C <= -3.4e+25) {
tmp = t_0;
} else if (C <= -1e-206) {
tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / ((double) M_PI);
} else if (C <= 8.2e-75) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (C <= -3.4e+25) {
tmp = t_0;
} else if (C <= -1e-206) {
tmp = (180.0 * Math.atan(((C / B) + (-1.0 - (A / B))))) / Math.PI;
} else if (C <= 8.2e-75) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if C <= -3.4e+25: tmp = t_0 elif C <= -1e-206: tmp = (180.0 * math.atan(((C / B) + (-1.0 - (A / B))))) / math.pi elif C <= 8.2e-75: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (C <= -3.4e+25) tmp = t_0; elseif (C <= -1e-206) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))) / pi); elseif (C <= 8.2e-75) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (C <= -3.4e+25) tmp = t_0; elseif (C <= -1e-206) tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / pi; elseif (C <= 8.2e-75) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.4e+25], t$95$0, If[LessEqual[C, -1e-206], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 8.2e-75], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -3.4 \cdot 10^{+25}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -1 \cdot 10^{-206}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.2 \cdot 10^{-75}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.39999999999999984e25 or -1.00000000000000003e-206 < C < 8.20000000000000005e-75Initial program 68.6%
Taylor expanded in B around -inf 68.5%
associate--l+68.5%
div-sub70.1%
Simplified70.1%
if -3.39999999999999984e25 < C < -1.00000000000000003e-206Initial program 62.3%
associate-*r/62.4%
associate-*l/62.4%
*-un-lft-identity62.4%
unpow262.4%
unpow262.4%
hypot-define85.2%
Applied egg-rr85.2%
Taylor expanded in B around inf 57.9%
if 8.20000000000000005e-75 < C Initial program 20.6%
Taylor expanded in A around 0 15.0%
unpow215.0%
unpow215.0%
hypot-define49.7%
Simplified49.7%
Taylor expanded in C around inf 65.7%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= C -3.4e+25)
t_0
(if (<= C -2.7e-206)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))
(if (<= C 4.1e-72) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (C <= -3.4e+25) {
tmp = t_0;
} else if (C <= -2.7e-206) {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
} else if (C <= 4.1e-72) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (C <= -3.4e+25) {
tmp = t_0;
} else if (C <= -2.7e-206) {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
} else if (C <= 4.1e-72) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if C <= -3.4e+25: tmp = t_0 elif C <= -2.7e-206: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) elif C <= 4.1e-72: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (C <= -3.4e+25) tmp = t_0; elseif (C <= -2.7e-206) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); elseif (C <= 4.1e-72) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (C <= -3.4e+25) tmp = t_0; elseif (C <= -2.7e-206) tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); elseif (C <= 4.1e-72) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.4e+25], t$95$0, If[LessEqual[C, -2.7e-206], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.1e-72], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -3.4 \cdot 10^{+25}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -2.7 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.1 \cdot 10^{-72}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.39999999999999984e25 or -2.7000000000000001e-206 < C < 4.10000000000000003e-72Initial program 68.6%
Taylor expanded in B around -inf 68.5%
associate--l+68.5%
div-sub70.1%
Simplified70.1%
if -3.39999999999999984e25 < C < -2.7000000000000001e-206Initial program 62.3%
Taylor expanded in B around inf 57.9%
if 4.10000000000000003e-72 < C Initial program 20.6%
Taylor expanded in A around 0 15.0%
unpow215.0%
unpow215.0%
hypot-define49.7%
Simplified49.7%
Taylor expanded in C around inf 65.7%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(if (<= B -2.1e-58)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7.8e-180)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-58) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7.8e-180) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.1e-58) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7.8e-180) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.1e-58: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7.8e-180: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.1e-58) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7.8e-180) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.1e-58) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7.8e-180) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.1e-58], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.8e-180], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.1 \cdot 10^{-58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-180}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.09999999999999988e-58Initial program 55.3%
Taylor expanded in B around -inf 55.5%
if -2.09999999999999988e-58 < B < 7.8000000000000005e-180Initial program 50.4%
Taylor expanded in C around inf 34.3%
associate-*r/34.3%
distribute-rgt1-in34.3%
metadata-eval34.3%
mul0-lft34.3%
metadata-eval34.3%
Simplified34.3%
if 7.8000000000000005e-180 < B Initial program 51.8%
Taylor expanded in B around inf 43.5%
(FPCore (A B C) :precision binary64 (if (<= C 5.6e-78) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 5.6e-78) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 5.6e-78) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 5.6e-78: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 5.6e-78) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 5.6e-78) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 5.6e-78], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 5.6 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 5.60000000000000047e-78Initial program 67.0%
Taylor expanded in B around -inf 62.8%
associate--l+62.8%
div-sub63.9%
Simplified63.9%
if 5.60000000000000047e-78 < C Initial program 20.6%
Taylor expanded in A around 0 15.0%
unpow215.0%
unpow215.0%
hypot-define49.7%
Simplified49.7%
Taylor expanded in C around inf 65.7%
(FPCore (A B C) :precision binary64 (if (<= B -2.95e-298) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.95e-298) {
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 <= -2.95e-298) {
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 <= -2.95e-298: 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 <= -2.95e-298) 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 <= -2.95e-298) 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, -2.95e-298], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.95 \cdot 10^{-298}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.94999999999999984e-298Initial program 50.7%
Taylor expanded in B around -inf 40.3%
if -2.94999999999999984e-298 < B Initial program 54.0%
Taylor expanded in B around inf 34.2%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 52.5%
Taylor expanded in B around inf 18.8%
herbie shell --seed 2024091
(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)))