
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -5e-27) (not (<= t_0 1e-6)))
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -5e-27) || !(t_0 <= 1e-6)) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -5e-27) || !(t_0 <= 1e-6)) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -5e-27) or not (t_0 <= 1e-6): tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -5e-27) || !(t_0 <= 1e-6)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -5e-27) || ~((t_0 <= 1e-6))) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5e-27], N[Not[LessEqual[t$95$0, 1e-6]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{-27} \lor \neg \left(t_0 \leq 10^{-6}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -5.0000000000000002e-27 or 9.99999999999999955e-7 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 60.8%
associate-*l/60.8%
*-lft-identity60.8%
+-commutative60.8%
unpow260.8%
unpow260.8%
hypot-def87.2%
Simplified87.2%
if -5.0000000000000002e-27 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 9.99999999999999955e-7Initial program 15.3%
associate-*l/15.3%
*-lft-identity15.3%
+-commutative15.3%
unpow215.3%
unpow215.3%
hypot-def15.4%
Simplified15.4%
Taylor expanded in C around -inf 8.1%
Taylor expanded in C around inf 24.6%
+-commutative24.6%
associate-+l+29.3%
Simplified42.1%
Taylor expanded in B around 0 59.6%
associate-*r/59.7%
associate-*r*59.7%
metadata-eval59.7%
Applied egg-rr59.7%
Final simplification82.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.14e+83)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 260.0)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(* 180.0 (/ (atan (/ (- (- A) (hypot A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.14e+83) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 260.0) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else {
tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.14e+83) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 260.0) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(A, B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.14e+83: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 260.0: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = 180.0 * (math.atan(((-A - math.hypot(A, B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.14e+83) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 260.0) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.14e+83) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 260.0) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.14e+83], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 260.0], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.14 \cdot 10^{+83}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 260:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.14000000000000003e83Initial program 15.3%
associate-*r/15.3%
unpow215.3%
Simplified15.3%
Taylor expanded in B around 0 11.6%
div-sub11.4%
+-commutative11.4%
Simplified46.3%
Taylor expanded in A around -inf 81.2%
if -1.14000000000000003e83 < A < 260Initial program 53.5%
associate-*l/53.5%
*-lft-identity53.5%
+-commutative53.5%
unpow253.5%
unpow253.5%
hypot-def74.7%
Simplified74.7%
clear-num74.7%
un-div-inv74.7%
associate--r+74.6%
Applied egg-rr74.6%
Taylor expanded in A around 0 50.7%
unpow250.7%
unpow250.7%
hypot-def71.8%
Simplified71.8%
if 260 < A Initial program 77.5%
associate-*l/77.5%
*-lft-identity77.5%
+-commutative77.5%
unpow277.5%
unpow277.5%
hypot-def94.9%
Simplified94.9%
Taylor expanded in C around 0 75.7%
mul-1-neg75.7%
+-commutative75.7%
unpow275.7%
unpow275.7%
hypot-def84.5%
Simplified84.5%
Final simplification75.9%
(FPCore (A B C)
:precision binary64
(if (<= A -9.4e+81)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 1.12e+74)
(* (atan (/ (- C (hypot B C)) B)) (/ 180.0 PI))
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.4e+81) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 1.12e+74) {
tmp = atan(((C - hypot(B, C)) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.4e+81) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 1.12e+74) {
tmp = Math.atan(((C - Math.hypot(B, C)) / B)) * (180.0 / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.4e+81: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 1.12e+74: tmp = math.atan(((C - math.hypot(B, C)) / B)) * (180.0 / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.4e+81) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 1.12e+74) tmp = Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) * Float64(180.0 / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.4e+81) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 1.12e+74) tmp = atan(((C - hypot(B, C)) / B)) * (180.0 / pi); else tmp = 180.0 / (pi / atan((((B + C) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.4e+81], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.12e+74], N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.4 \cdot 10^{+81}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.12 \cdot 10^{+74}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -9.4000000000000004e81Initial program 15.3%
associate-*r/15.3%
unpow215.3%
Simplified15.3%
Taylor expanded in B around 0 11.6%
div-sub11.4%
+-commutative11.4%
Simplified46.3%
Taylor expanded in A around -inf 81.2%
if -9.4000000000000004e81 < A < 1.12000000000000003e74Initial program 56.8%
associate-*r/56.8%
associate-*l/56.8%
associate-*l/56.8%
*-lft-identity56.8%
sub-neg56.8%
associate-+l-56.7%
sub-neg56.7%
remove-double-neg56.7%
+-commutative56.7%
unpow256.7%
unpow256.7%
hypot-def76.6%
Simplified76.6%
Taylor expanded in A around 0 52.4%
unpow252.4%
unpow252.4%
hypot-def72.3%
Simplified72.3%
if 1.12000000000000003e74 < A Initial program 71.8%
associate-*l/71.8%
*-lft-identity71.8%
+-commutative71.8%
unpow271.8%
unpow271.8%
hypot-def93.1%
Simplified93.1%
clear-num93.1%
un-div-inv93.1%
associate--r+93.1%
Applied egg-rr93.1%
Taylor expanded in B around -inf 81.5%
Final simplification75.1%
(FPCore (A B C)
:precision binary64
(if (<= A -1.9e+82)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 1.9e+80)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e+82) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 1.9e+80) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.9e+82) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 1.9e+80) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.9e+82: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 1.9e+80: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.9e+82) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 1.9e+80) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.9e+82) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 1.9e+80) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 / (pi / atan((((B + C) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.9e+82], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.9e+80], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.9 \cdot 10^{+82}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.9 \cdot 10^{+80}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.90000000000000017e82Initial program 15.3%
associate-*r/15.3%
unpow215.3%
Simplified15.3%
Taylor expanded in B around 0 11.6%
div-sub11.4%
+-commutative11.4%
Simplified46.3%
Taylor expanded in A around -inf 81.2%
if -1.90000000000000017e82 < A < 1.89999999999999999e80Initial program 56.8%
associate-*l/56.8%
*-lft-identity56.8%
+-commutative56.8%
unpow256.8%
unpow256.8%
hypot-def76.7%
Simplified76.7%
clear-num76.7%
un-div-inv76.7%
associate--r+76.6%
Applied egg-rr76.6%
Taylor expanded in A around 0 52.4%
unpow252.4%
unpow252.4%
hypot-def72.3%
Simplified72.3%
if 1.89999999999999999e80 < A Initial program 71.8%
associate-*l/71.8%
*-lft-identity71.8%
+-commutative71.8%
unpow271.8%
unpow271.8%
hypot-def93.1%
Simplified93.1%
clear-num93.1%
un-div-inv93.1%
associate--r+93.1%
Applied egg-rr93.1%
Taylor expanded in B around -inf 81.5%
Final simplification75.1%
(FPCore (A B C)
:precision binary64
(if (<= B -3.8e-175)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B -2.7e-240)
(* 180.0 (/ (atan (/ (* (/ B (/ A B)) (- -0.5)) B)) PI))
(if (or (<= B 1.1e-215) (not (<= B 3.6e-144)))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
(* (/ 180.0 PI) (atan (/ B (/ C -0.5))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-175) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= -2.7e-240) {
tmp = 180.0 * (atan((((B / (A / B)) * -(-0.5)) / B)) / ((double) M_PI));
} else if ((B <= 1.1e-215) || !(B <= 3.6e-144)) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B / (C / -0.5)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-175) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= -2.7e-240) {
tmp = 180.0 * (Math.atan((((B / (A / B)) * -(-0.5)) / B)) / Math.PI);
} else if ((B <= 1.1e-215) || !(B <= 3.6e-144)) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((B / (C / -0.5)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.8e-175: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= -2.7e-240: tmp = 180.0 * (math.atan((((B / (A / B)) * -(-0.5)) / B)) / math.pi) elif (B <= 1.1e-215) or not (B <= 3.6e-144): tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) else: tmp = (180.0 / math.pi) * math.atan((B / (C / -0.5))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.8e-175) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= -2.7e-240) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B / Float64(A / B)) * Float64(-(-0.5))) / B)) / pi)); elseif ((B <= 1.1e-215) || !(B <= 3.6e-144)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(C / -0.5)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.8e-175) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= -2.7e-240) tmp = 180.0 * (atan((((B / (A / B)) * -(-0.5)) / B)) / pi); elseif ((B <= 1.1e-215) || ~((B <= 3.6e-144))) tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); else tmp = (180.0 / pi) * atan((B / (C / -0.5))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.8e-175], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.7e-240], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B / N[(A / B), $MachinePrecision]), $MachinePrecision] * (--0.5)), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.1e-215], N[Not[LessEqual[B, 3.6e-144]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.8 \cdot 10^{-175}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq -2.7 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\frac{B}{\frac{A}{B}} \cdot \left(--0.5\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-215} \lor \neg \left(B \leq 3.6 \cdot 10^{-144}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\
\end{array}
\end{array}
if B < -3.8e-175Initial program 53.9%
associate-*l/53.9%
*-lft-identity53.9%
+-commutative53.9%
unpow253.9%
unpow253.9%
hypot-def74.2%
Simplified74.2%
clear-num74.2%
un-div-inv74.2%
associate--r+73.1%
Applied egg-rr73.1%
Taylor expanded in B around -inf 70.1%
if -3.8e-175 < B < -2.70000000000000018e-240Initial program 53.6%
associate-*l/53.6%
*-lft-identity53.6%
+-commutative53.6%
unpow253.6%
unpow253.6%
hypot-def71.2%
Simplified71.2%
Taylor expanded in C around -inf 47.5%
Taylor expanded in A around -inf 44.7%
associate-+r+44.7%
distribute-lft1-in44.7%
metadata-eval44.7%
mul0-lft44.7%
+-commutative44.7%
unpow244.7%
associate-/l*70.9%
Simplified70.9%
if -2.70000000000000018e-240 < B < 1.09999999999999998e-215 or 3.6e-144 < B Initial program 56.5%
associate-*r/56.5%
associate-*l/56.5%
associate-*l/56.5%
*-lft-identity56.5%
sub-neg56.5%
associate-+l-56.4%
sub-neg56.4%
remove-double-neg56.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-def77.6%
Simplified77.6%
Taylor expanded in B around inf 71.4%
if 1.09999999999999998e-215 < B < 3.6e-144Initial program 24.1%
associate-*l/24.1%
*-lft-identity24.1%
+-commutative24.1%
unpow224.1%
unpow224.1%
hypot-def56.2%
Simplified56.2%
Taylor expanded in C around -inf 33.0%
Taylor expanded in C around inf 23.2%
+-commutative23.2%
associate-+l+23.2%
Simplified49.8%
Taylor expanded in B around 0 53.1%
Taylor expanded in B around 0 53.1%
associate-*r/53.4%
associate-/l*49.8%
associate-/r/53.5%
associate-*r/53.5%
*-commutative53.5%
associate-/l*53.5%
Simplified53.5%
Final simplification69.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ 180.0 (/ PI (atan (+ 1.0 (/ C B)))))))
(if (<= A -7.6e-78)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 1.9e-295)
t_0
(if (<= A 4.2e-233)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 5.18e-8) t_0 (* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 / (((double) M_PI) / atan((1.0 + (C / B))));
double tmp;
if (A <= -7.6e-78) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 1.9e-295) {
tmp = t_0;
} else if (A <= 4.2e-233) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 5.18e-8) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 / (Math.PI / Math.atan((1.0 + (C / B))));
double tmp;
if (A <= -7.6e-78) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 1.9e-295) {
tmp = t_0;
} else if (A <= 4.2e-233) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 5.18e-8) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 / (math.pi / math.atan((1.0 + (C / B)))) tmp = 0 if A <= -7.6e-78: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 1.9e-295: tmp = t_0 elif A <= 4.2e-233: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 5.18e-8: tmp = t_0 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(C / B))))) tmp = 0.0 if (A <= -7.6e-78) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 1.9e-295) tmp = t_0; elseif (A <= 4.2e-233) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 5.18e-8) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 / (pi / atan((1.0 + (C / B)))); tmp = 0.0; if (A <= -7.6e-78) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 1.9e-295) tmp = t_0; elseif (A <= 4.2e-233) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 5.18e-8) tmp = t_0; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7.6e-78], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.9e-295], t$95$0, If[LessEqual[A, 4.2e-233], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.18e-8], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C}{B}\right)}}\\
\mathbf{if}\;A \leq -7.6 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.9 \cdot 10^{-295}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{-233}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 5.18 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.5999999999999998e-78Initial program 29.8%
associate-*l/29.8%
*-lft-identity29.8%
+-commutative29.8%
unpow229.8%
unpow229.8%
hypot-def52.7%
Simplified52.7%
Taylor expanded in A around -inf 62.9%
if -7.5999999999999998e-78 < A < 1.90000000000000009e-295 or 4.1999999999999997e-233 < A < 5.1800000000000001e-8Initial program 56.5%
associate-*l/56.5%
*-lft-identity56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-def78.6%
Simplified78.6%
clear-num78.6%
un-div-inv78.6%
associate--r+78.6%
Applied egg-rr78.6%
Taylor expanded in A around 0 53.1%
unpow253.1%
unpow253.1%
hypot-def75.0%
Simplified75.0%
Taylor expanded in B around -inf 57.0%
if 1.90000000000000009e-295 < A < 4.1999999999999997e-233Initial program 53.0%
associate-*l/53.0%
*-lft-identity53.0%
+-commutative53.0%
unpow253.0%
unpow253.0%
hypot-def82.8%
Simplified82.8%
Taylor expanded in B around inf 55.8%
if 5.1800000000000001e-8 < A Initial program 75.6%
associate-*l/75.6%
*-lft-identity75.6%
+-commutative75.6%
unpow275.6%
unpow275.6%
hypot-def93.5%
Simplified93.5%
Taylor expanded in A around inf 68.9%
*-commutative68.9%
Simplified68.9%
Final simplification61.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ 180.0 (/ PI (atan (+ 1.0 (/ C B)))))))
(if (<= A -1.7e-78)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 1.9e-295)
t_0
(if (<= A 4.2e-233)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 5.18e-8) t_0 (* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 / (((double) M_PI) / atan((1.0 + (C / B))));
double tmp;
if (A <= -1.7e-78) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 1.9e-295) {
tmp = t_0;
} else if (A <= 4.2e-233) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 5.18e-8) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 / (Math.PI / Math.atan((1.0 + (C / B))));
double tmp;
if (A <= -1.7e-78) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 1.9e-295) {
tmp = t_0;
} else if (A <= 4.2e-233) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 5.18e-8) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 / (math.pi / math.atan((1.0 + (C / B)))) tmp = 0 if A <= -1.7e-78: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 1.9e-295: tmp = t_0 elif A <= 4.2e-233: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 5.18e-8: tmp = t_0 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(C / B))))) tmp = 0.0 if (A <= -1.7e-78) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 1.9e-295) tmp = t_0; elseif (A <= 4.2e-233) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 5.18e-8) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 / (pi / atan((1.0 + (C / B)))); tmp = 0.0; if (A <= -1.7e-78) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 1.9e-295) tmp = t_0; elseif (A <= 4.2e-233) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 5.18e-8) tmp = t_0; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.7e-78], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.9e-295], t$95$0, If[LessEqual[A, 4.2e-233], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.18e-8], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C}{B}\right)}}\\
\mathbf{if}\;A \leq -1.7 \cdot 10^{-78}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.9 \cdot 10^{-295}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{-233}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 5.18 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.70000000000000006e-78Initial program 29.8%
associate-*r/29.8%
unpow229.8%
Simplified29.8%
Taylor expanded in B around 0 27.6%
div-sub26.5%
+-commutative26.5%
Simplified52.7%
Taylor expanded in A around -inf 62.9%
if -1.70000000000000006e-78 < A < 1.90000000000000009e-295 or 4.1999999999999997e-233 < A < 5.1800000000000001e-8Initial program 56.5%
associate-*l/56.5%
*-lft-identity56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-def78.6%
Simplified78.6%
clear-num78.6%
un-div-inv78.6%
associate--r+78.6%
Applied egg-rr78.6%
Taylor expanded in A around 0 53.1%
unpow253.1%
unpow253.1%
hypot-def75.0%
Simplified75.0%
Taylor expanded in B around -inf 57.0%
if 1.90000000000000009e-295 < A < 4.1999999999999997e-233Initial program 53.0%
associate-*l/53.0%
*-lft-identity53.0%
+-commutative53.0%
unpow253.0%
unpow253.0%
hypot-def82.8%
Simplified82.8%
Taylor expanded in B around inf 55.8%
if 5.1800000000000001e-8 < A Initial program 75.6%
associate-*l/75.6%
*-lft-identity75.6%
+-commutative75.6%
unpow275.6%
unpow275.6%
hypot-def93.5%
Simplified93.5%
Taylor expanded in A around inf 68.9%
*-commutative68.9%
Simplified68.9%
Final simplification61.3%
(FPCore (A B C)
:precision binary64
(if (<= B 1.04e-215)
(* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))
(if (<= B 3.6e-144)
(* (/ 180.0 PI) (atan (/ B (/ C -0.5))))
(if (<= B 1.95e-64)
(* 180.0 (/ (atan (/ (* (- C A) 2.0) B)) PI))
(/ (* 180.0 (atan (/ (- (- A) B) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.04e-215) {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
} else if (B <= 3.6e-144) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (C / -0.5)));
} else if (B <= 1.95e-64) {
tmp = 180.0 * (atan((((C - A) * 2.0) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((-A - B) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1.04e-215) {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
} else if (B <= 3.6e-144) {
tmp = (180.0 / Math.PI) * Math.atan((B / (C / -0.5)));
} else if (B <= 1.95e-64) {
tmp = 180.0 * (Math.atan((((C - A) * 2.0) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((-A - B) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.04e-215: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) elif B <= 3.6e-144: tmp = (180.0 / math.pi) * math.atan((B / (C / -0.5))) elif B <= 1.95e-64: tmp = 180.0 * (math.atan((((C - A) * 2.0) / B)) / math.pi) else: tmp = (180.0 * math.atan(((-A - B) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1.04e-215) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); elseif (B <= 3.6e-144) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(C / -0.5)))); elseif (B <= 1.95e-64) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) * 2.0) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-A) - B) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1.04e-215) tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); elseif (B <= 3.6e-144) tmp = (180.0 / pi) * atan((B / (C / -0.5))); elseif (B <= 1.95e-64) tmp = 180.0 * (atan((((C - A) * 2.0) / B)) / pi); else tmp = (180.0 * atan(((-A - B) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.04e-215], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-144], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.95e-64], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[((-A) - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.04 \cdot 10^{-215}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-144}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\
\mathbf{elif}\;B \leq 1.95 \cdot 10^{-64}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.0399999999999999e-215Initial program 57.0%
associate-*l/57.0%
*-lft-identity57.0%
+-commutative57.0%
unpow257.0%
unpow257.0%
hypot-def75.6%
Simplified75.6%
Taylor expanded in B around -inf 65.7%
if 1.0399999999999999e-215 < B < 3.6e-144Initial program 24.1%
associate-*l/24.1%
*-lft-identity24.1%
+-commutative24.1%
unpow224.1%
unpow224.1%
hypot-def56.2%
Simplified56.2%
Taylor expanded in C around -inf 33.0%
Taylor expanded in C around inf 23.2%
+-commutative23.2%
associate-+l+23.2%
Simplified49.8%
Taylor expanded in B around 0 53.1%
Taylor expanded in B around 0 53.1%
associate-*r/53.4%
associate-/l*49.8%
associate-/r/53.5%
associate-*r/53.5%
*-commutative53.5%
associate-/l*53.5%
Simplified53.5%
if 3.6e-144 < B < 1.9499999999999998e-64Initial program 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
unpow269.6%
hypot-def79.8%
Simplified79.8%
Taylor expanded in C around -inf 69.1%
+-commutative69.1%
metadata-eval69.1%
cancel-sign-sub-inv69.1%
distribute-lft-out--69.1%
Simplified69.1%
if 1.9499999999999998e-64 < B Initial program 46.8%
associate-*l/46.8%
*-lft-identity46.8%
+-commutative46.8%
unpow246.8%
unpow246.8%
hypot-def76.6%
Simplified76.6%
Taylor expanded in C around -inf 76.6%
Taylor expanded in B around inf 67.0%
associate-*r/67.0%
mul-1-neg67.0%
Applied egg-rr67.0%
Final simplification65.4%
(FPCore (A B C)
:precision binary64
(if (<= B 6.6e-215)
(* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))
(if (<= B 3.6e-144)
(* (/ 180.0 PI) (atan (/ B (/ C -0.5))))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 6.6e-215) {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
} else if (B <= 3.6e-144) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (C / -0.5)));
} 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 <= 6.6e-215) {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
} else if (B <= 3.6e-144) {
tmp = (180.0 / Math.PI) * Math.atan((B / (C / -0.5)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 6.6e-215: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) elif B <= 3.6e-144: tmp = (180.0 / math.pi) * math.atan((B / (C / -0.5))) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 6.6e-215) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); elseif (B <= 3.6e-144) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(C / -0.5)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 6.6e-215) tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); elseif (B <= 3.6e-144) tmp = (180.0 / pi) * atan((B / (C / -0.5))); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 6.6e-215], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-144], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 6.6 \cdot 10^{-215}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-144}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < 6.5999999999999996e-215Initial program 57.0%
associate-*l/57.0%
*-lft-identity57.0%
+-commutative57.0%
unpow257.0%
unpow257.0%
hypot-def75.6%
Simplified75.6%
Taylor expanded in B around -inf 65.7%
if 6.5999999999999996e-215 < B < 3.6e-144Initial program 24.1%
associate-*l/24.1%
*-lft-identity24.1%
+-commutative24.1%
unpow224.1%
unpow224.1%
hypot-def56.2%
Simplified56.2%
Taylor expanded in C around -inf 33.0%
Taylor expanded in C around inf 23.2%
+-commutative23.2%
associate-+l+23.2%
Simplified49.8%
Taylor expanded in B around 0 53.1%
Taylor expanded in B around 0 53.1%
associate-*r/53.4%
associate-/l*49.8%
associate-/r/53.5%
associate-*r/53.5%
*-commutative53.5%
associate-/l*53.5%
Simplified53.5%
if 3.6e-144 < B Initial program 51.9%
associate-*r/51.9%
associate-*l/51.9%
associate-*l/51.9%
*-lft-identity51.9%
sub-neg51.9%
associate-+l-52.0%
sub-neg52.0%
remove-double-neg52.0%
+-commutative52.0%
unpow252.0%
unpow252.0%
hypot-def77.3%
Simplified77.3%
Taylor expanded in B around inf 73.4%
Final simplification67.4%
(FPCore (A B C)
:precision binary64
(if (<= B 7.1e-215)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B 3.8e-144)
(* (/ 180.0 PI) (atan (/ B (/ C -0.5))))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 7.1e-215) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= 3.8e-144) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (C / -0.5)));
} 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 <= 7.1e-215) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= 3.8e-144) {
tmp = (180.0 / Math.PI) * Math.atan((B / (C / -0.5)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 7.1e-215: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= 3.8e-144: tmp = (180.0 / math.pi) * math.atan((B / (C / -0.5))) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 7.1e-215) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= 3.8e-144) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(C / -0.5)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 7.1e-215) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= 3.8e-144) tmp = (180.0 / pi) * atan((B / (C / -0.5))); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 7.1e-215], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-144], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7.1 \cdot 10^{-215}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-144}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < 7.1000000000000001e-215Initial program 57.0%
associate-*l/57.0%
*-lft-identity57.0%
+-commutative57.0%
unpow257.0%
unpow257.0%
hypot-def75.6%
Simplified75.6%
clear-num75.6%
un-div-inv75.6%
associate--r+72.9%
Applied egg-rr72.9%
Taylor expanded in B around -inf 65.7%
if 7.1000000000000001e-215 < B < 3.79999999999999993e-144Initial program 24.1%
associate-*l/24.1%
*-lft-identity24.1%
+-commutative24.1%
unpow224.1%
unpow224.1%
hypot-def56.2%
Simplified56.2%
Taylor expanded in C around -inf 33.0%
Taylor expanded in C around inf 23.2%
+-commutative23.2%
associate-+l+23.2%
Simplified49.8%
Taylor expanded in B around 0 53.1%
Taylor expanded in B around 0 53.1%
associate-*r/53.4%
associate-/l*49.8%
associate-/r/53.5%
associate-*r/53.5%
*-commutative53.5%
associate-/l*53.5%
Simplified53.5%
if 3.79999999999999993e-144 < B Initial program 51.9%
associate-*r/51.9%
associate-*l/51.9%
associate-*l/51.9%
*-lft-identity51.9%
sub-neg51.9%
associate-+l-52.0%
sub-neg52.0%
remove-double-neg52.0%
+-commutative52.0%
unpow252.0%
unpow252.0%
hypot-def77.3%
Simplified77.3%
Taylor expanded in B around inf 73.4%
Final simplification67.4%
(FPCore (A B C)
:precision binary64
(if (<= C -4.1e-157)
(/ 180.0 (/ PI (atan (+ 1.0 (/ C B)))))
(if (<= C 9e-86)
(/ (* 180.0 (atan (/ (- (- A) B) B))) PI)
(* (/ 180.0 PI) (atan (/ B (/ C -0.5)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.1e-157) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + (C / B))));
} else if (C <= 9e-86) {
tmp = (180.0 * atan(((-A - B) / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B / (C / -0.5)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.1e-157) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + (C / B))));
} else if (C <= 9e-86) {
tmp = (180.0 * Math.atan(((-A - B) / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((B / (C / -0.5)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.1e-157: tmp = 180.0 / (math.pi / math.atan((1.0 + (C / B)))) elif C <= 9e-86: tmp = (180.0 * math.atan(((-A - B) / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((B / (C / -0.5))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.1e-157) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(C / B))))); elseif (C <= 9e-86) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-A) - B) / B))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(C / -0.5)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.1e-157) tmp = 180.0 / (pi / atan((1.0 + (C / B)))); elseif (C <= 9e-86) tmp = (180.0 * atan(((-A - B) / B))) / pi; else tmp = (180.0 / pi) * atan((B / (C / -0.5))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.1e-157], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9e-86], N[(N[(180.0 * N[ArcTan[N[(N[((-A) - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.1 \cdot 10^{-157}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C}{B}\right)}}\\
\mathbf{elif}\;C \leq 9 \cdot 10^{-86}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\
\end{array}
\end{array}
if C < -4.1000000000000002e-157Initial program 68.3%
associate-*l/68.3%
*-lft-identity68.3%
+-commutative68.3%
unpow268.3%
unpow268.3%
hypot-def86.9%
Simplified86.9%
clear-num86.9%
un-div-inv86.9%
associate--r+85.3%
Applied egg-rr85.3%
Taylor expanded in A around 0 66.1%
unpow266.1%
unpow266.1%
hypot-def82.6%
Simplified82.6%
Taylor expanded in B around -inf 70.1%
if -4.1000000000000002e-157 < C < 8.9999999999999995e-86Initial program 61.6%
associate-*l/61.6%
*-lft-identity61.6%
+-commutative61.6%
unpow261.6%
unpow261.6%
hypot-def79.5%
Simplified79.5%
Taylor expanded in C around -inf 79.7%
Taylor expanded in B around inf 52.3%
associate-*r/52.3%
mul-1-neg52.3%
Applied egg-rr52.3%
if 8.9999999999999995e-86 < C Initial program 26.9%
associate-*l/26.9%
*-lft-identity26.9%
+-commutative26.9%
unpow226.9%
unpow226.9%
hypot-def56.4%
Simplified56.4%
Taylor expanded in C around -inf 39.9%
Taylor expanded in C around inf 23.6%
+-commutative23.6%
associate-+l+29.1%
Simplified52.3%
Taylor expanded in B around 0 62.5%
Taylor expanded in B around 0 62.5%
associate-*r/62.6%
associate-/l*59.6%
associate-/r/62.6%
associate-*r/62.6%
*-commutative62.6%
associate-/l*62.6%
Simplified62.6%
Final simplification61.9%
(FPCore (A B C)
:precision binary64
(if (<= B -7.2e-24)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.4e-217)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= B 8.2e-126)
(* 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 <= -7.2e-24) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.4e-217) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (B <= 8.2e-126) {
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 <= -7.2e-24) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.4e-217) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (B <= 8.2e-126) {
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 <= -7.2e-24: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.4e-217: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif B <= 8.2e-126: 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 <= -7.2e-24) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.4e-217) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (B <= 8.2e-126) 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 <= -7.2e-24) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.4e-217) tmp = 180.0 * (atan((-A / B)) / pi); elseif (B <= 8.2e-126) 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, -7.2e-24], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-217], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.2e-126], 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 -7.2 \cdot 10^{-24}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-217}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.2 \cdot 10^{-126}:\\
\;\;\;\;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 < -7.2000000000000002e-24Initial program 54.9%
associate-*l/54.9%
*-lft-identity54.9%
+-commutative54.9%
unpow254.9%
unpow254.9%
hypot-def84.1%
Simplified84.1%
Taylor expanded in B around -inf 63.7%
if -7.2000000000000002e-24 < B < 2.3999999999999999e-217Initial program 59.3%
associate-*l/59.3%
*-lft-identity59.3%
+-commutative59.3%
unpow259.3%
unpow259.3%
hypot-def68.4%
Simplified68.4%
Taylor expanded in C around -inf 60.2%
Taylor expanded in B around inf 36.3%
Taylor expanded in A around inf 36.5%
if 2.3999999999999999e-217 < B < 8.1999999999999995e-126Initial program 32.8%
associate-*l/32.8%
*-lft-identity32.8%
+-commutative32.8%
unpow232.8%
unpow232.8%
hypot-def66.0%
Simplified66.0%
Taylor expanded in C around inf 36.2%
distribute-rgt1-in36.2%
metadata-eval36.2%
mul0-lft36.2%
metadata-eval36.2%
Simplified36.2%
if 8.1999999999999995e-126 < B Initial program 51.3%
associate-*l/51.3%
*-lft-identity51.3%
+-commutative51.3%
unpow251.3%
unpow251.3%
hypot-def76.5%
Simplified76.5%
Taylor expanded in B around inf 51.7%
Final simplification48.4%
(FPCore (A B C)
:precision binary64
(if (<= A -9.5e-242)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 2e-176)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.5e-242) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 2e-176) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.5e-242) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 2e-176) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.5e-242: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 2e-176: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.5e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 2e-176) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.5e-242) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 2e-176) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.5e-242], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e-176], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.5 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-176}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.4999999999999997e-242Initial program 39.4%
associate-*l/39.4%
*-lft-identity39.4%
+-commutative39.4%
unpow239.4%
unpow239.4%
hypot-def60.7%
Simplified60.7%
Taylor expanded in A around -inf 54.2%
if -9.4999999999999997e-242 < A < 2e-176Initial program 56.0%
associate-*l/56.0%
*-lft-identity56.0%
+-commutative56.0%
unpow256.0%
unpow256.0%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around inf 38.3%
if 2e-176 < A Initial program 68.0%
associate-*l/68.0%
*-lft-identity68.0%
+-commutative68.0%
unpow268.0%
unpow268.0%
hypot-def87.3%
Simplified87.3%
Taylor expanded in A around inf 54.7%
*-commutative54.7%
Simplified54.7%
Final simplification51.6%
(FPCore (A B C)
:precision binary64
(if (<= A -9e-242)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 2.6e-191)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (/ (- A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9e-242) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 2.6e-191) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9e-242) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 2.6e-191) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9e-242: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 2.6e-191: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-A / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 2.6e-191) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9e-242) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 2.6e-191) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-A / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9e-242], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.6e-191], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.6 \cdot 10^{-191}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.9999999999999997e-242Initial program 39.4%
associate-*l/39.4%
*-lft-identity39.4%
+-commutative39.4%
unpow239.4%
unpow239.4%
hypot-def60.7%
Simplified60.7%
Taylor expanded in A around -inf 54.2%
if -8.9999999999999997e-242 < A < 2.59999999999999986e-191Initial program 56.0%
associate-*l/56.0%
*-lft-identity56.0%
+-commutative56.0%
unpow256.0%
unpow256.0%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around inf 38.3%
if 2.59999999999999986e-191 < A Initial program 68.0%
associate-*l/68.0%
*-lft-identity68.0%
+-commutative68.0%
unpow268.0%
unpow268.0%
hypot-def87.3%
Simplified87.3%
Taylor expanded in C around -inf 80.0%
Taylor expanded in B around inf 58.0%
Taylor expanded in A around inf 53.7%
Final simplification51.2%
(FPCore (A B C)
:precision binary64
(if (<= B -1.6e-152)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.7e-124)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.6e-152) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.7e-124) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.6e-152) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.7e-124) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.6e-152: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.7e-124: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.6e-152) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.7e-124) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.6e-152) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.7e-124) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.6e-152], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.7e-124], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.6 \cdot 10^{-152}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.7 \cdot 10^{-124}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.60000000000000006e-152Initial program 54.0%
associate-*l/54.0%
*-lft-identity54.0%
+-commutative54.0%
unpow254.0%
unpow254.0%
hypot-def73.9%
Simplified73.9%
Taylor expanded in B around -inf 49.4%
if -1.60000000000000006e-152 < B < 1.7e-124Initial program 53.4%
associate-*l/53.4%
*-lft-identity53.4%
+-commutative53.4%
unpow253.4%
unpow253.4%
hypot-def74.4%
Simplified74.4%
Taylor expanded in C around inf 28.5%
distribute-rgt1-in28.5%
metadata-eval28.5%
mul0-lft28.5%
metadata-eval28.5%
Simplified28.5%
if 1.7e-124 < B Initial program 51.3%
associate-*l/51.3%
*-lft-identity51.3%
+-commutative51.3%
unpow251.3%
unpow251.3%
hypot-def76.5%
Simplified76.5%
Taylor expanded in B around inf 51.7%
Final simplification43.9%
(FPCore (A B C) :precision binary64 (if (<= B -2e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.999999999999994e-310Initial program 55.5%
associate-*l/55.5%
*-lft-identity55.5%
+-commutative55.5%
unpow255.5%
unpow255.5%
hypot-def75.2%
Simplified75.2%
Taylor expanded in B around -inf 40.3%
if -1.999999999999994e-310 < B Initial program 50.2%
associate-*l/50.2%
*-lft-identity50.2%
+-commutative50.2%
unpow250.2%
unpow250.2%
hypot-def74.4%
Simplified74.4%
Taylor expanded in B around inf 37.7%
Final simplification39.1%
(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 53.0%
associate-*l/53.0%
*-lft-identity53.0%
+-commutative53.0%
unpow253.0%
unpow253.0%
hypot-def74.8%
Simplified74.8%
Taylor expanded in B around inf 18.6%
Final simplification18.6%
herbie shell --seed 2023240
(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)))