
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
(* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -0.5) or not (t_0 <= 0.0): tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -0.5) || !(t_0 <= 0.0)) tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -0.5) || ~((t_0 <= 0.0))) tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5 or 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 60.6%
associate-*r/60.6%
associate-*l/60.6%
*-commutative60.6%
Simplified87.0%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 20.9%
associate-*r/20.9%
associate-*l/20.9%
*-commutative20.9%
Simplified20.9%
Taylor expanded in B around 0 99.3%
associate-*r/99.4%
Simplified99.4%
Final simplification88.7%
(FPCore (A B C)
:precision binary64
(if (<= A -5.7e+172)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 8.5e+98)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (/ (+ C (- B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.7e+172) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 8.5e+98) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.7e+172) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 8.5e+98) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.7e+172: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 8.5e+98: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.7e+172) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 8.5e+98) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.7e+172) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 8.5e+98) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan(((C + (B - A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.7e+172], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 8.5e+98], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.7 \cdot 10^{+172}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 8.5 \cdot 10^{+98}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\end{array}
\end{array}
if A < -5.7e172Initial program 10.1%
associate-*r/10.1%
associate-*l/10.1%
*-commutative10.1%
Simplified42.0%
Taylor expanded in B around 0 88.6%
associate-*r/88.6%
Simplified88.6%
if -5.7e172 < A < 8.4999999999999996e98Initial program 52.9%
associate-*r/52.9%
associate-*l/52.9%
associate-*l/52.9%
*-lft-identity52.9%
sub-neg52.9%
associate-+l-51.9%
sub-neg51.9%
remove-double-neg51.9%
+-commutative51.9%
unpow251.9%
unpow251.9%
hypot-def76.0%
Simplified76.0%
Taylor expanded in A around 0 50.5%
unpow250.5%
unpow250.5%
hypot-def74.6%
Simplified74.6%
if 8.4999999999999996e98 < A Initial program 86.7%
associate-*r/86.7%
associate-*l/86.7%
associate-*l/86.7%
*-lft-identity86.7%
sub-neg86.7%
associate-+l-86.7%
sub-neg86.7%
remove-double-neg86.7%
+-commutative86.7%
unpow286.7%
unpow286.7%
hypot-def97.8%
Simplified97.8%
Taylor expanded in B around -inf 93.3%
neg-mul-193.3%
unsub-neg93.3%
Simplified93.3%
Final simplification79.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan -1.0)))
(t_1 (* (/ 180.0 PI) (atan (/ (+ B C) B)))))
(if (<= C -1.85e-105)
t_1
(if (<= C -3.6e-179)
t_0
(if (<= C -5.4e-236)
t_1
(if (<= C 6.2e-295)
t_0
(if (<= C 3.2e-109)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 1.35e-68)
t_0
(* (/ 180.0 PI) (atan (/ B (/ C -0.5))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(-1.0);
double t_1 = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
double tmp;
if (C <= -1.85e-105) {
tmp = t_1;
} else if (C <= -3.6e-179) {
tmp = t_0;
} else if (C <= -5.4e-236) {
tmp = t_1;
} else if (C <= 6.2e-295) {
tmp = t_0;
} else if (C <= 3.2e-109) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 1.35e-68) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B / (C / -0.5)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(-1.0);
double t_1 = (180.0 / Math.PI) * Math.atan(((B + C) / B));
double tmp;
if (C <= -1.85e-105) {
tmp = t_1;
} else if (C <= -3.6e-179) {
tmp = t_0;
} else if (C <= -5.4e-236) {
tmp = t_1;
} else if (C <= 6.2e-295) {
tmp = t_0;
} else if (C <= 3.2e-109) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 1.35e-68) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((B / (C / -0.5)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(-1.0) t_1 = (180.0 / math.pi) * math.atan(((B + C) / B)) tmp = 0 if C <= -1.85e-105: tmp = t_1 elif C <= -3.6e-179: tmp = t_0 elif C <= -5.4e-236: tmp = t_1 elif C <= 6.2e-295: tmp = t_0 elif C <= 3.2e-109: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 1.35e-68: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((B / (C / -0.5))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(-1.0)) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))) tmp = 0.0 if (C <= -1.85e-105) tmp = t_1; elseif (C <= -3.6e-179) tmp = t_0; elseif (C <= -5.4e-236) tmp = t_1; elseif (C <= 6.2e-295) tmp = t_0; elseif (C <= 3.2e-109) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 1.35e-68) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(C / -0.5)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(-1.0); t_1 = (180.0 / pi) * atan(((B + C) / B)); tmp = 0.0; if (C <= -1.85e-105) tmp = t_1; elseif (C <= -3.6e-179) tmp = t_0; elseif (C <= -5.4e-236) tmp = t_1; elseif (C <= 6.2e-295) tmp = t_0; elseif (C <= 3.2e-109) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 1.35e-68) tmp = t_0; else tmp = (180.0 / pi) * atan((B / (C / -0.5))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.85e-105], t$95$1, If[LessEqual[C, -3.6e-179], t$95$0, If[LessEqual[C, -5.4e-236], t$95$1, If[LessEqual[C, 6.2e-295], t$95$0, If[LessEqual[C, 3.2e-109], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.35e-68], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} -1\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{if}\;C \leq -1.85 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq -3.6 \cdot 10^{-179}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq -5.4 \cdot 10^{-236}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;C \leq 6.2 \cdot 10^{-295}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 3.2 \cdot 10^{-109}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 1.35 \cdot 10^{-68}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\
\end{array}
\end{array}
if C < -1.85000000000000004e-105 or -3.60000000000000007e-179 < C < -5.4e-236Initial program 68.9%
associate-*r/68.9%
associate-*l/68.9%
associate-*l/68.9%
*-lft-identity68.9%
sub-neg68.9%
associate-+l-68.9%
sub-neg68.9%
remove-double-neg68.9%
+-commutative68.9%
unpow268.9%
unpow268.9%
hypot-def86.1%
Simplified86.1%
Taylor expanded in A around 0 66.6%
unpow266.6%
unpow266.6%
hypot-def83.8%
Simplified83.8%
Taylor expanded in B around -inf 67.9%
if -1.85000000000000004e-105 < C < -3.60000000000000007e-179 or -5.4e-236 < C < 6.2000000000000004e-295 or 3.2000000000000002e-109 < C < 1.3500000000000001e-68Initial program 64.3%
associate-*r/64.3%
associate-*l/64.3%
*-commutative64.3%
Simplified88.5%
Taylor expanded in B around inf 53.6%
if 6.2000000000000004e-295 < C < 3.2000000000000002e-109Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-commutative54.8%
Simplified73.0%
Taylor expanded in A around -inf 37.7%
if 1.3500000000000001e-68 < C Initial program 29.0%
associate-*r/29.0%
associate-*l/29.0%
*-commutative29.0%
Simplified56.1%
Taylor expanded in B around 0 71.6%
associate-*r/71.6%
Simplified71.6%
Taylor expanded in C around inf 69.7%
associate-*r/69.7%
*-commutative69.7%
associate-/l*69.7%
Simplified69.7%
Final simplification62.7%
(FPCore (A B C)
:precision binary64
(if (<= B -4.1e-72)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (or (<= B 1.35e-137) (and (not (<= B 1.9e+85)) (<= B 5.5e+113)))
(* 180.0 (/ (atan (/ 0.5 (/ (- A C) B))) PI))
(* (/ 180.0 PI) (atan (/ (- C B) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.1e-72) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if ((B <= 1.35e-137) || (!(B <= 1.9e+85) && (B <= 5.5e+113))) {
tmp = 180.0 * (atan((0.5 / ((A - C) / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.1e-72) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if ((B <= 1.35e-137) || (!(B <= 1.9e+85) && (B <= 5.5e+113))) {
tmp = 180.0 * (Math.atan((0.5 / ((A - C) / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.1e-72: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif (B <= 1.35e-137) or (not (B <= 1.9e+85) and (B <= 5.5e+113)): tmp = 180.0 * (math.atan((0.5 / ((A - C) / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.1e-72) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif ((B <= 1.35e-137) || (!(B <= 1.9e+85) && (B <= 5.5e+113))) tmp = Float64(180.0 * Float64(atan(Float64(0.5 / Float64(Float64(A - C) / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.1e-72) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif ((B <= 1.35e-137) || (~((B <= 1.9e+85)) && (B <= 5.5e+113))) tmp = 180.0 * (atan((0.5 / ((A - C) / B))) / pi); else tmp = (180.0 / pi) * atan(((C - B) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.1e-72], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.35e-137], And[N[Not[LessEqual[B, 1.9e+85]], $MachinePrecision], LessEqual[B, 5.5e+113]]], N[(180.0 * N[(N[ArcTan[N[(0.5 / N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.1 \cdot 10^{-72}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;B \leq 1.35 \cdot 10^{-137} \lor \neg \left(B \leq 1.9 \cdot 10^{+85}\right) \land B \leq 5.5 \cdot 10^{+113}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A - C}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\end{array}
\end{array}
if B < -4.10000000000000003e-72Initial program 48.9%
associate-*r/48.9%
associate-*l/48.9%
associate-*l/48.9%
*-lft-identity48.9%
sub-neg48.9%
associate-+l-48.9%
sub-neg48.9%
remove-double-neg48.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-def79.2%
Simplified79.2%
Taylor expanded in A around 0 44.4%
unpow244.4%
unpow244.4%
hypot-def73.6%
Simplified73.6%
Taylor expanded in B around -inf 71.8%
if -4.10000000000000003e-72 < B < 1.34999999999999996e-137 or 1.89999999999999996e85 < B < 5.5000000000000001e113Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
*-commutative51.8%
Simplified69.8%
Taylor expanded in B around 0 59.0%
associate-*r/59.0%
Simplified59.0%
Taylor expanded in C around -inf 58.9%
associate-*r/58.9%
mul-1-neg58.9%
sub-neg58.9%
associate-/l*58.2%
Simplified58.2%
if 1.34999999999999996e-137 < B < 1.89999999999999996e85 or 5.5000000000000001e113 < B Initial program 61.6%
associate-*r/61.6%
associate-*l/61.6%
associate-*l/61.6%
*-lft-identity61.6%
sub-neg61.6%
associate-+l-61.6%
sub-neg61.6%
remove-double-neg61.6%
+-commutative61.6%
unpow261.6%
unpow261.6%
hypot-def82.3%
Simplified82.3%
Taylor expanded in A around 0 52.5%
unpow252.5%
unpow252.5%
hypot-def72.2%
Simplified72.2%
Taylor expanded in C around 0 71.7%
mul-1-neg71.7%
unsub-neg71.7%
Simplified71.7%
Final simplification67.4%
(FPCore (A B C)
:precision binary64
(if (<= B -8.8e-72)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (or (<= B 4.2e-137) (and (not (<= B 7.6e+85)) (<= B 3.8e+112)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* (/ 180.0 PI) (atan (/ (- C B) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.8e-72) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if ((B <= 4.2e-137) || (!(B <= 7.6e+85) && (B <= 3.8e+112))) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.8e-72) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if ((B <= 4.2e-137) || (!(B <= 7.6e+85) && (B <= 3.8e+112))) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.8e-72: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif (B <= 4.2e-137) or (not (B <= 7.6e+85) and (B <= 3.8e+112)): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.8e-72) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif ((B <= 4.2e-137) || (!(B <= 7.6e+85) && (B <= 3.8e+112))) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.8e-72) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif ((B <= 4.2e-137) || (~((B <= 7.6e+85)) && (B <= 3.8e+112))) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan(((C - B) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.8e-72], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 4.2e-137], And[N[Not[LessEqual[B, 7.6e+85]], $MachinePrecision], LessEqual[B, 3.8e+112]]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.8 \cdot 10^{-72}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-137} \lor \neg \left(B \leq 7.6 \cdot 10^{+85}\right) \land B \leq 3.8 \cdot 10^{+112}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\end{array}
\end{array}
if B < -8.8000000000000001e-72Initial program 48.9%
associate-*r/48.9%
associate-*l/48.9%
associate-*l/48.9%
*-lft-identity48.9%
sub-neg48.9%
associate-+l-48.9%
sub-neg48.9%
remove-double-neg48.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-def79.2%
Simplified79.2%
Taylor expanded in A around 0 44.4%
unpow244.4%
unpow244.4%
hypot-def73.6%
Simplified73.6%
Taylor expanded in B around -inf 71.8%
if -8.8000000000000001e-72 < B < 4.19999999999999983e-137 or 7.59999999999999984e85 < B < 3.80000000000000008e112Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
*-commutative51.8%
Simplified69.8%
Taylor expanded in B around 0 59.0%
associate-*r/59.0%
Simplified59.0%
if 4.19999999999999983e-137 < B < 7.59999999999999984e85 or 3.80000000000000008e112 < B Initial program 61.6%
associate-*r/61.6%
associate-*l/61.6%
associate-*l/61.6%
*-lft-identity61.6%
sub-neg61.6%
associate-+l-61.6%
sub-neg61.6%
remove-double-neg61.6%
+-commutative61.6%
unpow261.6%
unpow261.6%
hypot-def82.3%
Simplified82.3%
Taylor expanded in A around 0 52.5%
unpow252.5%
unpow252.5%
hypot-def72.2%
Simplified72.2%
Taylor expanded in C around 0 71.7%
mul-1-neg71.7%
unsub-neg71.7%
Simplified71.7%
Final simplification67.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.4e-72)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (or (<= B 8.5e-246) (and (not (<= B 4.6e+81)) (<= B 5.1e+107)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.4e-72) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if ((B <= 8.5e-246) || (!(B <= 4.6e+81) && (B <= 5.1e+107))) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.4e-72) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if ((B <= 8.5e-246) || (!(B <= 4.6e+81) && (B <= 5.1e+107))) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.4e-72: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif (B <= 8.5e-246) or (not (B <= 4.6e+81) and (B <= 5.1e+107)): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.4e-72) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif ((B <= 8.5e-246) || (!(B <= 4.6e+81) && (B <= 5.1e+107))) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.4e-72) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif ((B <= 8.5e-246) || (~((B <= 4.6e+81)) && (B <= 5.1e+107))) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.4e-72], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 8.5e-246], And[N[Not[LessEqual[B, 4.6e+81]], $MachinePrecision], LessEqual[B, 5.1e+107]]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.4 \cdot 10^{-72}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-246} \lor \neg \left(B \leq 4.6 \cdot 10^{+81}\right) \land B \leq 5.1 \cdot 10^{+107}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < -1.3999999999999999e-72Initial program 48.9%
associate-*r/48.9%
associate-*l/48.9%
associate-*l/48.9%
*-lft-identity48.9%
sub-neg48.9%
associate-+l-48.9%
sub-neg48.9%
remove-double-neg48.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-def79.2%
Simplified79.2%
Taylor expanded in A around 0 44.4%
unpow244.4%
unpow244.4%
hypot-def73.6%
Simplified73.6%
Taylor expanded in B around -inf 71.8%
if -1.3999999999999999e-72 < B < 8.4999999999999998e-246 or 4.5999999999999998e81 < B < 5.1000000000000002e107Initial program 49.0%
associate-*r/49.0%
associate-*l/49.0%
*-commutative49.0%
Simplified66.5%
Taylor expanded in B around 0 64.8%
associate-*r/64.9%
Simplified64.9%
if 8.4999999999999998e-246 < B < 4.5999999999999998e81 or 5.1000000000000002e107 < B Initial program 60.9%
associate-*r/60.9%
associate-*l/60.9%
associate-*l/60.9%
*-lft-identity60.9%
sub-neg60.9%
associate-+l-60.8%
sub-neg60.8%
remove-double-neg60.8%
+-commutative60.8%
unpow260.8%
unpow260.8%
hypot-def78.9%
Simplified78.9%
Taylor expanded in B around inf 76.4%
Final simplification72.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.95e-196)
(* (/ 180.0 PI) (atan (/ (+ C (- B A)) B)))
(if (or (<= B 2.2e-246) (and (not (<= B 2.15e+86)) (<= B 5.1e+107)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e-196) {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
} else if ((B <= 2.2e-246) || (!(B <= 2.15e+86) && (B <= 5.1e+107))) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e-196) {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
} else if ((B <= 2.2e-246) || (!(B <= 2.15e+86) && (B <= 5.1e+107))) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.95e-196: tmp = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) elif (B <= 2.2e-246) or (not (B <= 2.15e+86) and (B <= 5.1e+107)): tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.95e-196) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))); elseif ((B <= 2.2e-246) || (!(B <= 2.15e+86) && (B <= 5.1e+107))) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.95e-196) tmp = (180.0 / pi) * atan(((C + (B - A)) / B)); elseif ((B <= 2.2e-246) || (~((B <= 2.15e+86)) && (B <= 5.1e+107))) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.95e-196], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 2.2e-246], And[N[Not[LessEqual[B, 2.15e+86]], $MachinePrecision], LessEqual[B, 5.1e+107]]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.95 \cdot 10^{-196}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-246} \lor \neg \left(B \leq 2.15 \cdot 10^{+86}\right) \land B \leq 5.1 \cdot 10^{+107}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < -1.95000000000000008e-196Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
associate-*l/51.8%
*-lft-identity51.8%
sub-neg51.8%
associate-+l-51.7%
sub-neg51.7%
remove-double-neg51.7%
+-commutative51.7%
unpow251.7%
unpow251.7%
hypot-def76.1%
Simplified76.1%
Taylor expanded in B around -inf 74.2%
neg-mul-174.2%
unsub-neg74.2%
Simplified74.2%
if -1.95000000000000008e-196 < B < 2.19999999999999998e-246 or 2.1500000000000001e86 < B < 5.1000000000000002e107Initial program 42.2%
associate-*r/42.2%
associate-*l/42.2%
*-commutative42.2%
Simplified67.8%
Taylor expanded in B around 0 76.4%
associate-*r/76.5%
Simplified76.5%
if 2.19999999999999998e-246 < B < 2.1500000000000001e86 or 5.1000000000000002e107 < B Initial program 60.9%
associate-*r/60.9%
associate-*l/60.9%
associate-*l/60.9%
*-lft-identity60.9%
sub-neg60.9%
associate-+l-60.8%
sub-neg60.8%
remove-double-neg60.8%
+-commutative60.8%
unpow260.8%
unpow260.8%
hypot-def78.9%
Simplified78.9%
Taylor expanded in B around inf 76.4%
Final simplification75.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.45e-196)
(* (/ 180.0 PI) (atan (/ (+ C (- B A)) B)))
(if (<= B 6.5e-246)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (or (<= B 1.9e+85) (not (<= B 5.6e+107)))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
(/ (* 180.0 (atan (/ -0.5 (/ (- C A) B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.45e-196) {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
} else if (B <= 6.5e-246) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if ((B <= 1.9e+85) || !(B <= 5.6e+107)) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
} else {
tmp = (180.0 * atan((-0.5 / ((C - A) / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.45e-196) {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
} else if (B <= 6.5e-246) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if ((B <= 1.9e+85) || !(B <= 5.6e+107)) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
} else {
tmp = (180.0 * Math.atan((-0.5 / ((C - A) / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.45e-196: tmp = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) elif B <= 6.5e-246: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif (B <= 1.9e+85) or not (B <= 5.6e+107): tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) else: tmp = (180.0 * math.atan((-0.5 / ((C - A) / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.45e-196) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))); elseif (B <= 6.5e-246) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif ((B <= 1.9e+85) || !(B <= 5.6e+107)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 / Float64(Float64(C - A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.45e-196) tmp = (180.0 / pi) * atan(((C + (B - A)) / B)); elseif (B <= 6.5e-246) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif ((B <= 1.9e+85) || ~((B <= 5.6e+107))) tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); else tmp = (180.0 * atan((-0.5 / ((C - A) / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.45e-196], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.5e-246], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.9e+85], N[Not[LessEqual[B, 5.6e+107]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 / N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.45 \cdot 10^{-196}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-246}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;B \leq 1.9 \cdot 10^{+85} \lor \neg \left(B \leq 5.6 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5}{\frac{C - A}{B}}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.44999999999999994e-196Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
associate-*l/51.8%
*-lft-identity51.8%
sub-neg51.8%
associate-+l-51.7%
sub-neg51.7%
remove-double-neg51.7%
+-commutative51.7%
unpow251.7%
unpow251.7%
hypot-def76.1%
Simplified76.1%
Taylor expanded in B around -inf 74.2%
neg-mul-174.2%
unsub-neg74.2%
Simplified74.2%
if -1.44999999999999994e-196 < B < 6.50000000000000016e-246Initial program 47.7%
associate-*r/47.7%
associate-*l/47.7%
*-commutative47.7%
Simplified79.0%
Taylor expanded in B around 0 74.3%
associate-*r/74.4%
Simplified74.4%
if 6.50000000000000016e-246 < B < 1.89999999999999996e85 or 5.59999999999999969e107 < B Initial program 60.9%
associate-*r/60.9%
associate-*l/60.9%
associate-*l/60.9%
*-lft-identity60.9%
sub-neg60.9%
associate-+l-60.8%
sub-neg60.8%
remove-double-neg60.8%
+-commutative60.8%
unpow260.8%
unpow260.8%
hypot-def78.9%
Simplified78.9%
Taylor expanded in B around inf 76.4%
if 1.89999999999999996e85 < B < 5.59999999999999969e107Initial program 17.7%
associate-*r/17.7%
associate-*l/17.7%
*-commutative17.7%
Simplified18.2%
Taylor expanded in B around 0 85.7%
associate-*r/85.7%
Simplified85.7%
associate-*r/85.9%
associate-/l*85.9%
Applied egg-rr85.9%
Final simplification75.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))
(if (<= B -4.5e-55)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 3.9e-200)
t_0
(if (<= B 1.25e-131)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= B 6.2e-87) t_0 (* (/ 180.0 PI) (atan -1.0))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
double tmp;
if (B <= -4.5e-55) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 3.9e-200) {
tmp = t_0;
} else if (B <= 1.25e-131) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (B <= 6.2e-87) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
double tmp;
if (B <= -4.5e-55) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 3.9e-200) {
tmp = t_0;
} else if (B <= 1.25e-131) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (B <= 6.2e-87) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) tmp = 0 if B <= -4.5e-55: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 3.9e-200: tmp = t_0 elif B <= 1.25e-131: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif B <= 6.2e-87: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)) tmp = 0.0 if (B <= -4.5e-55) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 3.9e-200) tmp = t_0; elseif (B <= 1.25e-131) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (B <= 6.2e-87) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * -0.5) / C)) / pi); tmp = 0.0; if (B <= -4.5e-55) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 3.9e-200) tmp = t_0; elseif (B <= 1.25e-131) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (B <= 6.2e-87) tmp = t_0; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.5e-55], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.9e-200], t$95$0, If[LessEqual[B, 1.25e-131], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.2e-87], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -4.5 \cdot 10^{-55}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 3.9 \cdot 10^{-200}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-131}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.2 \cdot 10^{-87}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -4.4999999999999997e-55Initial program 47.3%
associate-*r/47.3%
associate-*l/47.3%
*-commutative47.3%
Simplified77.9%
Taylor expanded in B around -inf 60.9%
if -4.4999999999999997e-55 < B < 3.89999999999999999e-200 or 1.2500000000000001e-131 < B < 6.19999999999999995e-87Initial program 57.4%
associate-*r/57.4%
associate-*l/57.4%
associate-*l/57.4%
*-lft-identity57.4%
sub-neg57.4%
associate-+l-54.9%
sub-neg54.9%
remove-double-neg54.9%
+-commutative54.9%
unpow254.9%
unpow254.9%
hypot-def67.9%
Simplified67.9%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-def59.5%
Simplified59.5%
Taylor expanded in C around inf 44.9%
associate-*r/44.9%
associate-/l*44.2%
Simplified44.2%
Taylor expanded in C around 0 44.9%
associate-*r/44.9%
*-commutative44.9%
Simplified44.9%
if 3.89999999999999999e-200 < B < 1.2500000000000001e-131Initial program 52.6%
associate-*r/52.6%
associate-*l/52.6%
*-commutative52.6%
Simplified66.4%
Taylor expanded in A around -inf 51.2%
Taylor expanded in B around 0 51.1%
if 6.19999999999999995e-87 < B Initial program 58.6%
associate-*r/58.6%
associate-*l/58.6%
*-commutative58.6%
Simplified80.2%
Taylor expanded in B around inf 56.5%
Final simplification54.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))
(if (<= B -1.12e-54)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 1.85e-205)
t_0
(if (<= B 2e-132)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= B 7.6e-87) t_0 (* (/ 180.0 PI) (atan -1.0))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
double tmp;
if (B <= -1.12e-54) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 1.85e-205) {
tmp = t_0;
} else if (B <= 2e-132) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (B <= 7.6e-87) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
double tmp;
if (B <= -1.12e-54) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 1.85e-205) {
tmp = t_0;
} else if (B <= 2e-132) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (B <= 7.6e-87) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) tmp = 0 if B <= -1.12e-54: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 1.85e-205: tmp = t_0 elif B <= 2e-132: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif B <= 7.6e-87: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)) tmp = 0.0 if (B <= -1.12e-54) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 1.85e-205) tmp = t_0; elseif (B <= 2e-132) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (B <= 7.6e-87) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * -0.5) / C)) / pi); tmp = 0.0; if (B <= -1.12e-54) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 1.85e-205) tmp = t_0; elseif (B <= 2e-132) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (B <= 7.6e-87) tmp = t_0; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.12e-54], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.85e-205], t$95$0, If[LessEqual[B, 2e-132], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.6e-87], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.12 \cdot 10^{-54}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-132}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;B \leq 7.6 \cdot 10^{-87}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.11999999999999994e-54Initial program 47.3%
associate-*r/47.3%
associate-*l/47.3%
*-commutative47.3%
Simplified77.9%
Taylor expanded in B around -inf 60.9%
if -1.11999999999999994e-54 < B < 1.85e-205 or 2e-132 < B < 7.6e-87Initial program 57.4%
associate-*r/57.4%
associate-*l/57.4%
associate-*l/57.4%
*-lft-identity57.4%
sub-neg57.4%
associate-+l-54.9%
sub-neg54.9%
remove-double-neg54.9%
+-commutative54.9%
unpow254.9%
unpow254.9%
hypot-def67.9%
Simplified67.9%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-def59.5%
Simplified59.5%
Taylor expanded in C around inf 44.9%
associate-*r/44.9%
associate-/l*44.2%
Simplified44.2%
Taylor expanded in C around 0 44.9%
associate-*r/44.9%
*-commutative44.9%
Simplified44.9%
if 1.85e-205 < B < 2e-132Initial program 52.6%
associate-*r/52.6%
associate-*l/52.6%
*-commutative52.6%
Simplified66.4%
Taylor expanded in A around -inf 51.2%
if 7.6e-87 < B Initial program 58.6%
associate-*r/58.6%
associate-*l/58.6%
*-commutative58.6%
Simplified80.2%
Taylor expanded in B around inf 56.5%
Final simplification54.0%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-52)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 2.8e-201)
(* (/ 180.0 PI) (atan (/ B (/ C -0.5))))
(if (<= B 3.6e-131)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= B 2.5e-86)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(* (/ 180.0 PI) (atan -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-52) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 2.8e-201) {
tmp = (180.0 / ((double) M_PI)) * atan((B / (C / -0.5)));
} else if (B <= 3.6e-131) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (B <= 2.5e-86) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-52) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 2.8e-201) {
tmp = (180.0 / Math.PI) * Math.atan((B / (C / -0.5)));
} else if (B <= 3.6e-131) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (B <= 2.5e-86) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.6e-52: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 2.8e-201: tmp = (180.0 / math.pi) * math.atan((B / (C / -0.5))) elif B <= 3.6e-131: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif B <= 2.5e-86: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.6e-52) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 2.8e-201) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B / Float64(C / -0.5)))); elseif (B <= 3.6e-131) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (B <= 2.5e-86) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.6e-52) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 2.8e-201) tmp = (180.0 / pi) * atan((B / (C / -0.5))); elseif (B <= 3.6e-131) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (B <= 2.5e-86) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-52], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.8e-201], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-131], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.5e-86], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.6 \cdot 10^{-52}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{-201}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-131}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -2.5999999999999999e-52Initial program 47.3%
associate-*r/47.3%
associate-*l/47.3%
*-commutative47.3%
Simplified77.9%
Taylor expanded in B around -inf 60.9%
if -2.5999999999999999e-52 < B < 2.7999999999999999e-201Initial program 57.5%
associate-*r/57.5%
associate-*l/57.5%
*-commutative57.5%
Simplified78.5%
Taylor expanded in B around 0 54.8%
associate-*r/54.8%
Simplified54.8%
Taylor expanded in C around inf 44.7%
associate-*r/44.7%
*-commutative44.7%
associate-/l*44.7%
Simplified44.7%
if 2.7999999999999999e-201 < B < 3.5999999999999999e-131Initial program 52.6%
associate-*r/52.6%
associate-*l/52.6%
*-commutative52.6%
Simplified66.4%
Taylor expanded in A around -inf 51.2%
if 3.5999999999999999e-131 < B < 2.4999999999999999e-86Initial program 56.7%
associate-*r/56.7%
associate-*l/56.7%
associate-*l/56.7%
*-lft-identity56.7%
sub-neg56.7%
associate-+l-56.6%
sub-neg56.6%
remove-double-neg56.6%
+-commutative56.6%
unpow256.6%
unpow256.6%
hypot-def56.6%
Simplified56.6%
Taylor expanded in A around 0 49.2%
unpow249.2%
unpow249.2%
hypot-def49.2%
Simplified49.2%
Taylor expanded in C around inf 46.3%
associate-*r/46.3%
associate-/l*46.1%
Simplified46.1%
Taylor expanded in C around 0 46.4%
associate-*r/46.4%
*-commutative46.4%
Simplified46.4%
if 2.4999999999999999e-86 < B Initial program 58.6%
associate-*r/58.6%
associate-*l/58.6%
*-commutative58.6%
Simplified80.2%
Taylor expanded in B around inf 56.5%
Final simplification54.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1.9e-70)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -1e-198)
(* (/ 180.0 PI) (atan (/ (* A -2.0) B)))
(if (<= B 3.7e-222)
(* (/ 180.0 PI) (atan 0.0))
(if (<= B 4e-108)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(* (/ 180.0 PI) (atan -1.0)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.9e-70) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -1e-198) {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
} else if (B <= 3.7e-222) {
tmp = (180.0 / ((double) M_PI)) * atan(0.0);
} else if (B <= 4e-108) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.9e-70) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -1e-198) {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
} else if (B <= 3.7e-222) {
tmp = (180.0 / Math.PI) * Math.atan(0.0);
} else if (B <= 4e-108) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.9e-70: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -1e-198: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) elif B <= 3.7e-222: tmp = (180.0 / math.pi) * math.atan(0.0) elif B <= 4e-108: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.9e-70) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -1e-198) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); elseif (B <= 3.7e-222) tmp = Float64(Float64(180.0 / pi) * atan(0.0)); elseif (B <= 4e-108) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.9e-70) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -1e-198) tmp = (180.0 / pi) * atan(((A * -2.0) / B)); elseif (B <= 3.7e-222) tmp = (180.0 / pi) * atan(0.0); elseif (B <= 4e-108) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.9e-70], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1e-198], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.7e-222], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-108], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.9 \cdot 10^{-70}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -1 \cdot 10^{-198}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-222}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-108}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.8999999999999999e-70Initial program 48.9%
associate-*r/48.9%
associate-*l/48.9%
*-commutative48.9%
Simplified79.1%
Taylor expanded in B around -inf 59.5%
if -1.8999999999999999e-70 < B < -9.9999999999999991e-199Initial program 63.4%
associate-*r/63.4%
associate-*l/63.4%
*-commutative63.4%
Simplified63.7%
Taylor expanded in A around inf 62.3%
*-commutative62.3%
Simplified62.3%
if -9.9999999999999991e-199 < B < 3.6999999999999999e-222Initial program 49.7%
associate-*r/49.7%
associate-*l/49.7%
associate-*l/49.7%
*-lft-identity49.7%
sub-neg49.7%
associate-+l-45.0%
sub-neg45.0%
remove-double-neg45.0%
+-commutative45.0%
unpow245.0%
unpow245.0%
hypot-def68.2%
Simplified68.2%
div-sub30.3%
Applied egg-rr30.3%
Taylor expanded in C around inf 34.1%
distribute-rgt1-in34.1%
metadata-eval34.1%
mul0-lft52.3%
metadata-eval52.3%
Simplified52.3%
if 3.6999999999999999e-222 < B < 4.00000000000000016e-108Initial program 64.5%
associate-*r/64.5%
associate-*l/64.5%
*-commutative64.5%
Simplified72.5%
Taylor expanded in C around -inf 47.1%
if 4.00000000000000016e-108 < B Initial program 57.3%
associate-*r/57.3%
associate-*l/57.3%
*-commutative57.3%
Simplified77.7%
Taylor expanded in B around inf 55.4%
Final simplification55.8%
(FPCore (A B C)
:precision binary64
(if (<= B -9.6e-196)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 4.2e-213)
(* (/ 180.0 PI) (atan 0.0))
(if (<= B 7e-106)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* (/ 180.0 PI) (atan -1.0))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9.6e-196) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 4.2e-213) {
tmp = (180.0 / ((double) M_PI)) * atan(0.0);
} else if (B <= 7e-106) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -9.6e-196) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 4.2e-213) {
tmp = (180.0 / Math.PI) * Math.atan(0.0);
} else if (B <= 7e-106) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -9.6e-196: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 4.2e-213: tmp = (180.0 / math.pi) * math.atan(0.0) elif B <= 7e-106: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -9.6e-196) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 4.2e-213) tmp = Float64(Float64(180.0 / pi) * atan(0.0)); elseif (B <= 7e-106) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -9.6e-196) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 4.2e-213) tmp = (180.0 / pi) * atan(0.0); elseif (B <= 7e-106) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -9.6e-196], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e-213], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-106], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -9.6 \cdot 10^{-196}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-213}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -9.60000000000000082e-196Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
*-commutative51.8%
Simplified76.1%
Taylor expanded in B around -inf 50.3%
if -9.60000000000000082e-196 < B < 4.1999999999999997e-213Initial program 52.2%
associate-*r/52.2%
associate-*l/52.2%
associate-*l/52.2%
*-lft-identity52.2%
sub-neg52.2%
associate-+l-47.7%
sub-neg47.7%
remove-double-neg47.7%
+-commutative47.7%
unpow247.7%
unpow247.7%
hypot-def69.8%
Simplified69.8%
div-sub33.8%
Applied egg-rr33.8%
Taylor expanded in C around inf 32.5%
distribute-rgt1-in32.5%
metadata-eval32.5%
mul0-lft49.8%
metadata-eval49.8%
Simplified49.8%
if 4.1999999999999997e-213 < B < 7e-106Initial program 56.5%
associate-*r/56.5%
associate-*l/56.5%
*-commutative56.5%
Simplified64.6%
Taylor expanded in A around -inf 37.9%
Taylor expanded in B around 0 37.8%
if 7e-106 < B Initial program 58.3%
associate-*r/58.3%
associate-*l/58.3%
*-commutative58.3%
Simplified79.1%
Taylor expanded in B around inf 56.4%
Final simplification51.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.05e-195)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 4.8e-215)
(* (/ 180.0 PI) (atan 0.0))
(if (<= B 9e-105)
(* 180.0 (/ (atan (/ 0.5 (/ A B))) PI))
(* (/ 180.0 PI) (atan -1.0))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-195) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 4.8e-215) {
tmp = (180.0 / ((double) M_PI)) * atan(0.0);
} else if (B <= 9e-105) {
tmp = 180.0 * (atan((0.5 / (A / B))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-195) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 4.8e-215) {
tmp = (180.0 / Math.PI) * Math.atan(0.0);
} else if (B <= 9e-105) {
tmp = 180.0 * (Math.atan((0.5 / (A / B))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.05e-195: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 4.8e-215: tmp = (180.0 / math.pi) * math.atan(0.0) elif B <= 9e-105: tmp = 180.0 * (math.atan((0.5 / (A / B))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.05e-195) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 4.8e-215) tmp = Float64(Float64(180.0 / pi) * atan(0.0)); elseif (B <= 9e-105) tmp = Float64(180.0 * Float64(atan(Float64(0.5 / Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.05e-195) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 4.8e-215) tmp = (180.0 / pi) * atan(0.0); elseif (B <= 9e-105) tmp = 180.0 * (atan((0.5 / (A / B))) / pi); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.05e-195], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-215], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-105], N[(180.0 * N[(N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.05 \cdot 10^{-195}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-215}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.05e-195Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
*-commutative51.8%
Simplified76.1%
Taylor expanded in B around -inf 50.3%
if -1.05e-195 < B < 4.8000000000000002e-215Initial program 52.2%
associate-*r/52.2%
associate-*l/52.2%
associate-*l/52.2%
*-lft-identity52.2%
sub-neg52.2%
associate-+l-47.7%
sub-neg47.7%
remove-double-neg47.7%
+-commutative47.7%
unpow247.7%
unpow247.7%
hypot-def69.8%
Simplified69.8%
div-sub33.8%
Applied egg-rr33.8%
Taylor expanded in C around inf 32.5%
distribute-rgt1-in32.5%
metadata-eval32.5%
mul0-lft49.8%
metadata-eval49.8%
Simplified49.8%
if 4.8000000000000002e-215 < B < 8.9999999999999995e-105Initial program 56.5%
associate-*r/56.5%
associate-*l/56.5%
*-commutative56.5%
Simplified64.6%
Taylor expanded in B around 0 47.2%
associate-*r/47.2%
Simplified47.2%
Taylor expanded in C around -inf 47.1%
associate-*r/47.1%
mul-1-neg47.1%
sub-neg47.1%
associate-/l*47.2%
Simplified47.2%
Taylor expanded in A around inf 37.9%
if 8.9999999999999995e-105 < B Initial program 58.3%
associate-*r/58.3%
associate-*l/58.3%
*-commutative58.3%
Simplified79.1%
Taylor expanded in B around inf 56.4%
Final simplification51.5%
(FPCore (A B C)
:precision binary64
(if (<= B -7.8e-53)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -7.6e-292)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(if (<= B 3.6e-109)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(* (/ 180.0 PI) (atan -1.0))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7.8e-53) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -7.6e-292) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else if (B <= 3.6e-109) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -7.8e-53) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -7.6e-292) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else if (B <= 3.6e-109) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7.8e-53: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -7.6e-292: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) elif B <= 3.6e-109: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7.8e-53) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -7.6e-292) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); elseif (B <= 3.6e-109) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -7.8e-53) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -7.6e-292) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); elseif (B <= 3.6e-109) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7.8e-53], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.6e-292], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-109], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -7.8 \cdot 10^{-53}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -7.6 \cdot 10^{-292}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-109}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -7.8000000000000004e-53Initial program 47.3%
associate-*r/47.3%
associate-*l/47.3%
*-commutative47.3%
Simplified77.9%
Taylor expanded in B around -inf 60.9%
if -7.8000000000000004e-53 < B < -7.60000000000000039e-292Initial program 47.8%
associate-*r/47.8%
associate-*l/47.8%
associate-*l/47.8%
*-lft-identity47.8%
sub-neg47.8%
associate-+l-45.5%
sub-neg45.5%
remove-double-neg45.5%
+-commutative45.5%
unpow245.5%
unpow245.5%
hypot-def63.9%
Simplified63.9%
Taylor expanded in A around 0 35.3%
unpow235.3%
unpow235.3%
hypot-def54.1%
Simplified54.1%
Taylor expanded in C around inf 50.3%
associate-*r/50.3%
associate-/l*50.3%
Simplified50.3%
Taylor expanded in C around 0 50.3%
associate-*r/50.3%
*-commutative50.3%
Simplified50.3%
if -7.60000000000000039e-292 < B < 3.6000000000000001e-109Initial program 66.2%
associate-*r/66.2%
associate-*l/66.2%
*-commutative66.2%
Simplified80.7%
Taylor expanded in C around -inf 44.3%
if 3.6000000000000001e-109 < B Initial program 57.3%
associate-*r/57.3%
associate-*l/57.3%
*-commutative57.3%
Simplified77.7%
Taylor expanded in B around inf 55.4%
Final simplification54.1%
(FPCore (A B C)
:precision binary64
(if (<= B -2.7e-73)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= B -1.35e-199)
(* (/ 180.0 PI) (atan (/ (* A -2.0) B)))
(if (<= B 7.6e-222)
(* (/ 180.0 PI) (atan 0.0))
(* (/ 180.0 PI) (atan (/ (- C B) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-73) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (B <= -1.35e-199) {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
} else if (B <= 7.6e-222) {
tmp = (180.0 / ((double) M_PI)) * atan(0.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-73) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (B <= -1.35e-199) {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
} else if (B <= 7.6e-222) {
tmp = (180.0 / Math.PI) * Math.atan(0.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.7e-73: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif B <= -1.35e-199: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) elif B <= 7.6e-222: tmp = (180.0 / math.pi) * math.atan(0.0) else: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.7e-73) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (B <= -1.35e-199) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); elseif (B <= 7.6e-222) tmp = Float64(Float64(180.0 / pi) * atan(0.0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.7e-73) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (B <= -1.35e-199) tmp = (180.0 / pi) * atan(((A * -2.0) / B)); elseif (B <= 7.6e-222) tmp = (180.0 / pi) * atan(0.0); else tmp = (180.0 / pi) * atan(((C - B) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.7e-73], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.35e-199], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.6e-222], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.7 \cdot 10^{-73}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;B \leq -1.35 \cdot 10^{-199}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\mathbf{elif}\;B \leq 7.6 \cdot 10^{-222}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\end{array}
\end{array}
if B < -2.69999999999999994e-73Initial program 48.9%
associate-*r/48.9%
associate-*l/48.9%
associate-*l/48.9%
*-lft-identity48.9%
sub-neg48.9%
associate-+l-48.9%
sub-neg48.9%
remove-double-neg48.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-def79.2%
Simplified79.2%
Taylor expanded in A around 0 44.4%
unpow244.4%
unpow244.4%
hypot-def73.6%
Simplified73.6%
Taylor expanded in B around -inf 71.8%
if -2.69999999999999994e-73 < B < -1.34999999999999995e-199Initial program 63.4%
associate-*r/63.4%
associate-*l/63.4%
*-commutative63.4%
Simplified63.7%
Taylor expanded in A around inf 62.3%
*-commutative62.3%
Simplified62.3%
if -1.34999999999999995e-199 < B < 7.59999999999999993e-222Initial program 49.7%
associate-*r/49.7%
associate-*l/49.7%
associate-*l/49.7%
*-lft-identity49.7%
sub-neg49.7%
associate-+l-45.0%
sub-neg45.0%
remove-double-neg45.0%
+-commutative45.0%
unpow245.0%
unpow245.0%
hypot-def68.2%
Simplified68.2%
div-sub30.3%
Applied egg-rr30.3%
Taylor expanded in C around inf 34.1%
distribute-rgt1-in34.1%
metadata-eval34.1%
mul0-lft52.3%
metadata-eval52.3%
Simplified52.3%
if 7.59999999999999993e-222 < B Initial program 58.6%
associate-*r/58.6%
associate-*l/58.6%
associate-*l/58.6%
*-lft-identity58.6%
sub-neg58.6%
associate-+l-58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
unpow258.6%
unpow258.6%
hypot-def75.1%
Simplified75.1%
Taylor expanded in A around 0 49.2%
unpow249.2%
unpow249.2%
hypot-def65.3%
Simplified65.3%
Taylor expanded in C around 0 63.5%
mul-1-neg63.5%
unsub-neg63.5%
Simplified63.5%
Final simplification64.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1e-197)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 7.6e-137)
(* (/ 180.0 PI) (atan 0.0))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-197) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 7.6e-137) {
tmp = (180.0 / ((double) M_PI)) * atan(0.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-197) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 7.6e-137) {
tmp = (180.0 / Math.PI) * Math.atan(0.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-197: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 7.6e-137: tmp = (180.0 / math.pi) * math.atan(0.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-197) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 7.6e-137) tmp = Float64(Float64(180.0 / pi) * atan(0.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-197) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 7.6e-137) tmp = (180.0 / pi) * atan(0.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-197], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.6e-137], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-197}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 7.6 \cdot 10^{-137}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -9.9999999999999999e-198Initial program 51.8%
associate-*r/51.8%
associate-*l/51.8%
*-commutative51.8%
Simplified76.1%
Taylor expanded in B around -inf 50.3%
if -9.9999999999999999e-198 < B < 7.59999999999999997e-137Initial program 51.4%
associate-*r/51.4%
associate-*l/51.4%
associate-*l/51.4%
*-lft-identity51.4%
sub-neg51.4%
associate-+l-47.8%
sub-neg47.8%
remove-double-neg47.8%
+-commutative47.8%
unpow247.8%
unpow247.8%
hypot-def64.4%
Simplified64.4%
div-sub37.2%
Applied egg-rr37.2%
Taylor expanded in C around inf 25.3%
distribute-rgt1-in25.3%
metadata-eval25.3%
mul0-lft42.3%
metadata-eval42.3%
Simplified42.3%
if 7.59999999999999997e-137 < B Initial program 59.0%
associate-*r/59.0%
associate-*l/59.0%
*-commutative59.0%
Simplified77.8%
Taylor expanded in B around inf 52.2%
Final simplification49.5%
(FPCore (A B C) :precision binary64 (if (<= B -1.9e-303) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.9e-303) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.9e-303) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.9e-303: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.9e-303) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.9e-303) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.9e-303], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.9 \cdot 10^{-303}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.90000000000000005e-303Initial program 48.9%
associate-*r/48.9%
associate-*l/48.9%
*-commutative48.9%
Simplified76.3%
Taylor expanded in B around -inf 43.1%
if -1.90000000000000005e-303 < B Initial program 59.3%
associate-*r/59.3%
associate-*l/59.3%
*-commutative59.3%
Simplified78.2%
Taylor expanded in B around inf 42.3%
Final simplification42.6%
(FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
double code(double A, double B, double C) {
return (180.0 / ((double) M_PI)) * atan(-1.0);
}
public static double code(double A, double B, double C) {
return (180.0 / Math.PI) * Math.atan(-1.0);
}
def code(A, B, C): return (180.0 / math.pi) * math.atan(-1.0)
function code(A, B, C) return Float64(Float64(180.0 / pi) * atan(-1.0)) end
function tmp = code(A, B, C) tmp = (180.0 / pi) * atan(-1.0); end
code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{180}{\pi} \cdot \tan^{-1} -1
\end{array}
Initial program 54.9%
associate-*r/54.9%
associate-*l/54.9%
*-commutative54.9%
Simplified77.4%
Taylor expanded in B around inf 25.1%
Final simplification25.1%
herbie shell --seed 2023200
(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)))