
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -2.5e+154) (* (/ 180.0 PI) (atan (/ B (/ A 0.5)))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e+154) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (A / 0.5)));
} 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 <= -2.5e+154) {
tmp = (180.0 / Math.PI) * Math.atan((B / (A / 0.5)));
} 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 <= -2.5e+154: tmp = (180.0 / math.pi) * math.atan((B / (A / 0.5))) 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 <= -2.5e+154) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(A / 0.5)))); 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 <= -2.5e+154) tmp = (180.0 / pi) * atan((B / (A / 0.5))); 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, -2.5e+154], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.50000000000000002e154Initial program 12.4%
Taylor expanded in A around -inf 87.1%
associate-*r/87.1%
Simplified87.1%
Taylor expanded in B around 0 87.1%
associate-*r/87.2%
associate-/l*87.2%
associate-*r/87.2%
associate-/l*87.2%
associate-/r/87.1%
associate-/l*87.2%
*-commutative87.2%
associate-/l*87.2%
Simplified87.2%
if -2.50000000000000002e154 < A Initial program 63.7%
Simplified84.3%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= C -1.4e-17)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 2e+109)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.4e-17) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 2e+109) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((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.4e-17) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 2e+109) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / 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.4e-17: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 2e+109: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / 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.4e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 2e+109) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); else tmp = Float64(Float64(180.0 * 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.4e-17) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 2e+109) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.4e-17], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2e+109], 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[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.4 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2 \cdot 10^{+109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.3999999999999999e-17Initial program 84.4%
Taylor expanded in A around 0 84.4%
unpow284.4%
unpow284.4%
hypot-def90.8%
Simplified90.8%
if -1.3999999999999999e-17 < C < 1.99999999999999996e109Initial program 55.1%
Taylor expanded in C around 0 53.8%
associate-*r/53.8%
mul-1-neg53.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def81.9%
Simplified81.9%
if 1.99999999999999996e109 < C Initial program 21.0%
Taylor expanded in A around 0 21.0%
unpow221.0%
unpow221.0%
hypot-def54.1%
Simplified54.1%
Taylor expanded in C around inf 70.5%
Taylor expanded in B around 0 81.8%
associate-*r/81.9%
Simplified81.9%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -2.3e+164)
(* (/ 180.0 PI) (atan (/ B (/ A 0.5))))
(if (<= A 1.05e+128)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e+164) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (A / 0.5)));
} else if (A <= 1.05e+128) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e+164) {
tmp = (180.0 / Math.PI) * Math.atan((B / (A / 0.5)));
} else if (A <= 1.05e+128) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.3e+164: tmp = (180.0 / math.pi) * math.atan((B / (A / 0.5))) elif A <= 1.05e+128: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.3e+164) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(A / 0.5)))); elseif (A <= 1.05e+128) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.3e+164) tmp = (180.0 / pi) * atan((B / (A / 0.5))); elseif (A <= 1.05e+128) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.3e+164], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.05e+128], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.3 \cdot 10^{+164}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right)\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{+128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.3e164Initial program 12.4%
Taylor expanded in A around -inf 87.1%
associate-*r/87.1%
Simplified87.1%
Taylor expanded in B around 0 87.1%
associate-*r/87.2%
associate-/l*87.2%
associate-*r/87.2%
associate-/l*87.2%
associate-/r/87.1%
associate-/l*87.2%
*-commutative87.2%
associate-/l*87.2%
Simplified87.2%
if -2.3e164 < A < 1.05e128Initial program 59.7%
Taylor expanded in A around 0 55.3%
unpow255.3%
unpow255.3%
hypot-def80.6%
Simplified80.6%
if 1.05e128 < A Initial program 82.6%
Taylor expanded in C around 0 82.6%
associate-*r/82.6%
mul-1-neg82.6%
+-commutative82.6%
unpow282.6%
unpow282.6%
hypot-def92.7%
Simplified92.7%
Taylor expanded in B around -inf 80.9%
mul-1-neg80.9%
unsub-neg80.9%
Simplified80.9%
Final simplification81.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -0.185)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -1.35e-164)
t_0
(if (<= C -1.5e-213)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= C -8.4e-280)
t_0
(if (<= C 3.2e-154)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 6.5e+50)
t_0
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -0.185) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -1.35e-164) {
tmp = t_0;
} else if (C <= -1.5e-213) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (C <= -8.4e-280) {
tmp = t_0;
} else if (C <= 3.2e-154) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 6.5e+50) {
tmp = t_0;
} 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 t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -0.185) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -1.35e-164) {
tmp = t_0;
} else if (C <= -1.5e-213) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (C <= -8.4e-280) {
tmp = t_0;
} else if (C <= 3.2e-154) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 6.5e+50) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -0.185: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -1.35e-164: tmp = t_0 elif C <= -1.5e-213: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif C <= -8.4e-280: tmp = t_0 elif C <= 3.2e-154: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 6.5e+50: tmp = t_0 else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -0.185) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -1.35e-164) tmp = t_0; elseif (C <= -1.5e-213) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (C <= -8.4e-280) tmp = t_0; elseif (C <= 3.2e-154) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 6.5e+50) tmp = t_0; 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) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -0.185) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -1.35e-164) tmp = t_0; elseif (C <= -1.5e-213) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (C <= -8.4e-280) tmp = t_0; elseif (C <= 3.2e-154) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 6.5e+50) tmp = t_0; else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -0.185], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.35e-164], t$95$0, If[LessEqual[C, -1.5e-213], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -8.4e-280], t$95$0, If[LessEqual[C, 3.2e-154], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.5e+50], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -0.185:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.35 \cdot 10^{-164}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -1.5 \cdot 10^{-213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq -8.4 \cdot 10^{-280}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3.2 \cdot 10^{-154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 6.5 \cdot 10^{+50}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -0.185Initial program 82.6%
Taylor expanded in C around -inf 74.9%
if -0.185 < C < -1.3500000000000001e-164 or -1.49999999999999993e-213 < C < -8.40000000000000003e-280 or 3.20000000000000005e-154 < C < 6.5000000000000003e50Initial program 63.2%
Taylor expanded in C around 0 59.6%
associate-*r/59.6%
mul-1-neg59.6%
+-commutative59.6%
unpow259.6%
unpow259.6%
hypot-def85.7%
Simplified85.7%
Taylor expanded in B around -inf 57.2%
mul-1-neg57.2%
unsub-neg57.2%
Simplified57.2%
if -1.3500000000000001e-164 < C < -1.49999999999999993e-213Initial program 46.4%
Taylor expanded in A around -inf 61.0%
associate-*r/61.0%
Simplified61.0%
if -8.40000000000000003e-280 < C < 3.20000000000000005e-154Initial program 49.7%
Taylor expanded in B around inf 48.6%
if 6.5000000000000003e50 < C Initial program 21.2%
Taylor expanded in A around 0 21.7%
unpow221.7%
unpow221.7%
hypot-def52.4%
Simplified52.4%
Taylor expanded in C around inf 76.7%
associate-*r/76.7%
Simplified76.7%
Final simplification65.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -3.2)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -6.2e-137)
t_0
(if (<= C 3.6e-153)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 4.1e+50) t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -3.2) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -6.2e-137) {
tmp = t_0;
} else if (C <= 3.6e-153) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 4.1e+50) {
tmp = t_0;
} 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 t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -3.2) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -6.2e-137) {
tmp = t_0;
} else if (C <= 3.6e-153) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 4.1e+50) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -3.2: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -6.2e-137: tmp = t_0 elif C <= 3.6e-153: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 4.1e+50: tmp = t_0 else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -3.2) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -6.2e-137) tmp = t_0; elseif (C <= 3.6e-153) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 4.1e+50) tmp = t_0; 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) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -3.2) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -6.2e-137) tmp = t_0; elseif (C <= 3.6e-153) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 4.1e+50) tmp = t_0; else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.2], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -6.2e-137], t$95$0, If[LessEqual[C, 3.6e-153], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.1e+50], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -3.2:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -6.2 \cdot 10^{-137}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 3.6 \cdot 10^{-153}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 4.1 \cdot 10^{+50}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.2000000000000002Initial program 82.6%
Taylor expanded in C around -inf 74.9%
if -3.2000000000000002 < C < -6.19999999999999955e-137 or 3.5999999999999998e-153 < C < 4.1000000000000001e50Initial program 67.5%
Taylor expanded in C around 0 62.7%
associate-*r/62.7%
mul-1-neg62.7%
+-commutative62.7%
unpow262.7%
unpow262.7%
hypot-def86.4%
Simplified86.4%
Taylor expanded in B around -inf 61.3%
mul-1-neg61.3%
unsub-neg61.3%
Simplified61.3%
if -6.19999999999999955e-137 < C < 3.5999999999999998e-153Initial program 49.5%
Taylor expanded in B around inf 40.5%
if 4.1000000000000001e50 < C Initial program 21.2%
Taylor expanded in A around 0 21.7%
unpow221.7%
unpow221.7%
hypot-def52.4%
Simplified52.4%
Taylor expanded in C around inf 76.7%
associate-*r/76.7%
Simplified76.7%
Final simplification62.8%
(FPCore (A B C)
:precision binary64
(if (<= C -3.2e-163)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= C -4.3e-262)
(* (/ 180.0 PI) (atan (/ B (/ A 0.5))))
(if (<= C 6.2e-154)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 9.4e+51)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.2e-163) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (C <= -4.3e-262) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (A / 0.5)));
} else if (C <= 6.2e-154) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 9.4e+51) {
tmp = 180.0 * (atan((1.0 - (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 <= -3.2e-163) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (C <= -4.3e-262) {
tmp = (180.0 / Math.PI) * Math.atan((B / (A / 0.5)));
} else if (C <= 6.2e-154) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 9.4e+51) {
tmp = 180.0 * (Math.atan((1.0 - (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 <= -3.2e-163: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif C <= -4.3e-262: tmp = (180.0 / math.pi) * math.atan((B / (A / 0.5))) elif C <= 6.2e-154: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 9.4e+51: tmp = 180.0 * (math.atan((1.0 - (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 <= -3.2e-163) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (C <= -4.3e-262) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(A / 0.5)))); elseif (C <= 6.2e-154) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 9.4e+51) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - 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 <= -3.2e-163) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (C <= -4.3e-262) tmp = (180.0 / pi) * atan((B / (A / 0.5))); elseif (C <= 6.2e-154) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 9.4e+51) tmp = 180.0 * (atan((1.0 - (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, -3.2e-163], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.3e-262], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.2e-154], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.4e+51], N[(180.0 * N[(N[ArcTan[N[(1.0 - 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 -3.2 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.3 \cdot 10^{-262}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right)\\
\mathbf{elif}\;C \leq 6.2 \cdot 10^{-154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 9.4 \cdot 10^{+51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \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 < -3.19999999999999988e-163Initial program 78.7%
Taylor expanded in A around 0 75.0%
unpow275.0%
unpow275.0%
hypot-def86.3%
Simplified86.3%
Taylor expanded in B around -inf 72.1%
if -3.19999999999999988e-163 < C < -4.3000000000000001e-262Initial program 48.3%
Taylor expanded in A around -inf 45.9%
associate-*r/45.9%
Simplified45.9%
Taylor expanded in B around 0 45.9%
associate-*r/46.1%
associate-/l*45.4%
associate-*r/45.4%
associate-/l*45.3%
associate-/r/45.3%
associate-/l*46.2%
*-commutative46.2%
associate-/l*46.2%
Simplified46.2%
if -4.3000000000000001e-262 < C < 6.19999999999999963e-154Initial program 49.3%
Taylor expanded in B around inf 47.1%
if 6.19999999999999963e-154 < C < 9.4000000000000005e51Initial program 62.4%
Taylor expanded in C around 0 59.9%
associate-*r/59.9%
mul-1-neg59.9%
+-commutative59.9%
unpow259.9%
unpow259.9%
hypot-def82.8%
Simplified82.8%
Taylor expanded in B around -inf 53.2%
mul-1-neg53.2%
unsub-neg53.2%
Simplified53.2%
if 9.4000000000000005e51 < C Initial program 21.2%
Taylor expanded in A around 0 21.7%
unpow221.7%
unpow221.7%
hypot-def52.4%
Simplified52.4%
Taylor expanded in C around inf 76.7%
associate-*r/76.7%
Simplified76.7%
Final simplification64.3%
(FPCore (A B C)
:precision binary64
(if (<= C -2e-164)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= C -3.8e-259)
(* (/ 180.0 PI) (atan (/ B (/ A 0.5))))
(if (<= C 1.32e-151)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 1.08e+53)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2e-164) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (C <= -3.8e-259) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (A / 0.5)));
} else if (C <= 1.32e-151) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 1.08e+53) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((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 <= -2e-164) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (C <= -3.8e-259) {
tmp = (180.0 / Math.PI) * Math.atan((B / (A / 0.5)));
} else if (C <= 1.32e-151) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 1.08e+53) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / 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 <= -2e-164: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif C <= -3.8e-259: tmp = (180.0 / math.pi) * math.atan((B / (A / 0.5))) elif C <= 1.32e-151: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 1.08e+53: tmp = 180.0 * (math.atan((1.0 - (A / B))) / 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 <= -2e-164) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (C <= -3.8e-259) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(A / 0.5)))); elseif (C <= 1.32e-151) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 1.08e+53) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2e-164) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (C <= -3.8e-259) tmp = (180.0 / pi) * atan((B / (A / 0.5))); elseif (C <= 1.32e-151) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 1.08e+53) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2e-164], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.8e-259], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.32e-151], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.08e+53], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2 \cdot 10^{-164}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -3.8 \cdot 10^{-259}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right)\\
\mathbf{elif}\;C \leq 1.32 \cdot 10^{-151}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 1.08 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.99999999999999992e-164Initial program 78.7%
Taylor expanded in A around 0 75.0%
unpow275.0%
unpow275.0%
hypot-def86.3%
Simplified86.3%
Taylor expanded in B around -inf 72.1%
if -1.99999999999999992e-164 < C < -3.8e-259Initial program 48.3%
Taylor expanded in A around -inf 45.9%
associate-*r/45.9%
Simplified45.9%
Taylor expanded in B around 0 45.9%
associate-*r/46.1%
associate-/l*45.4%
associate-*r/45.4%
associate-/l*45.3%
associate-/r/45.3%
associate-/l*46.2%
*-commutative46.2%
associate-/l*46.2%
Simplified46.2%
if -3.8e-259 < C < 1.31999999999999999e-151Initial program 49.3%
Taylor expanded in B around inf 47.1%
if 1.31999999999999999e-151 < C < 1.08e53Initial program 62.4%
Taylor expanded in C around 0 59.9%
associate-*r/59.9%
mul-1-neg59.9%
+-commutative59.9%
unpow259.9%
unpow259.9%
hypot-def82.8%
Simplified82.8%
Taylor expanded in B around -inf 53.2%
mul-1-neg53.2%
unsub-neg53.2%
Simplified53.2%
if 1.08e53 < C Initial program 21.2%
Taylor expanded in A around 0 21.7%
unpow221.7%
unpow221.7%
hypot-def52.4%
Simplified52.4%
Taylor expanded in C around inf 68.7%
Taylor expanded in B around 0 76.7%
associate-*r/76.8%
Simplified76.8%
Final simplification64.3%
(FPCore (A B C)
:precision binary64
(if (<= B -3.45e-12)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.55e-289)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 4.5e-34)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.45e-12) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.55e-289) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 4.5e-34) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.45e-12) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.55e-289) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 4.5e-34) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.45e-12: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.55e-289: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 4.5e-34: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.45e-12) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.55e-289) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 4.5e-34) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.45e-12) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.55e-289) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 4.5e-34) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.45e-12], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.55e-289], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.5e-34], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.45 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.55 \cdot 10^{-289}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.45e-12Initial program 58.4%
Taylor expanded in B around -inf 61.8%
if -3.45e-12 < B < 1.55e-289Initial program 68.2%
Taylor expanded in A around 0 57.1%
unpow257.1%
unpow257.1%
hypot-def65.5%
Simplified65.5%
Taylor expanded in B around -inf 49.0%
Taylor expanded in B around 0 48.1%
if 1.55e-289 < B < 4.50000000000000042e-34Initial program 50.8%
Taylor expanded in C around inf 48.1%
associate-*r/48.1%
distribute-rgt1-in48.1%
metadata-eval48.1%
mul0-lft48.1%
metadata-eval48.1%
Simplified48.1%
if 4.50000000000000042e-34 < B Initial program 54.7%
Taylor expanded in B around inf 60.5%
Final simplification55.8%
(FPCore (A B C)
:precision binary64
(if (<= B -6.5e-15)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.8e-291)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 2.1e-36)
(* 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 <= -6.5e-15) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.8e-291) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 2.1e-36) {
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 <= -6.5e-15) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.8e-291) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 2.1e-36) {
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 <= -6.5e-15: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.8e-291: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 2.1e-36: 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 <= -6.5e-15) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.8e-291) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 2.1e-36) 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 <= -6.5e-15) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.8e-291) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 2.1e-36) 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, -6.5e-15], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-291], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e-36], 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 -6.5 \cdot 10^{-15}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-291}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-36}:\\
\;\;\;\;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 < -6.49999999999999991e-15Initial program 58.4%
Taylor expanded in B around -inf 61.8%
if -6.49999999999999991e-15 < B < 3.7999999999999998e-291Initial program 68.2%
Taylor expanded in C around -inf 49.0%
if 3.7999999999999998e-291 < B < 2.09999999999999991e-36Initial program 50.8%
Taylor expanded in C around inf 48.1%
associate-*r/48.1%
distribute-rgt1-in48.1%
metadata-eval48.1%
mul0-lft48.1%
metadata-eval48.1%
Simplified48.1%
if 2.09999999999999991e-36 < B Initial program 54.7%
Taylor expanded in B around inf 60.5%
Final simplification56.1%
(FPCore (A B C)
:precision binary64
(if (<= B -2e-162)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(if (<= B 1.56e-291)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 2.1e-36)
(* 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 <= -2e-162) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else if (B <= 1.56e-291) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 2.1e-36) {
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 <= -2e-162) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else if (B <= 1.56e-291) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 2.1e-36) {
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 <= -2e-162: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) elif B <= 1.56e-291: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 2.1e-36: 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 <= -2e-162) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); elseif (B <= 1.56e-291) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 2.1e-36) 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 <= -2e-162) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); elseif (B <= 1.56e-291) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 2.1e-36) 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, -2e-162], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.56e-291], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e-36], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-162}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.56 \cdot 10^{-291}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-36}:\\
\;\;\;\;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.99999999999999991e-162Initial program 60.3%
Taylor expanded in C around 0 50.8%
associate-*r/50.8%
mul-1-neg50.8%
+-commutative50.8%
unpow250.8%
unpow250.8%
hypot-def65.5%
Simplified65.5%
Taylor expanded in B around -inf 63.8%
mul-1-neg63.8%
unsub-neg63.8%
Simplified63.8%
if -1.99999999999999991e-162 < B < 1.56e-291Initial program 70.1%
Taylor expanded in A around 0 64.9%
unpow264.9%
unpow264.9%
hypot-def73.8%
Simplified73.8%
Taylor expanded in B around -inf 56.1%
Taylor expanded in B around 0 56.0%
if 1.56e-291 < B < 2.09999999999999991e-36Initial program 50.8%
Taylor expanded in C around inf 48.1%
associate-*r/48.1%
distribute-rgt1-in48.1%
metadata-eval48.1%
mul0-lft48.1%
metadata-eval48.1%
Simplified48.1%
if 2.09999999999999991e-36 < B Initial program 54.7%
Taylor expanded in B around inf 60.5%
Final simplification59.0%
(FPCore (A B C)
:precision binary64
(if (<= C -1.32e-17)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= C 1.4e+53)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.32e-17) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (C <= 1.4e+53) {
tmp = 180.0 * (atan((1.0 - (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 <= -1.32e-17) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (C <= 1.4e+53) {
tmp = 180.0 * (Math.atan((1.0 - (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 <= -1.32e-17: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif C <= 1.4e+53: tmp = 180.0 * (math.atan((1.0 - (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 <= -1.32e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (C <= 1.4e+53) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - 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 <= -1.32e-17) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (C <= 1.4e+53) tmp = 180.0 * (atan((1.0 - (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, -1.32e-17], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.4e+53], N[(180.0 * N[(N[ArcTan[N[(1.0 - 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 -1.32 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.4 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \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 < -1.3200000000000001e-17Initial program 84.4%
Taylor expanded in A around 0 84.4%
unpow284.4%
unpow284.4%
hypot-def90.8%
Simplified90.8%
Taylor expanded in B around -inf 79.8%
if -1.3200000000000001e-17 < C < 1.4e53Initial program 56.7%
Taylor expanded in C around 0 55.3%
associate-*r/55.3%
mul-1-neg55.3%
+-commutative55.3%
unpow255.3%
unpow255.3%
hypot-def83.2%
Simplified83.2%
Taylor expanded in B around -inf 45.9%
mul-1-neg45.9%
unsub-neg45.9%
Simplified45.9%
if 1.4e53 < C Initial program 21.2%
Taylor expanded in A around 0 21.7%
unpow221.7%
unpow221.7%
hypot-def52.4%
Simplified52.4%
Taylor expanded in C around inf 76.7%
associate-*r/76.7%
Simplified76.7%
Final simplification62.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.55e-71)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 6.5e-33)
(* 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.55e-71) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6.5e-33) {
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.55e-71) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6.5e-33) {
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.55e-71: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6.5e-33: 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.55e-71) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6.5e-33) 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.55e-71) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6.5e-33) 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.55e-71], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.5e-33], 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.55 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-33}:\\
\;\;\;\;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.55000000000000001e-71Initial program 60.4%
Taylor expanded in B around -inf 55.4%
if -1.55000000000000001e-71 < B < 6.4999999999999993e-33Initial program 59.0%
Taylor expanded in C around inf 37.7%
associate-*r/37.7%
distribute-rgt1-in37.7%
metadata-eval37.7%
mul0-lft37.7%
metadata-eval37.7%
Simplified37.7%
if 6.4999999999999993e-33 < B Initial program 54.7%
Taylor expanded in B around inf 60.5%
Final simplification50.7%
(FPCore (A B C) :precision binary64 (if (<= A -5.1e+39) (* (/ 180.0 PI) (atan (/ B (/ A 0.5)))) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e+39) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (A / 0.5)));
} 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 tmp;
if (A <= -5.1e+39) {
tmp = (180.0 / Math.PI) * Math.atan((B / (A / 0.5)));
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.1e+39: tmp = (180.0 / math.pi) * math.atan((B / (A / 0.5))) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.1e+39) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(A / 0.5)))); 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) tmp = 0.0; if (A <= -5.1e+39) tmp = (180.0 / pi) * atan((B / (A / 0.5))); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.1e+39], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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}
\mathbf{if}\;A \leq -5.1 \cdot 10^{+39}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.0999999999999998e39Initial program 27.1%
Taylor expanded in A around -inf 67.9%
associate-*r/67.9%
Simplified67.9%
Taylor expanded in B around 0 67.9%
associate-*r/68.1%
associate-/l*68.0%
associate-*r/68.0%
associate-/l*68.0%
associate-/r/67.9%
associate-/l*68.1%
*-commutative68.1%
associate-/l*68.1%
Simplified68.1%
if -5.0999999999999998e39 < A Initial program 66.8%
Taylor expanded in B around -inf 59.6%
associate--l+59.6%
div-sub60.1%
Simplified60.1%
Final simplification61.9%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 62.4%
Taylor expanded in B around -inf 40.4%
if -4.999999999999985e-310 < B Initial program 54.0%
Taylor expanded in B around inf 41.5%
Final simplification41.0%
(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 58.1%
Taylor expanded in B around inf 22.3%
Final simplification22.3%
herbie shell --seed 2024031
(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)))