
(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 26 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 (<= t_0 -0.5)
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))
(if (<= t_0 0.0)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(/ (* 180.0 (atan (/ (- C (+ A (hypot (- A C) B))) B))) PI)))))
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) {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * atan(((C - (A + hypot((A - C), B))) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double 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) {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
} else if (t_0 <= 0.0) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * Math.atan(((C - (A + Math.hypot((A - C), B))) / B))) / Math.PI;
}
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: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) elif t_0 <= 0.0: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 * math.atan(((C - (A + math.hypot((A - C), B))) / B))) / math.pi 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) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - Float64(A + hypot(Float64(A - C), B))) / B))) / pi); 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) tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); elseif (t_0 <= 0.0) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 * atan(((C - (A + hypot((A - C), B))) / B))) / pi; 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[LessEqual[t$95$0, -0.5], 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], If[LessEqual[t$95$0, 0.0], 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 * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}{\pi}\\
\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.5Initial program 62.9%
Simplified81.8%
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 23.6%
Simplified10.4%
Taylor expanded in B around 0 99.4%
associate-*r/99.4%
Simplified99.4%
if -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 61.7%
associate-*r/61.7%
associate-*l/61.7%
*-un-lft-identity61.7%
associate--l-61.7%
unpow261.7%
pow261.7%
hypot-def86.2%
Applied egg-rr86.2%
Final simplification86.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
(if (<= A -4.2e+110)
t_0
(if (<= A -2.1e+43)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= A -9.4e-12)
t_0
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -4.2e+110) {
tmp = t_0;
} else if (A <= -2.1e+43) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (A <= -9.4e-12) {
tmp = t_0;
} 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 t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -4.2e+110) {
tmp = t_0;
} else if (A <= -2.1e+43) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (A <= -9.4e-12) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) tmp = 0 if A <= -4.2e+110: tmp = t_0 elif A <= -2.1e+43: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif A <= -9.4e-12: tmp = t_0 else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) tmp = 0.0 if (A <= -4.2e+110) tmp = t_0; elseif (A <= -2.1e+43) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (A <= -9.4e-12) tmp = t_0; 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) t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); tmp = 0.0; if (A <= -4.2e+110) tmp = t_0; elseif (A <= -2.1e+43) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (A <= -9.4e-12) tmp = t_0; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.2e+110], t$95$0, If[LessEqual[A, -2.1e+43], 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[A, -9.4e-12], t$95$0, 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}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{if}\;A \leq -4.2 \cdot 10^{+110}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.1 \cdot 10^{+43}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -9.4 \cdot 10^{-12}:\\
\;\;\;\;t_0\\
\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 < -4.2000000000000003e110 or -2.10000000000000002e43 < A < -9.39999999999999953e-12Initial program 20.7%
Simplified23.6%
Taylor expanded in B around 0 82.7%
associate-*r/82.7%
Simplified82.7%
if -4.2000000000000003e110 < A < -2.10000000000000002e43Initial program 47.8%
Simplified37.1%
Taylor expanded in A around 0 42.7%
unpow242.7%
unpow242.7%
hypot-def79.2%
Simplified79.2%
if -9.39999999999999953e-12 < A Initial program 67.5%
Simplified87.4%
Final simplification85.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
(t_1 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
(if (<= A -1.2e+109)
t_1
(if (<= A -1.2e+42)
t_0
(if (<= A -110000000000.0)
t_1
(if (<= A 1.05e-16)
t_0
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
double t_1 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -1.2e+109) {
tmp = t_1;
} else if (A <= -1.2e+42) {
tmp = t_0;
} else if (A <= -110000000000.0) {
tmp = t_1;
} else if (A <= 1.05e-16) {
tmp = t_0;
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
double t_1 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -1.2e+109) {
tmp = t_1;
} else if (A <= -1.2e+42) {
tmp = t_0;
} else if (A <= -110000000000.0) {
tmp = t_1;
} else if (A <= 1.05e-16) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) t_1 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) tmp = 0 if A <= -1.2e+109: tmp = t_1 elif A <= -1.2e+42: tmp = t_0 elif A <= -110000000000.0: tmp = t_1 elif A <= 1.05e-16: tmp = t_0 else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) tmp = 0.0 if (A <= -1.2e+109) tmp = t_1; elseif (A <= -1.2e+42) tmp = t_0; elseif (A <= -110000000000.0) tmp = t_1; elseif (A <= 1.05e-16) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); t_1 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); tmp = 0.0; if (A <= -1.2e+109) tmp = t_1; elseif (A <= -1.2e+42) tmp = t_0; elseif (A <= -110000000000.0) tmp = t_1; elseif (A <= 1.05e-16) tmp = t_0; else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.2e+109], t$95$1, If[LessEqual[A, -1.2e+42], t$95$0, If[LessEqual[A, -110000000000.0], t$95$1, If[LessEqual[A, 1.05e-16], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{if}\;A \leq -1.2 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1.2 \cdot 10^{+42}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -110000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{-16}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.19999999999999994e109 or -1.1999999999999999e42 < A < -1.1e11Initial program 19.4%
Simplified20.9%
Taylor expanded in B around 0 85.2%
associate-*r/85.2%
Simplified85.2%
if -1.19999999999999994e109 < A < -1.1999999999999999e42 or -1.1e11 < A < 1.0500000000000001e-16Initial program 55.2%
Simplified53.7%
Taylor expanded in A around 0 53.8%
unpow253.8%
unpow253.8%
hypot-def80.4%
Simplified80.4%
if 1.0500000000000001e-16 < A Initial program 81.8%
associate-*r/81.8%
associate-*l/81.8%
*-un-lft-identity81.8%
associate--l-81.8%
unpow281.8%
pow281.8%
hypot-def93.7%
Applied egg-rr93.7%
Taylor expanded in B around inf 76.5%
+-commutative76.5%
associate--r+76.5%
div-sub81.6%
Simplified81.6%
Final simplification81.6%
(FPCore (A B C)
:precision binary64
(if (<= C -2.1e+19)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 1.7e+29)
(* 180.0 (/ (atan (/ (- (- (hypot B A)) A) B)) PI))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.1e+19) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 1.7e+29) {
tmp = 180.0 * (atan(((-hypot(B, A) - A) / B)) / ((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 tmp;
if (C <= -2.1e+19) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 1.7e+29) {
tmp = 180.0 * (Math.atan(((-Math.hypot(B, A) - A) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.1e+19: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 1.7e+29: tmp = 180.0 * (math.atan(((-math.hypot(B, A) - A) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.1e+19) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 1.7e+29) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-hypot(B, A)) - A) / B)) / 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) tmp = 0.0; if (C <= -2.1e+19) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 1.7e+29) tmp = 180.0 * (atan(((-hypot(B, A) - A) / B)) / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.1e+19], 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, 1.7e+29], N[(180.0 * N[(N[ArcTan[N[(N[((-N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]) - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / 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}
\mathbf{if}\;C \leq -2.1 \cdot 10^{+19}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.7 \cdot 10^{+29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-\mathsf{hypot}\left(B, A\right)\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if C < -2.1e19Initial program 84.8%
Simplified84.8%
Taylor expanded in A around 0 82.9%
unpow282.9%
unpow282.9%
hypot-def96.5%
Simplified96.5%
if -2.1e19 < C < 1.69999999999999991e29Initial program 58.6%
Simplified56.1%
Taylor expanded in C around 0 57.9%
associate-*r/57.9%
mul-1-neg57.9%
+-commutative57.9%
unpow257.9%
unpow257.9%
hypot-def78.7%
Simplified78.7%
if 1.69999999999999991e29 < C Initial program 26.1%
Simplified57.1%
Taylor expanded in B around 0 71.3%
associate-*r/71.3%
Simplified71.3%
Final simplification81.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI))
(t_1 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
(if (<= A -1.2e+109)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -2.4e+43)
t_0
(if (<= A -4.2e-14)
(/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
(if (<= A -5e-149)
t_1
(if (<= A 2.4e-176)
t_0
(if (<= A 2e-16) t_1 (* 180.0 (/ (atan (/ (- B A) B)) PI))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
double t_1 = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
double tmp;
if (A <= -1.2e+109) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -2.4e+43) {
tmp = t_0;
} else if (A <= -4.2e-14) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else if (A <= -5e-149) {
tmp = t_1;
} else if (A <= 2.4e-176) {
tmp = t_0;
} else if (A <= 2e-16) {
tmp = t_1;
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
double t_1 = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
double tmp;
if (A <= -1.2e+109) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -2.4e+43) {
tmp = t_0;
} else if (A <= -4.2e-14) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else if (A <= -5e-149) {
tmp = t_1;
} else if (A <= 2.4e-176) {
tmp = t_0;
} else if (A <= 2e-16) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi t_1 = 180.0 * (math.atan(((B + C) / B)) / math.pi) tmp = 0 if A <= -1.2e+109: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -2.4e+43: tmp = t_0 elif A <= -4.2e-14: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi elif A <= -5e-149: tmp = t_1 elif A <= 2.4e-176: tmp = t_0 elif A <= 2e-16: tmp = t_1 else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)) tmp = 0.0 if (A <= -1.2e+109) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -2.4e+43) tmp = t_0; elseif (A <= -4.2e-14) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi); elseif (A <= -5e-149) tmp = t_1; elseif (A <= 2.4e-176) tmp = t_0; elseif (A <= 2e-16) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((C - B) / B))) / pi; t_1 = 180.0 * (atan(((B + C) / B)) / pi); tmp = 0.0; if (A <= -1.2e+109) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -2.4e+43) tmp = t_0; elseif (A <= -4.2e-14) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; elseif (A <= -5e-149) tmp = t_1; elseif (A <= 2.4e-176) tmp = t_0; elseif (A <= 2e-16) tmp = t_1; else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.2e+109], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.4e+43], t$95$0, If[LessEqual[A, -4.2e-14], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -5e-149], t$95$1, If[LessEqual[A, 2.4e-176], t$95$0, If[LessEqual[A, 2e-16], t$95$1, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.2 \cdot 10^{+109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.4 \cdot 10^{+43}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -4.2 \cdot 10^{-14}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5 \cdot 10^{-149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 2.4 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.19999999999999994e109Initial program 22.7%
Simplified15.9%
Taylor expanded in A around -inf 81.8%
associate-*r/81.8%
Simplified81.8%
if -1.19999999999999994e109 < A < -2.40000000000000023e43 or -4.99999999999999968e-149 < A < 2.40000000000000006e-176Initial program 51.9%
associate-*r/51.9%
associate-*l/51.9%
*-un-lft-identity51.9%
associate--l-49.2%
unpow249.2%
pow249.2%
hypot-def82.9%
Applied egg-rr82.9%
Taylor expanded in B around inf 54.4%
if -2.40000000000000023e43 < A < -4.1999999999999998e-14Initial program 15.1%
Simplified14.0%
Taylor expanded in A around -inf 58.2%
associate-*r/58.2%
Simplified58.2%
add-cbrt-cube23.1%
associate-/l*23.1%
associate-/l*23.3%
associate-/l*22.9%
Applied egg-rr22.9%
associate-*l*22.9%
cube-unmult22.9%
associate-/r/23.1%
Simplified23.1%
rem-cbrt-cube58.3%
associate-*r/58.5%
*-commutative58.5%
Applied egg-rr58.5%
if -4.1999999999999998e-14 < A < -4.99999999999999968e-149 or 2.40000000000000006e-176 < A < 2e-16Initial program 62.1%
Simplified62.2%
Taylor expanded in B around -inf 63.3%
Taylor expanded in A around 0 62.0%
if 2e-16 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in B around -inf 78.6%
Taylor expanded in C around 0 75.7%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.42e-297)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 4.2e-178)
(* 180.0 (/ (atan (/ -0.5 (/ C B))) PI))
(if (<= A 1.5e-122)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= A 3.9e-60)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.42e-297) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 4.2e-178) {
tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
} else if (A <= 1.5e-122) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (A <= 3.9e-60) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.42e-297) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 4.2e-178) {
tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
} else if (A <= 1.5e-122) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (A <= 3.9e-60) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.42e-297: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 4.2e-178: tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi) elif A <= 1.5e-122: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif A <= 3.9e-60: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.42e-297) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 4.2e-178) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi)); elseif (A <= 1.5e-122) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (A <= 3.9e-60) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.42e-297) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 4.2e-178) tmp = 180.0 * (atan((-0.5 / (C / B))) / pi); elseif (A <= 1.5e-122) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (A <= 3.9e-60) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.42e-297], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.2e-178], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.5e-122], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.9e-60], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.42 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{-178}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.9 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.42e-297Initial program 39.4%
Simplified35.7%
Taylor expanded in A around -inf 52.1%
associate-*r/52.1%
Simplified52.1%
expm1-log1p-u46.3%
expm1-udef23.5%
associate-/l*23.5%
Applied egg-rr23.5%
expm1-def46.0%
expm1-log1p51.7%
associate-/r/52.1%
Simplified52.1%
if -1.42e-297 < A < 4.2e-178Initial program 46.7%
Simplified46.7%
Taylor expanded in A around 0 46.3%
unpow246.3%
unpow246.3%
hypot-def80.7%
Simplified80.7%
Taylor expanded in B around 0 38.5%
associate-*r/38.5%
associate-/l*38.6%
Simplified38.6%
if 4.2e-178 < A < 1.50000000000000002e-122Initial program 82.9%
Simplified82.9%
Taylor expanded in C around -inf 51.7%
if 1.50000000000000002e-122 < A < 3.9000000000000002e-60Initial program 62.3%
Simplified62.3%
Taylor expanded in B around -inf 58.2%
if 3.9000000000000002e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 71.7%
associate-*r/71.7%
*-commutative71.7%
Simplified71.7%
Final simplification57.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -1.08e-280)
t_0
(if (<= B 2.1e-269)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= B 5.2e-80) t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -1.08e-280) {
tmp = t_0;
} else if (B <= 2.1e-269) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (B <= 5.2e-80) {
tmp = t_0;
} else {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -1.08e-280) {
tmp = t_0;
} else if (B <= 2.1e-269) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (B <= 5.2e-80) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -1.08e-280: tmp = t_0 elif B <= 2.1e-269: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif B <= 5.2e-80: tmp = t_0 else: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -1.08e-280) tmp = t_0; elseif (B <= 2.1e-269) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (B <= 5.2e-80) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -1.08e-280) tmp = t_0; elseif (B <= 2.1e-269) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (B <= 5.2e-80) tmp = t_0; else tmp = (180.0 * atan(((C - B) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.08e-280], t$95$0, If[LessEqual[B, 2.1e-269], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5.2e-80], t$95$0, N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.08 \cdot 10^{-280}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-269}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-80}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.07999999999999996e-280 or 2.10000000000000005e-269 < B < 5.2000000000000002e-80Initial program 58.7%
Simplified57.7%
Taylor expanded in B around -inf 65.4%
associate--l+65.4%
div-sub69.4%
Simplified69.4%
if -1.07999999999999996e-280 < B < 2.10000000000000005e-269Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
associate--l-40.1%
unpow240.1%
pow240.1%
hypot-def44.9%
Applied egg-rr44.9%
Taylor expanded in A around -inf 59.0%
if 5.2000000000000002e-80 < B Initial program 54.9%
associate-*r/54.9%
associate-*l/54.9%
*-un-lft-identity54.9%
associate--l-55.0%
unpow255.0%
pow255.0%
hypot-def74.7%
Applied egg-rr74.7%
Taylor expanded in B around inf 62.2%
Final simplification66.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- (/ A B))) PI))))
(if (<= B -4.3e-13)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.4e-134)
t_0
(if (<= B 2.1e-260)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 5.7e-80) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-(A / B)) / ((double) M_PI));
double tmp;
if (B <= -4.3e-13) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.4e-134) {
tmp = t_0;
} else if (B <= 2.1e-260) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 5.7e-80) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-(A / B)) / Math.PI);
double tmp;
if (B <= -4.3e-13) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.4e-134) {
tmp = t_0;
} else if (B <= 2.1e-260) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 5.7e-80) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-(A / B)) / math.pi) tmp = 0 if B <= -4.3e-13: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.4e-134: tmp = t_0 elif B <= 2.1e-260: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 5.7e-80: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-Float64(A / B))) / pi)) tmp = 0.0 if (B <= -4.3e-13) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.4e-134) tmp = t_0; elseif (B <= 2.1e-260) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 5.7e-80) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-(A / B)) / pi); tmp = 0.0; if (B <= -4.3e-13) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.4e-134) tmp = t_0; elseif (B <= 2.1e-260) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 5.7e-80) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.3e-13], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.4e-134], t$95$0, If[LessEqual[B, 2.1e-260], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.7e-80], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -4.3 \cdot 10^{-13}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.4 \cdot 10^{-134}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-260}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.7 \cdot 10^{-80}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.2999999999999999e-13Initial program 51.0%
Simplified51.0%
Taylor expanded in B around -inf 61.7%
if -4.2999999999999999e-13 < B < -4.3999999999999999e-134 or 2.10000000000000005e-260 < B < 5.6999999999999999e-80Initial program 68.0%
Simplified67.1%
Taylor expanded in B around -inf 66.4%
Taylor expanded in A around inf 52.6%
associate-*r/52.6%
mul-1-neg52.6%
Simplified52.6%
if -4.3999999999999999e-134 < B < 2.10000000000000005e-260Initial program 57.0%
Simplified49.3%
Taylor expanded in C around inf 38.7%
mul-1-neg38.7%
distribute-rgt1-in38.7%
metadata-eval38.7%
mul0-lft38.7%
distribute-frac-neg38.7%
metadata-eval38.7%
Simplified38.7%
if 5.6999999999999999e-80 < B Initial program 54.9%
Simplified55.0%
Taylor expanded in B around inf 50.7%
Final simplification51.4%
(FPCore (A B C)
:precision binary64
(if (<= A -2.6e-297)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 1.35e-177)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 1.02e-122)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= A 1.65e-59)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (- (/ A B))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e-297) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 1.35e-177) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 1.02e-122) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (A <= 1.65e-59) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-(A / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e-297) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 1.35e-177) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 1.02e-122) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (A <= 1.65e-59) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-(A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.6e-297: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 1.35e-177: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 1.02e-122: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif A <= 1.65e-59: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-(A / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.6e-297) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 1.35e-177) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 1.02e-122) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (A <= 1.65e-59) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.6e-297) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 1.35e-177) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 1.02e-122) tmp = 180.0 * (atan((C / B)) / pi); elseif (A <= 1.65e-59) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-(A / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.6e-297], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.35e-177], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.02e-122], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.65e-59], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.6 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.35 \cdot 10^{-177}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.02 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.65 \cdot 10^{-59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.6000000000000001e-297Initial program 39.4%
Simplified35.7%
Taylor expanded in A around -inf 52.1%
if -2.6000000000000001e-297 < A < 1.3500000000000001e-177Initial program 46.7%
Simplified46.7%
Taylor expanded in A around 0 46.3%
unpow246.3%
unpow246.3%
hypot-def80.7%
Simplified80.7%
Taylor expanded in B around 0 38.5%
if 1.3500000000000001e-177 < A < 1.02000000000000002e-122Initial program 82.9%
Simplified82.9%
Taylor expanded in B around -inf 75.5%
Taylor expanded in C around inf 51.7%
if 1.02000000000000002e-122 < A < 1.64999999999999991e-59Initial program 62.3%
Simplified62.3%
Taylor expanded in B around -inf 58.2%
if 1.64999999999999991e-59 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in B around -inf 76.3%
Taylor expanded in A around inf 71.1%
associate-*r/71.1%
mul-1-neg71.1%
Simplified71.1%
Final simplification56.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.3e-299)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 2.4e-177)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 2e-122)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= A 4.2e-61)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (- (/ A B))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.3e-299) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 2.4e-177) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 2e-122) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (A <= 4.2e-61) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-(A / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.3e-299) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 2.4e-177) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 2e-122) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (A <= 4.2e-61) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-(A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.3e-299: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 2.4e-177: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 2e-122: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif A <= 4.2e-61: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-(A / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.3e-299) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 2.4e-177) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 2e-122) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (A <= 4.2e-61) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.3e-299) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 2.4e-177) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 2e-122) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (A <= 4.2e-61) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-(A / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.3e-299], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.4e-177], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e-122], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.2e-61], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.3 \cdot 10^{-299}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.4 \cdot 10^{-177}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.3000000000000002e-299Initial program 39.4%
Simplified35.7%
Taylor expanded in A around -inf 52.1%
if -3.3000000000000002e-299 < A < 2.3999999999999999e-177Initial program 46.7%
Simplified46.7%
Taylor expanded in A around 0 46.3%
unpow246.3%
unpow246.3%
hypot-def80.7%
Simplified80.7%
Taylor expanded in B around 0 38.5%
if 2.3999999999999999e-177 < A < 2.00000000000000012e-122Initial program 82.9%
Simplified82.9%
Taylor expanded in C around -inf 51.7%
if 2.00000000000000012e-122 < A < 4.1999999999999998e-61Initial program 62.3%
Simplified62.3%
Taylor expanded in B around -inf 58.2%
if 4.1999999999999998e-61 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in B around -inf 76.3%
Taylor expanded in A around inf 71.1%
associate-*r/71.1%
mul-1-neg71.1%
Simplified71.1%
Final simplification56.9%
(FPCore (A B C)
:precision binary64
(if (<= A -4.6e-297)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 6e-178)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 1.32e-122)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= A 9.8e-59)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (- (/ A B))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e-297) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 6e-178) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 1.32e-122) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (A <= 9.8e-59) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-(A / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e-297) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 6e-178) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 1.32e-122) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (A <= 9.8e-59) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-(A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.6e-297: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 6e-178: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 1.32e-122: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif A <= 9.8e-59: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-(A / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.6e-297) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 6e-178) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 1.32e-122) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (A <= 9.8e-59) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.6e-297) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 6e-178) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 1.32e-122) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (A <= 9.8e-59) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-(A / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.6e-297], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6e-178], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.32e-122], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9.8e-59], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.6 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6 \cdot 10^{-178}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.32 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9.8 \cdot 10^{-59}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.5999999999999998e-297Initial program 39.4%
Simplified35.7%
Taylor expanded in A around -inf 52.1%
associate-*r/52.1%
Simplified52.1%
expm1-log1p-u46.3%
expm1-udef23.5%
associate-/l*23.5%
Applied egg-rr23.5%
expm1-def46.0%
expm1-log1p51.7%
associate-/r/52.1%
Simplified52.1%
if -4.5999999999999998e-297 < A < 5.9999999999999997e-178Initial program 46.7%
Simplified46.7%
Taylor expanded in A around 0 46.3%
unpow246.3%
unpow246.3%
hypot-def80.7%
Simplified80.7%
Taylor expanded in B around 0 38.5%
if 5.9999999999999997e-178 < A < 1.3200000000000001e-122Initial program 82.9%
Simplified82.9%
Taylor expanded in C around -inf 51.7%
if 1.3200000000000001e-122 < A < 9.79999999999999954e-59Initial program 62.3%
Simplified62.3%
Taylor expanded in B around -inf 58.2%
if 9.79999999999999954e-59 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in B around -inf 76.3%
Taylor expanded in A around inf 71.1%
associate-*r/71.1%
mul-1-neg71.1%
Simplified71.1%
Final simplification56.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.1e-297)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 5.2e-179)
(* 180.0 (/ (atan (/ -0.5 (/ C B))) PI))
(if (<= A 1.2e-122)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= A 3.8e-60)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (- (/ A B))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e-297) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 5.2e-179) {
tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
} else if (A <= 1.2e-122) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (A <= 3.8e-60) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-(A / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e-297) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 5.2e-179) {
tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
} else if (A <= 1.2e-122) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (A <= 3.8e-60) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-(A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.1e-297: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 5.2e-179: tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi) elif A <= 1.2e-122: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif A <= 3.8e-60: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-(A / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.1e-297) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 5.2e-179) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi)); elseif (A <= 1.2e-122) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (A <= 3.8e-60) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.1e-297) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 5.2e-179) tmp = 180.0 * (atan((-0.5 / (C / B))) / pi); elseif (A <= 1.2e-122) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (A <= 3.8e-60) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-(A / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.1e-297], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.2e-179], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.2e-122], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-60], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.1 \cdot 10^{-297}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.2 \cdot 10^{-179}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-60}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.0999999999999997e-297Initial program 39.4%
Simplified35.7%
Taylor expanded in A around -inf 52.1%
associate-*r/52.1%
Simplified52.1%
expm1-log1p-u46.3%
expm1-udef23.5%
associate-/l*23.5%
Applied egg-rr23.5%
expm1-def46.0%
expm1-log1p51.7%
associate-/r/52.1%
Simplified52.1%
if -3.0999999999999997e-297 < A < 5.20000000000000011e-179Initial program 46.7%
Simplified46.7%
Taylor expanded in A around 0 46.3%
unpow246.3%
unpow246.3%
hypot-def80.7%
Simplified80.7%
Taylor expanded in B around 0 38.5%
associate-*r/38.5%
associate-/l*38.6%
Simplified38.6%
if 5.20000000000000011e-179 < A < 1.19999999999999994e-122Initial program 82.9%
Simplified82.9%
Taylor expanded in C around -inf 51.7%
if 1.19999999999999994e-122 < A < 3.79999999999999994e-60Initial program 62.3%
Simplified62.3%
Taylor expanded in B around -inf 58.2%
if 3.79999999999999994e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in B around -inf 76.3%
Taylor expanded in A around inf 71.1%
associate-*r/71.1%
mul-1-neg71.1%
Simplified71.1%
Final simplification56.9%
(FPCore (A B C)
:precision binary64
(if (<= C -5.6e+15)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 2.3e-270)
(* 180.0 (/ (atan (- (/ A B))) PI))
(if (<= C 1.42e-67)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.6e+15) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 2.3e-270) {
tmp = 180.0 * (atan(-(A / B)) / ((double) M_PI));
} else if (C <= 1.42e-67) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -5.6e+15) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 2.3e-270) {
tmp = 180.0 * (Math.atan(-(A / B)) / Math.PI);
} else if (C <= 1.42e-67) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5.6e+15: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 2.3e-270: tmp = 180.0 * (math.atan(-(A / B)) / math.pi) elif C <= 1.42e-67: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5.6e+15) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 2.3e-270) tmp = Float64(180.0 * Float64(atan(Float64(-Float64(A / B))) / pi)); elseif (C <= 1.42e-67) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5.6e+15) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 2.3e-270) tmp = 180.0 * (atan(-(A / B)) / pi); elseif (C <= 1.42e-67) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5.6e+15], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.3e-270], N[(180.0 * N[(N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.42e-67], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.6 \cdot 10^{+15}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.3 \cdot 10^{-270}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.42 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.6e15Initial program 84.8%
Simplified84.8%
Taylor expanded in B around -inf 83.8%
Taylor expanded in A around 0 82.2%
associate-*r/82.2%
+-commutative82.2%
Applied egg-rr82.2%
Taylor expanded in C around inf 75.5%
if -5.6e15 < C < 2.3000000000000001e-270Initial program 63.7%
Simplified60.6%
Taylor expanded in B around -inf 54.6%
Taylor expanded in A around inf 39.6%
associate-*r/39.6%
mul-1-neg39.6%
Simplified39.6%
if 2.3000000000000001e-270 < C < 1.42000000000000004e-67Initial program 54.2%
Simplified51.8%
Taylor expanded in B around inf 37.9%
if 1.42000000000000004e-67 < C Initial program 30.7%
Simplified29.3%
Taylor expanded in A around 0 23.6%
unpow223.6%
unpow223.6%
hypot-def46.7%
Simplified46.7%
Taylor expanded in B around 0 59.9%
Final simplification53.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -2.45e-281)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 3.6e-269)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(* 180.0 (/ (atan (+ t_0 -1.0)) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -2.45e-281) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 3.6e-269) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((t_0 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -2.45e-281) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 3.6e-269) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((t_0 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -2.45e-281: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 3.6e-269: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = 180.0 * (math.atan((t_0 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -2.45e-281) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 3.6e-269) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(t_0 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -2.45e-281) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 3.6e-269) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = 180.0 * (atan((t_0 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -2.45e-281], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-269], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -2.45 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-269}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.45e-281Initial program 55.9%
Simplified55.1%
Taylor expanded in B around -inf 66.0%
associate--l+66.0%
div-sub70.2%
Simplified70.2%
if -2.45e-281 < B < 3.59999999999999998e-269Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
associate--l-40.1%
unpow240.1%
pow240.1%
hypot-def44.9%
Applied egg-rr44.9%
Taylor expanded in A around -inf 59.0%
if 3.59999999999999998e-269 < B Initial program 58.8%
Simplified58.4%
Taylor expanded in B around inf 69.4%
+-commutative69.4%
associate--r+69.4%
div-sub70.3%
Simplified70.3%
Final simplification69.3%
(FPCore (A B C) :precision binary64 (if (<= A -3.55e-121) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C B) A))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.55e-121) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (atan(((1.0 / B) * ((C - B) - A))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.55e-121) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - B) - A))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.55e-121: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = 180.0 * (math.atan(((1.0 / B) * ((C - B) - A))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.55e-121) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - B) - A))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.55e-121) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = 180.0 * (atan(((1.0 / B) * ((C - B) - A))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.55e-121], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.55 \cdot 10^{-121}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - B\right) - A\right)\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.5499999999999999e-121Initial program 31.2%
Simplified43.6%
Taylor expanded in B around 0 65.8%
associate-*r/65.8%
Simplified65.8%
if -3.5499999999999999e-121 < A Initial program 71.2%
Simplified71.2%
Taylor expanded in B around inf 67.0%
neg-mul-167.0%
unsub-neg67.0%
Simplified67.0%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.6e-7)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 4e-12)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e-7) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 4e-12) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e-7) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 4e-12) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.6e-7: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 4e-12: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.6e-7) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 4e-12) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.6e-7) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 4e-12) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.6e-7], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4e-12], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.6 \cdot 10^{-7}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.6e-7Initial program 28.0%
Simplified21.2%
Taylor expanded in A around -inf 63.0%
associate-*r/63.0%
Simplified63.0%
expm1-log1p-u60.2%
expm1-udef26.0%
associate-/l*26.0%
Applied egg-rr26.0%
expm1-def59.6%
expm1-log1p62.4%
associate-/r/63.0%
Simplified63.0%
if -1.6e-7 < A < 3.99999999999999992e-12Initial program 58.0%
Simplified58.0%
Taylor expanded in B around -inf 55.0%
Taylor expanded in A around 0 54.4%
if 3.99999999999999992e-12 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 74.7%
associate-*r/74.7%
*-commutative74.7%
Simplified74.7%
Final simplification62.7%
(FPCore (A B C)
:precision binary64
(if (<= A -3.5e-14)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A 6.8e-13)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (/ (- B A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e-14) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= 6.8e-13) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e-14) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= 6.8e-13) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.5e-14: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= 6.8e-13: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.5e-14) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= 6.8e-13) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.5e-14) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= 6.8e-13) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.5e-14], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.8e-13], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.5 \cdot 10^{-14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.8 \cdot 10^{-13}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.5000000000000002e-14Initial program 28.0%
Simplified21.2%
Taylor expanded in A around -inf 63.0%
associate-*r/63.0%
Simplified63.0%
expm1-log1p-u60.2%
expm1-udef26.0%
associate-/l*26.0%
Applied egg-rr26.0%
expm1-def59.6%
expm1-log1p62.4%
associate-/r/63.0%
Simplified63.0%
if -3.5000000000000002e-14 < A < 6.80000000000000031e-13Initial program 58.0%
Simplified58.0%
Taylor expanded in B around -inf 55.0%
Taylor expanded in A around 0 54.4%
if 6.80000000000000031e-13 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in B around -inf 78.6%
Taylor expanded in C around 0 75.7%
Final simplification63.0%
(FPCore (A B C)
:precision binary64
(if (<= A -0.00118)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 2.2e-16)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (/ (- B A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -0.00118) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 2.2e-16) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -0.00118) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 2.2e-16) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -0.00118: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 2.2e-16: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -0.00118) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 2.2e-16) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -0.00118) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 2.2e-16) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -0.00118], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.2e-16], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -0.00118:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.2 \cdot 10^{-16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -0.0011800000000000001Initial program 28.0%
associate-*r/28.0%
associate-*l/28.0%
*-un-lft-identity28.0%
associate--l-21.2%
unpow221.2%
pow221.2%
hypot-def37.0%
Applied egg-rr37.0%
Taylor expanded in A around -inf 63.1%
if -0.0011800000000000001 < A < 2.2e-16Initial program 58.0%
Simplified58.0%
Taylor expanded in B around -inf 55.0%
Taylor expanded in A around 0 54.4%
if 2.2e-16 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in B around -inf 78.6%
Taylor expanded in C around 0 75.7%
Final simplification63.1%
(FPCore (A B C)
:precision binary64
(if (<= A -2e-20)
(/ (* 180.0 (atan (* B (/ 0.5 A)))) PI)
(if (<= A 3.2e-16)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* 180.0 (/ (atan (/ (- B A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2e-20) {
tmp = (180.0 * atan((B * (0.5 / A)))) / ((double) M_PI);
} else if (A <= 3.2e-16) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2e-20) {
tmp = (180.0 * Math.atan((B * (0.5 / A)))) / Math.PI;
} else if (A <= 3.2e-16) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2e-20: tmp = (180.0 * math.atan((B * (0.5 / A)))) / math.pi elif A <= 3.2e-16: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2e-20) tmp = Float64(Float64(180.0 * atan(Float64(B * Float64(0.5 / A)))) / pi); elseif (A <= 3.2e-16) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2e-20) tmp = (180.0 * atan((B * (0.5 / A)))) / pi; elseif (A <= 3.2e-16) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2e-20], N[(N[(180.0 * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 3.2e-16], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2 \cdot 10^{-20}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-16}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.99999999999999989e-20Initial program 28.0%
Simplified21.2%
Taylor expanded in A around -inf 63.0%
associate-*r/63.0%
Simplified63.0%
add-cbrt-cube40.3%
associate-/l*40.3%
associate-/l*40.3%
associate-/l*40.2%
Applied egg-rr40.2%
associate-*l*40.2%
cube-unmult40.2%
associate-/r/40.3%
Simplified40.3%
rem-cbrt-cube63.0%
associate-*r/63.1%
*-commutative63.1%
Applied egg-rr63.1%
if -1.99999999999999989e-20 < A < 3.20000000000000023e-16Initial program 58.0%
Simplified58.0%
Taylor expanded in B around -inf 55.0%
Taylor expanded in A around 0 54.4%
if 3.20000000000000023e-16 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in B around -inf 78.6%
Taylor expanded in C around 0 75.7%
Final simplification63.1%
(FPCore (A B C) :precision binary64 (if (<= A -2.1e-120) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) (* 180.0 (/ (atan (+ (/ (- C A) B) -1.0)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e-120) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e-120) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.1e-120: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = 180.0 * (math.atan((((C - A) / B) + -1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.1e-120) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.1e-120) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = 180.0 * (atan((((C - A) / B) + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.1e-120], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.1 \cdot 10^{-120}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.1e-120Initial program 31.2%
Simplified43.6%
Taylor expanded in B around 0 65.8%
associate-*r/65.8%
Simplified65.8%
if -2.1e-120 < A Initial program 71.2%
Simplified71.2%
Taylor expanded in B around inf 64.5%
+-commutative64.5%
associate--r+64.5%
div-sub67.0%
Simplified67.0%
Final simplification66.6%
(FPCore (A B C) :precision binary64 (if (<= A -4.5e-121) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) (/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e-121) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e-121) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.5e-121: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.5e-121) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.5e-121) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.5e-121], 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 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.5 \cdot 10^{-121}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.5000000000000003e-121Initial program 31.2%
Simplified43.6%
Taylor expanded in B around 0 65.8%
associate-*r/65.8%
Simplified65.8%
if -4.5000000000000003e-121 < A Initial program 71.2%
associate-*r/71.2%
associate-*l/71.2%
*-un-lft-identity71.2%
associate--l-71.2%
unpow271.2%
pow271.2%
hypot-def90.8%
Applied egg-rr90.8%
Taylor expanded in B around inf 64.5%
+-commutative64.5%
associate--r+64.5%
div-sub67.0%
Simplified67.0%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.75e-114)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.55e-108)
(* 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.75e-114) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.55e-108) {
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.75e-114) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.55e-108) {
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.75e-114: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.55e-108: 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.75e-114) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.55e-108) 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.75e-114) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.55e-108) 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.75e-114], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.55e-108], 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.75 \cdot 10^{-114}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.55 \cdot 10^{-108}:\\
\;\;\;\;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.75e-114Initial program 54.7%
Simplified54.7%
Taylor expanded in B around -inf 51.4%
if -1.75e-114 < B < 1.55000000000000007e-108Initial program 60.8%
Simplified55.5%
Taylor expanded in C around inf 33.4%
mul-1-neg33.4%
distribute-rgt1-in33.4%
metadata-eval33.4%
mul0-lft33.4%
distribute-frac-neg33.4%
metadata-eval33.4%
Simplified33.4%
if 1.55000000000000007e-108 < B Initial program 55.9%
Simplified55.9%
Taylor expanded in B around inf 49.0%
Final simplification44.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.15e-41)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.4e-111)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.15e-41) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.4e-111) {
tmp = 180.0 * (atan((C / 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.15e-41) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.4e-111) {
tmp = 180.0 * (Math.atan((C / 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.15e-41: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.4e-111: tmp = 180.0 * (math.atan((C / 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.15e-41) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.4e-111) tmp = Float64(180.0 * Float64(atan(Float64(C / 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.15e-41) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.4e-111) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.15e-41], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.4e-111], N[(180.0 * N[(N[ArcTan[N[(C / 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.15 \cdot 10^{-41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.4 \cdot 10^{-111}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.15000000000000005e-41Initial program 51.7%
Simplified51.7%
Taylor expanded in B around -inf 58.2%
if -1.15000000000000005e-41 < B < 3.39999999999999997e-111Initial program 62.7%
Simplified58.0%
Taylor expanded in B around -inf 55.4%
Taylor expanded in C around inf 34.1%
if 3.39999999999999997e-111 < B Initial program 55.3%
Simplified55.4%
Taylor expanded in B around inf 48.5%
Final simplification45.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.9e-41)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7.5e-118)
(/ (* 180.0 (atan (/ C B))) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.9e-41) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7.5e-118) {
tmp = (180.0 * atan((C / 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.9e-41) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7.5e-118) {
tmp = (180.0 * Math.atan((C / 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.9e-41: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7.5e-118: tmp = (180.0 * math.atan((C / 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.9e-41) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7.5e-118) tmp = Float64(Float64(180.0 * atan(Float64(C / 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.9e-41) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7.5e-118) tmp = (180.0 * atan((C / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.9e-41], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.5e-118], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.9 \cdot 10^{-41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{-118}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.8999999999999999e-41Initial program 51.7%
Simplified51.7%
Taylor expanded in B around -inf 58.2%
if -1.8999999999999999e-41 < B < 7.49999999999999978e-118Initial program 62.7%
Simplified58.0%
Taylor expanded in B around -inf 55.4%
Taylor expanded in A around 0 35.2%
associate-*r/35.2%
+-commutative35.2%
Applied egg-rr35.2%
Taylor expanded in C around inf 34.1%
if 7.49999999999999978e-118 < B Initial program 55.3%
Simplified55.4%
Taylor expanded in B around inf 48.5%
Final simplification45.7%
(FPCore (A B C) :precision binary64 (if (<= B -2e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.999999999999994e-310Initial program 56.1%
Simplified54.5%
Taylor expanded in B around -inf 37.6%
if -1.999999999999994e-310 < B Initial program 58.2%
Simplified56.2%
Taylor expanded in B around inf 36.8%
Final simplification37.2%
(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 57.1%
Simplified55.4%
Taylor expanded in B around inf 19.5%
Final simplification19.5%
herbie shell --seed 2023279
(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)))