
(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 21 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 (<= C 2.65e+29)
(* 180.0 (/ (atan (* (/ 1.0 B) (- (- C (hypot B (- A C))) A))) PI))
(if (<= C 3.9e+34)
(/ (* 180.0 (atan (/ (* B -0.5) C))) PI)
(if (<= C 2.3e+65)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(/ (atan (/ -0.5 (/ C B))) (/ PI 180.0))))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.65e+29) {
tmp = 180.0 * (atan(((1.0 / B) * ((C - hypot(B, (A - C))) - A))) / ((double) M_PI));
} else if (C <= 3.9e+34) {
tmp = (180.0 * atan(((B * -0.5) / C))) / ((double) M_PI);
} else if (C <= 2.3e+65) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
} else {
tmp = atan((-0.5 / (C / B))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 2.65e+29) {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - Math.hypot(B, (A - C))) - A))) / Math.PI);
} else if (C <= 3.9e+34) {
tmp = (180.0 * Math.atan(((B * -0.5) / C))) / Math.PI;
} else if (C <= 2.3e+65) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
} else {
tmp = Math.atan((-0.5 / (C / B))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2.65e+29: tmp = 180.0 * (math.atan(((1.0 / B) * ((C - math.hypot(B, (A - C))) - A))) / math.pi) elif C <= 3.9e+34: tmp = (180.0 * math.atan(((B * -0.5) / C))) / math.pi elif C <= 2.3e+65: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) else: tmp = math.atan((-0.5 / (C / B))) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2.65e+29) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - hypot(B, Float64(A - C))) - A))) / pi)); elseif (C <= 3.9e+34) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / C))) / pi); elseif (C <= 2.3e+65) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); else tmp = Float64(atan(Float64(-0.5 / Float64(C / B))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2.65e+29) tmp = 180.0 * (atan(((1.0 / B) * ((C - hypot(B, (A - C))) - A))) / pi); elseif (C <= 3.9e+34) tmp = (180.0 * atan(((B * -0.5) / C))) / pi; elseif (C <= 2.3e+65) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = atan((-0.5 / (C / B))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2.65e+29], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.9e+34], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.3e+65], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2.65 \cdot 10^{+29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - \mathsf{hypot}\left(B, A - C\right)\right) - A\right)\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.9 \cdot 10^{+34}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.3 \cdot 10^{+65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if C < 2.65e29Initial program 64.9%
associate--l-63.5%
sub-neg63.5%
unpow263.5%
unpow263.5%
hypot-def79.0%
Applied egg-rr79.0%
unsub-neg79.0%
+-commutative79.0%
associate--r+84.8%
Simplified84.8%
if 2.65e29 < C < 3.90000000000000019e34Initial program 4.4%
Taylor expanded in A around 0 4.4%
unpow24.4%
unpow24.4%
hypot-def4.4%
Simplified4.4%
Taylor expanded in C around inf 97.2%
associate-*r/97.2%
Simplified97.2%
associate-*r/97.8%
*-commutative97.8%
Applied egg-rr97.8%
if 3.90000000000000019e34 < C < 2.3e65Initial program 24.5%
Taylor expanded in C around 0 24.5%
associate-*r/24.5%
mul-1-neg24.5%
unpow224.5%
unpow224.5%
hypot-def73.2%
Simplified73.2%
if 2.3e65 < C Initial program 14.3%
Taylor expanded in A around 0 11.5%
unpow211.5%
unpow211.5%
hypot-def56.5%
Simplified56.5%
Taylor expanded in C around -inf 56.5%
associate-*r/56.5%
distribute-lft-in56.5%
neg-mul-156.5%
mul-1-neg56.5%
remove-double-neg56.5%
neg-mul-156.5%
sub-neg56.5%
associate-*r/56.5%
*-commutative56.5%
associate-/l*56.5%
Simplified56.5%
Taylor expanded in C around inf 72.4%
associate-*r/72.4%
associate-/l*72.4%
Simplified72.4%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (- C (hypot B C)) B)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -1.02e+151)
t_1
(if (<= A -6.2e+101)
(* 180.0 (/ t_0 PI))
(if (<= A -1.7e+70)
t_1
(if (<= A 5.5e+117)
(/ t_0 (/ PI 180.0))
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan(((C - hypot(B, C)) / B));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -1.02e+151) {
tmp = t_1;
} else if (A <= -6.2e+101) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -1.7e+70) {
tmp = t_1;
} else if (A <= 5.5e+117) {
tmp = t_0 / (((double) M_PI) / 180.0);
} 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 t_0 = Math.atan(((C - Math.hypot(B, C)) / B));
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -1.02e+151) {
tmp = t_1;
} else if (A <= -6.2e+101) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -1.7e+70) {
tmp = t_1;
} else if (A <= 5.5e+117) {
tmp = t_0 / (Math.PI / 180.0);
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((C - math.hypot(B, C)) / B)) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -1.02e+151: tmp = t_1 elif A <= -6.2e+101: tmp = 180.0 * (t_0 / math.pi) elif A <= -1.7e+70: tmp = t_1 elif A <= 5.5e+117: tmp = t_0 / (math.pi / 180.0) else: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(C - hypot(B, C)) / B)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -1.02e+151) tmp = t_1; elseif (A <= -6.2e+101) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -1.7e+70) tmp = t_1; elseif (A <= 5.5e+117) tmp = Float64(t_0 / Float64(pi / 180.0)); 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) t_0 = atan(((C - hypot(B, C)) / B)); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -1.02e+151) tmp = t_1; elseif (A <= -6.2e+101) tmp = 180.0 * (t_0 / pi); elseif (A <= -1.7e+70) tmp = t_1; elseif (A <= 5.5e+117) tmp = t_0 / (pi / 180.0); else tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.02e+151], t$95$1, If[LessEqual[A, -6.2e+101], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.7e+70], t$95$1, If[LessEqual[A, 5.5e+117], N[(t$95$0 / N[(Pi / 180.0), $MachinePrecision]), $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}
t_0 := \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.02 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -6.2 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{elif}\;A \leq -1.7 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 5.5 \cdot 10^{+117}:\\
\;\;\;\;\frac{t_0}{\frac{\pi}{180}}\\
\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.02000000000000002e151 or -6.19999999999999998e101 < A < -1.7e70Initial program 12.1%
Taylor expanded in A around -inf 89.1%
associate-*r/89.1%
Simplified89.1%
if -1.02000000000000002e151 < A < -6.19999999999999998e101Initial program 37.1%
Taylor expanded in A around 0 37.1%
unpow237.1%
unpow237.1%
hypot-def100.0%
Simplified100.0%
if -1.7e70 < A < 5.49999999999999965e117Initial program 55.8%
Taylor expanded in A around 0 52.1%
unpow252.1%
unpow252.1%
hypot-def76.6%
Simplified76.6%
Taylor expanded in C around -inf 76.6%
associate-*r/76.6%
distribute-lft-in76.6%
neg-mul-176.6%
mul-1-neg76.6%
remove-double-neg76.6%
neg-mul-176.6%
sub-neg76.6%
associate-*r/76.6%
*-commutative76.6%
associate-/l*76.6%
Simplified76.6%
if 5.49999999999999965e117 < A Initial program 72.8%
Taylor expanded in C around 0 72.8%
associate-*r/72.8%
mul-1-neg72.8%
unpow272.8%
unpow272.8%
hypot-def91.2%
Simplified91.2%
Final simplification81.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -2.4e+151)
t_1
(if (<= A -6.5e+101)
t_0
(if (<= A -4.2e+71)
t_1
(if (<= A 3e+122) t_0 (* 180.0 (/ (atan (/ (- B A) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -2.4e+151) {
tmp = t_1;
} else if (A <= -6.5e+101) {
tmp = t_0;
} else if (A <= -4.2e+71) {
tmp = t_1;
} else if (A <= 3e+122) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B - 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 - Math.hypot(B, C)) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -2.4e+151) {
tmp = t_1;
} else if (A <= -6.5e+101) {
tmp = t_0;
} else if (A <= -4.2e+71) {
tmp = t_1;
} else if (A <= 3e+122) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -2.4e+151: tmp = t_1 elif A <= -6.5e+101: tmp = t_0 elif A <= -4.2e+71: tmp = t_1 elif A <= 3e+122: tmp = t_0 else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -2.4e+151) tmp = t_1; elseif (A <= -6.5e+101) tmp = t_0; elseif (A <= -4.2e+71) tmp = t_1; elseif (A <= 3e+122) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -2.4e+151) tmp = t_1; elseif (A <= -6.5e+101) tmp = t_0; elseif (A <= -4.2e+71) tmp = t_1; elseif (A <= 3e+122) tmp = t_0; else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.4e+151], t$95$1, If[LessEqual[A, -6.5e+101], t$95$0, If[LessEqual[A, -4.2e+71], t$95$1, If[LessEqual[A, 3e+122], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -2.4 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -6.5 \cdot 10^{+101}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -4.2 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 3 \cdot 10^{+122}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.4000000000000001e151 or -6.50000000000000016e101 < A < -4.19999999999999978e71Initial program 12.1%
Taylor expanded in A around -inf 89.1%
associate-*r/89.1%
Simplified89.1%
if -2.4000000000000001e151 < A < -6.50000000000000016e101 or -4.19999999999999978e71 < A < 2.99999999999999986e122Initial program 54.7%
Taylor expanded in A around 0 51.3%
unpow251.3%
unpow251.3%
hypot-def77.8%
Simplified77.8%
if 2.99999999999999986e122 < A Initial program 74.1%
associate--l-74.1%
sub-neg74.1%
unpow274.1%
unpow274.1%
hypot-def95.6%
Applied egg-rr95.6%
unsub-neg95.6%
+-commutative95.6%
associate--r+91.0%
Simplified91.0%
Taylor expanded in C around 0 74.0%
associate-*r/74.0%
mul-1-neg74.0%
distribute-neg-in74.0%
unsub-neg74.0%
unpow274.0%
unpow274.0%
hypot-def91.0%
Simplified91.0%
Taylor expanded in B around -inf 86.5%
neg-mul-186.5%
+-commutative86.5%
unsub-neg86.5%
Simplified86.5%
Final simplification81.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (- C (hypot B C)) B)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -5e+150)
t_1
(if (<= A -6.5e+101)
(* 180.0 (/ t_0 PI))
(if (<= A -1.6e+73)
t_1
(if (<= A 7e+121)
(/ t_0 (/ PI 180.0))
(* 180.0 (/ (atan (/ (- B A) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan(((C - hypot(B, C)) / B));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -5e+150) {
tmp = t_1;
} else if (A <= -6.5e+101) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -1.6e+73) {
tmp = t_1;
} else if (A <= 7e+121) {
tmp = t_0 / (((double) M_PI) / 180.0);
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((C - Math.hypot(B, C)) / B));
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -5e+150) {
tmp = t_1;
} else if (A <= -6.5e+101) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -1.6e+73) {
tmp = t_1;
} else if (A <= 7e+121) {
tmp = t_0 / (Math.PI / 180.0);
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((C - math.hypot(B, C)) / B)) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -5e+150: tmp = t_1 elif A <= -6.5e+101: tmp = 180.0 * (t_0 / math.pi) elif A <= -1.6e+73: tmp = t_1 elif A <= 7e+121: tmp = t_0 / (math.pi / 180.0) else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(C - hypot(B, C)) / B)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -5e+150) tmp = t_1; elseif (A <= -6.5e+101) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -1.6e+73) tmp = t_1; elseif (A <= 7e+121) tmp = Float64(t_0 / Float64(pi / 180.0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((C - hypot(B, C)) / B)); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -5e+150) tmp = t_1; elseif (A <= -6.5e+101) tmp = 180.0 * (t_0 / pi); elseif (A <= -1.6e+73) tmp = t_1; elseif (A <= 7e+121) tmp = t_0 / (pi / 180.0); else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5e+150], t$95$1, If[LessEqual[A, -6.5e+101], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.6e+73], t$95$1, If[LessEqual[A, 7e+121], N[(t$95$0 / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -5 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -6.5 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{elif}\;A \leq -1.6 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 7 \cdot 10^{+121}:\\
\;\;\;\;\frac{t_0}{\frac{\pi}{180}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.00000000000000009e150 or -6.50000000000000016e101 < A < -1.59999999999999991e73Initial program 12.1%
Taylor expanded in A around -inf 89.1%
associate-*r/89.1%
Simplified89.1%
if -5.00000000000000009e150 < A < -6.50000000000000016e101Initial program 37.1%
Taylor expanded in A around 0 37.1%
unpow237.1%
unpow237.1%
hypot-def100.0%
Simplified100.0%
if -1.59999999999999991e73 < A < 6.9999999999999999e121Initial program 55.6%
Taylor expanded in A around 0 51.9%
unpow251.9%
unpow251.9%
hypot-def76.7%
Simplified76.7%
Taylor expanded in C around -inf 76.7%
associate-*r/76.7%
distribute-lft-in76.7%
neg-mul-176.7%
mul-1-neg76.7%
remove-double-neg76.7%
neg-mul-176.7%
sub-neg76.7%
associate-*r/76.7%
*-commutative76.7%
associate-/l*76.7%
Simplified76.7%
if 6.9999999999999999e121 < A Initial program 74.1%
associate--l-74.1%
sub-neg74.1%
unpow274.1%
unpow274.1%
hypot-def95.6%
Applied egg-rr95.6%
unsub-neg95.6%
+-commutative95.6%
associate--r+91.0%
Simplified91.0%
Taylor expanded in C around 0 74.0%
associate-*r/74.0%
mul-1-neg74.0%
distribute-neg-in74.0%
unsub-neg74.0%
unpow274.0%
unpow274.0%
hypot-def91.0%
Simplified91.0%
Taylor expanded in B around -inf 86.5%
neg-mul-186.5%
+-commutative86.5%
unsub-neg86.5%
Simplified86.5%
Final simplification81.1%
(FPCore (A B C)
:precision binary64
(if (<= C 1.55e+29)
(* 180.0 (/ (atan (/ (- (- C (hypot B (- A C))) A) B)) PI))
(if (<= C 4.1e+34)
(/ (* 180.0 (atan (/ (* B -0.5) C))) PI)
(if (<= C 3.8e+65)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(/ (atan (/ -0.5 (/ C B))) (/ PI 180.0))))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.55e+29) {
tmp = 180.0 * (atan((((C - hypot(B, (A - C))) - A) / B)) / ((double) M_PI));
} else if (C <= 4.1e+34) {
tmp = (180.0 * atan(((B * -0.5) / C))) / ((double) M_PI);
} else if (C <= 3.8e+65) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
} else {
tmp = atan((-0.5 / (C / B))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.55e+29) {
tmp = 180.0 * (Math.atan((((C - Math.hypot(B, (A - C))) - A) / B)) / Math.PI);
} else if (C <= 4.1e+34) {
tmp = (180.0 * Math.atan(((B * -0.5) / C))) / Math.PI;
} else if (C <= 3.8e+65) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
} else {
tmp = Math.atan((-0.5 / (C / B))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.55e+29: tmp = 180.0 * (math.atan((((C - math.hypot(B, (A - C))) - A) / B)) / math.pi) elif C <= 4.1e+34: tmp = (180.0 * math.atan(((B * -0.5) / C))) / math.pi elif C <= 3.8e+65: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) else: tmp = math.atan((-0.5 / (C / B))) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.55e+29) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - hypot(B, Float64(A - C))) - A) / B)) / pi)); elseif (C <= 4.1e+34) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / C))) / pi); elseif (C <= 3.8e+65) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); else tmp = Float64(atan(Float64(-0.5 / Float64(C / B))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.55e+29) tmp = 180.0 * (atan((((C - hypot(B, (A - C))) - A) / B)) / pi); elseif (C <= 4.1e+34) tmp = (180.0 * atan(((B * -0.5) / C))) / pi; elseif (C <= 3.8e+65) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = atan((-0.5 / (C / B))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.55e+29], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.1e+34], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.8e+65], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.55 \cdot 10^{+29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - \mathsf{hypot}\left(B, A - C\right)\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.1 \cdot 10^{+34}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.8 \cdot 10^{+65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if C < 1.5499999999999999e29Initial program 64.9%
Taylor expanded in B around 0 63.5%
+-commutative63.5%
Simplified84.8%
if 1.5499999999999999e29 < C < 4.0999999999999998e34Initial program 4.4%
Taylor expanded in A around 0 4.4%
unpow24.4%
unpow24.4%
hypot-def4.4%
Simplified4.4%
Taylor expanded in C around inf 97.2%
associate-*r/97.2%
Simplified97.2%
associate-*r/97.8%
*-commutative97.8%
Applied egg-rr97.8%
if 4.0999999999999998e34 < C < 3.80000000000000011e65Initial program 24.5%
Taylor expanded in C around 0 24.5%
associate-*r/24.5%
mul-1-neg24.5%
unpow224.5%
unpow224.5%
hypot-def73.2%
Simplified73.2%
if 3.80000000000000011e65 < C Initial program 14.3%
Taylor expanded in A around 0 11.5%
unpow211.5%
unpow211.5%
hypot-def56.5%
Simplified56.5%
Taylor expanded in C around -inf 56.5%
associate-*r/56.5%
distribute-lft-in56.5%
neg-mul-156.5%
mul-1-neg56.5%
remove-double-neg56.5%
neg-mul-156.5%
sub-neg56.5%
associate-*r/56.5%
*-commutative56.5%
associate-/l*56.5%
Simplified56.5%
Taylor expanded in C around inf 72.4%
associate-*r/72.4%
associate-/l*72.4%
Simplified72.4%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 1.8e-202)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 2.4e-151)
(/ (* 180.0 (atan (/ (* B -0.5) C))) PI)
(if (<= B 3.9e-104)
(* 180.0 (/ (atan (+ (/ (* B 0.5) C) (* t_0 2.0))) PI))
(if (<= B 1.3e-87)
(* 180.0 (/ (atan (/ -0.5 (/ C B))) PI))
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 1.8e-202) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 2.4e-151) {
tmp = (180.0 * atan(((B * -0.5) / C))) / ((double) M_PI);
} else if (B <= 3.9e-104) {
tmp = 180.0 * (atan((((B * 0.5) / C) + (t_0 * 2.0))) / ((double) M_PI));
} else if (B <= 1.3e-87) {
tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 1.8e-202) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 2.4e-151) {
tmp = (180.0 * Math.atan(((B * -0.5) / C))) / Math.PI;
} else if (B <= 3.9e-104) {
tmp = 180.0 * (Math.atan((((B * 0.5) / C) + (t_0 * 2.0))) / Math.PI);
} else if (B <= 1.3e-87) {
tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= 1.8e-202: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 2.4e-151: tmp = (180.0 * math.atan(((B * -0.5) / C))) / math.pi elif B <= 3.9e-104: tmp = 180.0 * (math.atan((((B * 0.5) / C) + (t_0 * 2.0))) / math.pi) elif B <= 1.3e-87: tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi) else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= 1.8e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 2.4e-151) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / C))) / pi); elseif (B <= 3.9e-104) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B * 0.5) / C) + Float64(t_0 * 2.0))) / pi)); elseif (B <= 1.3e-87) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= 1.8e-202) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 2.4e-151) tmp = (180.0 * atan(((B * -0.5) / C))) / pi; elseif (B <= 3.9e-104) tmp = 180.0 * (atan((((B * 0.5) / C) + (t_0 * 2.0))) / pi); elseif (B <= 1.3e-87) tmp = 180.0 * (atan((-0.5 / (C / B))) / pi); else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 1.8e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-151], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 3.9e-104], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B * 0.5), $MachinePrecision] / C), $MachinePrecision] + N[(t$95$0 * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-87], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 1.8 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-151}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.9 \cdot 10^{-104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{C} + t_0 \cdot 2\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.8000000000000001e-202Initial program 53.3%
Taylor expanded in B around -inf 63.2%
associate--l+63.2%
div-sub64.6%
Simplified64.6%
if 1.8000000000000001e-202 < B < 2.4e-151Initial program 19.3%
Taylor expanded in A around 0 18.6%
unpow218.6%
unpow218.6%
hypot-def68.4%
Simplified68.4%
Taylor expanded in C around inf 59.8%
associate-*r/59.8%
Simplified59.8%
associate-*r/60.0%
*-commutative60.0%
Applied egg-rr60.0%
if 2.4e-151 < B < 3.9000000000000002e-104Initial program 70.4%
Taylor expanded in C around -inf 70.6%
+-commutative70.6%
+-commutative70.6%
associate-+l+70.6%
associate-*r/70.6%
metadata-eval70.6%
cancel-sign-sub-inv70.6%
distribute-lft-out--70.6%
div-sub70.6%
Simplified70.6%
if 3.9000000000000002e-104 < B < 1.30000000000000001e-87Initial program 20.0%
Taylor expanded in A around 0 3.8%
unpow23.8%
unpow23.8%
hypot-def5.7%
Simplified5.7%
Taylor expanded in C around inf 84.2%
associate-*r/84.5%
associate-/l*84.2%
Simplified84.2%
if 1.30000000000000001e-87 < B Initial program 51.4%
Taylor expanded in B around inf 75.5%
+-commutative75.5%
associate--r+75.5%
div-sub75.5%
Simplified75.5%
Final simplification68.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))))
(if (<= A -2.5e+60)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -2.15e-11)
t_0
(if (<= A -1.8e-85)
(* 180.0 (/ (atan (/ -0.5 (/ C B))) PI))
(if (<= A 2.6e-173)
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) + -1.0)) / ((double) M_PI));
double tmp;
if (A <= -2.5e+60) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -2.15e-11) {
tmp = t_0;
} else if (A <= -1.8e-85) {
tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
} else if (A <= 2.6e-173) {
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) + -1.0)) / Math.PI);
double tmp;
if (A <= -2.5e+60) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -2.15e-11) {
tmp = t_0;
} else if (A <= -1.8e-85) {
tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
} else if (A <= 2.6e-173) {
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) + -1.0)) / math.pi) tmp = 0 if A <= -2.5e+60: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -2.15e-11: tmp = t_0 elif A <= -1.8e-85: tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi) elif A <= 2.6e-173: 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(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)) tmp = 0.0 if (A <= -2.5e+60) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -2.15e-11) tmp = t_0; elseif (A <= -1.8e-85) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi)); elseif (A <= 2.6e-173) 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) + -1.0)) / pi); tmp = 0.0; if (A <= -2.5e+60) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -2.15e-11) tmp = t_0; elseif (A <= -1.8e-85) tmp = 180.0 * (atan((-0.5 / (C / B))) / pi); elseif (A <= 2.6e-173) 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[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.5e+60], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.15e-11], t$95$0, If[LessEqual[A, -1.8e-85], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.6e-173], 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 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{if}\;A \leq -2.5 \cdot 10^{+60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.15 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.8 \cdot 10^{-85}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.6 \cdot 10^{-173}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.49999999999999987e60Initial program 15.7%
Taylor expanded in A around -inf 76.6%
associate-*r/76.6%
Simplified76.6%
if -2.49999999999999987e60 < A < -2.15000000000000001e-11 or -1.7999999999999999e-85 < A < 2.60000000000000003e-173Initial program 60.5%
Taylor expanded in A around 0 59.9%
unpow259.9%
unpow259.9%
hypot-def79.7%
Simplified79.7%
Taylor expanded in C around 0 62.0%
if -2.15000000000000001e-11 < A < -1.7999999999999999e-85Initial program 27.0%
Taylor expanded in A around 0 27.2%
unpow227.2%
unpow227.2%
hypot-def66.0%
Simplified66.0%
Taylor expanded in C around inf 59.7%
associate-*r/59.7%
associate-/l*59.7%
Simplified59.7%
if 2.60000000000000003e-173 < A Initial program 64.9%
Taylor expanded in B around -inf 69.8%
associate--l+69.8%
div-sub70.9%
Simplified70.9%
Final simplification68.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* (/ C B) 2.0)) PI))))
(if (<= B -8e+48)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.1e-198)
t_0
(if (<= B 9.2e-156)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.8e-78) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
double tmp;
if (B <= -8e+48) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.1e-198) {
tmp = t_0;
} else if (B <= 9.2e-156) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.8e-78) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
double tmp;
if (B <= -8e+48) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.1e-198) {
tmp = t_0;
} else if (B <= 9.2e-156) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.8e-78) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) tmp = 0 if B <= -8e+48: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.1e-198: tmp = t_0 elif B <= 9.2e-156: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.8e-78: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)) tmp = 0.0 if (B <= -8e+48) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.1e-198) tmp = t_0; elseif (B <= 9.2e-156) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.8e-78) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C / B) * 2.0)) / pi); tmp = 0.0; if (B <= -8e+48) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.1e-198) tmp = t_0; elseif (B <= 9.2e-156) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.8e-78) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e+48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-198], t$95$0, If[LessEqual[B, 9.2e-156], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-78], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{if}\;B \leq -8 \cdot 10^{+48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-198}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-156}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.00000000000000035e48Initial program 44.6%
Taylor expanded in B around -inf 76.4%
if -8.00000000000000035e48 < B < 3.0999999999999998e-198 or 9.1999999999999998e-156 < B < 1.8000000000000001e-78Initial program 57.8%
Taylor expanded in C around -inf 40.0%
if 3.0999999999999998e-198 < B < 9.1999999999999998e-156Initial program 19.3%
Taylor expanded in C around inf 52.8%
associate-*r/52.8%
distribute-rgt1-in52.8%
metadata-eval52.8%
mul0-lft52.8%
metadata-eval52.8%
Simplified52.8%
if 1.8000000000000001e-78 < B Initial program 50.2%
Taylor expanded in B around inf 57.3%
Final simplification52.8%
(FPCore (A B C)
:precision binary64
(if (<= C -3.45e-87)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C -3e-289)
(* 180.0 (/ (atan (/ (- (- A) B) B)) PI))
(if (<= C 1.25e-268)
(* 180.0 (/ (atan (/ 0.5 (/ A B))) PI))
(if (<= C 4e-21)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(/ (atan (/ -0.5 (/ C B))) (/ PI 180.0)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.45e-87) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= -3e-289) {
tmp = 180.0 * (atan(((-A - B) / B)) / ((double) M_PI));
} else if (C <= 1.25e-268) {
tmp = 180.0 * (atan((0.5 / (A / B))) / ((double) M_PI));
} else if (C <= 4e-21) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else {
tmp = atan((-0.5 / (C / B))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -3.45e-87) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= -3e-289) {
tmp = 180.0 * (Math.atan(((-A - B) / B)) / Math.PI);
} else if (C <= 1.25e-268) {
tmp = 180.0 * (Math.atan((0.5 / (A / B))) / Math.PI);
} else if (C <= 4e-21) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else {
tmp = Math.atan((-0.5 / (C / B))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.45e-87: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= -3e-289: tmp = 180.0 * (math.atan(((-A - B) / B)) / math.pi) elif C <= 1.25e-268: tmp = 180.0 * (math.atan((0.5 / (A / B))) / math.pi) elif C <= 4e-21: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) else: tmp = math.atan((-0.5 / (C / B))) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.45e-87) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= -3e-289) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - B) / B)) / pi)); elseif (C <= 1.25e-268) tmp = Float64(180.0 * Float64(atan(Float64(0.5 / Float64(A / B))) / pi)); elseif (C <= 4e-21) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); else tmp = Float64(atan(Float64(-0.5 / Float64(C / B))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.45e-87) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= -3e-289) tmp = 180.0 * (atan(((-A - B) / B)) / pi); elseif (C <= 1.25e-268) tmp = 180.0 * (atan((0.5 / (A / B))) / pi); elseif (C <= 4e-21) tmp = 180.0 * (atan(((B - A) / B)) / pi); else tmp = atan((-0.5 / (C / B))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.45e-87], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3e-289], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.25e-268], N[(180.0 * N[(N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4e-21], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.45 \cdot 10^{-87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -3 \cdot 10^{-289}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.25 \cdot 10^{-268}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4 \cdot 10^{-21}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if C < -3.45000000000000021e-87Initial program 68.6%
Taylor expanded in A around 0 67.8%
unpow267.8%
unpow267.8%
hypot-def86.2%
Simplified86.2%
Taylor expanded in B around -inf 73.4%
if -3.45000000000000021e-87 < C < -2.9999999999999998e-289Initial program 67.2%
associate--l-63.8%
sub-neg63.8%
unpow263.8%
unpow263.8%
hypot-def82.4%
Applied egg-rr82.4%
unsub-neg82.4%
+-commutative82.4%
associate--r+92.9%
Simplified92.9%
Taylor expanded in C around 0 60.2%
associate-*r/60.2%
mul-1-neg60.2%
distribute-neg-in60.2%
unsub-neg60.2%
unpow260.2%
unpow260.2%
hypot-def86.1%
Simplified86.1%
Taylor expanded in A around 0 63.6%
neg-mul-163.6%
+-commutative63.6%
mul-1-neg63.6%
unsub-neg63.6%
Simplified63.6%
if -2.9999999999999998e-289 < C < 1.25e-268Initial program 47.6%
associate--l-40.7%
sub-neg40.7%
unpow240.7%
unpow240.7%
hypot-def54.2%
Applied egg-rr54.2%
unsub-neg54.2%
+-commutative54.2%
associate--r+68.2%
Simplified68.2%
Taylor expanded in C around 0 47.6%
associate-*r/47.6%
mul-1-neg47.6%
distribute-neg-in47.6%
unsub-neg47.6%
unpow247.6%
unpow247.6%
hypot-def68.2%
Simplified68.2%
Taylor expanded in A around -inf 51.9%
associate-*r/51.9%
associate-/l*51.9%
Simplified51.9%
if 1.25e-268 < C < 3.99999999999999963e-21Initial program 67.3%
associate--l-67.1%
sub-neg67.1%
unpow267.1%
unpow267.1%
hypot-def74.3%
Applied egg-rr74.3%
unsub-neg74.3%
+-commutative74.3%
associate--r+81.2%
Simplified81.2%
Taylor expanded in C around 0 65.9%
associate-*r/65.9%
mul-1-neg65.9%
distribute-neg-in65.9%
unsub-neg65.9%
unpow265.9%
unpow265.9%
hypot-def79.7%
Simplified79.7%
Taylor expanded in B around -inf 53.0%
neg-mul-153.0%
+-commutative53.0%
unsub-neg53.0%
Simplified53.0%
if 3.99999999999999963e-21 < C Initial program 18.3%
Taylor expanded in A around 0 14.1%
unpow214.1%
unpow214.1%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around -inf 51.4%
associate-*r/51.4%
distribute-lft-in51.4%
neg-mul-151.4%
mul-1-neg51.4%
remove-double-neg51.4%
neg-mul-151.4%
sub-neg51.4%
associate-*r/51.4%
*-commutative51.4%
associate-/l*51.4%
Simplified51.4%
Taylor expanded in C around inf 65.0%
associate-*r/65.0%
associate-/l*64.9%
Simplified64.9%
Final simplification64.9%
(FPCore (A B C)
:precision binary64
(if (<= B 3.9e-205)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= B 1.6e-156)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.05e-78)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 3.9e-205) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (B <= 1.6e-156) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.05e-78) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 3.9e-205) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (B <= 1.6e-156) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.05e-78) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 3.9e-205: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif B <= 1.6e-156: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.05e-78: tmp = 180.0 * (math.atan(((C / B) * 2.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 <= 3.9e-205) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (B <= 1.6e-156) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.05e-78) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 3.9e-205) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (B <= 1.6e-156) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.05e-78) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 3.9e-205], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e-156], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.05e-78], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.9 \cdot 10^{-205}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-156}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 3.90000000000000018e-205Initial program 53.3%
Taylor expanded in A around 0 45.8%
unpow245.8%
unpow245.8%
hypot-def66.8%
Simplified66.8%
Taylor expanded in B around -inf 56.8%
if 3.90000000000000018e-205 < B < 1.59999999999999991e-156Initial program 19.3%
Taylor expanded in C around inf 52.8%
associate-*r/52.8%
distribute-rgt1-in52.8%
metadata-eval52.8%
mul0-lft52.8%
metadata-eval52.8%
Simplified52.8%
if 1.59999999999999991e-156 < B < 2.0499999999999999e-78Initial program 58.8%
Taylor expanded in C around -inf 38.3%
if 2.0499999999999999e-78 < B Initial program 50.2%
Taylor expanded in B around inf 57.3%
Final simplification55.3%
(FPCore (A B C)
:precision binary64
(if (<= C 3e-255)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(if (<= C 9.5e-168)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 1.4e-67)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (/ -0.5 (/ C B))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= 3e-255) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else if (C <= 9.5e-168) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 1.4e-67) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 3e-255) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else if (C <= 9.5e-168) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 1.4e-67) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 3e-255: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) elif C <= 9.5e-168: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 1.4e-67: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 3e-255) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); elseif (C <= 9.5e-168) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 1.4e-67) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 3e-255) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); elseif (C <= 9.5e-168) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 1.4e-67) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 / (C / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 3e-255], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.5e-168], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.4e-67], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3 \cdot 10^{-255}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 9.5 \cdot 10^{-168}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 1.4 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\
\end{array}
\end{array}
if C < 3.00000000000000002e-255Initial program 66.5%
Taylor expanded in A around 0 59.0%
unpow259.0%
unpow259.0%
hypot-def76.8%
Simplified76.8%
Taylor expanded in C around 0 60.8%
if 3.00000000000000002e-255 < C < 9.49999999999999918e-168Initial program 58.1%
Taylor expanded in B around -inf 46.8%
if 9.49999999999999918e-168 < C < 1.40000000000000005e-67Initial program 67.8%
Taylor expanded in B around inf 40.6%
if 1.40000000000000005e-67 < C Initial program 25.5%
Taylor expanded in A around 0 17.7%
unpow217.7%
unpow217.7%
hypot-def48.9%
Simplified48.9%
Taylor expanded in C around inf 63.0%
associate-*r/63.1%
associate-/l*63.0%
Simplified63.0%
Final simplification59.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 1.1e-198)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 1.75e-158)
(/ (* 180.0 (atan (/ (* B -0.5) C))) PI)
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 1.1e-198) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 1.75e-158) {
tmp = (180.0 * atan(((B * -0.5) / C))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 1.1e-198) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 1.75e-158) {
tmp = (180.0 * Math.atan(((B * -0.5) / C))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= 1.1e-198: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 1.75e-158: tmp = (180.0 * math.atan(((B * -0.5) / C))) / math.pi else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= 1.1e-198) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 1.75e-158) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / C))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= 1.1e-198) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 1.75e-158) tmp = (180.0 * atan(((B * -0.5) / C))) / pi; else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 1.1e-198], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.75e-158], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 1.1 \cdot 10^{-198}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.75 \cdot 10^{-158}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.1e-198Initial program 53.3%
Taylor expanded in B around -inf 63.2%
associate--l+63.2%
div-sub64.6%
Simplified64.6%
if 1.1e-198 < B < 1.75000000000000006e-158Initial program 14.3%
Taylor expanded in A around 0 13.5%
unpow213.5%
unpow213.5%
hypot-def62.1%
Simplified62.1%
Taylor expanded in C around inf 61.6%
associate-*r/61.6%
Simplified61.6%
associate-*r/61.8%
*-commutative61.8%
Applied egg-rr61.8%
if 1.75000000000000006e-158 < B Initial program 51.8%
Taylor expanded in B around inf 70.3%
+-commutative70.3%
associate--r+70.3%
div-sub70.3%
Simplified70.3%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(if (<= B 1.7e-202)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= B 2e-156)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.7e-202) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (B <= 2e-156) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1.7e-202) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (B <= 2e-156) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.7e-202: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif B <= 2e-156: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1.7e-202) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (B <= 2e-156) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1.7e-202) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (B <= 2e-156) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.7e-202], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2e-156], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.7 \cdot 10^{-202}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-156}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.70000000000000006e-202Initial program 53.3%
Taylor expanded in A around 0 45.8%
unpow245.8%
unpow245.8%
hypot-def66.8%
Simplified66.8%
Taylor expanded in B around -inf 56.8%
if 1.70000000000000006e-202 < B < 2.00000000000000008e-156Initial program 19.3%
Taylor expanded in C around inf 52.8%
associate-*r/52.8%
distribute-rgt1-in52.8%
metadata-eval52.8%
mul0-lft52.8%
metadata-eval52.8%
Simplified52.8%
if 2.00000000000000008e-156 < B Initial program 52.0%
Taylor expanded in A around 0 41.3%
unpow241.3%
unpow241.3%
hypot-def60.8%
Simplified60.8%
Taylor expanded in C around 0 59.5%
Final simplification57.7%
(FPCore (A B C)
:precision binary64
(if (<= C -1.15e-287)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(if (<= C 1.95e-178)
(* 180.0 (/ (atan (/ 0.5 (/ A B))) PI))
(* 180.0 (/ (atan (/ -0.5 (/ C B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.15e-287) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else if (C <= 1.95e-178) {
tmp = 180.0 * (atan((0.5 / (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.15e-287) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else if (C <= 1.95e-178) {
tmp = 180.0 * (Math.atan((0.5 / (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.15e-287: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) elif C <= 1.95e-178: tmp = 180.0 * (math.atan((0.5 / (A / B))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.15e-287) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); elseif (C <= 1.95e-178) tmp = Float64(180.0 * Float64(atan(Float64(0.5 / Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.15e-287) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); elseif (C <= 1.95e-178) tmp = 180.0 * (atan((0.5 / (A / B))) / pi); else tmp = 180.0 * (atan((-0.5 / (C / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.15e-287], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.95e-178], N[(180.0 * N[(N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.15 \cdot 10^{-287}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.95 \cdot 10^{-178}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.14999999999999993e-287Initial program 68.3%
Taylor expanded in A around 0 62.6%
unpow262.6%
unpow262.6%
hypot-def81.1%
Simplified81.1%
Taylor expanded in C around 0 66.0%
if -1.14999999999999993e-287 < C < 1.95000000000000013e-178Initial program 54.0%
associate--l-50.0%
sub-neg50.0%
unpow250.0%
unpow250.0%
hypot-def60.5%
Applied egg-rr60.5%
unsub-neg60.5%
+-commutative60.5%
associate--r+75.2%
Simplified75.2%
Taylor expanded in C around 0 54.0%
associate-*r/54.0%
mul-1-neg54.0%
distribute-neg-in54.0%
unsub-neg54.0%
unpow254.0%
unpow254.0%
hypot-def75.2%
Simplified75.2%
Taylor expanded in A around -inf 46.1%
associate-*r/46.1%
associate-/l*45.9%
Simplified45.9%
if 1.95000000000000013e-178 < C Initial program 33.1%
Taylor expanded in A around 0 23.5%
unpow223.5%
unpow223.5%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around inf 56.7%
associate-*r/56.7%
associate-/l*56.7%
Simplified56.6%
Final simplification59.8%
(FPCore (A B C)
:precision binary64
(if (<= C -4e-289)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(if (<= C 6e-184)
(* 180.0 (/ (atan (/ 0.5 (/ A B))) PI))
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4e-289) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else if (C <= 6e-184) {
tmp = 180.0 * (atan((0.5 / (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4e-289) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else if (C <= 6e-184) {
tmp = 180.0 * (Math.atan((0.5 / (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4e-289: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) elif C <= 6e-184: tmp = 180.0 * (math.atan((0.5 / (A / B))) / math.pi) else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4e-289) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); elseif (C <= 6e-184) tmp = Float64(180.0 * Float64(atan(Float64(0.5 / Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4e-289) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); elseif (C <= 6e-184) tmp = 180.0 * (atan((0.5 / (A / B))) / pi); else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4e-289], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6e-184], N[(180.0 * N[(N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4 \cdot 10^{-289}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 6 \cdot 10^{-184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4e-289Initial program 68.3%
Taylor expanded in A around 0 62.6%
unpow262.6%
unpow262.6%
hypot-def81.1%
Simplified81.1%
Taylor expanded in C around 0 66.0%
if -4e-289 < C < 5.99999999999999982e-184Initial program 54.0%
associate--l-50.0%
sub-neg50.0%
unpow250.0%
unpow250.0%
hypot-def60.5%
Applied egg-rr60.5%
unsub-neg60.5%
+-commutative60.5%
associate--r+75.2%
Simplified75.2%
Taylor expanded in C around 0 54.0%
associate-*r/54.0%
mul-1-neg54.0%
distribute-neg-in54.0%
unsub-neg54.0%
unpow254.0%
unpow254.0%
hypot-def75.2%
Simplified75.2%
Taylor expanded in A around -inf 46.1%
associate-*r/46.1%
associate-/l*45.9%
Simplified45.9%
if 5.99999999999999982e-184 < C Initial program 33.1%
Taylor expanded in A around 0 23.5%
unpow223.5%
unpow223.5%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around inf 56.7%
associate-*r/56.7%
Simplified56.7%
Final simplification59.8%
(FPCore (A B C)
:precision binary64
(if (<= C -9.5e-289)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(if (<= C 2.1e-178)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -9.5e-289) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else if (C <= 2.1e-178) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -9.5e-289) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else if (C <= 2.1e-178) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -9.5e-289: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) elif C <= 2.1e-178: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -9.5e-289) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); elseif (C <= 2.1e-178) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -9.5e-289) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); elseif (C <= 2.1e-178) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -9.5e-289], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.1e-178], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -9.5 \cdot 10^{-289}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.1 \cdot 10^{-178}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -9.4999999999999995e-289Initial program 68.3%
Taylor expanded in A around 0 62.6%
unpow262.6%
unpow262.6%
hypot-def81.1%
Simplified81.1%
Taylor expanded in C around 0 66.0%
if -9.4999999999999995e-289 < C < 2.1e-178Initial program 54.0%
Taylor expanded in A around -inf 46.1%
associate-*r/46.1%
Simplified46.1%
if 2.1e-178 < C Initial program 33.1%
Taylor expanded in A around 0 23.5%
unpow223.5%
unpow223.5%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around inf 56.7%
associate-*r/56.7%
Simplified56.7%
Final simplification59.8%
(FPCore (A B C)
:precision binary64
(if (<= C -2.85e-223)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(if (<= C 2.1e-26)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.85e-223) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else if (C <= 2.1e-26) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.85e-223) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else if (C <= 2.1e-26) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.85e-223: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) elif C <= 2.1e-26: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.85e-223) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); elseif (C <= 2.1e-26) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.85e-223) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); elseif (C <= 2.1e-26) tmp = 180.0 * (atan(((B - A) / B)) / pi); else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.85e-223], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.1e-26], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.85 \cdot 10^{-223}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.1 \cdot 10^{-26}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.8499999999999999e-223Initial program 66.7%
Taylor expanded in A around 0 64.4%
unpow264.4%
unpow264.4%
hypot-def83.4%
Simplified83.4%
Taylor expanded in C around 0 68.7%
if -2.8499999999999999e-223 < C < 2.10000000000000008e-26Initial program 65.8%
associate--l-64.3%
sub-neg64.3%
unpow264.3%
unpow264.3%
hypot-def73.2%
Applied egg-rr73.2%
unsub-neg73.2%
+-commutative73.2%
associate--r+80.7%
Simplified80.7%
Taylor expanded in C around 0 64.9%
associate-*r/64.9%
mul-1-neg64.9%
distribute-neg-in64.9%
unsub-neg64.9%
unpow264.9%
unpow264.9%
hypot-def79.7%
Simplified79.7%
Taylor expanded in B around -inf 52.4%
neg-mul-152.4%
+-commutative52.4%
unsub-neg52.4%
Simplified52.4%
if 2.10000000000000008e-26 < C Initial program 18.3%
Taylor expanded in A around 0 14.1%
unpow214.1%
unpow214.1%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around inf 64.9%
associate-*r/64.9%
Simplified64.9%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= C -6.2e-221)
(* 180.0 (/ (atan (+ (/ C B) -1.0)) PI))
(if (<= C 1.15e-20)
(* 180.0 (/ (atan (/ (- B A) B)) PI))
(/ (atan (/ -0.5 (/ C B))) (/ PI 180.0)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -6.2e-221) {
tmp = 180.0 * (atan(((C / B) + -1.0)) / ((double) M_PI));
} else if (C <= 1.15e-20) {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
} else {
tmp = atan((-0.5 / (C / B))) / (((double) M_PI) / 180.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -6.2e-221) {
tmp = 180.0 * (Math.atan(((C / B) + -1.0)) / Math.PI);
} else if (C <= 1.15e-20) {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
} else {
tmp = Math.atan((-0.5 / (C / B))) / (Math.PI / 180.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -6.2e-221: tmp = 180.0 * (math.atan(((C / B) + -1.0)) / math.pi) elif C <= 1.15e-20: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) else: tmp = math.atan((-0.5 / (C / B))) / (math.pi / 180.0) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -6.2e-221) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + -1.0)) / pi)); elseif (C <= 1.15e-20) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); else tmp = Float64(atan(Float64(-0.5 / Float64(C / B))) / Float64(pi / 180.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -6.2e-221) tmp = 180.0 * (atan(((C / B) + -1.0)) / pi); elseif (C <= 1.15e-20) tmp = 180.0 * (atan(((B - A) / B)) / pi); else tmp = atan((-0.5 / (C / B))) / (pi / 180.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -6.2e-221], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.15e-20], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi / 180.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6.2 \cdot 10^{-221}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.15 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\frac{\pi}{180}}\\
\end{array}
\end{array}
if C < -6.1999999999999998e-221Initial program 66.7%
Taylor expanded in A around 0 64.4%
unpow264.4%
unpow264.4%
hypot-def83.4%
Simplified83.4%
Taylor expanded in C around 0 68.7%
if -6.1999999999999998e-221 < C < 1.15e-20Initial program 65.8%
associate--l-64.3%
sub-neg64.3%
unpow264.3%
unpow264.3%
hypot-def73.2%
Applied egg-rr73.2%
unsub-neg73.2%
+-commutative73.2%
associate--r+80.7%
Simplified80.7%
Taylor expanded in C around 0 64.9%
associate-*r/64.9%
mul-1-neg64.9%
distribute-neg-in64.9%
unsub-neg64.9%
unpow264.9%
unpow264.9%
hypot-def79.7%
Simplified79.7%
Taylor expanded in B around -inf 52.4%
neg-mul-152.4%
+-commutative52.4%
unsub-neg52.4%
Simplified52.4%
if 1.15e-20 < C Initial program 18.3%
Taylor expanded in A around 0 14.1%
unpow214.1%
unpow214.1%
hypot-def51.4%
Simplified51.4%
Taylor expanded in C around -inf 51.4%
associate-*r/51.4%
distribute-lft-in51.4%
neg-mul-151.4%
mul-1-neg51.4%
remove-double-neg51.4%
neg-mul-151.4%
sub-neg51.4%
associate-*r/51.4%
*-commutative51.4%
associate-/l*51.4%
Simplified51.4%
Taylor expanded in C around inf 65.0%
associate-*r/65.0%
associate-/l*64.9%
Simplified64.9%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= B -5.2e-57)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.6e-157)
(* 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.2e-57) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.6e-157) {
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.2e-57) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.6e-157) {
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.2e-57: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.6e-157: 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.2e-57) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.6e-157) 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.2e-57) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.6e-157) 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.2e-57], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.6e-157], 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.2 \cdot 10^{-57}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-157}:\\
\;\;\;\;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.19999999999999971e-57Initial program 47.3%
Taylor expanded in B around -inf 56.0%
if -5.19999999999999971e-57 < B < 4.59999999999999977e-157Initial program 54.1%
Taylor expanded in C around inf 37.8%
associate-*r/37.8%
distribute-rgt1-in37.8%
metadata-eval37.8%
mul0-lft37.8%
metadata-eval37.8%
Simplified37.8%
if 4.59999999999999977e-157 < B Initial program 51.8%
Taylor expanded in B around inf 48.1%
Final simplification47.3%
(FPCore (A B C) :precision binary64 (if (<= B -2e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.999999999999994e-310Initial program 50.2%
Taylor expanded in B around -inf 39.7%
if -1.999999999999994e-310 < B Initial program 52.0%
Taylor expanded in B around inf 39.2%
Final simplification39.4%
(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 51.2%
Taylor expanded in B around inf 21.3%
Final simplification21.3%
herbie shell --seed 2023187
(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)))