
(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 19 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 -7.5e+57) (* 180.0 (/ (atan (* 0.5 (/ B A))) PI)) (/ 180.0 (/ PI (atan (/ (- C (+ A (hypot B (- A C)))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.5e+57) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((C - (A + hypot(B, (A - C)))) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.5e+57) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.5e+57: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan(((C - (A + math.hypot(B, (A - C)))) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.5e+57) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.5e+57) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 / (pi / atan(((C - (A + hypot(B, (A - C)))) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.5e+57], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.5 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -7.5000000000000006e57Initial program 17.5%
associate-*l/17.5%
*-lft-identity17.5%
+-commutative17.5%
unpow217.5%
unpow217.5%
hypot-def48.2%
Simplified48.2%
Taylor expanded in A around -inf 78.4%
if -7.5000000000000006e57 < A Initial program 63.1%
associate-*l/63.1%
*-lft-identity63.1%
+-commutative63.1%
unpow263.1%
unpow263.1%
hypot-def84.8%
Simplified84.8%
clear-num84.8%
un-div-inv84.8%
associate--r+84.8%
Applied egg-rr84.8%
Final simplification83.3%
(FPCore (A B C) :precision binary64 (if (<= A -1.32e+60) (* 180.0 (/ (atan (* 0.5 (/ B A))) 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.32e+60) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((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.32e+60) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / 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.32e+60: tmp = 180.0 * (math.atan((0.5 * (B / A))) / 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.32e+60) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / 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 <= -1.32e+60) tmp = 180.0 * (atan((0.5 * (B / A))) / 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.32e+60], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $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 -1.32 \cdot 10^{+60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\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 < -1.32e60Initial program 17.5%
associate-*l/17.5%
*-lft-identity17.5%
+-commutative17.5%
unpow217.5%
unpow217.5%
hypot-def48.2%
Simplified48.2%
Taylor expanded in A around -inf 78.4%
if -1.32e60 < A Initial program 63.1%
associate-*l/63.1%
*-lft-identity63.1%
+-commutative63.1%
unpow263.1%
unpow263.1%
hypot-def84.8%
Simplified84.8%
Final simplification83.3%
(FPCore (A B C) :precision binary64 (if (<= A -7.4e+59) (* 180.0 (/ (atan (* 0.5 (/ B A))) PI)) (* (atan (/ (- C (+ A (hypot B (- A C)))) B)) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.4e+59) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = atan(((C - (A + hypot(B, (A - C)))) / B)) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.4e+59) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.4e+59: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.4e+59) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.4e+59) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = atan(((C - (A + hypot(B, (A - C)))) / B)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.4e+59], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.4 \cdot 10^{+59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if A < -7.39999999999999995e59Initial program 17.5%
associate-*l/17.5%
*-lft-identity17.5%
+-commutative17.5%
unpow217.5%
unpow217.5%
hypot-def48.2%
Simplified48.2%
Taylor expanded in A around -inf 78.4%
if -7.39999999999999995e59 < A Initial program 63.1%
associate-*r/63.0%
associate-*l/63.1%
associate-*l/63.1%
*-lft-identity63.1%
sub-neg63.1%
associate-+l-63.1%
sub-neg63.1%
remove-double-neg63.1%
+-commutative63.1%
unpow263.1%
unpow263.1%
hypot-def84.8%
Simplified84.8%
Final simplification83.3%
(FPCore (A B C)
:precision binary64
(if (<= A -5.5e+57)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 2e+61)
(* (/ 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 <= -5.5e+57) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 2e+61) {
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 <= -5.5e+57) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 2e+61) {
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 <= -5.5e+57: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 2e+61: 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 <= -5.5e+57) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 2e+61) tmp = Float64(Float64(180.0 / 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 <= -5.5e+57) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 2e+61) 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, -5.5e+57], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e+61], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $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 -5.5 \cdot 10^{+57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2 \cdot 10^{+61}:\\
\;\;\;\;\frac{180}{\pi} \cdot \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 < -5.5000000000000002e57Initial program 17.5%
associate-*l/17.5%
*-lft-identity17.5%
+-commutative17.5%
unpow217.5%
unpow217.5%
hypot-def48.2%
Simplified48.2%
Taylor expanded in A around -inf 78.4%
if -5.5000000000000002e57 < A < 1.9999999999999999e61Initial program 55.2%
associate-*r/55.1%
associate-*l/55.2%
associate-*l/55.2%
*-lft-identity55.2%
sub-neg55.2%
associate-+l-55.2%
sub-neg55.2%
remove-double-neg55.2%
+-commutative55.2%
unpow255.2%
unpow255.2%
hypot-def80.1%
Simplified80.1%
Taylor expanded in A around 0 51.7%
unpow251.7%
unpow251.7%
hypot-def76.5%
Simplified76.5%
if 1.9999999999999999e61 < A Initial program 88.4%
associate-*l/88.4%
*-lft-identity88.4%
+-commutative88.4%
unpow288.4%
unpow288.4%
hypot-def99.9%
Simplified99.9%
Taylor expanded in C around 0 88.4%
mul-1-neg88.4%
+-commutative88.4%
unpow288.4%
unpow288.4%
hypot-def94.1%
Simplified94.1%
Final simplification80.1%
(FPCore (A B C)
:precision binary64
(if (<= A -1.05e+59)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 4e+51)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e+59) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 4e+51) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.05e+59) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 4e+51) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.05e+59: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 4e+51: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.05e+59) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 4e+51) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.05e+59) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 4e+51) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.05e+59], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4e+51], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.05 \cdot 10^{+59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4 \cdot 10^{+51}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.04999999999999992e59Initial program 17.5%
associate-*l/17.5%
*-lft-identity17.5%
+-commutative17.5%
unpow217.5%
unpow217.5%
hypot-def48.2%
Simplified48.2%
Taylor expanded in A around -inf 78.4%
if -1.04999999999999992e59 < A < 4e51Initial program 54.6%
associate-*r/54.5%
associate-*l/54.6%
associate-*l/54.6%
*-lft-identity54.6%
sub-neg54.6%
associate-+l-54.6%
sub-neg54.6%
remove-double-neg54.6%
+-commutative54.6%
unpow254.6%
unpow254.6%
hypot-def79.8%
Simplified79.8%
Taylor expanded in A around 0 51.1%
unpow251.1%
unpow251.1%
hypot-def76.2%
Simplified76.2%
if 4e51 < A Initial program 88.9%
associate-*l/88.9%
*-lft-identity88.9%
+-commutative88.9%
unpow288.9%
unpow288.9%
hypot-def99.9%
Simplified99.9%
Taylor expanded in B around -inf 90.9%
Final simplification79.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.7e+44)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -8.2e-32)
(* 180.0 (/ (atan 1.0) PI))
(if (or (<= A -8.6e-108) (and (not (<= A -9.2e-225)) (<= A 3e+62)))
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e+44) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -8.2e-32) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if ((A <= -8.6e-108) || (!(A <= -9.2e-225) && (A <= 3e+62))) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e+44) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -8.2e-32) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if ((A <= -8.6e-108) || (!(A <= -9.2e-225) && (A <= 3e+62))) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.7e+44: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -8.2e-32: tmp = 180.0 * (math.atan(1.0) / math.pi) elif (A <= -8.6e-108) or (not (A <= -9.2e-225) and (A <= 3e+62)): tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.7e+44) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -8.2e-32) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif ((A <= -8.6e-108) || (!(A <= -9.2e-225) && (A <= 3e+62))) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.7e+44) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -8.2e-32) tmp = 180.0 * (atan(1.0) / pi); elseif ((A <= -8.6e-108) || (~((A <= -9.2e-225)) && (A <= 3e+62))) tmp = 180.0 * (atan(((C - B) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.7e+44], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.2e-32], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -8.6e-108], And[N[Not[LessEqual[A, -9.2e-225]], $MachinePrecision], LessEqual[A, 3e+62]]], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.7 \cdot 10^{+44}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8.2 \cdot 10^{-32}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq -8.6 \cdot 10^{-108} \lor \neg \left(A \leq -9.2 \cdot 10^{-225}\right) \land A \leq 3 \cdot 10^{+62}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.7e44Initial program 20.0%
associate-*l/20.0%
*-lft-identity20.0%
+-commutative20.0%
unpow220.0%
unpow220.0%
hypot-def49.2%
Simplified49.2%
Taylor expanded in A around -inf 77.3%
if -1.7e44 < A < -8.1999999999999995e-32Initial program 62.1%
associate-*l/62.1%
*-lft-identity62.1%
+-commutative62.1%
unpow262.1%
unpow262.1%
hypot-def79.6%
Simplified79.6%
Taylor expanded in B around -inf 50.9%
if -8.1999999999999995e-32 < A < -8.6000000000000001e-108 or -9.1999999999999995e-225 < A < 3e62Initial program 54.1%
associate-*l/54.1%
*-lft-identity54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-def79.7%
Simplified79.7%
Taylor expanded in B around inf 52.3%
neg-mul-152.3%
unsub-neg52.3%
Simplified52.3%
Taylor expanded in A around 0 48.2%
if -8.6000000000000001e-108 < A < -9.1999999999999995e-225 or 3e62 < A Initial program 75.7%
associate-*l/75.7%
*-lft-identity75.7%
+-commutative75.7%
unpow275.7%
unpow275.7%
hypot-def93.6%
Simplified93.6%
Taylor expanded in C around 0 72.6%
mul-1-neg72.6%
unpow272.6%
unpow272.6%
Simplified72.6%
Taylor expanded in B around -inf 75.0%
mul-1-neg75.0%
unsub-neg75.0%
Simplified75.0%
Final simplification63.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))))
(if (<= A -6e+55)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -5e-274)
t_0
(if (<= A 9.4e-98)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= A 1.2e-62) (/ 180.0 (/ PI (atan (* -0.5 (/ B C))))) t_0))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
double tmp;
if (A <= -6e+55) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -5e-274) {
tmp = t_0;
} else if (A <= 9.4e-98) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (A <= 1.2e-62) {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
double tmp;
if (A <= -6e+55) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -5e-274) {
tmp = t_0;
} else if (A <= 9.4e-98) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (A <= 1.2e-62) {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) tmp = 0 if A <= -6e+55: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -5e-274: tmp = t_0 elif A <= 9.4e-98: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif A <= 1.2e-62: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)) tmp = 0.0 if (A <= -6e+55) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -5e-274) tmp = t_0; elseif (A <= 9.4e-98) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (A <= 1.2e-62) tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((((B + C) - A) / B)) / pi); tmp = 0.0; if (A <= -6e+55) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -5e-274) tmp = t_0; elseif (A <= 9.4e-98) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (A <= 1.2e-62) tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); else tmp = t_0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -6e+55], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5e-274], t$95$0, If[LessEqual[A, 9.4e-98], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.2e-62], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -6 \cdot 10^{+55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5 \cdot 10^{-274}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 9.4 \cdot 10^{-98}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{-62}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if A < -6.00000000000000033e55Initial program 17.5%
associate-*l/17.5%
*-lft-identity17.5%
+-commutative17.5%
unpow217.5%
unpow217.5%
hypot-def48.2%
Simplified48.2%
Taylor expanded in A around -inf 78.4%
if -6.00000000000000033e55 < A < -5e-274 or 1.19999999999999992e-62 < A Initial program 66.3%
associate-*l/66.3%
*-lft-identity66.3%
+-commutative66.3%
unpow266.3%
unpow266.3%
hypot-def87.2%
Simplified87.2%
Taylor expanded in B around -inf 69.3%
if -5e-274 < A < 9.40000000000000011e-98Initial program 59.7%
associate-*l/59.7%
*-lft-identity59.7%
+-commutative59.7%
unpow259.7%
unpow259.7%
hypot-def85.0%
Simplified85.0%
Taylor expanded in B around inf 55.8%
neg-mul-155.8%
unsub-neg55.8%
Simplified55.8%
Taylor expanded in A around 0 53.2%
if 9.40000000000000011e-98 < A < 1.19999999999999992e-62Initial program 27.3%
associate-*l/27.3%
*-lft-identity27.3%
+-commutative27.3%
unpow227.3%
unpow227.3%
hypot-def41.5%
Simplified41.5%
clear-num41.5%
un-div-inv41.5%
associate--r+41.5%
Applied egg-rr41.5%
Taylor expanded in C around inf 41.0%
fma-def41.0%
*-commutative41.0%
associate--l+53.2%
unpow253.2%
fma-def53.2%
unpow253.2%
unpow253.2%
difference-of-squares53.2%
distribute-rgt1-in53.2%
metadata-eval53.2%
mul0-lft53.2%
mul-1-neg53.2%
associate-*r/53.2%
Simplified53.2%
Taylor expanded in B around 0 75.9%
Final simplification68.5%
(FPCore (A B C)
:precision binary64
(if (<= B -8e-53)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6e-191)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 3.05e-242)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.1e+34)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8e-53) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6e-191) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 3.05e-242) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.1e+34) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8e-53) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6e-191) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 3.05e-242) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.1e+34) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8e-53: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6e-191: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 3.05e-242: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.1e+34: tmp = 180.0 * (math.atan((-A / 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 <= -8e-53) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6e-191) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 3.05e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.1e+34) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8e-53) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6e-191) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 3.05e-242) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.1e+34) tmp = 180.0 * (atan((-A / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8e-53], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6e-191], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.05e-242], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e+34], N[(180.0 * N[(N[ArcTan[N[((-A) / 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 -8 \cdot 10^{-53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6 \cdot 10^{-191}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.05 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{+34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.00000000000000025e-53Initial program 53.5%
associate-*l/53.5%
*-lft-identity53.5%
+-commutative53.5%
unpow253.5%
unpow253.5%
hypot-def78.3%
Simplified78.3%
Taylor expanded in B around -inf 59.4%
if -8.00000000000000025e-53 < B < -6.0000000000000001e-191Initial program 53.2%
associate-*l/53.2%
*-lft-identity53.2%
+-commutative53.2%
unpow253.2%
unpow253.2%
hypot-def62.4%
Simplified62.4%
Taylor expanded in B around inf 38.5%
neg-mul-138.5%
unsub-neg38.5%
Simplified38.5%
Taylor expanded in C around inf 39.5%
if -6.0000000000000001e-191 < B < 3.04999999999999982e-242Initial program 47.9%
associate-*l/47.9%
*-lft-identity47.9%
+-commutative47.9%
unpow247.9%
unpow247.9%
hypot-def89.8%
Simplified89.8%
Taylor expanded in C around inf 58.3%
distribute-rgt1-in58.3%
metadata-eval58.3%
mul0-lft58.3%
metadata-eval58.3%
Simplified58.3%
if 3.04999999999999982e-242 < B < 2.10000000000000017e34Initial program 56.1%
associate-*l/56.1%
*-lft-identity56.1%
+-commutative56.1%
unpow256.1%
unpow256.1%
hypot-def69.3%
Simplified69.3%
Taylor expanded in B around inf 53.3%
neg-mul-153.3%
unsub-neg53.3%
Simplified53.3%
Taylor expanded in A around inf 38.5%
associate-*r/38.5%
mul-1-neg38.5%
Simplified38.5%
if 2.10000000000000017e34 < B Initial program 51.2%
associate-*l/51.2%
*-lft-identity51.2%
+-commutative51.2%
unpow251.2%
unpow251.2%
hypot-def79.7%
Simplified79.7%
Taylor expanded in B around inf 65.4%
Final simplification53.6%
(FPCore (A B C)
:precision binary64
(if (<= C -9e-27)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 1.1e-74)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= C 4.45e+77)
(* 180.0 (/ (atan (/ (- (- A) B) B)) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C)))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -9e-27) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 1.1e-74) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 4.45e+77) {
tmp = 180.0 * (atan(((-A - B) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -9e-27) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 1.1e-74) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (C <= 4.45e+77) {
tmp = 180.0 * (Math.atan(((-A - B) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -9e-27: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 1.1e-74: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif C <= 4.45e+77: tmp = 180.0 * (math.atan(((-A - B) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -9e-27) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 1.1e-74) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (C <= 4.45e+77) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - B) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -9e-27) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 1.1e-74) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (C <= 4.45e+77) tmp = 180.0 * (atan(((-A - B) / B)) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -9e-27], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.1e-74], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.45e+77], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -9 \cdot 10^{-27}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.1 \cdot 10^{-74}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.45 \cdot 10^{+77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -9.0000000000000003e-27Initial program 70.8%
associate-*l/70.8%
*-lft-identity70.8%
+-commutative70.8%
unpow270.8%
unpow270.8%
hypot-def89.0%
Simplified89.0%
Taylor expanded in B around inf 71.5%
neg-mul-171.5%
unsub-neg71.5%
Simplified71.5%
Taylor expanded in A around 0 71.3%
if -9.0000000000000003e-27 < C < 1.10000000000000005e-74Initial program 61.9%
associate-*l/61.9%
*-lft-identity61.9%
+-commutative61.9%
unpow261.9%
unpow261.9%
hypot-def81.2%
Simplified81.2%
Taylor expanded in C around 0 59.5%
mul-1-neg59.5%
unpow259.5%
unpow259.5%
Simplified59.5%
Taylor expanded in B around -inf 58.0%
mul-1-neg58.0%
unsub-neg58.0%
Simplified58.0%
if 1.10000000000000005e-74 < C < 4.4499999999999999e77Initial program 35.5%
associate-*l/35.5%
*-lft-identity35.5%
+-commutative35.5%
unpow235.5%
unpow235.5%
hypot-def71.6%
Simplified71.6%
Taylor expanded in C around 0 35.6%
mul-1-neg35.6%
unpow235.6%
unpow235.6%
Simplified35.6%
Taylor expanded in A around 0 51.2%
if 4.4499999999999999e77 < C Initial program 18.4%
associate-*l/18.4%
*-lft-identity18.4%
+-commutative18.4%
unpow218.4%
unpow218.4%
hypot-def52.3%
Simplified52.3%
clear-num52.3%
un-div-inv52.3%
associate--r+48.3%
Applied egg-rr48.3%
Taylor expanded in C around inf 47.4%
fma-def47.4%
*-commutative47.4%
associate--l+56.9%
unpow256.9%
fma-def56.9%
unpow256.9%
unpow256.9%
difference-of-squares65.6%
distribute-rgt1-in65.6%
metadata-eval65.6%
mul0-lft65.6%
mul-1-neg65.6%
associate-*r/65.6%
Simplified65.6%
Taylor expanded in B around 0 81.8%
Final simplification65.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -5e-61)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.8e-187)
t_0
(if (<= B 2.9e-242)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 6e+28) 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 <= -5e-61) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.8e-187) {
tmp = t_0;
} else if (B <= 2.9e-242) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 6e+28) {
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 <= -5e-61) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.8e-187) {
tmp = t_0;
} else if (B <= 2.9e-242) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 6e+28) {
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 <= -5e-61: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.8e-187: tmp = t_0 elif B <= 2.9e-242: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 6e+28: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -5e-61) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.8e-187) tmp = t_0; elseif (B <= 2.9e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 6e+28) 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 <= -5e-61) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.8e-187) tmp = t_0; elseif (B <= 2.9e-242) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 6e+28) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5e-61], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.8e-187], t$95$0, If[LessEqual[B, 2.9e-242], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e+28], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -5 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.8 \cdot 10^{-187}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.9 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.9999999999999999e-61Initial program 53.5%
associate-*l/53.5%
*-lft-identity53.5%
+-commutative53.5%
unpow253.5%
unpow253.5%
hypot-def78.3%
Simplified78.3%
Taylor expanded in B around -inf 59.4%
if -4.9999999999999999e-61 < B < -3.80000000000000025e-187 or 2.9000000000000001e-242 < B < 6.0000000000000002e28Initial program 54.7%
associate-*l/54.7%
*-lft-identity54.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-def67.1%
Simplified67.1%
Taylor expanded in B around inf 48.0%
neg-mul-148.0%
unsub-neg48.0%
Simplified48.0%
Taylor expanded in C around inf 32.9%
if -3.80000000000000025e-187 < B < 2.9000000000000001e-242Initial program 47.9%
associate-*l/47.9%
*-lft-identity47.9%
+-commutative47.9%
unpow247.9%
unpow247.9%
hypot-def89.8%
Simplified89.8%
Taylor expanded in C around inf 58.3%
distribute-rgt1-in58.3%
metadata-eval58.3%
mul0-lft58.3%
metadata-eval58.3%
Simplified58.3%
if 6.0000000000000002e28 < B Initial program 52.1%
associate-*l/52.1%
*-lft-identity52.1%
+-commutative52.1%
unpow252.1%
unpow252.1%
hypot-def79.1%
Simplified79.1%
Taylor expanded in B around inf 62.9%
Final simplification51.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ C B))))
(if (<= B -3.6e-48)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.4e-190)
(* 180.0 (/ t_0 PI))
(if (<= B 3.1e-242)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 6e+28)
(/ 180.0 (/ PI t_0))
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan((C / B));
double tmp;
if (B <= -3.6e-48) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.4e-190) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (B <= 3.1e-242) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 6e+28) {
tmp = 180.0 / (((double) M_PI) / 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 = Math.atan((C / B));
double tmp;
if (B <= -3.6e-48) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.4e-190) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (B <= 3.1e-242) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 6e+28) {
tmp = 180.0 / (Math.PI / t_0);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((C / B)) tmp = 0 if B <= -3.6e-48: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.4e-190: tmp = 180.0 * (t_0 / math.pi) elif B <= 3.1e-242: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 6e+28: tmp = 180.0 / (math.pi / t_0) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(C / B)) tmp = 0.0 if (B <= -3.6e-48) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.4e-190) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (B <= 3.1e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 6e+28) tmp = Float64(180.0 / Float64(pi / 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 = atan((C / B)); tmp = 0.0; if (B <= -3.6e-48) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.4e-190) tmp = 180.0 * (t_0 / pi); elseif (B <= 3.1e-242) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 6e+28) tmp = 180.0 / (pi / t_0); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, -3.6e-48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.4e-190], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-242], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6e+28], N[(180.0 / N[(Pi / t$95$0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;B \leq -3.6 \cdot 10^{-48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.4 \cdot 10^{-190}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{+28}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t_0}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.6000000000000002e-48Initial program 53.5%
associate-*l/53.5%
*-lft-identity53.5%
+-commutative53.5%
unpow253.5%
unpow253.5%
hypot-def78.3%
Simplified78.3%
Taylor expanded in B around -inf 59.4%
if -3.6000000000000002e-48 < B < -1.40000000000000003e-190Initial program 53.2%
associate-*l/53.2%
*-lft-identity53.2%
+-commutative53.2%
unpow253.2%
unpow253.2%
hypot-def62.4%
Simplified62.4%
Taylor expanded in B around inf 38.5%
neg-mul-138.5%
unsub-neg38.5%
Simplified38.5%
Taylor expanded in C around inf 39.5%
if -1.40000000000000003e-190 < B < 3.10000000000000015e-242Initial program 47.9%
associate-*l/47.9%
*-lft-identity47.9%
+-commutative47.9%
unpow247.9%
unpow247.9%
hypot-def89.8%
Simplified89.8%
Taylor expanded in C around inf 58.3%
distribute-rgt1-in58.3%
metadata-eval58.3%
mul0-lft58.3%
metadata-eval58.3%
Simplified58.3%
if 3.10000000000000015e-242 < B < 6.0000000000000002e28Initial program 55.4%
associate-*l/55.4%
*-lft-identity55.4%
+-commutative55.4%
unpow255.4%
unpow255.4%
hypot-def69.4%
Simplified69.4%
Taylor expanded in B around inf 52.5%
neg-mul-152.5%
unsub-neg52.5%
Simplified52.5%
Taylor expanded in C around inf 29.7%
associate-*r/29.7%
Applied egg-rr29.7%
associate-/l*29.7%
Simplified29.7%
if 6.0000000000000002e28 < B Initial program 52.1%
associate-*l/52.1%
*-lft-identity52.1%
+-commutative52.1%
unpow252.1%
unpow252.1%
hypot-def79.1%
Simplified79.1%
Taylor expanded in B around inf 62.9%
Final simplification51.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.65e+44)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -8.5e-272)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 2.7e-182)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.65e+44) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -8.5e-272) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 2.7e-182) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.65e+44) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -8.5e-272) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 2.7e-182) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.65e+44: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -8.5e-272: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 2.7e-182: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.65e+44) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -8.5e-272) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 2.7e-182) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.65e+44) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -8.5e-272) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 2.7e-182) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.65e+44], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.5e-272], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.7e-182], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.65 \cdot 10^{+44}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8.5 \cdot 10^{-272}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 2.7 \cdot 10^{-182}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.65000000000000007e44Initial program 20.0%
associate-*l/20.0%
*-lft-identity20.0%
+-commutative20.0%
unpow220.0%
unpow220.0%
hypot-def49.2%
Simplified49.2%
Taylor expanded in A around -inf 77.3%
if -1.65000000000000007e44 < A < -8.5000000000000001e-272Initial program 46.9%
associate-*l/46.9%
*-lft-identity46.9%
+-commutative46.9%
unpow246.9%
unpow246.9%
hypot-def77.2%
Simplified77.2%
Taylor expanded in B around -inf 39.2%
if -8.5000000000000001e-272 < A < 2.69999999999999999e-182Initial program 51.9%
associate-*l/51.9%
*-lft-identity51.9%
+-commutative51.9%
unpow251.9%
unpow251.9%
hypot-def80.0%
Simplified80.0%
Taylor expanded in B around inf 45.6%
if 2.69999999999999999e-182 < A Initial program 79.2%
associate-*l/79.2%
*-lft-identity79.2%
+-commutative79.2%
unpow279.2%
unpow279.2%
hypot-def92.8%
Simplified92.8%
Taylor expanded in C around 0 72.5%
mul-1-neg72.5%
unpow272.5%
unpow272.5%
Simplified72.5%
Taylor expanded in B around -inf 66.5%
mul-1-neg66.5%
unsub-neg66.5%
Simplified66.5%
Final simplification58.9%
(FPCore (A B C)
:precision binary64
(if (<= C -9.8e-26)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C 1.9e-69)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= C 2.8e+31)
(* 180.0 (/ (atan -1.0) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C)))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -9.8e-26) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= 1.9e-69) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (C <= 2.8e+31) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -9.8e-26) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= 1.9e-69) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (C <= 2.8e+31) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -9.8e-26: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= 1.9e-69: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif C <= 2.8e+31: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -9.8e-26) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= 1.9e-69) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (C <= 2.8e+31) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -9.8e-26) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= 1.9e-69) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (C <= 2.8e+31) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -9.8e-26], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.9e-69], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.8e+31], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -9.8 \cdot 10^{-26}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.9 \cdot 10^{-69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.8 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -9.7999999999999998e-26Initial program 70.8%
associate-*l/70.8%
*-lft-identity70.8%
+-commutative70.8%
unpow270.8%
unpow270.8%
hypot-def89.0%
Simplified89.0%
Taylor expanded in B around inf 71.5%
neg-mul-171.5%
unsub-neg71.5%
Simplified71.5%
Taylor expanded in A around 0 71.3%
if -9.7999999999999998e-26 < C < 1.8999999999999999e-69Initial program 62.3%
associate-*l/62.3%
*-lft-identity62.3%
+-commutative62.3%
unpow262.3%
unpow262.3%
hypot-def81.3%
Simplified81.3%
Taylor expanded in C around 0 59.8%
mul-1-neg59.8%
unpow259.8%
unpow259.8%
Simplified59.8%
Taylor expanded in B around -inf 58.3%
mul-1-neg58.3%
unsub-neg58.3%
Simplified58.3%
if 1.8999999999999999e-69 < C < 2.80000000000000017e31Initial program 32.0%
associate-*l/32.0%
*-lft-identity32.0%
+-commutative32.0%
unpow232.0%
unpow232.0%
hypot-def80.0%
Simplified80.0%
Taylor expanded in B around inf 53.9%
if 2.80000000000000017e31 < C Initial program 21.3%
associate-*l/21.3%
*-lft-identity21.3%
+-commutative21.3%
unpow221.3%
unpow221.3%
hypot-def52.3%
Simplified52.3%
clear-num52.4%
un-div-inv52.4%
associate--r+48.8%
Applied egg-rr48.8%
Taylor expanded in C around inf 42.6%
fma-def42.6%
*-commutative42.6%
associate--l+50.6%
unpow250.6%
fma-def50.6%
unpow250.6%
unpow250.6%
difference-of-squares59.7%
distribute-rgt1-in59.7%
metadata-eval59.7%
mul0-lft59.7%
mul-1-neg59.7%
associate-*r/59.7%
Simplified59.7%
Taylor expanded in B around 0 74.3%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(if (<= B -6.8e-193)
(* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))
(if (<= B 2.7e-242)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- (- C B) A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-193) {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
} else if (B <= 2.7e-242) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-193) {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
} else if (B <= 2.7e-242) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.8e-193: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) elif B <= 2.7e-242: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.8e-193) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); elseif (B <= 2.7e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.8e-193) tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); elseif (B <= 2.7e-242) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan((((C - B) - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.8e-193], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-242], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.8 \cdot 10^{-193}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.8000000000000004e-193Initial program 53.9%
associate-*l/53.9%
*-lft-identity53.9%
+-commutative53.9%
unpow253.9%
unpow253.9%
hypot-def74.4%
Simplified74.4%
Taylor expanded in B around -inf 70.6%
if -6.8000000000000004e-193 < B < 2.7e-242Initial program 46.4%
associate-*l/46.4%
*-lft-identity46.4%
+-commutative46.4%
unpow246.4%
unpow246.4%
hypot-def89.5%
Simplified89.5%
Taylor expanded in C around inf 59.9%
distribute-rgt1-in59.9%
metadata-eval59.9%
mul0-lft59.9%
metadata-eval59.9%
Simplified59.9%
if 2.7e-242 < B Initial program 53.7%
associate-*l/53.7%
*-lft-identity53.7%
+-commutative53.7%
unpow253.7%
unpow253.7%
hypot-def74.4%
Simplified74.4%
Taylor expanded in B around inf 65.4%
neg-mul-165.4%
unsub-neg65.4%
Simplified65.4%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(if (<= B -5.6e-192)
(* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))
(if (<= B 2.3e-242)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.6e-192) {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
} else if (B <= 2.3e-242) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.6e-192) {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
} else if (B <= 2.3e-242) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.6e-192: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) elif B <= 2.3e-242: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.6e-192) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); elseif (B <= 2.3e-242) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.6e-192) tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); elseif (B <= 2.3e-242) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.6e-192], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.3e-242], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.6 \cdot 10^{-192}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -5.60000000000000007e-192Initial program 53.9%
associate-*l/53.9%
*-lft-identity53.9%
+-commutative53.9%
unpow253.9%
unpow253.9%
hypot-def74.4%
Simplified74.4%
Taylor expanded in B around -inf 70.6%
if -5.60000000000000007e-192 < B < 2.29999999999999985e-242Initial program 46.4%
associate-*l/46.4%
*-lft-identity46.4%
+-commutative46.4%
unpow246.4%
unpow246.4%
hypot-def89.5%
Simplified89.5%
Taylor expanded in C around inf 59.9%
distribute-rgt1-in59.9%
metadata-eval59.9%
mul0-lft59.9%
metadata-eval59.9%
Simplified59.9%
if 2.29999999999999985e-242 < B Initial program 53.7%
associate-*l/53.7%
*-lft-identity53.7%
+-commutative53.7%
unpow253.7%
unpow253.7%
hypot-def74.4%
Simplified74.4%
clear-num74.4%
un-div-inv74.4%
associate--r+72.5%
Applied egg-rr72.5%
Taylor expanded in B around inf 65.4%
mul-1-neg65.4%
unsub-neg65.4%
Simplified65.4%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.55e+44)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.6e-271)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 1.75e-112)
(* 180.0 (/ (atan -1.0) PI))
(/ 180.0 (/ PI (atan (/ (- A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e+44) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.6e-271) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 1.75e-112) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e+44) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.6e-271) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 1.75e-112) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.55e+44: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.6e-271: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 1.75e-112: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.55e+44) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.6e-271) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 1.75e-112) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(-A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.55e+44) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.6e-271) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 1.75e-112) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 / (pi / atan((-A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.55e+44], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.6e-271], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.75e-112], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.55 \cdot 10^{+44}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.6 \cdot 10^{-271}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 1.75 \cdot 10^{-112}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{-A}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.54999999999999998e44Initial program 20.0%
associate-*l/20.0%
*-lft-identity20.0%
+-commutative20.0%
unpow220.0%
unpow220.0%
hypot-def49.2%
Simplified49.2%
Taylor expanded in A around -inf 77.3%
if -1.54999999999999998e44 < A < -1.59999999999999989e-271Initial program 46.9%
associate-*l/46.9%
*-lft-identity46.9%
+-commutative46.9%
unpow246.9%
unpow246.9%
hypot-def77.2%
Simplified77.2%
Taylor expanded in B around -inf 39.2%
if -1.59999999999999989e-271 < A < 1.74999999999999997e-112Initial program 57.1%
associate-*l/57.1%
*-lft-identity57.1%
+-commutative57.1%
unpow257.1%
unpow257.1%
hypot-def84.0%
Simplified84.0%
Taylor expanded in B around inf 42.9%
if 1.74999999999999997e-112 < A Initial program 81.1%
associate-*l/81.1%
*-lft-identity81.1%
+-commutative81.1%
unpow281.1%
unpow281.1%
hypot-def92.8%
Simplified92.8%
clear-num92.8%
un-div-inv92.8%
associate--r+92.8%
Applied egg-rr92.8%
Taylor expanded in B around inf 75.6%
mul-1-neg75.6%
unsub-neg75.6%
Simplified75.6%
Taylor expanded in A around inf 62.5%
associate-*r/62.5%
mul-1-neg62.5%
Simplified62.5%
Final simplification56.0%
(FPCore (A B C)
:precision binary64
(if (<= B -2.5e-191)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.6e-94)
(* 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.5e-191) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.6e-94) {
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.5e-191) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.6e-94) {
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.5e-191: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.6e-94: 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.5e-191) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.6e-94) 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.5e-191) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.6e-94) 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.5e-191], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.6e-94], 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.5 \cdot 10^{-191}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{-94}:\\
\;\;\;\;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.5e-191Initial program 53.9%
associate-*l/53.9%
*-lft-identity53.9%
+-commutative53.9%
unpow253.9%
unpow253.9%
hypot-def74.4%
Simplified74.4%
Taylor expanded in B around -inf 49.4%
if -2.5e-191 < B < 2.59999999999999994e-94Initial program 53.4%
associate-*l/53.4%
*-lft-identity53.4%
+-commutative53.4%
unpow253.4%
unpow253.4%
hypot-def87.3%
Simplified87.3%
Taylor expanded in C around inf 43.9%
distribute-rgt1-in43.9%
metadata-eval43.9%
mul0-lft43.9%
metadata-eval43.9%
Simplified43.9%
if 2.59999999999999994e-94 < B Initial program 50.9%
associate-*l/50.9%
*-lft-identity50.9%
+-commutative50.9%
unpow250.9%
unpow250.9%
hypot-def70.7%
Simplified70.7%
Taylor expanded in B around inf 48.2%
Final simplification47.5%
(FPCore (A B C) :precision binary64 (if (<= B -2.7e-281) (* 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.7e-281) {
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.7e-281) {
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.7e-281: 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.7e-281) 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.7e-281) 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.7e-281], 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.7 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.6999999999999999e-281Initial program 52.4%
associate-*l/52.4%
*-lft-identity52.4%
+-commutative52.4%
unpow252.4%
unpow252.4%
hypot-def74.8%
Simplified74.8%
Taylor expanded in B around -inf 43.5%
if -2.6999999999999999e-281 < B Initial program 53.1%
associate-*l/53.1%
*-lft-identity53.1%
+-commutative53.1%
unpow253.1%
unpow253.1%
hypot-def78.0%
Simplified78.0%
Taylor expanded in B around inf 35.2%
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 52.7%
associate-*l/52.7%
*-lft-identity52.7%
+-commutative52.7%
unpow252.7%
unpow252.7%
hypot-def76.5%
Simplified76.5%
Taylor expanded in B around inf 19.6%
Final simplification19.6%
herbie shell --seed 2023181
(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)))