
(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 -2.7e+143) (* (/ 1.0 PI) (* 180.0 (atan (* 0.5 (/ B A))))) (/ 1.0 (/ PI (* 180.0 (atan (/ (- (- C A) (hypot B (- A C))) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e+143) {
tmp = (1.0 / ((double) M_PI)) * (180.0 * atan((0.5 * (B / A))));
} else {
tmp = 1.0 / (((double) M_PI) / (180.0 * atan((((C - A) - hypot(B, (A - C))) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.7e+143) {
tmp = (1.0 / Math.PI) * (180.0 * Math.atan((0.5 * (B / A))));
} else {
tmp = 1.0 / (Math.PI / (180.0 * Math.atan((((C - A) - Math.hypot(B, (A - C))) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.7e+143: tmp = (1.0 / math.pi) * (180.0 * math.atan((0.5 * (B / A)))) else: tmp = 1.0 / (math.pi / (180.0 * math.atan((((C - A) - math.hypot(B, (A - C))) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.7e+143) tmp = Float64(Float64(1.0 / pi) * Float64(180.0 * atan(Float64(0.5 * Float64(B / A))))); else tmp = Float64(1.0 / Float64(pi / Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.7e+143) tmp = (1.0 / pi) * (180.0 * atan((0.5 * (B / A)))); else tmp = 1.0 / (pi / (180.0 * atan((((C - A) - hypot(B, (A - C))) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.7e+143], N[(N[(1.0 / Pi), $MachinePrecision] * N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(Pi / N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.7 \cdot 10^{+143}:\\
\;\;\;\;\frac{1}{\pi} \cdot \left(180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\pi}{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.7000000000000002e143Initial program 10.1%
associate-*r/10.1%
Applied egg-rr69.2%
Taylor expanded in A around -inf 85.2%
associate-/r/85.8%
Applied egg-rr85.8%
if -2.7000000000000002e143 < A Initial program 63.6%
associate-*r/63.6%
Applied egg-rr84.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.6e+143)
(* (/ 1.0 PI) (* 180.0 (atan (* 0.5 (/ B A)))))
(if (<= A 1.3e-134)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(/ 1.0 (/ PI (* -180.0 (atan (/ (+ A (hypot B A)) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+143) {
tmp = (1.0 / ((double) M_PI)) * (180.0 * atan((0.5 * (B / A))));
} else if (A <= 1.3e-134) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else {
tmp = 1.0 / (((double) M_PI) / (-180.0 * atan(((A + hypot(B, A)) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+143) {
tmp = (1.0 / Math.PI) * (180.0 * Math.atan((0.5 * (B / A))));
} else if (A <= 1.3e-134) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else {
tmp = 1.0 / (Math.PI / (-180.0 * Math.atan(((A + Math.hypot(B, A)) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.6e+143: tmp = (1.0 / math.pi) * (180.0 * math.atan((0.5 * (B / A)))) elif A <= 1.3e-134: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi else: tmp = 1.0 / (math.pi / (-180.0 * math.atan(((A + math.hypot(B, A)) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.6e+143) tmp = Float64(Float64(1.0 / pi) * Float64(180.0 * atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 1.3e-134) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); else tmp = Float64(1.0 / Float64(pi / Float64(-180.0 * atan(Float64(Float64(A + hypot(B, A)) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.6e+143) tmp = (1.0 / pi) * (180.0 * atan((0.5 * (B / A)))); elseif (A <= 1.3e-134) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; else tmp = 1.0 / (pi / (-180.0 * atan(((A + hypot(B, A)) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.6e+143], N[(N[(1.0 / Pi), $MachinePrecision] * N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.3e-134], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(1.0 / N[(Pi / N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.6 \cdot 10^{+143}:\\
\;\;\;\;\frac{1}{\pi} \cdot \left(180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-134}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\pi}{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.60000000000000008e143Initial program 10.1%
associate-*r/10.1%
Applied egg-rr69.2%
Taylor expanded in A around -inf 85.2%
associate-/r/85.8%
Applied egg-rr85.8%
if -1.60000000000000008e143 < A < 1.30000000000000011e-134Initial program 56.8%
associate-*r/56.8%
Applied egg-rr77.2%
Taylor expanded in A around 0 54.5%
+-commutative54.5%
unpow254.5%
unpow254.5%
hypot-define74.5%
Simplified74.5%
Taylor expanded in C around 0 54.5%
+-commutative54.5%
unpow254.5%
unpow254.5%
hypot-undefine74.5%
associate-/l*74.5%
Simplified74.5%
if 1.30000000000000011e-134 < A Initial program 72.5%
associate-*r/72.5%
Applied egg-rr93.0%
Taylor expanded in C around 0 70.9%
mul-1-neg70.9%
distribute-neg-frac270.9%
unpow270.9%
unpow270.9%
hypot-define88.6%
Simplified88.6%
inv-pow88.6%
associate-/r*88.6%
distribute-frac-neg288.6%
atan-neg88.6%
Applied egg-rr88.6%
unpow-188.6%
associate-/l/88.6%
*-commutative88.6%
distribute-rgt-neg-out88.6%
distribute-lft-neg-in88.6%
metadata-eval88.6%
hypot-undefine70.9%
unpow270.9%
unpow270.9%
+-commutative70.9%
unpow270.9%
unpow270.9%
hypot-define88.6%
Simplified88.6%
(FPCore (A B C) :precision binary64 (if (<= A -3.7e+144) (* (/ 1.0 PI) (* 180.0 (atan (* 0.5 (/ B A))))) (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (hypot (- A C) B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.7e+144) {
tmp = (1.0 / ((double) M_PI)) * (180.0 * atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - hypot((A - C), B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.7e+144) {
tmp = (1.0 / Math.PI) * (180.0 * Math.atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.hypot((A - C), B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.7e+144: tmp = (1.0 / math.pi) * (180.0 * math.atan((0.5 * (B / A)))) else: tmp = 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.hypot((A - C), B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.7e+144) tmp = Float64(Float64(1.0 / pi) * Float64(180.0 * atan(Float64(0.5 * Float64(B / A))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - hypot(Float64(A - C), B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.7e+144) tmp = (1.0 / pi) * (180.0 * atan((0.5 * (B / A)))); else tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - hypot((A - C), B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.7e+144], N[(N[(1.0 / Pi), $MachinePrecision] * N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.7 \cdot 10^{+144}:\\
\;\;\;\;\frac{1}{\pi} \cdot \left(180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\right)\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.6999999999999997e144Initial program 10.1%
associate-*r/10.1%
Applied egg-rr69.2%
Taylor expanded in A around -inf 85.2%
associate-/r/85.8%
Applied egg-rr85.8%
if -3.6999999999999997e144 < A Initial program 63.6%
unpow263.6%
unpow263.6%
hypot-define84.0%
Applied egg-rr84.0%
(FPCore (A B C)
:precision binary64
(if (<= A -5.4e+143)
(* (/ 1.0 PI) (* 180.0 (atan (* 0.5 (/ B A)))))
(if (<= A 1.45e-134)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(/ (* -180.0 (atan (/ (+ A (hypot B A)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e+143) {
tmp = (1.0 / ((double) M_PI)) * (180.0 * atan((0.5 * (B / A))));
} else if (A <= 1.45e-134) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else {
tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e+143) {
tmp = (1.0 / Math.PI) * (180.0 * Math.atan((0.5 * (B / A))));
} else if (A <= 1.45e-134) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else {
tmp = (-180.0 * Math.atan(((A + Math.hypot(B, A)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.4e+143: tmp = (1.0 / math.pi) * (180.0 * math.atan((0.5 * (B / A)))) elif A <= 1.45e-134: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi else: tmp = (-180.0 * math.atan(((A + math.hypot(B, A)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.4e+143) tmp = Float64(Float64(1.0 / pi) * Float64(180.0 * atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 1.45e-134) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(B, A)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.4e+143) tmp = (1.0 / pi) * (180.0 * atan((0.5 * (B / A)))); elseif (A <= 1.45e-134) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; else tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.4e+143], N[(N[(1.0 / Pi), $MachinePrecision] * N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.45e-134], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.4 \cdot 10^{+143}:\\
\;\;\;\;\frac{1}{\pi} \cdot \left(180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{-134}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.4000000000000003e143Initial program 10.1%
associate-*r/10.1%
Applied egg-rr69.2%
Taylor expanded in A around -inf 85.2%
associate-/r/85.8%
Applied egg-rr85.8%
if -5.4000000000000003e143 < A < 1.44999999999999997e-134Initial program 56.8%
associate-*r/56.8%
Applied egg-rr77.2%
Taylor expanded in A around 0 54.5%
+-commutative54.5%
unpow254.5%
unpow254.5%
hypot-define74.5%
Simplified74.5%
Taylor expanded in C around 0 54.5%
+-commutative54.5%
unpow254.5%
unpow254.5%
hypot-undefine74.5%
associate-/l*74.5%
Simplified74.5%
if 1.44999999999999997e-134 < A Initial program 72.5%
associate-*r/72.5%
Applied egg-rr93.0%
Taylor expanded in C around 0 70.9%
mul-1-neg70.9%
distribute-neg-frac270.9%
unpow270.9%
unpow270.9%
hypot-define88.6%
Simplified88.6%
*-un-lft-identity88.6%
associate-/r/88.6%
distribute-frac-neg288.6%
atan-neg88.6%
Applied egg-rr88.6%
*-lft-identity88.6%
associate-*l/88.6%
*-lft-identity88.6%
distribute-rgt-neg-out88.6%
distribute-lft-neg-in88.6%
metadata-eval88.6%
hypot-undefine70.9%
unpow270.9%
unpow270.9%
+-commutative70.9%
unpow270.9%
unpow270.9%
hypot-define88.6%
Simplified88.6%
(FPCore (A B C)
:precision binary64
(if (<= A -3.45e+149)
(* (/ 1.0 PI) (* 180.0 (atan (* 0.5 (/ B A)))))
(if (<= A 1.06e-134)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ (* -180.0 (atan (/ (+ A (hypot B A)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.45e+149) {
tmp = (1.0 / ((double) M_PI)) * (180.0 * atan((0.5 * (B / A))));
} else if (A <= 1.06e-134) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.45e+149) {
tmp = (1.0 / Math.PI) * (180.0 * Math.atan((0.5 * (B / A))));
} else if (A <= 1.06e-134) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = (-180.0 * Math.atan(((A + Math.hypot(B, A)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.45e+149: tmp = (1.0 / math.pi) * (180.0 * math.atan((0.5 * (B / A)))) elif A <= 1.06e-134: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = (-180.0 * math.atan(((A + math.hypot(B, A)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.45e+149) tmp = Float64(Float64(1.0 / pi) * Float64(180.0 * atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 1.06e-134) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(B, A)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.45e+149) tmp = (1.0 / pi) * (180.0 * atan((0.5 * (B / A)))); elseif (A <= 1.06e-134) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.45e+149], N[(N[(1.0 / Pi), $MachinePrecision] * N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.06e-134], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.45 \cdot 10^{+149}:\\
\;\;\;\;\frac{1}{\pi} \cdot \left(180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\mathbf{elif}\;A \leq 1.06 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.4500000000000002e149Initial program 10.1%
associate-*r/10.1%
Applied egg-rr69.2%
Taylor expanded in A around -inf 85.2%
associate-/r/85.8%
Applied egg-rr85.8%
if -3.4500000000000002e149 < A < 1.06e-134Initial program 56.8%
Taylor expanded in A around 0 54.5%
+-commutative54.5%
unpow254.5%
unpow254.5%
hypot-define74.5%
Simplified74.5%
if 1.06e-134 < A Initial program 72.5%
associate-*r/72.5%
Applied egg-rr93.0%
Taylor expanded in C around 0 70.9%
mul-1-neg70.9%
distribute-neg-frac270.9%
unpow270.9%
unpow270.9%
hypot-define88.6%
Simplified88.6%
*-un-lft-identity88.6%
associate-/r/88.6%
distribute-frac-neg288.6%
atan-neg88.6%
Applied egg-rr88.6%
*-lft-identity88.6%
associate-*l/88.6%
*-lft-identity88.6%
distribute-rgt-neg-out88.6%
distribute-lft-neg-in88.6%
metadata-eval88.6%
hypot-undefine70.9%
unpow270.9%
unpow270.9%
+-commutative70.9%
unpow270.9%
unpow270.9%
hypot-define88.6%
Simplified88.6%
(FPCore (A B C)
:precision binary64
(if (<= A -6.4e+143)
(* (/ 1.0 PI) (* 180.0 (atan (* 0.5 (/ B A)))))
(if (<= A 4.8e+22)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ 180.0 (/ PI (atan (+ (/ (- C A) B) -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+143) {
tmp = (1.0 / ((double) M_PI)) * (180.0 * atan((0.5 * (B / A))));
} else if (A <= 4.8e+22) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) / B) + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+143) {
tmp = (1.0 / Math.PI) * (180.0 * Math.atan((0.5 * (B / A))));
} else if (A <= 4.8e+22) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) / B) + -1.0)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.4e+143: tmp = (1.0 / math.pi) * (180.0 * math.atan((0.5 * (B / A)))) elif A <= 4.8e+22: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - A) / B) + -1.0))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.4e+143) tmp = Float64(Float64(1.0 / pi) * Float64(180.0 * atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 4.8e+22) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) / B) + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.4e+143) tmp = (1.0 / pi) * (180.0 * atan((0.5 * (B / A)))); elseif (A <= 4.8e+22) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 / (pi / atan((((C - A) / B) + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.4e+143], N[(N[(1.0 / Pi), $MachinePrecision] * N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.8e+22], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.4 \cdot 10^{+143}:\\
\;\;\;\;\frac{1}{\pi} \cdot \left(180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\mathbf{elif}\;A \leq 4.8 \cdot 10^{+22}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}}\\
\end{array}
\end{array}
if A < -6.40000000000000033e143Initial program 10.1%
associate-*r/10.1%
Applied egg-rr69.2%
Taylor expanded in A around -inf 85.2%
associate-/r/85.8%
Applied egg-rr85.8%
if -6.40000000000000033e143 < A < 4.8e22Initial program 59.1%
Taylor expanded in A around 0 54.8%
+-commutative54.8%
unpow254.8%
unpow254.8%
hypot-define75.6%
Simplified75.6%
if 4.8e22 < A Initial program 78.1%
*-commutative78.1%
associate--l-78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-undefine96.3%
div-inv96.3%
clear-num96.3%
un-div-inv96.4%
Applied egg-rr96.4%
Taylor expanded in B around inf 76.2%
+-commutative76.2%
associate--r+76.2%
div-sub84.1%
Simplified84.1%
Final simplification78.8%
(FPCore (A B C) :precision binary64 (if (<= A -6e+143) (* (/ 1.0 PI) (* 180.0 (atan (* 0.5 (/ B A))))) (/ (* 180.0 (atan (/ (- (- C A) (hypot B (- A C))) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -6e+143) {
tmp = (1.0 / ((double) M_PI)) * (180.0 * atan((0.5 * (B / A))));
} 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 <= -6e+143) {
tmp = (1.0 / Math.PI) * (180.0 * Math.atan((0.5 * (B / A))));
} 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 <= -6e+143: tmp = (1.0 / math.pi) * (180.0 * math.atan((0.5 * (B / A)))) 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 <= -6e+143) tmp = Float64(Float64(1.0 / pi) * Float64(180.0 * atan(Float64(0.5 * Float64(B / A))))); else tmp = Float64(Float64(180.0 * 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 <= -6e+143) tmp = (1.0 / pi) * (180.0 * atan((0.5 * (B / A)))); 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, -6e+143], N[(N[(1.0 / Pi), $MachinePrecision] * N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6 \cdot 10^{+143}:\\
\;\;\;\;\frac{1}{\pi} \cdot \left(180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.0000000000000001e143Initial program 10.1%
associate-*r/10.1%
Applied egg-rr69.2%
Taylor expanded in A around -inf 85.2%
associate-/r/85.8%
Applied egg-rr85.8%
if -6.0000000000000001e143 < A Initial program 63.6%
associate-*r/63.6%
Applied egg-rr84.0%
(FPCore (A B C) :precision binary64 (if (<= A -9e+149) (* (/ 1.0 PI) (* 180.0 (atan (* 0.5 (/ B A))))) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9e+149) {
tmp = (1.0 / ((double) M_PI)) * (180.0 * atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9e+149) {
tmp = (1.0 / Math.PI) * (180.0 * Math.atan((0.5 * (B / A))));
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9e+149: tmp = (1.0 / math.pi) * (180.0 * math.atan((0.5 * (B / A)))) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9e+149) tmp = Float64(Float64(1.0 / pi) * Float64(180.0 * atan(Float64(0.5 * Float64(B / A))))); 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 <= -9e+149) tmp = (1.0 / pi) * (180.0 * atan((0.5 * (B / A)))); else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9e+149], N[(N[(1.0 / Pi), $MachinePrecision] * N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 -9 \cdot 10^{+149}:\\
\;\;\;\;\frac{1}{\pi} \cdot \left(180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\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 < -8.99999999999999965e149Initial program 10.1%
associate-*r/10.1%
Applied egg-rr69.2%
Taylor expanded in A around -inf 85.2%
associate-/r/85.8%
Applied egg-rr85.8%
if -8.99999999999999965e149 < A Initial program 63.6%
associate-*l/63.6%
*-lft-identity63.6%
+-commutative63.6%
unpow263.6%
unpow263.6%
hypot-define84.0%
Simplified84.0%
(FPCore (A B C) :precision binary64 (if (<= A -1.52e+143) (* (/ 1.0 PI) (* 180.0 (atan (* 0.5 (/ B A))))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.52e+143) {
tmp = (1.0 / ((double) M_PI)) * (180.0 * atan((0.5 * (B / A))));
} 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.52e+143) {
tmp = (1.0 / Math.PI) * (180.0 * Math.atan((0.5 * (B / A))));
} 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.52e+143: tmp = (1.0 / math.pi) * (180.0 * math.atan((0.5 * (B / A)))) 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.52e+143) tmp = Float64(Float64(1.0 / pi) * Float64(180.0 * atan(Float64(0.5 * Float64(B / A))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.52e+143) tmp = (1.0 / pi) * (180.0 * atan((0.5 * (B / A)))); 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.52e+143], N[(N[(1.0 / Pi), $MachinePrecision] * N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.52 \cdot 10^{+143}:\\
\;\;\;\;\frac{1}{\pi} \cdot \left(180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.51999999999999996e143Initial program 10.1%
associate-*r/10.1%
Applied egg-rr69.2%
Taylor expanded in A around -inf 85.2%
associate-/r/85.8%
Applied egg-rr85.8%
if -1.51999999999999996e143 < A Initial program 63.6%
Simplified83.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1.6e-188)
(/ 180.0 (/ PI (atan (+ 1.0 t_0))))
(if (<= B 4.7e-285)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* B C) A))) (- A))) PI))
(/ 180.0 (/ PI (atan (+ t_0 -1.0))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.6e-188) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + t_0)));
} else if (B <= 4.7e-285) {
tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((t_0 + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1.6e-188) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + t_0)));
} else if (B <= 4.7e-285) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((t_0 + -1.0)));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1.6e-188: tmp = 180.0 / (math.pi / math.atan((1.0 + t_0))) elif B <= 4.7e-285: tmp = 180.0 * (math.atan(((-0.5 * (B + ((B * C) / A))) / -A)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((t_0 + -1.0))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1.6e-188) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + t_0)))); elseif (B <= 4.7e-285) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-A))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(t_0 + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1.6e-188) tmp = 180.0 / (pi / atan((1.0 + t_0))); elseif (B <= 4.7e-285) tmp = 180.0 * (atan(((-0.5 * (B + ((B * C) / A))) / -A)) / pi); else tmp = 180.0 / (pi / atan((t_0 + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1.6e-188], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.7e-285], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1.6 \cdot 10^{-188}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + t\_0\right)}}\\
\mathbf{elif}\;B \leq 4.7 \cdot 10^{-285}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(t\_0 + -1\right)}}\\
\end{array}
\end{array}
if B < -1.60000000000000011e-188Initial program 57.7%
*-commutative57.7%
associate--l-57.6%
+-commutative57.6%
unpow257.6%
unpow257.6%
hypot-undefine81.1%
div-inv81.1%
clear-num81.1%
un-div-inv81.1%
Applied egg-rr84.1%
Taylor expanded in B around -inf 78.1%
associate--l+78.1%
div-sub78.1%
Simplified78.1%
if -1.60000000000000011e-188 < B < 4.70000000000000037e-285Initial program 48.5%
Taylor expanded in A around -inf 62.9%
associate-*r/62.9%
mul-1-neg62.9%
distribute-lft-out62.9%
*-commutative62.9%
Simplified62.9%
if 4.70000000000000037e-285 < B Initial program 55.8%
*-commutative55.8%
associate--l-55.8%
+-commutative55.8%
unpow255.8%
unpow255.8%
hypot-undefine73.7%
div-inv73.6%
clear-num73.6%
un-div-inv73.6%
Applied egg-rr79.7%
Taylor expanded in B around inf 64.3%
+-commutative64.3%
associate--r+64.3%
div-sub67.6%
Simplified67.6%
Final simplification71.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -7.1e-189)
(/ 180.0 (/ PI (atan (+ 1.0 t_0))))
(if (<= B 2.4e-286)
(/ 180.0 (/ PI (atan (/ (* 0.5 (+ B (* B (/ C A)))) A))))
(/ 180.0 (/ PI (atan (+ t_0 -1.0))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -7.1e-189) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + t_0)));
} else if (B <= 2.4e-286) {
tmp = 180.0 / (((double) M_PI) / atan(((0.5 * (B + (B * (C / A)))) / A)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((t_0 + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -7.1e-189) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + t_0)));
} else if (B <= 2.4e-286) {
tmp = 180.0 / (Math.PI / Math.atan(((0.5 * (B + (B * (C / A)))) / A)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((t_0 + -1.0)));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -7.1e-189: tmp = 180.0 / (math.pi / math.atan((1.0 + t_0))) elif B <= 2.4e-286: tmp = 180.0 / (math.pi / math.atan(((0.5 * (B + (B * (C / A)))) / A))) else: tmp = 180.0 / (math.pi / math.atan((t_0 + -1.0))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -7.1e-189) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + t_0)))); elseif (B <= 2.4e-286) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(t_0 + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -7.1e-189) tmp = 180.0 / (pi / atan((1.0 + t_0))); elseif (B <= 2.4e-286) tmp = 180.0 / (pi / atan(((0.5 * (B + (B * (C / A)))) / A))); else tmp = 180.0 / (pi / atan((t_0 + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -7.1e-189], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-286], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -7.1 \cdot 10^{-189}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + t\_0\right)}}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-286}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(t\_0 + -1\right)}}\\
\end{array}
\end{array}
if B < -7.1000000000000003e-189Initial program 57.7%
*-commutative57.7%
associate--l-57.6%
+-commutative57.6%
unpow257.6%
unpow257.6%
hypot-undefine81.1%
div-inv81.1%
clear-num81.1%
un-div-inv81.1%
Applied egg-rr84.1%
Taylor expanded in B around -inf 78.1%
associate--l+78.1%
div-sub78.1%
Simplified78.1%
if -7.1000000000000003e-189 < B < 2.39999999999999993e-286Initial program 48.3%
*-commutative48.3%
associate--l-43.3%
+-commutative43.3%
unpow243.3%
unpow243.3%
hypot-undefine50.0%
div-inv50.0%
clear-num50.0%
un-div-inv50.0%
Applied egg-rr85.1%
Taylor expanded in A around -inf 62.3%
associate-*r/62.3%
distribute-lft-out62.3%
associate-*r*62.3%
metadata-eval62.3%
associate-/l*61.9%
Simplified61.9%
if 2.39999999999999993e-286 < B Initial program 55.7%
*-commutative55.7%
associate--l-55.7%
+-commutative55.7%
unpow255.7%
unpow255.7%
hypot-undefine73.3%
div-inv73.3%
clear-num73.3%
un-div-inv73.3%
Applied egg-rr79.2%
Taylor expanded in B around inf 63.3%
+-commutative63.3%
associate--r+63.3%
div-sub67.3%
Simplified67.3%
Final simplification70.9%
(FPCore (A B C)
:precision binary64
(if (<= B -1.32e-45)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -6.5e-193)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))
(if (<= B 4.3e-75)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.32e-45) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -6.5e-193) {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
} else if (B <= 4.3e-75) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((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.32e-45) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -6.5e-193) {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
} else if (B <= 4.3e-75) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.32e-45: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -6.5e-193: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) elif B <= 4.3e-75: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / 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.32e-45) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -6.5e-193) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); elseif (B <= 4.3e-75) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / 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.32e-45) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -6.5e-193) tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); elseif (B <= 4.3e-75) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.32e-45], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.5e-193], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.3e-75], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $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.32 \cdot 10^{-45}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -6.5 \cdot 10^{-193}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.32000000000000005e-45Initial program 55.5%
Taylor expanded in B around -inf 69.0%
if -1.32000000000000005e-45 < B < -6.5000000000000004e-193Initial program 60.4%
associate-*l/60.4%
*-lft-identity60.4%
+-commutative60.4%
unpow260.4%
unpow260.4%
hypot-define74.6%
Simplified74.6%
Taylor expanded in A around inf 46.1%
*-commutative46.1%
Simplified46.1%
if -6.5000000000000004e-193 < B < 4.2999999999999999e-75Initial program 57.6%
Taylor expanded in A around -inf 42.2%
associate-*r/42.2%
Simplified42.2%
if 4.2999999999999999e-75 < B Initial program 50.6%
Taylor expanded in B around inf 67.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -5.8e-189)
(/ 180.0 (/ PI (atan (+ 1.0 t_0))))
(if (<= B 4e-295)
(/ 180.0 (/ PI (atan 0.0)))
(/ 180.0 (/ PI (atan (+ t_0 -1.0))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -5.8e-189) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + t_0)));
} else if (B <= 4e-295) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} else {
tmp = 180.0 / (((double) M_PI) / atan((t_0 + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -5.8e-189) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + t_0)));
} else if (B <= 4e-295) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else {
tmp = 180.0 / (Math.PI / Math.atan((t_0 + -1.0)));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -5.8e-189: tmp = 180.0 / (math.pi / math.atan((1.0 + t_0))) elif B <= 4e-295: tmp = 180.0 / (math.pi / math.atan(0.0)) else: tmp = 180.0 / (math.pi / math.atan((t_0 + -1.0))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -5.8e-189) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + t_0)))); elseif (B <= 4e-295) tmp = Float64(180.0 / Float64(pi / atan(0.0))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(t_0 + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -5.8e-189) tmp = 180.0 / (pi / atan((1.0 + t_0))); elseif (B <= 4e-295) tmp = 180.0 / (pi / atan(0.0)); else tmp = 180.0 / (pi / atan((t_0 + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -5.8e-189], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-295], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -5.8 \cdot 10^{-189}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + t\_0\right)}}\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-295}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(t\_0 + -1\right)}}\\
\end{array}
\end{array}
if B < -5.8e-189Initial program 57.7%
*-commutative57.7%
associate--l-57.6%
+-commutative57.6%
unpow257.6%
unpow257.6%
hypot-undefine81.1%
div-inv81.1%
clear-num81.1%
un-div-inv81.1%
Applied egg-rr84.1%
Taylor expanded in B around -inf 78.1%
associate--l+78.1%
div-sub78.1%
Simplified78.1%
if -5.8e-189 < B < 4.00000000000000024e-295Initial program 48.1%
*-commutative48.1%
associate--l-42.7%
+-commutative42.7%
unpow242.7%
unpow242.7%
hypot-undefine49.9%
div-inv49.9%
clear-num49.9%
un-div-inv49.9%
Applied egg-rr87.6%
div-sub33.9%
Applied egg-rr33.9%
Taylor expanded in C around inf 16.1%
distribute-lft1-in16.1%
metadata-eval16.1%
associate-*r*16.1%
metadata-eval16.1%
mul0-lft55.3%
Simplified55.3%
if 4.00000000000000024e-295 < B Initial program 55.6%
*-commutative55.6%
associate--l-55.7%
+-commutative55.7%
unpow255.7%
unpow255.7%
hypot-undefine73.0%
div-inv72.9%
clear-num72.9%
un-div-inv72.9%
Applied egg-rr78.8%
Taylor expanded in B around inf 63.1%
+-commutative63.1%
associate--r+63.1%
div-sub67.1%
Simplified67.1%
Final simplification70.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.22e-108)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.35e-75)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.22e-108) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.35e-75) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((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.22e-108) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.35e-75) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.22e-108: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.35e-75: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / 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.22e-108) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.35e-75) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / 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.22e-108) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.35e-75) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.22e-108], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.35e-75], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $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.22 \cdot 10^{-108}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.35 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.2199999999999999e-108Initial program 58.1%
Taylor expanded in B around -inf 60.2%
if -1.2199999999999999e-108 < B < 1.3499999999999999e-75Initial program 56.8%
Taylor expanded in A around -inf 40.8%
associate-*r/40.8%
Simplified40.8%
if 1.3499999999999999e-75 < B Initial program 50.6%
Taylor expanded in B around inf 67.1%
(FPCore (A B C) :precision binary64 (if (<= B 5.4e-58) (/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5.4e-58) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
} 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 <= 5.4e-58) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5.4e-58: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5.4e-58) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); 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 <= 5.4e-58) tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5.4e-58], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 5.4 \cdot 10^{-58}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 5.3999999999999998e-58Initial program 57.6%
*-commutative57.6%
associate--l-56.8%
+-commutative56.8%
unpow256.8%
unpow256.8%
hypot-undefine72.5%
div-inv72.5%
clear-num72.4%
un-div-inv72.4%
Applied egg-rr83.2%
Taylor expanded in B around -inf 61.0%
associate--l+61.0%
div-sub64.7%
Simplified64.7%
if 5.3999999999999998e-58 < B Initial program 49.8%
Taylor expanded in B around inf 67.8%
(FPCore (A B C) :precision binary64 (if (<= B 6e-58) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 6e-58) {
tmp = 180.0 * (atan((1.0 + ((C - 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 <= 6e-58) {
tmp = 180.0 * (Math.atan((1.0 + ((C - 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 <= 6e-58: tmp = 180.0 * (math.atan((1.0 + ((C - 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 <= 6e-58) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - 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 <= 6e-58) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 6e-58], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 6 \cdot 10^{-58}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 6.00000000000000015e-58Initial program 57.6%
Taylor expanded in B around -inf 60.9%
associate--l+60.9%
div-sub64.7%
Simplified64.7%
if 6.00000000000000015e-58 < B Initial program 49.8%
Taylor expanded in B around inf 67.8%
(FPCore (A B C)
:precision binary64
(if (<= B -2.7e-110)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.35e-99)
(/ 180.0 (/ PI (atan 0.0)))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-110) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.35e-99) {
tmp = 180.0 / (((double) M_PI) / atan(0.0));
} 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-110) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.35e-99) {
tmp = 180.0 / (Math.PI / Math.atan(0.0));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.7e-110: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.35e-99: tmp = 180.0 / (math.pi / math.atan(0.0)) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.7e-110) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.35e-99) tmp = Float64(180.0 / Float64(pi / atan(0.0))); 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-110) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.35e-99) tmp = 180.0 / (pi / atan(0.0)); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.7e-110], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.35e-99], N[(180.0 / N[(Pi / N[ArcTan[0.0], $MachinePrecision]), $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^{-110}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.35 \cdot 10^{-99}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} 0}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.6999999999999998e-110Initial program 58.1%
Taylor expanded in B around -inf 60.2%
if -2.6999999999999998e-110 < B < 1.35e-99Initial program 55.7%
*-commutative55.7%
associate--l-54.2%
+-commutative54.2%
unpow254.2%
unpow254.2%
hypot-undefine60.8%
div-inv60.8%
clear-num60.8%
un-div-inv60.8%
Applied egg-rr81.5%
div-sub51.1%
Applied egg-rr51.1%
Taylor expanded in C around inf 9.1%
distribute-lft1-in9.1%
metadata-eval9.1%
associate-*r*9.1%
metadata-eval9.1%
mul0-lft32.9%
Simplified32.9%
if 1.35e-99 < B Initial program 52.7%
Taylor expanded in B around inf 62.0%
(FPCore (A B C) :precision binary64 (if (<= B -1e-309) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-309) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-309) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-309: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-309) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-309) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-309], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-309}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.000000000000002e-309Initial program 56.1%
Taylor expanded in B around -inf 44.5%
if -1.000000000000002e-309 < B Initial program 55.2%
Taylor expanded in B around inf 39.9%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 55.6%
Taylor expanded in B around inf 21.5%
herbie shell --seed 2024188
(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)))