
(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 7.8e+135) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* (atan (/ (* B -0.5) C)) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 7.8e+135) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = atan(((B * -0.5) / C)) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 7.8e+135) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 7.8e+135: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 7.8e+135) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 7.8e+135) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = atan(((B * -0.5) / C)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 7.8e+135], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 7.8 \cdot 10^{+135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < 7.80000000000000064e135Initial program 61.8%
Simplified82.5%
if 7.80000000000000064e135 < C Initial program 8.7%
Taylor expanded in A around 0 8.7%
unpow28.7%
unpow28.7%
hypot-define52.4%
Simplified52.4%
Taylor expanded in C around inf 90.7%
associate-*r/91.0%
Applied egg-rr91.0%
*-commutative91.0%
associate-/l*91.1%
*-commutative91.1%
associate-*l/91.1%
Simplified91.1%
Final simplification84.2%
(FPCore (A B C)
:precision binary64
(if (<= A -6.5e+78)
(/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
(if (<= A 6.1e+29)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (/ (- (+ C B) A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.5e+78) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else if (A <= 6.1e+29) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C + B) - A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.5e+78) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else if (A <= 6.1e+29) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C + B) - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.5e+78: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi elif A <= 6.1e+29: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 * math.atan((((C + B) - A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.5e+78) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi); elseif (A <= 6.1e+29) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / 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 <= -6.5e+78) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; elseif (A <= 6.1e+29) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan((((C + B) - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.5e+78], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 6.1e+29], 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[(N[(N[(C + B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.5 \cdot 10^{+78}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.1 \cdot 10^{+29}:\\
\;\;\;\;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{\left(C + B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.50000000000000036e78Initial program 20.9%
associate-*r/20.9%
associate-*l/20.9%
*-un-lft-identity20.9%
unpow220.9%
unpow220.9%
hypot-define53.4%
Applied egg-rr53.4%
Taylor expanded in A around -inf 89.8%
associate-*r/89.8%
*-commutative89.8%
associate-/l*89.8%
Simplified89.8%
if -6.50000000000000036e78 < A < 6.0999999999999998e29Initial program 46.0%
Taylor expanded in A around 0 42.4%
unpow242.4%
unpow242.4%
hypot-define72.5%
Simplified72.5%
if 6.0999999999999998e29 < A Initial program 85.2%
associate-*r/85.2%
associate-*l/85.2%
*-un-lft-identity85.2%
unpow285.2%
unpow285.2%
hypot-define96.9%
Applied egg-rr96.9%
Taylor expanded in B around -inf 88.2%
Final simplification79.1%
(FPCore (A B C)
:precision binary64
(if (<= A -1.35e+79)
(/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
(if (<= A 1.76e+31)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ (* 180.0 (atan (/ (- (+ C B) A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+79) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else if (A <= 1.76e+31) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C + B) - A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+79) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else if (A <= 1.76e+31) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C + B) - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.35e+79: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi elif A <= 1.76e+31: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = (180.0 * math.atan((((C + B) - A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.35e+79) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi); elseif (A <= 1.76e+31) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / 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 <= -1.35e+79) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; elseif (A <= 1.76e+31) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = (180.0 * atan((((C + B) - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.35e+79], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.76e+31], 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[(N[(C + B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.35 \cdot 10^{+79}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.76 \cdot 10^{+31}:\\
\;\;\;\;\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(C + B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.35e79Initial program 20.9%
associate-*r/20.9%
associate-*l/20.9%
*-un-lft-identity20.9%
unpow220.9%
unpow220.9%
hypot-define53.4%
Applied egg-rr53.4%
Taylor expanded in A around -inf 89.8%
associate-*r/89.8%
*-commutative89.8%
associate-/l*89.8%
Simplified89.8%
if -1.35e79 < A < 1.76e31Initial program 46.0%
associate-*r/46.0%
associate-*l/46.0%
*-un-lft-identity46.0%
unpow246.0%
unpow246.0%
hypot-define76.0%
Applied egg-rr76.0%
Taylor expanded in A around 0 42.4%
unpow242.4%
unpow242.4%
hypot-undefine72.5%
Simplified72.5%
if 1.76e31 < A Initial program 85.2%
associate-*r/85.2%
associate-*l/85.2%
*-un-lft-identity85.2%
unpow285.2%
unpow285.2%
hypot-define96.9%
Applied egg-rr96.9%
Taylor expanded in B around -inf 88.2%
Final simplification79.1%
(FPCore (A B C) :precision binary64 (if (<= A -1.35e+80) (/ (* 180.0 (atan (* B (/ 0.5 A)))) PI) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+80) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+80) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.35e+80: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.35e+80) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / 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 <= -1.35e+80) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.35e+80], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / 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 -1.35 \cdot 10^{+80}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{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 < -1.34999999999999991e80Initial program 20.9%
associate-*r/20.9%
associate-*l/20.9%
*-un-lft-identity20.9%
unpow220.9%
unpow220.9%
hypot-define53.4%
Applied egg-rr53.4%
Taylor expanded in A around -inf 89.8%
associate-*r/89.8%
*-commutative89.8%
associate-/l*89.8%
Simplified89.8%
if -1.34999999999999991e80 < A Initial program 57.1%
Simplified81.9%
Final simplification83.2%
(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)))
(t_2 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -7.2e+24)
t_2
(if (<= A -7e-7)
t_1
(if (<= A -6.1e-97)
t_2
(if (<= A -5.8e-210)
t_0
(if (<= A 1.25e-242)
t_1
(if (<= A 1.15e-159)
t_0
(if (<= A 3.25e+24)
t_1
(* 180.0 (/ (atan (* -2.0 (/ 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 t_2 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -7.2e+24) {
tmp = t_2;
} else if (A <= -7e-7) {
tmp = t_1;
} else if (A <= -6.1e-97) {
tmp = t_2;
} else if (A <= -5.8e-210) {
tmp = t_0;
} else if (A <= 1.25e-242) {
tmp = t_1;
} else if (A <= 1.15e-159) {
tmp = t_0;
} else if (A <= 3.25e+24) {
tmp = t_1;
} 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(((C + B) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double t_2 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -7.2e+24) {
tmp = t_2;
} else if (A <= -7e-7) {
tmp = t_1;
} else if (A <= -6.1e-97) {
tmp = t_2;
} else if (A <= -5.8e-210) {
tmp = t_0;
} else if (A <= 1.25e-242) {
tmp = t_1;
} else if (A <= 1.15e-159) {
tmp = t_0;
} else if (A <= 3.25e+24) {
tmp = t_1;
} 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(((C + B) / B)) / math.pi) t_1 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) t_2 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -7.2e+24: tmp = t_2 elif A <= -7e-7: tmp = t_1 elif A <= -6.1e-97: tmp = t_2 elif A <= -5.8e-210: tmp = t_0 elif A <= 1.25e-242: tmp = t_1 elif A <= 1.15e-159: tmp = t_0 elif A <= 3.25e+24: tmp = t_1 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(Float64(Float64(C + B) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) t_2 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -7.2e+24) tmp = t_2; elseif (A <= -7e-7) tmp = t_1; elseif (A <= -6.1e-97) tmp = t_2; elseif (A <= -5.8e-210) tmp = t_0; elseif (A <= 1.25e-242) tmp = t_1; elseif (A <= 1.15e-159) tmp = t_0; elseif (A <= 3.25e+24) tmp = t_1; 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(((C + B) / B)) / pi); t_1 = 180.0 * (atan((-0.5 * (B / C))) / pi); t_2 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -7.2e+24) tmp = t_2; elseif (A <= -7e-7) tmp = t_1; elseif (A <= -6.1e-97) tmp = t_2; elseif (A <= -5.8e-210) tmp = t_0; elseif (A <= 1.25e-242) tmp = t_1; elseif (A <= 1.15e-159) tmp = t_0; elseif (A <= 3.25e+24) tmp = t_1; 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[N[(N[(C + B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7.2e+24], t$95$2, If[LessEqual[A, -7e-7], t$95$1, If[LessEqual[A, -6.1e-97], t$95$2, If[LessEqual[A, -5.8e-210], t$95$0, If[LessEqual[A, 1.25e-242], t$95$1, If[LessEqual[A, 1.15e-159], t$95$0, If[LessEqual[A, 3.25e+24], t$95$1, 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} \left(\frac{C + B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -7.2 \cdot 10^{+24}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -6.1 \cdot 10^{-97}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;A \leq -5.8 \cdot 10^{-210}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 1.15 \cdot 10^{-159}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 3.25 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.19999999999999966e24 or -6.99999999999999968e-7 < A < -6.10000000000000026e-97Initial program 29.8%
Taylor expanded in A around -inf 74.8%
associate-*r/74.8%
Simplified74.8%
if -7.19999999999999966e24 < A < -6.99999999999999968e-7 or -5.80000000000000012e-210 < A < 1.25e-242 or 1.14999999999999989e-159 < A < 3.2499999999999998e24Initial program 44.3%
Taylor expanded in A around 0 37.6%
unpow237.6%
unpow237.6%
hypot-define68.2%
Simplified68.2%
Taylor expanded in C around inf 54.5%
if -6.10000000000000026e-97 < A < -5.80000000000000012e-210 or 1.25e-242 < A < 1.14999999999999989e-159Initial program 49.2%
Taylor expanded in A around 0 49.0%
unpow249.0%
unpow249.0%
hypot-define83.3%
Simplified83.3%
Taylor expanded in B around -inf 58.5%
if 3.2499999999999998e24 < A Initial program 85.2%
Taylor expanded in A around inf 81.0%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))
(t_2 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= A -8e+76)
t_1
(if (<= A -7.5e+31)
t_0
(if (<= A -7.2e+24)
t_1
(if (<= A -7e-7)
t_2
(if (<= A -6e-102)
t_1
(if (<= A 2.3e-215)
t_0
(if (<= A 5.1e+24)
t_2
(* 180.0 (/ (atan (* -2.0 (/ 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(((B * 0.5) / A)) / ((double) M_PI));
double t_2 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (A <= -8e+76) {
tmp = t_1;
} else if (A <= -7.5e+31) {
tmp = t_0;
} else if (A <= -7.2e+24) {
tmp = t_1;
} else if (A <= -7e-7) {
tmp = t_2;
} else if (A <= -6e-102) {
tmp = t_1;
} else if (A <= 2.3e-215) {
tmp = t_0;
} else if (A <= 5.1e+24) {
tmp = t_2;
} 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(((C - B) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double t_2 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (A <= -8e+76) {
tmp = t_1;
} else if (A <= -7.5e+31) {
tmp = t_0;
} else if (A <= -7.2e+24) {
tmp = t_1;
} else if (A <= -7e-7) {
tmp = t_2;
} else if (A <= -6e-102) {
tmp = t_1;
} else if (A <= 2.3e-215) {
tmp = t_0;
} else if (A <= 5.1e+24) {
tmp = t_2;
} 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(((C - B) / B)) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) t_2 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if A <= -8e+76: tmp = t_1 elif A <= -7.5e+31: tmp = t_0 elif A <= -7.2e+24: tmp = t_1 elif A <= -7e-7: tmp = t_2 elif A <= -6e-102: tmp = t_1 elif A <= 2.3e-215: tmp = t_0 elif A <= 5.1e+24: tmp = t_2 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(Float64(Float64(C - B) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) t_2 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (A <= -8e+76) tmp = t_1; elseif (A <= -7.5e+31) tmp = t_0; elseif (A <= -7.2e+24) tmp = t_1; elseif (A <= -7e-7) tmp = t_2; elseif (A <= -6e-102) tmp = t_1; elseif (A <= 2.3e-215) tmp = t_0; elseif (A <= 5.1e+24) tmp = t_2; 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(((C - B) / B)) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); t_2 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (A <= -8e+76) tmp = t_1; elseif (A <= -7.5e+31) tmp = t_0; elseif (A <= -7.2e+24) tmp = t_1; elseif (A <= -7e-7) tmp = t_2; elseif (A <= -6e-102) tmp = t_1; elseif (A <= 2.3e-215) tmp = t_0; elseif (A <= 5.1e+24) tmp = t_2; 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[N[(N[(C - B), $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]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -8e+76], t$95$1, If[LessEqual[A, -7.5e+31], t$95$0, If[LessEqual[A, -7.2e+24], t$95$1, If[LessEqual[A, -7e-7], t$95$2, If[LessEqual[A, -6e-102], t$95$1, If[LessEqual[A, 2.3e-215], t$95$0, If[LessEqual[A, 5.1e+24], t$95$2, 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} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;A \leq -8 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -7.5 \cdot 10^{+31}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -7.2 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;A \leq -6 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{-215}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 5.1 \cdot 10^{+24}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.0000000000000004e76 or -7.5e31 < A < -7.19999999999999966e24 or -6.99999999999999968e-7 < A < -6e-102Initial program 27.1%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
if -8.0000000000000004e76 < A < -7.5e31 or -6e-102 < A < 2.2999999999999999e-215Initial program 52.2%
Taylor expanded in A around 0 52.0%
unpow252.0%
unpow252.0%
hypot-define80.5%
Simplified80.5%
Taylor expanded in C around 0 52.5%
neg-mul-152.5%
unsub-neg52.5%
Simplified52.5%
if -7.19999999999999966e24 < A < -6.99999999999999968e-7 or 2.2999999999999999e-215 < A < 5.0999999999999995e24Initial program 40.0%
Taylor expanded in A around 0 31.2%
unpow231.2%
unpow231.2%
hypot-define66.9%
Simplified66.9%
Taylor expanded in C around inf 55.1%
if 5.0999999999999995e24 < A Initial program 85.2%
Taylor expanded in A around inf 81.0%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))
(t_2 (* (atan (/ (* B -0.5) C)) (/ 180.0 PI))))
(if (<= A -9e+74)
t_1
(if (<= A -7.5e+31)
t_0
(if (<= A -8.2e+24)
t_1
(if (<= A -7e-7)
t_2
(if (<= A -5.2e-103)
t_1
(if (<= A 7.5e-215)
t_0
(if (<= A 1.18e+24)
t_2
(* 180.0 (/ (atan (* -2.0 (/ 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(((B * 0.5) / A)) / ((double) M_PI));
double t_2 = atan(((B * -0.5) / C)) * (180.0 / ((double) M_PI));
double tmp;
if (A <= -9e+74) {
tmp = t_1;
} else if (A <= -7.5e+31) {
tmp = t_0;
} else if (A <= -8.2e+24) {
tmp = t_1;
} else if (A <= -7e-7) {
tmp = t_2;
} else if (A <= -5.2e-103) {
tmp = t_1;
} else if (A <= 7.5e-215) {
tmp = t_0;
} else if (A <= 1.18e+24) {
tmp = t_2;
} 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(((C - B) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double t_2 = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
double tmp;
if (A <= -9e+74) {
tmp = t_1;
} else if (A <= -7.5e+31) {
tmp = t_0;
} else if (A <= -8.2e+24) {
tmp = t_1;
} else if (A <= -7e-7) {
tmp = t_2;
} else if (A <= -5.2e-103) {
tmp = t_1;
} else if (A <= 7.5e-215) {
tmp = t_0;
} else if (A <= 1.18e+24) {
tmp = t_2;
} 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(((C - B) / B)) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) t_2 = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) tmp = 0 if A <= -9e+74: tmp = t_1 elif A <= -7.5e+31: tmp = t_0 elif A <= -8.2e+24: tmp = t_1 elif A <= -7e-7: tmp = t_2 elif A <= -5.2e-103: tmp = t_1 elif A <= 7.5e-215: tmp = t_0 elif A <= 1.18e+24: tmp = t_2 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(Float64(Float64(C - B) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) t_2 = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)) tmp = 0.0 if (A <= -9e+74) tmp = t_1; elseif (A <= -7.5e+31) tmp = t_0; elseif (A <= -8.2e+24) tmp = t_1; elseif (A <= -7e-7) tmp = t_2; elseif (A <= -5.2e-103) tmp = t_1; elseif (A <= 7.5e-215) tmp = t_0; elseif (A <= 1.18e+24) tmp = t_2; 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(((C - B) / B)) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); t_2 = atan(((B * -0.5) / C)) * (180.0 / pi); tmp = 0.0; if (A <= -9e+74) tmp = t_1; elseif (A <= -7.5e+31) tmp = t_0; elseif (A <= -8.2e+24) tmp = t_1; elseif (A <= -7e-7) tmp = t_2; elseif (A <= -5.2e-103) tmp = t_1; elseif (A <= 7.5e-215) tmp = t_0; elseif (A <= 1.18e+24) tmp = t_2; 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[N[(N[(C - B), $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]}, Block[{t$95$2 = N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -9e+74], t$95$1, If[LessEqual[A, -7.5e+31], t$95$0, If[LessEqual[A, -8.2e+24], t$95$1, If[LessEqual[A, -7e-7], t$95$2, If[LessEqual[A, -5.2e-103], t$95$1, If[LessEqual[A, 7.5e-215], t$95$0, If[LessEqual[A, 1.18e+24], t$95$2, 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} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
t_2 := \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{if}\;A \leq -9 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -7.5 \cdot 10^{+31}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -8.2 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;A \leq -5.2 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 7.5 \cdot 10^{-215}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 1.18 \cdot 10^{+24}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.9999999999999999e74 or -7.5e31 < A < -8.2000000000000002e24 or -6.99999999999999968e-7 < A < -5.19999999999999993e-103Initial program 27.1%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
if -8.9999999999999999e74 < A < -7.5e31 or -5.19999999999999993e-103 < A < 7.49999999999999986e-215Initial program 52.2%
Taylor expanded in A around 0 52.0%
unpow252.0%
unpow252.0%
hypot-define80.5%
Simplified80.5%
Taylor expanded in C around 0 52.5%
neg-mul-152.5%
unsub-neg52.5%
Simplified52.5%
if -8.2000000000000002e24 < A < -6.99999999999999968e-7 or 7.49999999999999986e-215 < A < 1.17999999999999997e24Initial program 40.0%
Taylor expanded in A around 0 31.2%
unpow231.2%
unpow231.2%
hypot-define66.9%
Simplified66.9%
Taylor expanded in C around inf 55.1%
associate-*r/55.4%
Applied egg-rr55.4%
*-commutative55.4%
associate-/l*55.4%
*-commutative55.4%
associate-*l/55.4%
Simplified55.4%
if 1.17999999999999997e24 < A Initial program 85.2%
Taylor expanded in A around inf 81.0%
Final simplification66.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -9e+74)
t_1
(if (<= A -7.5e+31)
t_0
(if (<= A -7.2e+24)
t_1
(if (<= A -4.5e-7)
(* (atan (/ (* B -0.5) C)) (/ 180.0 PI))
(if (<= A -1.22e-102)
t_1
(if (<= A 1.4e-214)
t_0
(if (<= A 2.9e+24)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(* 180.0 (/ (atan (* -2.0 (/ 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(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -9e+74) {
tmp = t_1;
} else if (A <= -7.5e+31) {
tmp = t_0;
} else if (A <= -7.2e+24) {
tmp = t_1;
} else if (A <= -4.5e-7) {
tmp = atan(((B * -0.5) / C)) * (180.0 / ((double) M_PI));
} else if (A <= -1.22e-102) {
tmp = t_1;
} else if (A <= 1.4e-214) {
tmp = t_0;
} else if (A <= 2.9e+24) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} 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(((C - B) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -9e+74) {
tmp = t_1;
} else if (A <= -7.5e+31) {
tmp = t_0;
} else if (A <= -7.2e+24) {
tmp = t_1;
} else if (A <= -4.5e-7) {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
} else if (A <= -1.22e-102) {
tmp = t_1;
} else if (A <= 1.4e-214) {
tmp = t_0;
} else if (A <= 2.9e+24) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} 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(((C - B) / B)) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -9e+74: tmp = t_1 elif A <= -7.5e+31: tmp = t_0 elif A <= -7.2e+24: tmp = t_1 elif A <= -4.5e-7: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) elif A <= -1.22e-102: tmp = t_1 elif A <= 1.4e-214: tmp = t_0 elif A <= 2.9e+24: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi 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(Float64(Float64(C - B) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -9e+74) tmp = t_1; elseif (A <= -7.5e+31) tmp = t_0; elseif (A <= -7.2e+24) tmp = t_1; elseif (A <= -4.5e-7) tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); elseif (A <= -1.22e-102) tmp = t_1; elseif (A <= 1.4e-214) tmp = t_0; elseif (A <= 2.9e+24) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); 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(((C - B) / B)) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -9e+74) tmp = t_1; elseif (A <= -7.5e+31) tmp = t_0; elseif (A <= -7.2e+24) tmp = t_1; elseif (A <= -4.5e-7) tmp = atan(((B * -0.5) / C)) * (180.0 / pi); elseif (A <= -1.22e-102) tmp = t_1; elseif (A <= 1.4e-214) tmp = t_0; elseif (A <= 2.9e+24) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; 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[N[(N[(C - B), $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, -9e+74], t$95$1, If[LessEqual[A, -7.5e+31], t$95$0, If[LessEqual[A, -7.2e+24], t$95$1, If[LessEqual[A, -4.5e-7], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.22e-102], t$95$1, If[LessEqual[A, 1.4e-214], t$95$0, If[LessEqual[A, 2.9e+24], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -9 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -7.5 \cdot 10^{+31}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -7.2 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -4.5 \cdot 10^{-7}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq -1.22 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 1.4 \cdot 10^{-214}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 2.9 \cdot 10^{+24}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.9999999999999999e74 or -7.5e31 < A < -7.19999999999999966e24 or -4.4999999999999998e-7 < A < -1.22e-102Initial program 27.1%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
if -8.9999999999999999e74 < A < -7.5e31 or -1.22e-102 < A < 1.4000000000000001e-214Initial program 52.2%
Taylor expanded in A around 0 52.0%
unpow252.0%
unpow252.0%
hypot-define80.5%
Simplified80.5%
Taylor expanded in C around 0 52.5%
neg-mul-152.5%
unsub-neg52.5%
Simplified52.5%
if -7.19999999999999966e24 < A < -4.4999999999999998e-7Initial program 30.9%
Taylor expanded in A around 0 26.7%
unpow226.7%
unpow226.7%
hypot-define48.0%
Simplified48.0%
Taylor expanded in C around inf 67.0%
associate-*r/67.4%
Applied egg-rr67.4%
*-commutative67.4%
associate-/l*67.4%
*-commutative67.4%
associate-*l/67.4%
Simplified67.4%
if 1.4000000000000001e-214 < A < 2.89999999999999979e24Initial program 41.3%
associate-*r/41.3%
associate-*l/41.3%
*-un-lft-identity41.3%
unpow241.3%
unpow241.3%
hypot-define79.1%
Applied egg-rr79.1%
Taylor expanded in A around 0 31.8%
unpow231.8%
unpow231.8%
hypot-undefine69.7%
Simplified69.7%
Taylor expanded in C around inf 53.6%
if 2.89999999999999979e24 < A Initial program 85.2%
Taylor expanded in A around inf 81.0%
Final simplification66.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -9e+74)
(/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
(if (<= A -7.5e+31)
t_0
(if (<= A -7.2e+24)
t_1
(if (<= A -7e-7)
(* (atan (/ (* B -0.5) C)) (/ 180.0 PI))
(if (<= A -2.2e-103)
t_1
(if (<= A 3.55e-214)
t_0
(if (<= A 6.4e+25)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(* 180.0 (/ (atan (* -2.0 (/ 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(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -9e+74) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else if (A <= -7.5e+31) {
tmp = t_0;
} else if (A <= -7.2e+24) {
tmp = t_1;
} else if (A <= -7e-7) {
tmp = atan(((B * -0.5) / C)) * (180.0 / ((double) M_PI));
} else if (A <= -2.2e-103) {
tmp = t_1;
} else if (A <= 3.55e-214) {
tmp = t_0;
} else if (A <= 6.4e+25) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} 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(((C - B) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -9e+74) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else if (A <= -7.5e+31) {
tmp = t_0;
} else if (A <= -7.2e+24) {
tmp = t_1;
} else if (A <= -7e-7) {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
} else if (A <= -2.2e-103) {
tmp = t_1;
} else if (A <= 3.55e-214) {
tmp = t_0;
} else if (A <= 6.4e+25) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} 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(((C - B) / B)) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -9e+74: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi elif A <= -7.5e+31: tmp = t_0 elif A <= -7.2e+24: tmp = t_1 elif A <= -7e-7: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) elif A <= -2.2e-103: tmp = t_1 elif A <= 3.55e-214: tmp = t_0 elif A <= 6.4e+25: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi 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(Float64(Float64(C - B) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -9e+74) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi); elseif (A <= -7.5e+31) tmp = t_0; elseif (A <= -7.2e+24) tmp = t_1; elseif (A <= -7e-7) tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); elseif (A <= -2.2e-103) tmp = t_1; elseif (A <= 3.55e-214) tmp = t_0; elseif (A <= 6.4e+25) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); 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(((C - B) / B)) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -9e+74) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; elseif (A <= -7.5e+31) tmp = t_0; elseif (A <= -7.2e+24) tmp = t_1; elseif (A <= -7e-7) tmp = atan(((B * -0.5) / C)) * (180.0 / pi); elseif (A <= -2.2e-103) tmp = t_1; elseif (A <= 3.55e-214) tmp = t_0; elseif (A <= 6.4e+25) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; 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[N[(N[(C - B), $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, -9e+74], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -7.5e+31], t$95$0, If[LessEqual[A, -7.2e+24], t$95$1, If[LessEqual[A, -7e-7], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.2e-103], t$95$1, If[LessEqual[A, 3.55e-214], t$95$0, If[LessEqual[A, 6.4e+25], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -9 \cdot 10^{+74}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7.5 \cdot 10^{+31}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -7.2 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-7}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq -2.2 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 3.55 \cdot 10^{-214}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq 6.4 \cdot 10^{+25}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.9999999999999999e74Initial program 20.5%
associate-*r/20.5%
associate-*l/20.5%
*-un-lft-identity20.5%
unpow220.5%
unpow220.5%
hypot-define54.4%
Applied egg-rr54.4%
Taylor expanded in A around -inf 87.8%
associate-*r/87.8%
*-commutative87.8%
associate-/l*87.8%
Simplified87.8%
if -8.9999999999999999e74 < A < -7.5e31 or -2.1999999999999999e-103 < A < 3.55000000000000005e-214Initial program 52.2%
Taylor expanded in A around 0 52.0%
unpow252.0%
unpow252.0%
hypot-define80.5%
Simplified80.5%
Taylor expanded in C around 0 52.5%
neg-mul-152.5%
unsub-neg52.5%
Simplified52.5%
if -7.5e31 < A < -7.19999999999999966e24 or -6.99999999999999968e-7 < A < -2.1999999999999999e-103Initial program 44.3%
Taylor expanded in A around -inf 63.7%
associate-*r/63.7%
Simplified63.7%
if -7.19999999999999966e24 < A < -6.99999999999999968e-7Initial program 30.9%
Taylor expanded in A around 0 26.7%
unpow226.7%
unpow226.7%
hypot-define48.0%
Simplified48.0%
Taylor expanded in C around inf 67.0%
associate-*r/67.4%
Applied egg-rr67.4%
*-commutative67.4%
associate-/l*67.4%
*-commutative67.4%
associate-*l/67.4%
Simplified67.4%
if 3.55000000000000005e-214 < A < 6.3999999999999999e25Initial program 41.3%
associate-*r/41.3%
associate-*l/41.3%
*-un-lft-identity41.3%
unpow241.3%
unpow241.3%
hypot-define79.1%
Applied egg-rr79.1%
Taylor expanded in A around 0 31.8%
unpow231.8%
unpow231.8%
hypot-undefine69.7%
Simplified69.7%
Taylor expanded in C around inf 53.6%
if 6.3999999999999999e25 < A Initial program 85.2%
Taylor expanded in A around inf 81.0%
Final simplification66.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- (+ A B)) B)) PI))))
(if (<= C -1.1e-111)
(* 180.0 (/ (atan (/ (+ C B) B)) PI))
(if (<= C -5.2e-245)
t_0
(if (<= C -9.2e-287)
(/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
(if (<= C 5.9e-214)
t_0
(if (<= C 2e-132)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 4.5e-54)
t_0
(* (atan (/ (* B -0.5) C)) (/ 180.0 PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-(A + B) / B)) / ((double) M_PI));
double tmp;
if (C <= -1.1e-111) {
tmp = 180.0 * (atan(((C + B) / B)) / ((double) M_PI));
} else if (C <= -5.2e-245) {
tmp = t_0;
} else if (C <= -9.2e-287) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else if (C <= 5.9e-214) {
tmp = t_0;
} else if (C <= 2e-132) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 4.5e-54) {
tmp = t_0;
} else {
tmp = atan(((B * -0.5) / C)) * (180.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) / B)) / Math.PI);
double tmp;
if (C <= -1.1e-111) {
tmp = 180.0 * (Math.atan(((C + B) / B)) / Math.PI);
} else if (C <= -5.2e-245) {
tmp = t_0;
} else if (C <= -9.2e-287) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else if (C <= 5.9e-214) {
tmp = t_0;
} else if (C <= 2e-132) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 4.5e-54) {
tmp = t_0;
} else {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-(A + B) / B)) / math.pi) tmp = 0 if C <= -1.1e-111: tmp = 180.0 * (math.atan(((C + B) / B)) / math.pi) elif C <= -5.2e-245: tmp = t_0 elif C <= -9.2e-287: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi elif C <= 5.9e-214: tmp = t_0 elif C <= 2e-132: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 4.5e-54: tmp = t_0 else: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(-Float64(A + B)) / B)) / pi)) tmp = 0.0 if (C <= -1.1e-111) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + B) / B)) / pi)); elseif (C <= -5.2e-245) tmp = t_0; elseif (C <= -9.2e-287) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi); elseif (C <= 5.9e-214) tmp = t_0; elseif (C <= 2e-132) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 4.5e-54) tmp = t_0; else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-(A + B) / B)) / pi); tmp = 0.0; if (C <= -1.1e-111) tmp = 180.0 * (atan(((C + B) / B)) / pi); elseif (C <= -5.2e-245) tmp = t_0; elseif (C <= -9.2e-287) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; elseif (C <= 5.9e-214) tmp = t_0; elseif (C <= 2e-132) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 4.5e-54) tmp = t_0; else tmp = atan(((B * -0.5) / C)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[((-N[(A + B), $MachinePrecision]) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.1e-111], N[(180.0 * N[(N[ArcTan[N[(N[(C + B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -5.2e-245], t$95$0, If[LessEqual[C, -9.2e-287], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 5.9e-214], t$95$0, If[LessEqual[C, 2e-132], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.5e-54], t$95$0, N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + B\right)}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.1 \cdot 10^{-111}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5.2 \cdot 10^{-245}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -9.2 \cdot 10^{-287}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.9 \cdot 10^{-214}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 2 \cdot 10^{-132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 4.5 \cdot 10^{-54}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -1.1e-111Initial program 71.8%
Taylor expanded in A around 0 70.6%
unpow270.6%
unpow270.6%
hypot-define81.7%
Simplified81.7%
Taylor expanded in B around -inf 71.7%
if -1.1e-111 < C < -5.20000000000000013e-245 or -9.19999999999999944e-287 < C < 5.8999999999999998e-214 or 2e-132 < C < 4.4999999999999998e-54Initial program 60.7%
Simplified80.7%
Taylor expanded in B around inf 68.1%
+-commutative68.1%
Simplified68.1%
Taylor expanded in C around 0 68.3%
mul-1-neg68.3%
+-commutative68.3%
distribute-neg-frac268.3%
Simplified68.3%
if -5.20000000000000013e-245 < C < -9.19999999999999944e-287Initial program 43.3%
associate-*r/43.3%
associate-*l/43.3%
*-un-lft-identity43.3%
unpow243.3%
unpow243.3%
hypot-define52.9%
Applied egg-rr52.9%
Taylor expanded in A around -inf 72.3%
associate-*r/72.3%
*-commutative72.3%
associate-/l*72.3%
Simplified72.3%
if 5.8999999999999998e-214 < C < 2e-132Initial program 63.3%
Taylor expanded in B around -inf 49.6%
if 4.4999999999999998e-54 < C Initial program 23.8%
Taylor expanded in A around 0 18.3%
unpow218.3%
unpow218.3%
hypot-define53.2%
Simplified53.2%
Taylor expanded in C around inf 71.0%
associate-*r/71.2%
Applied egg-rr71.2%
*-commutative71.2%
associate-/l*71.2%
*-commutative71.2%
associate-*l/71.2%
Simplified71.2%
Final simplification68.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- (+ A B)) B)) PI))))
(if (<= C -3.7e-243)
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))
(if (<= C -1.55e-285)
(/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
(if (<= C 2.65e-212)
t_0
(if (<= C 2.05e-132)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 4.5e-54)
t_0
(* (atan (/ (* B -0.5) C)) (/ 180.0 PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-(A + B) / B)) / ((double) M_PI));
double tmp;
if (C <= -3.7e-243) {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
} else if (C <= -1.55e-285) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else if (C <= 2.65e-212) {
tmp = t_0;
} else if (C <= 2.05e-132) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 4.5e-54) {
tmp = t_0;
} else {
tmp = atan(((B * -0.5) / C)) * (180.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) / B)) / Math.PI);
double tmp;
if (C <= -3.7e-243) {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
} else if (C <= -1.55e-285) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else if (C <= 2.65e-212) {
tmp = t_0;
} else if (C <= 2.05e-132) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 4.5e-54) {
tmp = t_0;
} else {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-(A + B) / B)) / math.pi) tmp = 0 if C <= -3.7e-243: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) elif C <= -1.55e-285: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi elif C <= 2.65e-212: tmp = t_0 elif C <= 2.05e-132: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 4.5e-54: tmp = t_0 else: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(-Float64(A + B)) / B)) / pi)) tmp = 0.0 if (C <= -3.7e-243) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); elseif (C <= -1.55e-285) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi); elseif (C <= 2.65e-212) tmp = t_0; elseif (C <= 2.05e-132) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 4.5e-54) tmp = t_0; else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-(A + B) / B)) / pi); tmp = 0.0; if (C <= -3.7e-243) tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); elseif (C <= -1.55e-285) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; elseif (C <= 2.65e-212) tmp = t_0; elseif (C <= 2.05e-132) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 4.5e-54) tmp = t_0; else tmp = atan(((B * -0.5) / C)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[((-N[(A + B), $MachinePrecision]) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.7e-243], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.55e-285], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.65e-212], t$95$0, If[LessEqual[C, 2.05e-132], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.5e-54], t$95$0, N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + B\right)}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -3.7 \cdot 10^{-243}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.55 \cdot 10^{-285}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.65 \cdot 10^{-212}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 2.05 \cdot 10^{-132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 4.5 \cdot 10^{-54}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -3.7e-243Initial program 70.9%
Simplified83.4%
Taylor expanded in B around inf 70.9%
+-commutative70.9%
Simplified70.9%
if -3.7e-243 < C < -1.55e-285Initial program 43.3%
associate-*r/43.3%
associate-*l/43.3%
*-un-lft-identity43.3%
unpow243.3%
unpow243.3%
hypot-define52.9%
Applied egg-rr52.9%
Taylor expanded in A around -inf 72.3%
associate-*r/72.3%
*-commutative72.3%
associate-/l*72.3%
Simplified72.3%
if -1.55e-285 < C < 2.6500000000000002e-212 or 2.05000000000000003e-132 < C < 4.4999999999999998e-54Initial program 57.8%
Simplified79.0%
Taylor expanded in B around inf 67.8%
+-commutative67.8%
Simplified67.8%
Taylor expanded in C around 0 68.0%
mul-1-neg68.0%
+-commutative68.0%
distribute-neg-frac268.0%
Simplified68.0%
if 2.6500000000000002e-212 < C < 2.05000000000000003e-132Initial program 63.3%
Taylor expanded in B around -inf 49.6%
if 4.4999999999999998e-54 < C Initial program 23.8%
Taylor expanded in A around 0 18.3%
unpow218.3%
unpow218.3%
hypot-define53.2%
Simplified53.2%
Taylor expanded in C around inf 71.0%
associate-*r/71.2%
Applied egg-rr71.2%
*-commutative71.2%
associate-/l*71.2%
*-commutative71.2%
associate-*l/71.2%
Simplified71.2%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(if (<= C -9.2e-246)
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))
(if (<= C -4.2e-285)
(/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
(if (<= C 7.5e-217)
(* 180.0 (/ (atan (/ (- (+ A B)) B)) PI))
(if (<= C 4.9e+26)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(* (atan (/ (* B -0.5) C)) (/ 180.0 PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -9.2e-246) {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
} else if (C <= -4.2e-285) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else if (C <= 7.5e-217) {
tmp = 180.0 * (atan((-(A + B) / B)) / ((double) M_PI));
} else if (C <= 4.9e+26) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else {
tmp = atan(((B * -0.5) / C)) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -9.2e-246) {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
} else if (C <= -4.2e-285) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else if (C <= 7.5e-217) {
tmp = 180.0 * (Math.atan((-(A + B) / B)) / Math.PI);
} else if (C <= 4.9e+26) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -9.2e-246: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) elif C <= -4.2e-285: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi elif C <= 7.5e-217: tmp = 180.0 * (math.atan((-(A + B) / B)) / math.pi) elif C <= 4.9e+26: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) else: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -9.2e-246) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); elseif (C <= -4.2e-285) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi); elseif (C <= 7.5e-217) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-Float64(A + B)) / B)) / pi)); elseif (C <= 4.9e+26) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -9.2e-246) tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); elseif (C <= -4.2e-285) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; elseif (C <= 7.5e-217) tmp = 180.0 * (atan((-(A + B) / B)) / pi); elseif (C <= 4.9e+26) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); else tmp = atan(((B * -0.5) / C)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -9.2e-246], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.2e-285], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 7.5e-217], N[(180.0 * N[(N[ArcTan[N[((-N[(A + B), $MachinePrecision]) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.9e+26], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -9.2 \cdot 10^{-246}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.2 \cdot 10^{-285}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{-217}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-\left(A + B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.9 \cdot 10^{+26}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -9.199999999999999e-246Initial program 70.9%
Simplified83.4%
Taylor expanded in B around inf 70.9%
+-commutative70.9%
Simplified70.9%
if -9.199999999999999e-246 < C < -4.19999999999999968e-285Initial program 43.3%
associate-*r/43.3%
associate-*l/43.3%
*-un-lft-identity43.3%
unpow243.3%
unpow243.3%
hypot-define52.9%
Applied egg-rr52.9%
Taylor expanded in A around -inf 72.3%
associate-*r/72.3%
*-commutative72.3%
associate-/l*72.3%
Simplified72.3%
if -4.19999999999999968e-285 < C < 7.50000000000000031e-217Initial program 55.4%
Simplified89.3%
Taylor expanded in B around inf 77.7%
+-commutative77.7%
Simplified77.7%
Taylor expanded in C around 0 77.7%
mul-1-neg77.7%
+-commutative77.7%
distribute-neg-frac277.7%
Simplified77.7%
if 7.50000000000000031e-217 < C < 4.89999999999999974e26Initial program 58.2%
Simplified67.2%
Taylor expanded in B around -inf 57.9%
neg-mul-157.9%
unsub-neg57.9%
Simplified57.9%
if 4.89999999999999974e26 < C Initial program 18.9%
Taylor expanded in A around 0 17.3%
unpow217.3%
unpow217.3%
hypot-define55.0%
Simplified55.0%
Taylor expanded in C around inf 76.6%
associate-*r/76.9%
Applied egg-rr76.9%
*-commutative76.9%
associate-/l*76.9%
*-commutative76.9%
associate-*l/76.9%
Simplified76.9%
Final simplification70.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -8.6e-60)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.8e-113)
t_0
(if (<= B 2.4e-190)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.7e+53) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double tmp;
if (B <= -8.6e-60) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.8e-113) {
tmp = t_0;
} else if (B <= 2.4e-190) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.7e+53) {
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((-2.0 * (A / B))) / Math.PI);
double tmp;
if (B <= -8.6e-60) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.8e-113) {
tmp = t_0;
} else if (B <= 2.4e-190) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.7e+53) {
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((-2.0 * (A / B))) / math.pi) tmp = 0 if B <= -8.6e-60: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.8e-113: tmp = t_0 elif B <= 2.4e-190: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.7e+53: 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(-2.0 * Float64(A / B))) / pi)) tmp = 0.0 if (B <= -8.6e-60) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.8e-113) tmp = t_0; elseif (B <= 2.4e-190) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.7e+53) 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((-2.0 * (A / B))) / pi); tmp = 0.0; if (B <= -8.6e-60) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.8e-113) tmp = t_0; elseif (B <= 2.4e-190) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.7e+53) 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[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8.6e-60], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.8e-113], t$95$0, If[LessEqual[B, 2.4e-190], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.7e+53], 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(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -8.6 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.8 \cdot 10^{-113}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-190}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.7 \cdot 10^{+53}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.6000000000000001e-60Initial program 49.9%
Taylor expanded in B around -inf 50.7%
if -8.6000000000000001e-60 < B < -2.8e-113 or 2.4e-190 < B < 1.69999999999999999e53Initial program 58.9%
Taylor expanded in A around inf 40.6%
if -2.8e-113 < B < 2.4e-190Initial program 49.4%
Taylor expanded in C around inf 44.1%
associate-*r/44.1%
distribute-rgt1-in44.1%
metadata-eval44.1%
mul0-lft44.1%
metadata-eval44.1%
Simplified44.1%
if 1.69999999999999999e53 < B Initial program 42.4%
Taylor expanded in B around inf 72.3%
Final simplification49.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))
(t_1 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI))))
(if (<= A -7.2e+24)
t_1
(if (<= A -7e-7)
t_0
(if (<= A -1.22e-203)
t_1
(if (<= A 7.2e+26) t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double t_1 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double tmp;
if (A <= -7.2e+24) {
tmp = t_1;
} else if (A <= -7e-7) {
tmp = t_0;
} else if (A <= -1.22e-203) {
tmp = t_1;
} else if (A <= 7.2e+26) {
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((-0.5 * (B / C))) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double tmp;
if (A <= -7.2e+24) {
tmp = t_1;
} else if (A <= -7e-7) {
tmp = t_0;
} else if (A <= -1.22e-203) {
tmp = t_1;
} else if (A <= 7.2e+26) {
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((-0.5 * (B / C))) / math.pi) t_1 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) tmp = 0 if A <= -7.2e+24: tmp = t_1 elif A <= -7e-7: tmp = t_0 elif A <= -1.22e-203: tmp = t_1 elif A <= 7.2e+26: 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(Float64(-0.5 * Float64(B / C))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) tmp = 0.0 if (A <= -7.2e+24) tmp = t_1; elseif (A <= -7e-7) tmp = t_0; elseif (A <= -1.22e-203) tmp = t_1; elseif (A <= 7.2e+26) 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((-0.5 * (B / C))) / pi); t_1 = 180.0 * (atan(((B * 0.5) / A)) / pi); tmp = 0.0; if (A <= -7.2e+24) tmp = t_1; elseif (A <= -7e-7) tmp = t_0; elseif (A <= -1.22e-203) tmp = t_1; elseif (A <= 7.2e+26) 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[N[(-0.5 * N[(B / C), $MachinePrecision]), $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, -7.2e+24], t$95$1, If[LessEqual[A, -7e-7], t$95$0, If[LessEqual[A, -1.22e-203], t$95$1, If[LessEqual[A, 7.2e+26], 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} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -7.2 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -1.22 \cdot 10^{-203}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;A \leq 7.2 \cdot 10^{+26}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.19999999999999966e24 or -6.99999999999999968e-7 < A < -1.21999999999999995e-203Initial program 37.3%
Taylor expanded in A around -inf 62.2%
associate-*r/62.2%
Simplified62.2%
if -7.19999999999999966e24 < A < -6.99999999999999968e-7 or -1.21999999999999995e-203 < A < 7.20000000000000048e26Initial program 43.5%
Taylor expanded in A around 0 38.1%
unpow238.1%
unpow238.1%
hypot-define71.8%
Simplified71.8%
Taylor expanded in C around inf 49.1%
if 7.20000000000000048e26 < A Initial program 85.2%
Taylor expanded in A around inf 81.0%
Final simplification61.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ A (- B))) PI))))
(if (<= B -3.1e-59)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.8e-113)
t_0
(if (<= B 3.5e-190)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2e+70) 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 <= -3.1e-59) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.8e-113) {
tmp = t_0;
} else if (B <= 3.5e-190) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2e+70) {
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 <= -3.1e-59) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.8e-113) {
tmp = t_0;
} else if (B <= 3.5e-190) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2e+70) {
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 <= -3.1e-59: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.8e-113: tmp = t_0 elif B <= 3.5e-190: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2e+70: 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(A / Float64(-B))) / pi)) tmp = 0.0 if (B <= -3.1e-59) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.8e-113) tmp = t_0; elseif (B <= 3.5e-190) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2e+70) 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 <= -3.1e-59) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.8e-113) tmp = t_0; elseif (B <= 3.5e-190) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2e+70) 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[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.1e-59], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.8e-113], t$95$0, If[LessEqual[B, 3.5e-190], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2e+70], 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{A}{-B}\right)}{\pi}\\
\mathbf{if}\;B \leq -3.1 \cdot 10^{-59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.8 \cdot 10^{-113}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-190}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{+70}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.09999999999999999e-59Initial program 49.9%
Taylor expanded in B around -inf 50.7%
if -3.09999999999999999e-59 < B < -4.80000000000000024e-113 or 3.4999999999999999e-190 < B < 2.00000000000000015e70Initial program 58.9%
Simplified67.2%
Taylor expanded in B around inf 57.9%
+-commutative57.9%
Simplified57.9%
Taylor expanded in A around inf 39.9%
associate-*r/39.9%
mul-1-neg39.9%
Simplified39.9%
if -4.80000000000000024e-113 < B < 3.4999999999999999e-190Initial program 49.4%
Taylor expanded in C around inf 44.1%
associate-*r/44.1%
distribute-rgt1-in44.1%
metadata-eval44.1%
mul0-lft44.1%
metadata-eval44.1%
Simplified44.1%
if 2.00000000000000015e70 < B Initial program 42.4%
Taylor expanded in B around inf 72.3%
Final simplification49.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI))))
(if (<= B -2e-58)
t_0
(if (<= B -3.2e-115)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B -7.5e-118)
t_0
(if (<= B 2.45e-119)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (B <= -2e-58) {
tmp = t_0;
} else if (B <= -3.2e-115) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= -7.5e-118) {
tmp = t_0;
} else if (B <= 2.45e-119) {
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 t_0 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (B <= -2e-58) {
tmp = t_0;
} else if (B <= -3.2e-115) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= -7.5e-118) {
tmp = t_0;
} else if (B <= 2.45e-119) {
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): t_0 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if B <= -2e-58: tmp = t_0 elif B <= -3.2e-115: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= -7.5e-118: tmp = t_0 elif B <= 2.45e-119: 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) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (B <= -2e-58) tmp = t_0; elseif (B <= -3.2e-115) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= -7.5e-118) tmp = t_0; elseif (B <= 2.45e-119) 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) t_0 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (B <= -2e-58) tmp = t_0; elseif (B <= -3.2e-115) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= -7.5e-118) tmp = t_0; elseif (B <= 2.45e-119) 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_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2e-58], t$95$0, If[LessEqual[B, -3.2e-115], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.5e-118], t$95$0, If[LessEqual[B, 2.45e-119], 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}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;B \leq -2 \cdot 10^{-58}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -3.2 \cdot 10^{-115}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -7.5 \cdot 10^{-118}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.45 \cdot 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.0000000000000001e-58 or -3.2e-115 < B < -7.49999999999999978e-118Initial program 49.2%
Taylor expanded in B around -inf 51.2%
if -2.0000000000000001e-58 < B < -3.2e-115Initial program 76.1%
Simplified81.8%
add-sqr-sqrt81.8%
pow281.8%
hypot-undefine75.7%
unpow275.7%
unpow275.7%
+-commutative75.7%
unpow275.7%
unpow275.7%
hypot-define81.8%
Applied egg-rr81.8%
Taylor expanded in C around inf 43.1%
if -7.49999999999999978e-118 < B < 2.45e-119Initial program 48.0%
Taylor expanded in C around inf 42.4%
associate-*r/42.4%
distribute-rgt1-in42.4%
metadata-eval42.4%
mul0-lft42.4%
metadata-eval42.4%
Simplified42.4%
if 2.45e-119 < B Initial program 50.7%
Taylor expanded in B around inf 44.7%
Final simplification45.7%
(FPCore (A B C)
:precision binary64
(if (<= C -3.1e-135)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 1.44e-213)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= C 8e-163)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.1e-135) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 1.44e-213) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (C <= 8e-163) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -3.1e-135) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 1.44e-213) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (C <= 8e-163) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.1e-135: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 1.44e-213: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif C <= 8e-163: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.1e-135) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 1.44e-213) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (C <= 8e-163) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.1e-135) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 1.44e-213) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (C <= 8e-163) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.1e-135], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.44e-213], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8e-163], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.1 \cdot 10^{-135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.44 \cdot 10^{-213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.1000000000000001e-135Initial program 71.3%
Simplified82.1%
add-sqr-sqrt82.1%
pow282.1%
hypot-undefine71.2%
unpow271.2%
unpow271.2%
+-commutative71.2%
unpow271.2%
unpow271.2%
hypot-define82.1%
Applied egg-rr82.1%
Taylor expanded in C around inf 60.2%
if -3.1000000000000001e-135 < C < 1.44e-213Initial program 58.4%
Taylor expanded in A around inf 40.1%
if 1.44e-213 < C < 7.99999999999999939e-163Initial program 62.2%
Taylor expanded in B around -inf 52.9%
if 7.99999999999999939e-163 < C Initial program 32.9%
Taylor expanded in A around 0 21.0%
unpow221.0%
unpow221.0%
hypot-define50.2%
Simplified50.2%
Taylor expanded in C around inf 62.7%
Final simplification56.7%
(FPCore (A B C)
:precision binary64
(if (<= C -1.85e-136)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 4.7e-212)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= C 7.5e-161)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.85e-136) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 4.7e-212) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (C <= 7.5e-161) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.85e-136) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 4.7e-212) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (C <= 7.5e-161) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.85e-136: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 4.7e-212: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif C <= 7.5e-161: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.85e-136) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 4.7e-212) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (C <= 7.5e-161) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.85e-136) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 4.7e-212) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (C <= 7.5e-161) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.85e-136], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.7e-212], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.5e-161], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.85 \cdot 10^{-136}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.7 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{-161}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.85e-136Initial program 71.3%
Taylor expanded in C around -inf 60.7%
if -1.85e-136 < C < 4.69999999999999998e-212Initial program 58.4%
Taylor expanded in A around inf 40.1%
if 4.69999999999999998e-212 < C < 7.49999999999999991e-161Initial program 62.2%
Taylor expanded in B around -inf 52.9%
if 7.49999999999999991e-161 < C Initial program 32.9%
Taylor expanded in A around 0 21.0%
unpow221.0%
unpow221.0%
hypot-define50.2%
Simplified50.2%
Taylor expanded in C around inf 62.7%
Final simplification56.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.4e-118)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.8e-119)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.4e-118) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.8e-119) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.4e-118) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.8e-119) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.4e-118: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.8e-119: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.4e-118) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.8e-119) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.4e-118) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.8e-119) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.4e-118], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.8e-119], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.4 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.4e-118Initial program 54.1%
Taylor expanded in B around -inf 44.7%
if -1.4e-118 < B < 2.8e-119Initial program 48.0%
Taylor expanded in C around inf 42.4%
associate-*r/42.4%
distribute-rgt1-in42.4%
metadata-eval42.4%
mul0-lft42.4%
metadata-eval42.4%
Simplified42.4%
if 2.8e-119 < B Initial program 50.7%
Taylor expanded in B around inf 44.7%
Final simplification44.0%
(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 50.5%
Taylor expanded in B around -inf 33.3%
if -4.999999999999985e-310 < B Initial program 51.5%
Taylor expanded in B around inf 35.3%
Final simplification34.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 51.0%
Taylor expanded in B around inf 18.1%
Final simplification18.1%
herbie shell --seed 2024039
(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)))