
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -2000000000.0) (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI) (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -2000000000.0) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2000000000.0) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2000000000.0: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2000000000.0) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2000000000.0) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2000000000.0], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2000000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2e9Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -2e9 < A Initial program 66.5%
associate-*r/66.6%
Applied egg-rr86.3%
Final simplification85.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.5e+21)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 1.8e-127)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+21) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 1.8e-127) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+21) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 1.8e-127) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+21: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 1.8e-127: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+21) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 1.8e-127) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+21) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 1.8e-127) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+21], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.8e-127], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{-127}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.5e21Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -1.5e21 < A < 1.8e-127Initial program 59.0%
associate-*r/59.0%
Applied egg-rr81.2%
Taylor expanded in A around 0 58.2%
unpow258.2%
unpow258.2%
hypot-def80.4%
Simplified80.4%
if 1.8e-127 < A Initial program 77.8%
associate--l-77.8%
Simplified77.8%
Taylor expanded in C around 0 74.7%
associate-*r/74.7%
mul-1-neg74.7%
+-commutative74.7%
unpow274.7%
unpow274.7%
hypot-def88.2%
Simplified88.2%
Final simplification83.1%
(FPCore (A B C)
:precision binary64
(if (<= A -7.2e+21)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 7.3e-127)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ (* 180.0 (atan (/ (- (- A) (hypot A B)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.2e+21) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 7.3e-127) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} 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 <= -7.2e+21) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 7.3e-127) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} 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 <= -7.2e+21: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 7.3e-127: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi 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 <= -7.2e+21) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 7.3e-127) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(Float64(180.0 * 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 <= -7.2e+21) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 7.3e-127) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = (180.0 * atan(((-A - hypot(A, B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.2e+21], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 7.3e-127], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.2 \cdot 10^{+21}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.3 \cdot 10^{-127}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.2e21Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -7.2e21 < A < 7.30000000000000033e-127Initial program 59.0%
associate-*r/59.0%
Applied egg-rr81.2%
Taylor expanded in A around 0 58.2%
unpow258.2%
unpow258.2%
hypot-def80.4%
Simplified80.4%
if 7.30000000000000033e-127 < A Initial program 77.8%
associate-*r/77.8%
Applied egg-rr93.9%
Taylor expanded in C around 0 74.7%
mul-1-neg74.7%
unpow274.7%
unpow274.7%
hypot-def88.2%
Simplified88.2%
Final simplification83.1%
(FPCore (A B C)
:precision binary64
(if (<= A -9e+24)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 9e+164)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (/ (- A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9e+24) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 9e+164) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9e+24) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 9e+164) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9e+24: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 9e+164: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 * math.atan((-A / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9e+24) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 9e+164) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9e+24) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 9e+164) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan((-A / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9e+24], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 9e+164], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9 \cdot 10^{+24}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+164}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.00000000000000039e24Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -9.00000000000000039e24 < A < 8.9999999999999995e164Initial program 60.9%
associate--l-60.9%
Simplified60.9%
Taylor expanded in A around 0 56.0%
unpow256.0%
unpow256.0%
hypot-def79.4%
Simplified79.4%
if 8.9999999999999995e164 < A Initial program 94.1%
associate-*r/94.1%
Applied egg-rr97.2%
Taylor expanded in B around inf 94.1%
neg-mul-194.1%
unsub-neg94.1%
Simplified94.1%
Taylor expanded in A around inf 94.1%
associate-*r/94.1%
mul-1-neg94.1%
Simplified94.1%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.2e+23)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 9e+164)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ (* 180.0 (atan (/ (- A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.2e+23) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 9e+164) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.2e+23) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 9e+164) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.2e+23: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 9e+164: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = (180.0 * math.atan((-A / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.2e+23) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 9e+164) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.2e+23) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 9e+164) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = (180.0 * atan((-A / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.2e+23], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 9e+164], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.2 \cdot 10^{+23}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+164}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.2e23Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -3.2e23 < A < 8.9999999999999995e164Initial program 60.9%
associate-*r/60.9%
Applied egg-rr84.0%
Taylor expanded in A around 0 56.0%
unpow256.0%
unpow256.0%
hypot-def79.4%
Simplified79.4%
if 8.9999999999999995e164 < A Initial program 94.1%
associate-*r/94.1%
Applied egg-rr97.2%
Taylor expanded in B around inf 94.1%
neg-mul-194.1%
unsub-neg94.1%
Simplified94.1%
Taylor expanded in A around inf 94.1%
associate-*r/94.1%
mul-1-neg94.1%
Simplified94.1%
Final simplification81.9%
(FPCore (A B C) :precision binary64 (if (<= A -5.8e+23) (/ (* 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 <= -5.8e+23) {
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 <= -5.8e+23) {
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 <= -5.8e+23: 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 <= -5.8e+23) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.8e+23) 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, -5.8e+23], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.8 \cdot 10^{+23}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.80000000000000025e23Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -5.80000000000000025e23 < A Initial program 66.5%
Simplified86.2%
Final simplification85.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI)))
(t_1 (/ (* 180.0 (atan (/ C B))) PI)))
(if (<= B -1.7e+16)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.6e-58)
(/ (* 180.0 (atan (/ (- A) B))) PI)
(if (<= B -1.02e-190)
t_1
(if (<= B -8.2e-269)
t_0
(if (<= B 1.8e-308)
t_1
(if (<= B 4.8e-270)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 5.5e-249)
t_0
(if (<= B 2.05e-165)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double t_1 = (180.0 * atan((C / B))) / ((double) M_PI);
double tmp;
if (B <= -1.7e+16) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.6e-58) {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
} else if (B <= -1.02e-190) {
tmp = t_1;
} else if (B <= -8.2e-269) {
tmp = t_0;
} else if (B <= 1.8e-308) {
tmp = t_1;
} else if (B <= 4.8e-270) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 5.5e-249) {
tmp = t_0;
} else if (B <= 2.05e-165) {
tmp = 180.0 * (atan((-2.0 * (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 t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double t_1 = (180.0 * Math.atan((C / B))) / Math.PI;
double tmp;
if (B <= -1.7e+16) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.6e-58) {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
} else if (B <= -1.02e-190) {
tmp = t_1;
} else if (B <= -8.2e-269) {
tmp = t_0;
} else if (B <= 1.8e-308) {
tmp = t_1;
} else if (B <= 4.8e-270) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 5.5e-249) {
tmp = t_0;
} else if (B <= 2.05e-165) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi) t_1 = (180.0 * math.atan((C / B))) / math.pi tmp = 0 if B <= -1.7e+16: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.6e-58: tmp = (180.0 * math.atan((-A / B))) / math.pi elif B <= -1.02e-190: tmp = t_1 elif B <= -8.2e-269: tmp = t_0 elif B <= 1.8e-308: tmp = t_1 elif B <= 4.8e-270: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 5.5e-249: tmp = t_0 elif B <= 2.05e-165: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) 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(0.0 / B)) / pi)) t_1 = Float64(Float64(180.0 * atan(Float64(C / B))) / pi) tmp = 0.0 if (B <= -1.7e+16) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.6e-58) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); elseif (B <= -1.02e-190) tmp = t_1; elseif (B <= -8.2e-269) tmp = t_0; elseif (B <= 1.8e-308) tmp = t_1; elseif (B <= 4.8e-270) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 5.5e-249) tmp = t_0; elseif (B <= 2.05e-165) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * 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) t_0 = 180.0 * (atan((0.0 / B)) / pi); t_1 = (180.0 * atan((C / B))) / pi; tmp = 0.0; if (B <= -1.7e+16) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.6e-58) tmp = (180.0 * atan((-A / B))) / pi; elseif (B <= -1.02e-190) tmp = t_1; elseif (B <= -8.2e-269) tmp = t_0; elseif (B <= 1.8e-308) tmp = t_1; elseif (B <= 4.8e-270) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 5.5e-249) tmp = t_0; elseif (B <= 2.05e-165) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); 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[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -1.7e+16], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-58], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -1.02e-190], t$95$1, If[LessEqual[B, -8.2e-269], t$95$0, If[LessEqual[B, 1.8e-308], t$95$1, If[LessEqual[B, 4.8e-270], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e-249], t$95$0, If[LessEqual[B, 2.05e-165], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / 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}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.7 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-58}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.02 \cdot 10^{-190}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -8.2 \cdot 10^{-269}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-270}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{-249}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{-165}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.7e16Initial program 50.8%
associate--l-50.7%
Simplified50.7%
Taylor expanded in B around -inf 63.4%
if -1.7e16 < B < -1.6e-58Initial program 87.0%
associate-*r/87.0%
Applied egg-rr87.4%
Taylor expanded in B around inf 67.3%
neg-mul-167.3%
unsub-neg67.3%
Simplified67.3%
Taylor expanded in A around inf 67.5%
associate-*r/67.5%
mul-1-neg67.5%
Simplified67.5%
if -1.6e-58 < B < -1.02e-190 or -8.2000000000000006e-269 < B < 1.7999999999999999e-308Initial program 72.6%
associate-*r/72.6%
Applied egg-rr80.9%
Taylor expanded in B around inf 61.0%
neg-mul-161.0%
unsub-neg61.0%
Simplified61.0%
Taylor expanded in C around inf 56.0%
if -1.02e-190 < B < -8.2000000000000006e-269 or 4.80000000000000003e-270 < B < 5.49999999999999999e-249Initial program 45.7%
associate--l-30.0%
Simplified30.0%
Taylor expanded in C around inf 72.7%
associate-*r/72.7%
distribute-rgt1-in72.7%
metadata-eval72.7%
mul0-lft72.7%
metadata-eval72.7%
Simplified72.7%
if 1.7999999999999999e-308 < B < 4.80000000000000003e-270Initial program 56.9%
associate-*r/56.9%
Applied egg-rr65.1%
Taylor expanded in C around inf 40.9%
+-commutative40.9%
unpow240.9%
mul-1-neg40.9%
mul-1-neg40.9%
sqr-neg40.9%
unpow240.9%
distribute-rgt1-in40.9%
metadata-eval40.9%
mul0-lft40.9%
metadata-eval40.9%
Simplified40.9%
Taylor expanded in A around 0 59.3%
Taylor expanded in B around 0 59.2%
if 5.49999999999999999e-249 < B < 2.0500000000000001e-165Initial program 52.7%
associate--l-48.2%
Simplified48.2%
Taylor expanded in A around inf 43.4%
if 2.0500000000000001e-165 < B Initial program 51.7%
associate--l-51.7%
Simplified51.7%
Taylor expanded in B around inf 52.9%
Final simplification56.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -5e+16)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.6e-58)
(/ (* 180.0 (atan (/ (- A) B))) PI)
(if (<= B -9e-188)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B -1.55e-265)
t_0
(if (<= B 1.8e-308)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 3.8e-270)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 1.4e-248)
t_0
(if (<= B 2.5e-166)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -5e+16) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.6e-58) {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
} else if (B <= -9e-188) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= -1.55e-265) {
tmp = t_0;
} else if (B <= 1.8e-308) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 3.8e-270) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 1.4e-248) {
tmp = t_0;
} else if (B <= 2.5e-166) {
tmp = 180.0 * (atan((-2.0 * (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 t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -5e+16) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.6e-58) {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
} else if (B <= -9e-188) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= -1.55e-265) {
tmp = t_0;
} else if (B <= 1.8e-308) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 3.8e-270) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 1.4e-248) {
tmp = t_0;
} else if (B <= 2.5e-166) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -5e+16: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.6e-58: tmp = (180.0 * math.atan((-A / B))) / math.pi elif B <= -9e-188: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= -1.55e-265: tmp = t_0 elif B <= 1.8e-308: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 3.8e-270: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 1.4e-248: tmp = t_0 elif B <= 2.5e-166: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) 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(0.0 / B)) / pi)) tmp = 0.0 if (B <= -5e+16) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.6e-58) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); elseif (B <= -9e-188) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= -1.55e-265) tmp = t_0; elseif (B <= 1.8e-308) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 3.8e-270) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 1.4e-248) tmp = t_0; elseif (B <= 2.5e-166) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * 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) t_0 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -5e+16) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.6e-58) tmp = (180.0 * atan((-A / B))) / pi; elseif (B <= -9e-188) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= -1.55e-265) tmp = t_0; elseif (B <= 1.8e-308) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 3.8e-270) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 1.4e-248) tmp = t_0; elseif (B <= 2.5e-166) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); 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[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5e+16], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.6e-58], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -9e-188], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.55e-265], t$95$0, If[LessEqual[B, 1.8e-308], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 3.8e-270], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-248], t$95$0, If[LessEqual[B, 2.5e-166], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / 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}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -5 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.6 \cdot 10^{-58}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -9 \cdot 10^{-188}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.55 \cdot 10^{-265}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-308}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-270}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-248}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5e16Initial program 50.8%
associate--l-50.7%
Simplified50.7%
Taylor expanded in B around -inf 63.4%
if -5e16 < B < -2.60000000000000007e-58Initial program 87.0%
associate-*r/87.0%
Applied egg-rr87.4%
Taylor expanded in B around inf 67.3%
neg-mul-167.3%
unsub-neg67.3%
Simplified67.3%
Taylor expanded in A around inf 67.5%
associate-*r/67.5%
mul-1-neg67.5%
Simplified67.5%
if -2.60000000000000007e-58 < B < -8.99999999999999986e-188Initial program 61.7%
associate--l-61.7%
Simplified61.7%
Taylor expanded in C around -inf 50.0%
if -8.99999999999999986e-188 < B < -1.54999999999999994e-265 or 3.80000000000000041e-270 < B < 1.40000000000000005e-248Initial program 45.7%
associate--l-30.0%
Simplified30.0%
Taylor expanded in C around inf 72.7%
associate-*r/72.7%
distribute-rgt1-in72.7%
metadata-eval72.7%
mul0-lft72.7%
metadata-eval72.7%
Simplified72.7%
if -1.54999999999999994e-265 < B < 1.7999999999999999e-308Initial program 100.0%
associate-*r/100.0%
Applied egg-rr100.0%
Taylor expanded in B around inf 70.9%
neg-mul-170.9%
unsub-neg70.9%
Simplified70.9%
Taylor expanded in C around inf 70.9%
if 1.7999999999999999e-308 < B < 3.80000000000000041e-270Initial program 56.9%
associate-*r/56.9%
Applied egg-rr65.1%
Taylor expanded in C around inf 40.9%
+-commutative40.9%
unpow240.9%
mul-1-neg40.9%
mul-1-neg40.9%
sqr-neg40.9%
unpow240.9%
distribute-rgt1-in40.9%
metadata-eval40.9%
mul0-lft40.9%
metadata-eval40.9%
Simplified40.9%
Taylor expanded in A around 0 59.3%
Taylor expanded in B around 0 59.2%
if 1.40000000000000005e-248 < B < 2.5e-166Initial program 52.7%
associate--l-48.2%
Simplified48.2%
Taylor expanded in A around inf 43.4%
if 2.5e-166 < B Initial program 51.7%
associate--l-51.7%
Simplified51.7%
Taylor expanded in B around inf 52.9%
Final simplification56.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI))
(t_1 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= A -32000000.0)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 1.3e-218)
t_0
(if (<= A 5.2e-168)
t_1
(if (<= A 1.6e-104)
t_0
(if (<= A 1.5e-70)
t_1
(if (<= A 9e+164) t_0 (/ (* 180.0 (atan (/ (- A) B))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
double t_1 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (A <= -32000000.0) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 1.3e-218) {
tmp = t_0;
} else if (A <= 5.2e-168) {
tmp = t_1;
} else if (A <= 1.6e-104) {
tmp = t_0;
} else if (A <= 1.5e-70) {
tmp = t_1;
} else if (A <= 9e+164) {
tmp = t_0;
} else {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
double t_1 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (A <= -32000000.0) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 1.3e-218) {
tmp = t_0;
} else if (A <= 5.2e-168) {
tmp = t_1;
} else if (A <= 1.6e-104) {
tmp = t_0;
} else if (A <= 1.5e-70) {
tmp = t_1;
} else if (A <= 9e+164) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi t_1 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if A <= -32000000.0: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 1.3e-218: tmp = t_0 elif A <= 5.2e-168: tmp = t_1 elif A <= 1.6e-104: tmp = t_0 elif A <= 1.5e-70: tmp = t_1 elif A <= 9e+164: tmp = t_0 else: tmp = (180.0 * math.atan((-A / B))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi) t_1 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (A <= -32000000.0) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 1.3e-218) tmp = t_0; elseif (A <= 5.2e-168) tmp = t_1; elseif (A <= 1.6e-104) tmp = t_0; elseif (A <= 1.5e-70) tmp = t_1; elseif (A <= 9e+164) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((C - B) / B))) / pi; t_1 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (A <= -32000000.0) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 1.3e-218) tmp = t_0; elseif (A <= 5.2e-168) tmp = t_1; elseif (A <= 1.6e-104) tmp = t_0; elseif (A <= 1.5e-70) tmp = t_1; elseif (A <= 9e+164) tmp = t_0; else tmp = (180.0 * atan((-A / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -32000000.0], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.3e-218], t$95$0, If[LessEqual[A, 5.2e-168], t$95$1, If[LessEqual[A, 1.6e-104], t$95$0, If[LessEqual[A, 1.5e-70], t$95$1, If[LessEqual[A, 9e+164], t$95$0, N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;A \leq -32000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-218}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5.2 \cdot 10^{-168}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.6 \cdot 10^{-104}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 9 \cdot 10^{+164}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.2e7Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -3.2e7 < A < 1.29999999999999992e-218 or 5.2000000000000002e-168 < A < 1.59999999999999994e-104 or 1.5000000000000001e-70 < A < 8.9999999999999995e164Initial program 63.5%
associate-*r/63.5%
Applied egg-rr87.9%
Taylor expanded in A around 0 60.0%
unpow260.0%
unpow260.0%
hypot-def84.5%
Simplified84.5%
Taylor expanded in C around 0 59.7%
mul-1-neg59.7%
sub-neg59.7%
Simplified59.7%
if 1.29999999999999992e-218 < A < 5.2000000000000002e-168 or 1.59999999999999994e-104 < A < 1.5000000000000001e-70Initial program 41.4%
associate-*r/41.4%
Applied egg-rr55.5%
Taylor expanded in C around inf 25.6%
+-commutative25.6%
unpow225.6%
mul-1-neg25.6%
mul-1-neg25.6%
sqr-neg25.6%
unpow225.6%
distribute-rgt1-in25.6%
metadata-eval25.6%
mul0-lft25.6%
metadata-eval25.6%
Simplified25.6%
Taylor expanded in A around 0 59.6%
Taylor expanded in B around 0 59.8%
if 8.9999999999999995e164 < A Initial program 94.1%
associate-*r/94.1%
Applied egg-rr97.2%
Taylor expanded in B around inf 94.1%
neg-mul-194.1%
unsub-neg94.1%
Simplified94.1%
Taylor expanded in A around inf 94.1%
associate-*r/94.1%
mul-1-neg94.1%
Simplified94.1%
Final simplification69.5%
(FPCore (A B C)
:precision binary64
(if (<= B -2.2e+16)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1e-58)
(/ (* 180.0 (atan (/ (- A) B))) PI)
(if (<= B -2.6e-190)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 3.95e-250)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 3.4e-167)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.2e+16) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1e-58) {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
} else if (B <= -2.6e-190) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 3.95e-250) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 3.4e-167) {
tmp = 180.0 * (atan((-2.0 * (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 <= -2.2e+16) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1e-58) {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
} else if (B <= -2.6e-190) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 3.95e-250) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 3.4e-167) {
tmp = 180.0 * (Math.atan((-2.0 * (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 <= -2.2e+16: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1e-58: tmp = (180.0 * math.atan((-A / B))) / math.pi elif B <= -2.6e-190: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 3.95e-250: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 3.4e-167: tmp = 180.0 * (math.atan((-2.0 * (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 <= -2.2e+16) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1e-58) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); elseif (B <= -2.6e-190) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 3.95e-250) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 3.4e-167) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * 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 <= -2.2e+16) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1e-58) tmp = (180.0 * atan((-A / B))) / pi; elseif (B <= -2.6e-190) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 3.95e-250) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 3.4e-167) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.2e+16], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1e-58], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -2.6e-190], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 3.95e-250], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.4e-167], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / 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 -2.2 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1 \cdot 10^{-58}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.6 \cdot 10^{-190}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.95 \cdot 10^{-250}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.4 \cdot 10^{-167}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.2e16Initial program 50.8%
associate--l-50.7%
Simplified50.7%
Taylor expanded in B around -inf 63.4%
if -2.2e16 < B < -1e-58Initial program 87.0%
associate-*r/87.0%
Applied egg-rr87.4%
Taylor expanded in B around inf 67.3%
neg-mul-167.3%
unsub-neg67.3%
Simplified67.3%
Taylor expanded in A around inf 67.5%
associate-*r/67.5%
mul-1-neg67.5%
Simplified67.5%
if -1e-58 < B < -2.5999999999999998e-190Initial program 61.7%
associate-*r/61.7%
Applied egg-rr73.2%
Taylor expanded in B around inf 57.1%
neg-mul-157.1%
unsub-neg57.1%
Simplified57.1%
Taylor expanded in C around inf 50.0%
if -2.5999999999999998e-190 < B < 3.94999999999999993e-250Initial program 62.6%
associate--l-46.7%
Simplified46.7%
Taylor expanded in C around inf 53.0%
associate-*r/53.0%
distribute-rgt1-in53.0%
metadata-eval53.0%
mul0-lft53.0%
metadata-eval53.0%
Simplified53.0%
if 3.94999999999999993e-250 < B < 3.3999999999999997e-167Initial program 52.7%
associate--l-48.2%
Simplified48.2%
Taylor expanded in A around inf 43.4%
if 3.3999999999999997e-167 < B Initial program 51.7%
associate--l-51.7%
Simplified51.7%
Taylor expanded in B around inf 52.9%
Final simplification54.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (+ B C) B))) PI)))
(if (<= A -5.4e-92)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 2.5e-237)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 2.05e-100)
t_0
(if (<= A 1.5e-70)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 2.4e+78)
t_0
(/ (* 180.0 (atan (/ (* A -2.0) B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
double tmp;
if (A <= -5.4e-92) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 2.5e-237) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 2.05e-100) {
tmp = t_0;
} else if (A <= 1.5e-70) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 2.4e+78) {
tmp = t_0;
} else {
tmp = (180.0 * atan(((A * -2.0) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
double tmp;
if (A <= -5.4e-92) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 2.5e-237) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 2.05e-100) {
tmp = t_0;
} else if (A <= 1.5e-70) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 2.4e+78) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan(((A * -2.0) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((B + C) / B))) / math.pi tmp = 0 if A <= -5.4e-92: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 2.5e-237: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 2.05e-100: tmp = t_0 elif A <= 1.5e-70: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 2.4e+78: tmp = t_0 else: tmp = (180.0 * math.atan(((A * -2.0) / B))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi) tmp = 0.0 if (A <= -5.4e-92) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 2.5e-237) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 2.05e-100) tmp = t_0; elseif (A <= 1.5e-70) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 2.4e+78) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(A * -2.0) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((B + C) / B))) / pi; tmp = 0.0; if (A <= -5.4e-92) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 2.5e-237) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 2.05e-100) tmp = t_0; elseif (A <= 1.5e-70) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 2.4e+78) tmp = t_0; else tmp = (180.0 * atan(((A * -2.0) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -5.4e-92], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.5e-237], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.05e-100], t$95$0, If[LessEqual[A, 1.5e-70], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.4e+78], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.4 \cdot 10^{-92}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.5 \cdot 10^{-237}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 2.05 \cdot 10^{-100}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{-70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.4 \cdot 10^{+78}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.3999999999999999e-92Initial program 31.3%
associate-*r/31.4%
Applied egg-rr57.7%
Taylor expanded in A around -inf 70.5%
if -5.3999999999999999e-92 < A < 2.5000000000000001e-237Initial program 62.3%
associate--l-62.3%
Simplified62.3%
Taylor expanded in B around inf 47.0%
if 2.5000000000000001e-237 < A < 2.0499999999999999e-100 or 1.5000000000000001e-70 < A < 2.3999999999999999e78Initial program 65.9%
associate-*r/65.9%
Applied egg-rr91.0%
Taylor expanded in A around 0 57.4%
unpow257.4%
unpow257.4%
hypot-def82.9%
Simplified82.9%
Taylor expanded in B around -inf 52.3%
if 2.0499999999999999e-100 < A < 1.5000000000000001e-70Initial program 42.4%
associate-*r/42.4%
Applied egg-rr52.6%
Taylor expanded in C around inf 17.7%
+-commutative17.7%
unpow217.7%
mul-1-neg17.7%
mul-1-neg17.7%
sqr-neg17.7%
unpow217.7%
distribute-rgt1-in17.7%
metadata-eval17.7%
mul0-lft17.7%
metadata-eval17.7%
Simplified17.7%
Taylor expanded in A around 0 65.3%
Taylor expanded in B around 0 65.7%
if 2.3999999999999999e78 < A Initial program 87.5%
associate-*r/87.6%
Applied egg-rr97.9%
Taylor expanded in A around inf 86.6%
*-commutative86.6%
Simplified86.6%
Final simplification63.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- A) B))) PI)))
(if (<= B -1.4e+16)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.8e-58)
t_0
(if (<= B -1.4e-187)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 1.05e-248)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 3.1e-166) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((-A / B))) / ((double) M_PI);
double tmp;
if (B <= -1.4e+16) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.8e-58) {
tmp = t_0;
} else if (B <= -1.4e-187) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 1.05e-248) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 3.1e-166) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((-A / B))) / Math.PI;
double tmp;
if (B <= -1.4e+16) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.8e-58) {
tmp = t_0;
} else if (B <= -1.4e-187) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 1.05e-248) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 3.1e-166) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((-A / B))) / math.pi tmp = 0 if B <= -1.4e+16: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.8e-58: tmp = t_0 elif B <= -1.4e-187: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 1.05e-248: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 3.1e-166: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi) tmp = 0.0 if (B <= -1.4e+16) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.8e-58) tmp = t_0; elseif (B <= -1.4e-187) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 1.05e-248) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 3.1e-166) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((-A / B))) / pi; tmp = 0.0; if (B <= -1.4e+16) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.8e-58) tmp = t_0; elseif (B <= -1.4e-187) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 1.05e-248) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 3.1e-166) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -1.4e+16], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.8e-58], t$95$0, If[LessEqual[B, -1.4e-187], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-248], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-166], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.4 \cdot 10^{+16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.8 \cdot 10^{-58}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.4 \cdot 10^{-187}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-248}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-166}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.4e16Initial program 50.8%
associate--l-50.7%
Simplified50.7%
Taylor expanded in B around -inf 63.4%
if -1.4e16 < B < -3.7999999999999997e-58 or 1.05e-248 < B < 3.09999999999999984e-166Initial program 66.6%
associate-*r/66.6%
Applied egg-rr74.5%
Taylor expanded in B around inf 57.8%
neg-mul-157.8%
unsub-neg57.8%
Simplified57.8%
Taylor expanded in A around inf 53.2%
associate-*r/53.2%
mul-1-neg53.2%
Simplified53.2%
if -3.7999999999999997e-58 < B < -1.4e-187Initial program 61.7%
associate-*r/61.7%
Applied egg-rr73.2%
Taylor expanded in B around inf 57.1%
neg-mul-157.1%
unsub-neg57.1%
Simplified57.1%
Taylor expanded in C around inf 50.0%
if -1.4e-187 < B < 1.05e-248Initial program 62.6%
associate--l-46.7%
Simplified46.7%
Taylor expanded in C around inf 53.0%
associate-*r/53.0%
distribute-rgt1-in53.0%
metadata-eval53.0%
mul0-lft53.0%
metadata-eval53.0%
Simplified53.0%
if 3.09999999999999984e-166 < B Initial program 51.7%
associate--l-51.7%
Simplified51.7%
Taylor expanded in B around inf 52.9%
Final simplification54.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI)))
(if (<= A -15000000.0)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 2.5e-219)
t_0
(if (<= A 6.2e-168)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 4.4e-106)
t_0
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
double tmp;
if (A <= -15000000.0) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 2.5e-219) {
tmp = t_0;
} else if (A <= 6.2e-168) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 4.4e-106) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
double tmp;
if (A <= -15000000.0) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 2.5e-219) {
tmp = t_0;
} else if (A <= 6.2e-168) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 4.4e-106) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi tmp = 0 if A <= -15000000.0: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 2.5e-219: tmp = t_0 elif A <= 6.2e-168: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 4.4e-106: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi) tmp = 0.0 if (A <= -15000000.0) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 2.5e-219) tmp = t_0; elseif (A <= 6.2e-168) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 4.4e-106) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((C - B) / B))) / pi; tmp = 0.0; if (A <= -15000000.0) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 2.5e-219) tmp = t_0; elseif (A <= 6.2e-168) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 4.4e-106) tmp = t_0; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -15000000.0], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.5e-219], t$95$0, If[LessEqual[A, 6.2e-168], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e-106], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -15000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.5 \cdot 10^{-219}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 6.2 \cdot 10^{-168}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{-106}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.5e7Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -1.5e7 < A < 2.5000000000000001e-219 or 6.2e-168 < A < 4.39999999999999989e-106Initial program 61.1%
associate-*r/61.2%
Applied egg-rr84.7%
Taylor expanded in A around 0 61.2%
unpow261.2%
unpow261.2%
hypot-def84.7%
Simplified84.7%
Taylor expanded in C around 0 58.9%
mul-1-neg58.9%
sub-neg58.9%
Simplified58.9%
if 2.5000000000000001e-219 < A < 6.2e-168Initial program 42.9%
associate-*r/42.9%
Applied egg-rr53.3%
Taylor expanded in C around inf 32.6%
+-commutative32.6%
unpow232.6%
mul-1-neg32.6%
mul-1-neg32.6%
sqr-neg32.6%
unpow232.6%
distribute-rgt1-in32.6%
metadata-eval32.6%
mul0-lft32.6%
metadata-eval32.6%
Simplified32.6%
Taylor expanded in A around 0 59.2%
Taylor expanded in B around 0 59.2%
if 4.39999999999999989e-106 < A Initial program 78.2%
associate--l-78.2%
Simplified78.2%
Taylor expanded in B around -inf 77.1%
associate--l+77.1%
div-sub79.9%
Simplified79.9%
Final simplification70.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI)))
(if (<= A -920000000.0)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 3.8e-219)
t_0
(if (<= A 5.2e-168)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 1.82e-109)
t_0
(/ (* 180.0 (atan (/ (- (+ B C) A) B))) PI)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
double tmp;
if (A <= -920000000.0) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 3.8e-219) {
tmp = t_0;
} else if (A <= 5.2e-168) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 1.82e-109) {
tmp = t_0;
} 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 t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
double tmp;
if (A <= -920000000.0) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 3.8e-219) {
tmp = t_0;
} else if (A <= 5.2e-168) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 1.82e-109) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((((B + C) - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi tmp = 0 if A <= -920000000.0: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 3.8e-219: tmp = t_0 elif A <= 5.2e-168: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 1.82e-109: tmp = t_0 else: tmp = (180.0 * math.atan((((B + C) - A) / B))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi) tmp = 0.0 if (A <= -920000000.0) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 3.8e-219) tmp = t_0; elseif (A <= 5.2e-168) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 1.82e-109) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(B + C) - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((C - B) / B))) / pi; tmp = 0.0; if (A <= -920000000.0) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 3.8e-219) tmp = t_0; elseif (A <= 5.2e-168) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 1.82e-109) tmp = t_0; else tmp = (180.0 * atan((((B + C) - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -920000000.0], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 3.8e-219], t$95$0, If[LessEqual[A, 5.2e-168], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.82e-109], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -920000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-219}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5.2 \cdot 10^{-168}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.82 \cdot 10^{-109}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.2e8Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -9.2e8 < A < 3.80000000000000025e-219 or 5.2000000000000002e-168 < A < 1.8200000000000001e-109Initial program 61.1%
associate-*r/61.2%
Applied egg-rr84.7%
Taylor expanded in A around 0 61.2%
unpow261.2%
unpow261.2%
hypot-def84.7%
Simplified84.7%
Taylor expanded in C around 0 58.9%
mul-1-neg58.9%
sub-neg58.9%
Simplified58.9%
if 3.80000000000000025e-219 < A < 5.2000000000000002e-168Initial program 42.9%
associate-*r/42.9%
Applied egg-rr53.3%
Taylor expanded in C around inf 32.6%
+-commutative32.6%
unpow232.6%
mul-1-neg32.6%
mul-1-neg32.6%
sqr-neg32.6%
unpow232.6%
distribute-rgt1-in32.6%
metadata-eval32.6%
mul0-lft32.6%
metadata-eval32.6%
Simplified32.6%
Taylor expanded in A around 0 59.2%
Taylor expanded in B around 0 59.2%
if 1.8200000000000001e-109 < A Initial program 78.2%
associate-*r/78.2%
Applied egg-rr93.4%
Taylor expanded in B around -inf 79.9%
Final simplification70.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -4.3e-91)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 6e-234)
t_0
(if (<= A 5.5e-168)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 8.4e-76) t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -4.3e-91) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 6e-234) {
tmp = t_0;
} else if (A <= 5.5e-168) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 8.4e-76) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (A <= -4.3e-91) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 6e-234) {
tmp = t_0;
} else if (A <= 5.5e-168) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 8.4e-76) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -4.3e-91: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 6e-234: tmp = t_0 elif A <= 5.5e-168: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 8.4e-76: tmp = t_0 else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -4.3e-91) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 6e-234) tmp = t_0; elseif (A <= 5.5e-168) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 8.4e-76) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -4.3e-91) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 6e-234) tmp = t_0; elseif (A <= 5.5e-168) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 8.4e-76) tmp = t_0; else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.3e-91], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6e-234], t$95$0, If[LessEqual[A, 5.5e-168], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 8.4e-76], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -4.3 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6 \cdot 10^{-234}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5.5 \cdot 10^{-168}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 8.4 \cdot 10^{-76}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.3e-91Initial program 31.3%
associate--l-22.7%
Simplified22.7%
Taylor expanded in A around -inf 70.3%
associate-*r/70.3%
Simplified70.3%
if -4.3e-91 < A < 5.99999999999999975e-234 or 5.4999999999999999e-168 < A < 8.39999999999999969e-76Initial program 60.9%
associate--l-60.8%
Simplified60.8%
Taylor expanded in B around inf 44.0%
if 5.99999999999999975e-234 < A < 5.4999999999999999e-168Initial program 56.1%
associate-*r/56.1%
Applied egg-rr64.1%
Taylor expanded in C around inf 33.1%
+-commutative33.1%
unpow233.1%
mul-1-neg33.1%
mul-1-neg33.1%
sqr-neg33.1%
unpow233.1%
distribute-rgt1-in33.1%
metadata-eval33.1%
mul0-lft33.1%
metadata-eval33.1%
Simplified33.1%
Taylor expanded in A around 0 53.6%
Taylor expanded in B around 0 53.6%
if 8.39999999999999969e-76 < A Initial program 82.8%
associate--l-82.8%
Simplified82.8%
Taylor expanded in A around inf 73.7%
Final simplification60.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -3.1e-92)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 7.8e-235)
t_0
(if (<= A 1e-166)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 1.9e-77) t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -3.1e-92) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 7.8e-235) {
tmp = t_0;
} else if (A <= 1e-166) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 1.9e-77) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (A <= -3.1e-92) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 7.8e-235) {
tmp = t_0;
} else if (A <= 1e-166) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 1.9e-77) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -3.1e-92: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 7.8e-235: tmp = t_0 elif A <= 1e-166: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 1.9e-77: tmp = t_0 else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -3.1e-92) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 7.8e-235) tmp = t_0; elseif (A <= 1e-166) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 1.9e-77) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -3.1e-92) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 7.8e-235) tmp = t_0; elseif (A <= 1e-166) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 1.9e-77) tmp = t_0; else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.1e-92], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 7.8e-235], t$95$0, If[LessEqual[A, 1e-166], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.9e-77], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -3.1 \cdot 10^{-92}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.8 \cdot 10^{-235}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 10^{-166}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.9 \cdot 10^{-77}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.1000000000000001e-92Initial program 31.3%
associate-*r/31.4%
Applied egg-rr57.7%
Taylor expanded in A around -inf 70.5%
if -3.1000000000000001e-92 < A < 7.79999999999999939e-235 or 1.00000000000000004e-166 < A < 1.8999999999999999e-77Initial program 60.9%
associate--l-60.8%
Simplified60.8%
Taylor expanded in B around inf 44.0%
if 7.79999999999999939e-235 < A < 1.00000000000000004e-166Initial program 56.1%
associate-*r/56.1%
Applied egg-rr64.1%
Taylor expanded in C around inf 33.1%
+-commutative33.1%
unpow233.1%
mul-1-neg33.1%
mul-1-neg33.1%
sqr-neg33.1%
unpow233.1%
distribute-rgt1-in33.1%
metadata-eval33.1%
mul0-lft33.1%
metadata-eval33.1%
Simplified33.1%
Taylor expanded in A around 0 53.6%
Taylor expanded in B around 0 53.6%
if 1.8999999999999999e-77 < A Initial program 82.8%
associate--l-82.8%
Simplified82.8%
Taylor expanded in A around inf 73.7%
Final simplification60.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -7.5e-92)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 1.05e-234)
t_0
(if (<= A 7e-167)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 2.05e-76) t_0 (/ (* 180.0 (atan (/ (* A -2.0) B))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -7.5e-92) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 1.05e-234) {
tmp = t_0;
} else if (A <= 7e-167) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 2.05e-76) {
tmp = t_0;
} else {
tmp = (180.0 * atan(((A * -2.0) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (A <= -7.5e-92) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 1.05e-234) {
tmp = t_0;
} else if (A <= 7e-167) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 2.05e-76) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan(((A * -2.0) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -7.5e-92: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 1.05e-234: tmp = t_0 elif A <= 7e-167: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 2.05e-76: tmp = t_0 else: tmp = (180.0 * math.atan(((A * -2.0) / B))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -7.5e-92) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 1.05e-234) tmp = t_0; elseif (A <= 7e-167) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 2.05e-76) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(A * -2.0) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -7.5e-92) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 1.05e-234) tmp = t_0; elseif (A <= 7e-167) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 2.05e-76) tmp = t_0; else tmp = (180.0 * atan(((A * -2.0) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7.5e-92], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.05e-234], t$95$0, If[LessEqual[A, 7e-167], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.05e-76], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -7.5 \cdot 10^{-92}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{-234}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 7 \cdot 10^{-167}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.05 \cdot 10^{-76}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.5000000000000005e-92Initial program 31.3%
associate-*r/31.4%
Applied egg-rr57.7%
Taylor expanded in A around -inf 70.5%
if -7.5000000000000005e-92 < A < 1.04999999999999996e-234 or 6.9999999999999998e-167 < A < 2.0499999999999999e-76Initial program 60.9%
associate--l-60.8%
Simplified60.8%
Taylor expanded in B around inf 44.0%
if 1.04999999999999996e-234 < A < 6.9999999999999998e-167Initial program 56.1%
associate-*r/56.1%
Applied egg-rr64.1%
Taylor expanded in C around inf 33.1%
+-commutative33.1%
unpow233.1%
mul-1-neg33.1%
mul-1-neg33.1%
sqr-neg33.1%
unpow233.1%
distribute-rgt1-in33.1%
metadata-eval33.1%
mul0-lft33.1%
metadata-eval33.1%
Simplified33.1%
Taylor expanded in A around 0 53.6%
Taylor expanded in B around 0 53.6%
if 2.0499999999999999e-76 < A Initial program 82.8%
associate-*r/82.8%
Applied egg-rr97.1%
Taylor expanded in A around inf 73.8%
*-commutative73.8%
Simplified73.8%
Final simplification60.8%
(FPCore (A B C)
:precision binary64
(if (<= B -3.5e-46)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.4e-189)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 2.4e-98)
(* 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 <= -3.5e-46) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.4e-189) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 2.4e-98) {
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 <= -3.5e-46) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.4e-189) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 2.4e-98) {
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 <= -3.5e-46: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.4e-189: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 2.4e-98: 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 <= -3.5e-46) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.4e-189) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 2.4e-98) 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 <= -3.5e-46) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.4e-189) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 2.4e-98) 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, -3.5e-46], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.4e-189], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.4e-98], 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 -3.5 \cdot 10^{-46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.4 \cdot 10^{-189}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-98}:\\
\;\;\;\;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 < -3.5000000000000002e-46Initial program 58.3%
associate--l-58.3%
Simplified58.3%
Taylor expanded in B around -inf 57.2%
if -3.5000000000000002e-46 < B < -4.40000000000000038e-189Initial program 64.5%
associate-*r/64.5%
Applied egg-rr75.2%
Taylor expanded in B around inf 60.3%
neg-mul-160.3%
unsub-neg60.3%
Simplified60.3%
Taylor expanded in C around inf 50.0%
if -4.40000000000000038e-189 < B < 2.40000000000000005e-98Initial program 53.3%
associate--l-43.7%
Simplified43.7%
Taylor expanded in C around inf 39.3%
associate-*r/39.3%
distribute-rgt1-in39.3%
metadata-eval39.3%
mul0-lft39.3%
metadata-eval39.3%
Simplified39.3%
if 2.40000000000000005e-98 < B Initial program 55.3%
associate--l-55.3%
Simplified55.3%
Taylor expanded in B around inf 57.4%
Final simplification51.2%
(FPCore (A B C)
:precision binary64
(if (<= B -5.5e-118)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.8e-98)
(* 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 <= -5.5e-118) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.8e-98) {
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 <= -5.5e-118) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.8e-98) {
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 <= -5.5e-118: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.8e-98: 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 <= -5.5e-118) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.8e-98) 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 <= -5.5e-118) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.8e-98) 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, -5.5e-118], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-98], 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 -5.5 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-98}:\\
\;\;\;\;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 < -5.5000000000000003e-118Initial program 61.1%
associate--l-61.1%
Simplified61.1%
Taylor expanded in B around -inf 50.2%
if -5.5000000000000003e-118 < B < 4.8000000000000001e-98Initial program 53.7%
associate--l-45.5%
Simplified45.5%
Taylor expanded in C around inf 37.3%
associate-*r/37.3%
distribute-rgt1-in37.3%
metadata-eval37.3%
mul0-lft37.3%
metadata-eval37.3%
Simplified37.3%
if 4.8000000000000001e-98 < B Initial program 55.3%
associate--l-55.3%
Simplified55.3%
Taylor expanded in B around inf 57.4%
Final simplification48.3%
(FPCore (A B C) :precision binary64 (if (<= A -55000000.0) (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI) (/ (* 180.0 (atan (/ (- (- C B) A) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -55000000.0) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((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 (A <= -55000000.0) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - B) - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -55000000.0: tmp = (180.0 * math.atan((0.5 * (B / A)))) / 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 (A <= -55000000.0) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B) - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -55000000.0) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = (180.0 * atan((((C - B) - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -55000000.0], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -55000000:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.5e7Initial program 24.6%
associate-*r/24.6%
Applied egg-rr54.2%
Taylor expanded in A around -inf 81.9%
if -5.5e7 < A Initial program 66.5%
associate-*r/66.6%
Applied egg-rr86.3%
Taylor expanded in B around inf 64.7%
neg-mul-164.7%
unsub-neg64.7%
Simplified64.7%
Final simplification68.9%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 61.4%
associate--l-57.7%
Simplified57.7%
Taylor expanded in B around -inf 38.9%
if -4.999999999999985e-310 < B Initial program 52.9%
associate--l-50.6%
Simplified50.6%
Taylor expanded in B around inf 41.3%
Final simplification40.3%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 56.4%
associate--l-53.5%
Simplified53.5%
Taylor expanded in B around inf 25.0%
Final simplification25.0%
herbie shell --seed 2024021
(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)))