
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -4e-84) (not (<= t_0 0.0)))
(* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -4e-84) || !(t_0 <= 0.0)) {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -4e-84) || !(t_0 <= 0.0)) {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -4e-84) or not (t_0 <= 0.0): tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -4e-84) || !(t_0 <= 0.0)) tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -4e-84) || ~((t_0 <= 0.0))) tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -4e-84], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -4 \cdot 10^{-84} \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -4.0000000000000001e-84 or 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 60.9%
associate-*r/60.9%
associate-*l/60.9%
*-commutative60.9%
Simplified88.6%
if -4.0000000000000001e-84 < (*.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.4%
associate-*r/23.4%
associate-*l/23.4%
*-commutative23.4%
Simplified23.4%
Taylor expanded in B around 0 99.7%
associate-*r/99.7%
Simplified99.7%
Final simplification90.2%
(FPCore (A B C)
:precision binary64
(if (<= A -4.6e+38)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 3.8e-123)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (/ (- (- A) (hypot A B)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e+38) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 3.8e-123) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((-A - hypot(A, B)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.6e+38) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 3.8e-123) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((-A - Math.hypot(A, B)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.6e+38: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 3.8e-123: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((-A - math.hypot(A, B)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.6e+38) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 3.8e-123) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.6e+38) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 3.8e-123) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan(((-A - hypot(A, B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.6e+38], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-123], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.6 \cdot 10^{+38}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-123}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)\\
\end{array}
\end{array}
if A < -4.6000000000000002e38Initial program 22.9%
associate-*r/22.9%
associate-*l/22.9%
*-commutative22.9%
Simplified66.4%
Taylor expanded in B around 0 81.7%
associate-*r/81.7%
Simplified81.7%
if -4.6000000000000002e38 < A < 3.79999999999999996e-123Initial program 56.2%
associate-*r/56.2%
associate-*l/56.2%
associate-*l/56.2%
*-lft-identity56.2%
sub-neg56.2%
associate-+l-55.1%
sub-neg55.1%
remove-double-neg55.1%
+-commutative55.1%
unpow255.1%
unpow255.1%
hypot-def74.1%
Simplified74.1%
Taylor expanded in A around 0 55.2%
unpow255.2%
unpow255.2%
hypot-def75.2%
Simplified75.2%
if 3.79999999999999996e-123 < A Initial program 73.4%
associate-*r/73.4%
associate-*l/73.4%
*-commutative73.4%
Simplified91.2%
Taylor expanded in C around 0 71.6%
mul-1-neg71.6%
+-commutative71.6%
unpow271.6%
unpow271.6%
hypot-def85.4%
Simplified85.4%
Final simplification80.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.3e+38)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 2.05e+55)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e+38) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 2.05e+55) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e+38) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 2.05e+55) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.3e+38: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 2.05e+55: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.3e+38) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 2.05e+55) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.3e+38) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 2.05e+55) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.3e+38], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.05e+55], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.3 \cdot 10^{+38}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 2.05 \cdot 10^{+55}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if A < -2.3000000000000001e38Initial program 22.9%
associate-*r/22.9%
associate-*l/22.9%
*-commutative22.9%
Simplified66.4%
Taylor expanded in B around 0 81.7%
associate-*r/81.7%
Simplified81.7%
if -2.3000000000000001e38 < A < 2.04999999999999991e55Initial program 57.2%
associate-*r/57.2%
associate-*l/57.2%
associate-*l/57.2%
*-lft-identity57.2%
sub-neg57.2%
associate-+l-56.5%
sub-neg56.5%
remove-double-neg56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-def77.8%
Simplified77.8%
Taylor expanded in A around 0 52.1%
unpow252.1%
unpow252.1%
hypot-def74.1%
Simplified74.1%
if 2.04999999999999991e55 < A Initial program 86.2%
associate-*r/86.1%
associate-*l/86.2%
associate-*l/86.2%
*-lft-identity86.2%
sub-neg86.2%
associate-+l-86.2%
sub-neg86.2%
remove-double-neg86.2%
+-commutative86.2%
unpow286.2%
unpow286.2%
hypot-def96.2%
Simplified96.2%
Taylor expanded in B around inf 87.8%
Final simplification78.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan 1.0))) (t_1 (atan (* -0.5 (/ B C)))))
(if (<= A -1.8e-101)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -4e-301)
t_0
(if (<= A 1.2e-213)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= A 2.5e-141)
(* 180.0 (/ t_1 PI))
(if (<= A 1.5e-125)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= A 1.2e-95)
t_0
(if (<= A 4500.0)
(* (/ 180.0 PI) t_1)
(* 180.0 (/ (atan (/ A (/ B -2.0))) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(1.0);
double t_1 = atan((-0.5 * (B / C)));
double tmp;
if (A <= -1.8e-101) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -4e-301) {
tmp = t_0;
} else if (A <= 1.2e-213) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (A <= 2.5e-141) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= 1.5e-125) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (A <= 1.2e-95) {
tmp = t_0;
} else if (A <= 4500.0) {
tmp = (180.0 / ((double) M_PI)) * t_1;
} else {
tmp = 180.0 * (atan((A / (B / -2.0))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(1.0);
double t_1 = Math.atan((-0.5 * (B / C)));
double tmp;
if (A <= -1.8e-101) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -4e-301) {
tmp = t_0;
} else if (A <= 1.2e-213) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (A <= 2.5e-141) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= 1.5e-125) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (A <= 1.2e-95) {
tmp = t_0;
} else if (A <= 4500.0) {
tmp = (180.0 / Math.PI) * t_1;
} else {
tmp = 180.0 * (Math.atan((A / (B / -2.0))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(1.0) t_1 = math.atan((-0.5 * (B / C))) tmp = 0 if A <= -1.8e-101: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -4e-301: tmp = t_0 elif A <= 1.2e-213: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif A <= 2.5e-141: tmp = 180.0 * (t_1 / math.pi) elif A <= 1.5e-125: tmp = (180.0 / math.pi) * math.atan((C / B)) elif A <= 1.2e-95: tmp = t_0 elif A <= 4500.0: tmp = (180.0 / math.pi) * t_1 else: tmp = 180.0 * (math.atan((A / (B / -2.0))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(1.0)) t_1 = atan(Float64(-0.5 * Float64(B / C))) tmp = 0.0 if (A <= -1.8e-101) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -4e-301) tmp = t_0; elseif (A <= 1.2e-213) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (A <= 2.5e-141) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= 1.5e-125) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (A <= 1.2e-95) tmp = t_0; elseif (A <= 4500.0) tmp = Float64(Float64(180.0 / pi) * t_1); else tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(B / -2.0))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(1.0); t_1 = atan((-0.5 * (B / C))); tmp = 0.0; if (A <= -1.8e-101) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -4e-301) tmp = t_0; elseif (A <= 1.2e-213) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (A <= 2.5e-141) tmp = 180.0 * (t_1 / pi); elseif (A <= 1.5e-125) tmp = (180.0 / pi) * atan((C / B)); elseif (A <= 1.2e-95) tmp = t_0; elseif (A <= 4500.0) tmp = (180.0 / pi) * t_1; else tmp = 180.0 * (atan((A / (B / -2.0))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -1.8e-101], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4e-301], t$95$0, If[LessEqual[A, 1.2e-213], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.5e-141], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.5e-125], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.2e-95], t$95$0, If[LessEqual[A, 4500.0], N[(N[(180.0 / Pi), $MachinePrecision] * t$95$1), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(A / N[(B / -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} 1\\
t_1 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{if}\;A \leq -1.8 \cdot 10^{-101}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -4 \cdot 10^{-301}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{-213}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;A \leq 2.5 \cdot 10^{-141}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{-95}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 4500:\\
\;\;\;\;\frac{180}{\pi} \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{\frac{B}{-2}}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.8e-101Initial program 33.4%
associate-*r/33.4%
associate-*l/33.4%
*-commutative33.4%
Simplified66.8%
Taylor expanded in A around -inf 67.7%
if -1.8e-101 < A < -4.00000000000000027e-301 or 1.49999999999999995e-125 < A < 1.2e-95Initial program 52.6%
associate-*r/52.6%
associate-*l/52.6%
*-commutative52.6%
Simplified78.3%
Taylor expanded in B around -inf 40.6%
if -4.00000000000000027e-301 < A < 1.19999999999999998e-213Initial program 67.2%
associate-*r/67.2%
associate-*l/67.2%
*-commutative67.2%
Simplified84.4%
Taylor expanded in C around -inf 43.6%
if 1.19999999999999998e-213 < A < 2.5e-141Initial program 45.7%
associate-*r/45.7%
associate-*l/45.7%
*-commutative45.7%
Simplified60.2%
Taylor expanded in B around 0 22.2%
unpow222.2%
Simplified22.2%
Taylor expanded in B around 0 53.9%
associate-*r/53.9%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in C around inf 53.9%
if 2.5e-141 < A < 1.49999999999999995e-125Initial program 100.0%
associate-*r/100.0%
associate-*l/100.0%
associate-*l/100.0%
*-lft-identity100.0%
sub-neg100.0%
associate-+l-100.0%
sub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in C around inf 100.0%
if 1.2e-95 < A < 4500Initial program 52.6%
associate-*r/52.7%
associate-*l/52.7%
*-commutative52.7%
Simplified78.4%
Taylor expanded in B around 0 25.7%
unpow225.7%
Simplified25.7%
Taylor expanded in C around inf 40.5%
if 4500 < A Initial program 81.5%
associate-*r/81.5%
associate-*l/81.5%
*-commutative81.5%
Simplified96.9%
Taylor expanded in A around inf 75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in A around 0 75.4%
*-commutative75.4%
associate-/r/75.4%
Simplified75.4%
Final simplification59.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))
(t_1 (* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))))
(if (<= B -4.3e-45)
(/ (* 180.0 (atan (/ (- B A) B))) PI)
(if (<= B -3.2e-195)
t_0
(if (<= B -1.28e-259)
t_1
(if (<= B -2.6e-279)
(* 180.0 (/ (atan (* B (/ -0.5 (- C A)))) PI))
(if (or (<= B 2.3e-306) (not (<= B 1.55e-173))) t_1 t_0)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double t_1 = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
double tmp;
if (B <= -4.3e-45) {
tmp = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
} else if (B <= -3.2e-195) {
tmp = t_0;
} else if (B <= -1.28e-259) {
tmp = t_1;
} else if (B <= -2.6e-279) {
tmp = 180.0 * (atan((B * (-0.5 / (C - A)))) / ((double) M_PI));
} else if ((B <= 2.3e-306) || !(B <= 1.55e-173)) {
tmp = t_1;
} else {
tmp = t_0;
}
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 t_1 = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
double tmp;
if (B <= -4.3e-45) {
tmp = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
} else if (B <= -3.2e-195) {
tmp = t_0;
} else if (B <= -1.28e-259) {
tmp = t_1;
} else if (B <= -2.6e-279) {
tmp = 180.0 * (Math.atan((B * (-0.5 / (C - A)))) / Math.PI);
} else if ((B <= 2.3e-306) || !(B <= 1.55e-173)) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) t_1 = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) tmp = 0 if B <= -4.3e-45: tmp = (180.0 * math.atan(((B - A) / B))) / math.pi elif B <= -3.2e-195: tmp = t_0 elif B <= -1.28e-259: tmp = t_1 elif B <= -2.6e-279: tmp = 180.0 * (math.atan((B * (-0.5 / (C - A)))) / math.pi) elif (B <= 2.3e-306) or not (B <= 1.55e-173): tmp = t_1 else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))) tmp = 0.0 if (B <= -4.3e-45) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi); elseif (B <= -3.2e-195) tmp = t_0; elseif (B <= -1.28e-259) tmp = t_1; elseif (B <= -2.6e-279) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / Float64(C - A)))) / pi)); elseif ((B <= 2.3e-306) || !(B <= 1.55e-173)) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); t_1 = (180.0 / pi) * atan(((C - (B + A)) / B)); tmp = 0.0; if (B <= -4.3e-45) tmp = (180.0 * atan(((B - A) / B))) / pi; elseif (B <= -3.2e-195) tmp = t_0; elseif (B <= -1.28e-259) tmp = t_1; elseif (B <= -2.6e-279) tmp = 180.0 * (atan((B * (-0.5 / (C - A)))) / pi); elseif ((B <= 2.3e-306) || ~((B <= 1.55e-173))) tmp = t_1; else tmp = t_0; 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]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.3e-45], N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -3.2e-195], t$95$0, If[LessEqual[B, -1.28e-259], t$95$1, If[LessEqual[B, -2.6e-279], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 2.3e-306], N[Not[LessEqual[B, 1.55e-173]], $MachinePrecision]], t$95$1, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{if}\;B \leq -4.3 \cdot 10^{-45}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -3.2 \cdot 10^{-195}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.28 \cdot 10^{-259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -2.6 \cdot 10^{-279}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-306} \lor \neg \left(B \leq 1.55 \cdot 10^{-173}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if B < -4.2999999999999999e-45Initial program 55.5%
associate-*r/55.5%
unpow255.5%
Simplified55.5%
Taylor expanded in C around 0 54.4%
+-commutative54.4%
unpow254.4%
unpow254.4%
hypot-def78.9%
Simplified78.9%
Taylor expanded in C around 0 51.4%
associate-*r/51.4%
mul-1-neg51.4%
+-commutative51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-def74.9%
distribute-neg-in74.9%
unsub-neg74.9%
Simplified74.9%
Taylor expanded in B around -inf 74.4%
neg-mul-174.4%
+-commutative74.4%
unsub-neg74.4%
Simplified74.4%
if -4.2999999999999999e-45 < B < -3.2000000000000001e-195 or 2.29999999999999989e-306 < B < 1.55000000000000003e-173Initial program 48.1%
associate-*r/48.1%
associate-*l/48.1%
*-commutative48.1%
Simplified77.7%
Taylor expanded in B around 0 60.3%
associate-*r/60.3%
Simplified60.3%
if -3.2000000000000001e-195 < B < -1.27999999999999998e-259 or -2.6000000000000002e-279 < B < 2.29999999999999989e-306 or 1.55000000000000003e-173 < B Initial program 61.3%
associate-*r/61.3%
associate-*l/61.3%
associate-*l/61.3%
*-lft-identity61.3%
sub-neg61.3%
associate-+l-61.3%
sub-neg61.3%
remove-double-neg61.3%
+-commutative61.3%
unpow261.3%
unpow261.3%
hypot-def76.8%
Simplified76.8%
Taylor expanded in B around inf 73.5%
if -1.27999999999999998e-259 < B < -2.6000000000000002e-279Initial program 32.4%
associate-*r/32.4%
associate-*l/32.4%
*-commutative32.4%
Simplified60.1%
Taylor expanded in B around 0 46.2%
unpow246.2%
Simplified46.2%
Taylor expanded in B around 0 86.1%
associate-*r/86.1%
associate-/l*86.1%
Simplified86.1%
associate-/r/86.1%
Applied egg-rr86.1%
Final simplification70.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* B (/ -0.5 (- C A)))) PI)))
(t_1 (/ (* 180.0 (atan (/ (- B A) B))) PI)))
(if (<= B -2.75e-45)
t_1
(if (<= B -5.2e-189)
t_0
(if (<= B -3.4e-253)
t_1
(if (<= B -4.5e-281)
t_0
(if (<= B -8.5e-296)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B 3100000000.0)
t_0
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((B * (-0.5 / (C - A)))) / ((double) M_PI));
double t_1 = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
double tmp;
if (B <= -2.75e-45) {
tmp = t_1;
} else if (B <= -5.2e-189) {
tmp = t_0;
} else if (B <= -3.4e-253) {
tmp = t_1;
} else if (B <= -4.5e-281) {
tmp = t_0;
} else if (B <= -8.5e-296) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= 3100000000.0) {
tmp = t_0;
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((B * (-0.5 / (C - A)))) / Math.PI);
double t_1 = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
double tmp;
if (B <= -2.75e-45) {
tmp = t_1;
} else if (B <= -5.2e-189) {
tmp = t_0;
} else if (B <= -3.4e-253) {
tmp = t_1;
} else if (B <= -4.5e-281) {
tmp = t_0;
} else if (B <= -8.5e-296) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= 3100000000.0) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((B * (-0.5 / (C - A)))) / math.pi) t_1 = (180.0 * math.atan(((B - A) / B))) / math.pi tmp = 0 if B <= -2.75e-45: tmp = t_1 elif B <= -5.2e-189: tmp = t_0 elif B <= -3.4e-253: tmp = t_1 elif B <= -4.5e-281: tmp = t_0 elif B <= -8.5e-296: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= 3100000000.0: tmp = t_0 else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / Float64(C - A)))) / pi)) t_1 = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi) tmp = 0.0 if (B <= -2.75e-45) tmp = t_1; elseif (B <= -5.2e-189) tmp = t_0; elseif (B <= -3.4e-253) tmp = t_1; elseif (B <= -4.5e-281) tmp = t_0; elseif (B <= -8.5e-296) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= 3100000000.0) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((B * (-0.5 / (C - A)))) / pi); t_1 = (180.0 * atan(((B - A) / B))) / pi; tmp = 0.0; if (B <= -2.75e-45) tmp = t_1; elseif (B <= -5.2e-189) tmp = t_0; elseif (B <= -3.4e-253) tmp = t_1; elseif (B <= -4.5e-281) tmp = t_0; elseif (B <= -8.5e-296) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= 3100000000.0) tmp = t_0; else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -2.75e-45], t$95$1, If[LessEqual[B, -5.2e-189], t$95$0, If[LessEqual[B, -3.4e-253], t$95$1, If[LessEqual[B, -4.5e-281], t$95$0, If[LessEqual[B, -8.5e-296], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3100000000.0], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.75 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -5.2 \cdot 10^{-189}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.4 \cdot 10^{-253}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -4.5 \cdot 10^{-281}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-296}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 3100000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.75000000000000015e-45 or -5.1999999999999998e-189 < B < -3.39999999999999985e-253Initial program 57.2%
associate-*r/57.2%
unpow257.2%
Simplified57.2%
Taylor expanded in C around 0 56.2%
+-commutative56.2%
unpow256.2%
unpow256.2%
hypot-def82.3%
Simplified82.3%
Taylor expanded in C around 0 51.4%
associate-*r/51.4%
mul-1-neg51.4%
+-commutative51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-def76.5%
distribute-neg-in76.5%
unsub-neg76.5%
Simplified76.5%
Taylor expanded in B around -inf 73.8%
neg-mul-173.8%
+-commutative73.8%
unsub-neg73.8%
Simplified73.8%
if -2.75000000000000015e-45 < B < -5.1999999999999998e-189 or -3.39999999999999985e-253 < B < -4.49999999999999993e-281 or -8.50000000000000018e-296 < B < 3.1e9Initial program 52.9%
associate-*r/52.9%
associate-*l/52.9%
*-commutative52.9%
Simplified71.8%
Taylor expanded in B around 0 44.8%
unpow244.8%
Simplified44.8%
Taylor expanded in B around 0 56.7%
associate-*r/56.7%
associate-/l*56.1%
Simplified56.1%
associate-/r/56.6%
Applied egg-rr56.6%
if -4.49999999999999993e-281 < B < -8.50000000000000018e-296Initial program 100.0%
associate-*r/100.0%
associate-*l/100.0%
associate-*l/100.0%
*-lft-identity100.0%
sub-neg100.0%
associate-+l-100.0%
sub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in C around inf 100.0%
if 3.1e9 < B Initial program 54.6%
associate-*r/54.5%
unpow254.5%
Simplified54.5%
Taylor expanded in C around 0 52.2%
+-commutative52.2%
unpow252.2%
unpow252.2%
hypot-def84.2%
Simplified84.2%
Taylor expanded in C around 0 45.4%
associate-*r/45.4%
mul-1-neg45.4%
+-commutative45.4%
+-commutative45.4%
unpow245.4%
unpow245.4%
hypot-def75.9%
distribute-neg-in75.9%
unsub-neg75.9%
Simplified75.9%
Taylor expanded in A around 0 72.2%
sub-neg72.2%
neg-mul-172.2%
distribute-neg-in72.2%
+-commutative72.2%
distribute-neg-in72.2%
metadata-eval72.2%
unsub-neg72.2%
Simplified72.2%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* B (/ -0.5 (- C A)))) PI)))
(t_1 (/ (* 180.0 (atan (/ (- B A) B))) PI)))
(if (<= B -1.7e-40)
t_1
(if (<= B -3.3e-189)
t_0
(if (<= B -8.2e-253)
t_1
(if (<= B -1.9e-281)
t_0
(if (<= B -8.5e-296)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B 115000000000.0)
(* 180.0 (/ (atan (/ -0.5 (/ (- C A) B))) PI))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((B * (-0.5 / (C - A)))) / ((double) M_PI));
double t_1 = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
double tmp;
if (B <= -1.7e-40) {
tmp = t_1;
} else if (B <= -3.3e-189) {
tmp = t_0;
} else if (B <= -8.2e-253) {
tmp = t_1;
} else if (B <= -1.9e-281) {
tmp = t_0;
} else if (B <= -8.5e-296) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= 115000000000.0) {
tmp = 180.0 * (atan((-0.5 / ((C - A) / B))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((B * (-0.5 / (C - A)))) / Math.PI);
double t_1 = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
double tmp;
if (B <= -1.7e-40) {
tmp = t_1;
} else if (B <= -3.3e-189) {
tmp = t_0;
} else if (B <= -8.2e-253) {
tmp = t_1;
} else if (B <= -1.9e-281) {
tmp = t_0;
} else if (B <= -8.5e-296) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= 115000000000.0) {
tmp = 180.0 * (Math.atan((-0.5 / ((C - A) / B))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((B * (-0.5 / (C - A)))) / math.pi) t_1 = (180.0 * math.atan(((B - A) / B))) / math.pi tmp = 0 if B <= -1.7e-40: tmp = t_1 elif B <= -3.3e-189: tmp = t_0 elif B <= -8.2e-253: tmp = t_1 elif B <= -1.9e-281: tmp = t_0 elif B <= -8.5e-296: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= 115000000000.0: tmp = 180.0 * (math.atan((-0.5 / ((C - A) / B))) / math.pi) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / Float64(C - A)))) / pi)) t_1 = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi) tmp = 0.0 if (B <= -1.7e-40) tmp = t_1; elseif (B <= -3.3e-189) tmp = t_0; elseif (B <= -8.2e-253) tmp = t_1; elseif (B <= -1.9e-281) tmp = t_0; elseif (B <= -8.5e-296) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= 115000000000.0) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((B * (-0.5 / (C - A)))) / pi); t_1 = (180.0 * atan(((B - A) / B))) / pi; tmp = 0.0; if (B <= -1.7e-40) tmp = t_1; elseif (B <= -3.3e-189) tmp = t_0; elseif (B <= -8.2e-253) tmp = t_1; elseif (B <= -1.9e-281) tmp = t_0; elseif (B <= -8.5e-296) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= 115000000000.0) tmp = 180.0 * (atan((-0.5 / ((C - A) / B))) / pi); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -1.7e-40], t$95$1, If[LessEqual[B, -3.3e-189], t$95$0, If[LessEqual[B, -8.2e-253], t$95$1, If[LessEqual[B, -1.9e-281], t$95$0, If[LessEqual[B, -8.5e-296], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 115000000000.0], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.7 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -3.3 \cdot 10^{-189}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -8.2 \cdot 10^{-253}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -1.9 \cdot 10^{-281}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-296}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 115000000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C - A}{B}}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.69999999999999992e-40 or -3.3000000000000001e-189 < B < -8.20000000000000004e-253Initial program 57.2%
associate-*r/57.2%
unpow257.2%
Simplified57.2%
Taylor expanded in C around 0 56.2%
+-commutative56.2%
unpow256.2%
unpow256.2%
hypot-def82.3%
Simplified82.3%
Taylor expanded in C around 0 51.4%
associate-*r/51.4%
mul-1-neg51.4%
+-commutative51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-def76.5%
distribute-neg-in76.5%
unsub-neg76.5%
Simplified76.5%
Taylor expanded in B around -inf 73.8%
neg-mul-173.8%
+-commutative73.8%
unsub-neg73.8%
Simplified73.8%
if -1.69999999999999992e-40 < B < -3.3000000000000001e-189 or -8.20000000000000004e-253 < B < -1.89999999999999988e-281Initial program 41.3%
associate-*r/41.3%
associate-*l/41.3%
*-commutative41.3%
Simplified64.1%
Taylor expanded in B around 0 48.3%
unpow248.3%
Simplified48.3%
Taylor expanded in B around 0 65.2%
associate-*r/65.2%
associate-/l*63.3%
Simplified63.3%
associate-/r/65.2%
Applied egg-rr65.2%
if -1.89999999999999988e-281 < B < -8.50000000000000018e-296Initial program 100.0%
associate-*r/100.0%
associate-*l/100.0%
associate-*l/100.0%
*-lft-identity100.0%
sub-neg100.0%
associate-+l-100.0%
sub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in C around inf 100.0%
if -8.50000000000000018e-296 < B < 1.15e11Initial program 57.5%
associate-*r/57.5%
associate-*l/57.5%
*-commutative57.5%
Simplified74.9%
Taylor expanded in B around 0 43.4%
unpow243.4%
Simplified43.4%
Taylor expanded in B around 0 53.4%
associate-*r/53.4%
associate-/l*53.3%
Simplified53.3%
if 1.15e11 < B Initial program 54.6%
associate-*r/54.5%
unpow254.5%
Simplified54.5%
Taylor expanded in C around 0 52.2%
+-commutative52.2%
unpow252.2%
unpow252.2%
hypot-def84.2%
Simplified84.2%
Taylor expanded in C around 0 45.4%
associate-*r/45.4%
mul-1-neg45.4%
+-commutative45.4%
+-commutative45.4%
unpow245.4%
unpow245.4%
hypot-def75.9%
distribute-neg-in75.9%
unsub-neg75.9%
Simplified75.9%
Taylor expanded in A around 0 72.2%
sub-neg72.2%
neg-mul-172.2%
distribute-neg-in72.2%
+-commutative72.2%
distribute-neg-in72.2%
metadata-eval72.2%
unsub-neg72.2%
Simplified72.2%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* B (/ -0.5 (- C A)))) PI)))
(t_1 (/ (* 180.0 (atan (/ (- B A) B))) PI)))
(if (<= B -4.1e-41)
t_1
(if (<= B -3.6e-189)
t_0
(if (<= B -3.8e-253)
t_1
(if (<= B -2e-280)
t_0
(if (<= B -8.5e-296)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B 205000000000.0)
(* 180.0 (/ (atan (/ (* B -0.5) (- C A))) PI))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((B * (-0.5 / (C - A)))) / ((double) M_PI));
double t_1 = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
double tmp;
if (B <= -4.1e-41) {
tmp = t_1;
} else if (B <= -3.6e-189) {
tmp = t_0;
} else if (B <= -3.8e-253) {
tmp = t_1;
} else if (B <= -2e-280) {
tmp = t_0;
} else if (B <= -8.5e-296) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= 205000000000.0) {
tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((B * (-0.5 / (C - A)))) / Math.PI);
double t_1 = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
double tmp;
if (B <= -4.1e-41) {
tmp = t_1;
} else if (B <= -3.6e-189) {
tmp = t_0;
} else if (B <= -3.8e-253) {
tmp = t_1;
} else if (B <= -2e-280) {
tmp = t_0;
} else if (B <= -8.5e-296) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= 205000000000.0) {
tmp = 180.0 * (Math.atan(((B * -0.5) / (C - A))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((B * (-0.5 / (C - A)))) / math.pi) t_1 = (180.0 * math.atan(((B - A) / B))) / math.pi tmp = 0 if B <= -4.1e-41: tmp = t_1 elif B <= -3.6e-189: tmp = t_0 elif B <= -3.8e-253: tmp = t_1 elif B <= -2e-280: tmp = t_0 elif B <= -8.5e-296: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= 205000000000.0: tmp = 180.0 * (math.atan(((B * -0.5) / (C - A))) / math.pi) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / Float64(C - A)))) / pi)) t_1 = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi) tmp = 0.0 if (B <= -4.1e-41) tmp = t_1; elseif (B <= -3.6e-189) tmp = t_0; elseif (B <= -3.8e-253) tmp = t_1; elseif (B <= -2e-280) tmp = t_0; elseif (B <= -8.5e-296) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= 205000000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((B * (-0.5 / (C - A)))) / pi); t_1 = (180.0 * atan(((B - A) / B))) / pi; tmp = 0.0; if (B <= -4.1e-41) tmp = t_1; elseif (B <= -3.6e-189) tmp = t_0; elseif (B <= -3.8e-253) tmp = t_1; elseif (B <= -2e-280) tmp = t_0; elseif (B <= -8.5e-296) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= 205000000000.0) tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / pi); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -4.1e-41], t$95$1, If[LessEqual[B, -3.6e-189], t$95$0, If[LessEqual[B, -3.8e-253], t$95$1, If[LessEqual[B, -2e-280], t$95$0, If[LessEqual[B, -8.5e-296], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 205000000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -4.1 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -3.6 \cdot 10^{-189}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.8 \cdot 10^{-253}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-280}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-296}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 205000000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.10000000000000014e-41 or -3.60000000000000017e-189 < B < -3.80000000000000012e-253Initial program 57.2%
associate-*r/57.2%
unpow257.2%
Simplified57.2%
Taylor expanded in C around 0 56.2%
+-commutative56.2%
unpow256.2%
unpow256.2%
hypot-def82.3%
Simplified82.3%
Taylor expanded in C around 0 51.4%
associate-*r/51.4%
mul-1-neg51.4%
+-commutative51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-def76.5%
distribute-neg-in76.5%
unsub-neg76.5%
Simplified76.5%
Taylor expanded in B around -inf 73.8%
neg-mul-173.8%
+-commutative73.8%
unsub-neg73.8%
Simplified73.8%
if -4.10000000000000014e-41 < B < -3.60000000000000017e-189 or -3.80000000000000012e-253 < B < -1.9999999999999999e-280Initial program 41.3%
associate-*r/41.3%
associate-*l/41.3%
*-commutative41.3%
Simplified64.1%
Taylor expanded in B around 0 48.3%
unpow248.3%
Simplified48.3%
Taylor expanded in B around 0 65.2%
associate-*r/65.2%
associate-/l*63.3%
Simplified63.3%
associate-/r/65.2%
Applied egg-rr65.2%
if -1.9999999999999999e-280 < B < -8.50000000000000018e-296Initial program 100.0%
associate-*r/100.0%
associate-*l/100.0%
associate-*l/100.0%
*-lft-identity100.0%
sub-neg100.0%
associate-+l-100.0%
sub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in C around inf 100.0%
if -8.50000000000000018e-296 < B < 2.05e11Initial program 57.5%
associate-*r/57.5%
associate-*l/57.5%
*-commutative57.5%
Simplified74.9%
Taylor expanded in B around 0 43.4%
unpow243.4%
Simplified43.4%
Taylor expanded in B around 0 53.4%
associate-*r/53.4%
Simplified53.4%
if 2.05e11 < B Initial program 54.6%
associate-*r/54.5%
unpow254.5%
Simplified54.5%
Taylor expanded in C around 0 52.2%
+-commutative52.2%
unpow252.2%
unpow252.2%
hypot-def84.2%
Simplified84.2%
Taylor expanded in C around 0 45.4%
associate-*r/45.4%
mul-1-neg45.4%
+-commutative45.4%
+-commutative45.4%
unpow245.4%
unpow245.4%
hypot-def75.9%
distribute-neg-in75.9%
unsub-neg75.9%
Simplified75.9%
Taylor expanded in A around 0 72.2%
sub-neg72.2%
neg-mul-172.2%
distribute-neg-in72.2%
+-commutative72.2%
distribute-neg-in72.2%
metadata-eval72.2%
unsub-neg72.2%
Simplified72.2%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))
(t_1 (/ (* 180.0 (atan (/ (- B A) B))) PI)))
(if (<= B -4e-46)
t_1
(if (<= B -6.2e-189)
t_0
(if (<= B -4.8e-257)
t_1
(if (<= B -5.6e-280)
(* 180.0 (/ (atan (* B (/ -0.5 (- C A)))) PI))
(if (<= B -8.2e-296)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B 57000000000.0)
t_0
(/ (* 180.0 (atan (- -1.0 (/ A 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 t_1 = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
double tmp;
if (B <= -4e-46) {
tmp = t_1;
} else if (B <= -6.2e-189) {
tmp = t_0;
} else if (B <= -4.8e-257) {
tmp = t_1;
} else if (B <= -5.6e-280) {
tmp = 180.0 * (atan((B * (-0.5 / (C - A)))) / ((double) M_PI));
} else if (B <= -8.2e-296) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= 57000000000.0) {
tmp = t_0;
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double t_1 = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
double tmp;
if (B <= -4e-46) {
tmp = t_1;
} else if (B <= -6.2e-189) {
tmp = t_0;
} else if (B <= -4.8e-257) {
tmp = t_1;
} else if (B <= -5.6e-280) {
tmp = 180.0 * (Math.atan((B * (-0.5 / (C - A)))) / Math.PI);
} else if (B <= -8.2e-296) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= 57000000000.0) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) t_1 = (180.0 * math.atan(((B - A) / B))) / math.pi tmp = 0 if B <= -4e-46: tmp = t_1 elif B <= -6.2e-189: tmp = t_0 elif B <= -4.8e-257: tmp = t_1 elif B <= -5.6e-280: tmp = 180.0 * (math.atan((B * (-0.5 / (C - A)))) / math.pi) elif B <= -8.2e-296: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= 57000000000.0: tmp = t_0 else: tmp = (180.0 * math.atan((-1.0 - (A / 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)))) t_1 = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi) tmp = 0.0 if (B <= -4e-46) tmp = t_1; elseif (B <= -6.2e-189) tmp = t_0; elseif (B <= -4.8e-257) tmp = t_1; elseif (B <= -5.6e-280) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / Float64(C - A)))) / pi)); elseif (B <= -8.2e-296) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= 57000000000.0) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); t_1 = (180.0 * atan(((B - A) / B))) / pi; tmp = 0.0; if (B <= -4e-46) tmp = t_1; elseif (B <= -6.2e-189) tmp = t_0; elseif (B <= -4.8e-257) tmp = t_1; elseif (B <= -5.6e-280) tmp = 180.0 * (atan((B * (-0.5 / (C - A)))) / pi); elseif (B <= -8.2e-296) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= 57000000000.0) tmp = t_0; else tmp = (180.0 * atan((-1.0 - (A / 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]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -4e-46], t$95$1, If[LessEqual[B, -6.2e-189], t$95$0, If[LessEqual[B, -4.8e-257], t$95$1, If[LessEqual[B, -5.6e-280], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.2e-296], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 57000000000.0], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -4 \cdot 10^{-46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-189}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -4.8 \cdot 10^{-257}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -5.6 \cdot 10^{-280}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)}{\pi}\\
\mathbf{elif}\;B \leq -8.2 \cdot 10^{-296}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 57000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.00000000000000009e-46 or -6.2000000000000001e-189 < B < -4.80000000000000033e-257Initial program 57.2%
associate-*r/57.2%
unpow257.2%
Simplified57.2%
Taylor expanded in C around 0 56.2%
+-commutative56.2%
unpow256.2%
unpow256.2%
hypot-def82.3%
Simplified82.3%
Taylor expanded in C around 0 51.4%
associate-*r/51.4%
mul-1-neg51.4%
+-commutative51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-def76.5%
distribute-neg-in76.5%
unsub-neg76.5%
Simplified76.5%
Taylor expanded in B around -inf 73.8%
neg-mul-173.8%
+-commutative73.8%
unsub-neg73.8%
Simplified73.8%
if -4.00000000000000009e-46 < B < -6.2000000000000001e-189 or -8.19999999999999988e-296 < B < 5.7e10Initial program 54.3%
associate-*r/54.3%
associate-*l/54.3%
*-commutative54.3%
Simplified72.6%
Taylor expanded in B around 0 54.8%
associate-*r/54.8%
Simplified54.8%
if -4.80000000000000033e-257 < B < -5.60000000000000035e-280Initial program 32.4%
associate-*r/32.4%
associate-*l/32.4%
*-commutative32.4%
Simplified60.1%
Taylor expanded in B around 0 46.2%
unpow246.2%
Simplified46.2%
Taylor expanded in B around 0 86.1%
associate-*r/86.1%
associate-/l*86.1%
Simplified86.1%
associate-/r/86.1%
Applied egg-rr86.1%
if -5.60000000000000035e-280 < B < -8.19999999999999988e-296Initial program 100.0%
associate-*r/100.0%
associate-*l/100.0%
associate-*l/100.0%
*-lft-identity100.0%
sub-neg100.0%
associate-+l-100.0%
sub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around inf 100.0%
Taylor expanded in C around inf 100.0%
if 5.7e10 < B Initial program 54.6%
associate-*r/54.5%
unpow254.5%
Simplified54.5%
Taylor expanded in C around 0 52.2%
+-commutative52.2%
unpow252.2%
unpow252.2%
hypot-def84.2%
Simplified84.2%
Taylor expanded in C around 0 45.4%
associate-*r/45.4%
mul-1-neg45.4%
+-commutative45.4%
+-commutative45.4%
unpow245.4%
unpow245.4%
hypot-def75.9%
distribute-neg-in75.9%
unsub-neg75.9%
Simplified75.9%
Taylor expanded in A around 0 72.2%
sub-neg72.2%
neg-mul-172.2%
distribute-neg-in72.2%
+-commutative72.2%
distribute-neg-in72.2%
metadata-eval72.2%
unsub-neg72.2%
Simplified72.2%
Final simplification66.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan 1.0))))
(if (<= C -4e-150)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 2.4e-216)
t_0
(if (<= C 8e-138)
(* (/ 180.0 PI) (atan -1.0))
(if (<= C 7.5e-136) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(1.0);
double tmp;
if (C <= -4e-150) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 2.4e-216) {
tmp = t_0;
} else if (C <= 8e-138) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if (C <= 7.5e-136) {
tmp = t_0;
} 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 t_0 = (180.0 / Math.PI) * Math.atan(1.0);
double tmp;
if (C <= -4e-150) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 2.4e-216) {
tmp = t_0;
} else if (C <= 8e-138) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if (C <= 7.5e-136) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(1.0) tmp = 0 if C <= -4e-150: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 2.4e-216: tmp = t_0 elif C <= 8e-138: tmp = (180.0 / math.pi) * math.atan(-1.0) elif C <= 7.5e-136: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(1.0)) tmp = 0.0 if (C <= -4e-150) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 2.4e-216) tmp = t_0; elseif (C <= 8e-138) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif (C <= 7.5e-136) tmp = t_0; 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) t_0 = (180.0 / pi) * atan(1.0); tmp = 0.0; if (C <= -4e-150) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 2.4e-216) tmp = t_0; elseif (C <= 8e-138) tmp = (180.0 / pi) * atan(-1.0); elseif (C <= 7.5e-136) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -4e-150], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 2.4e-216], t$95$0, If[LessEqual[C, 8e-138], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.5e-136], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{if}\;C \leq -4 \cdot 10^{-150}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.4 \cdot 10^{-216}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 8 \cdot 10^{-138}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{-136}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.00000000000000003e-150Initial program 74.7%
associate-*r/74.7%
unpow274.7%
Simplified74.7%
Taylor expanded in C around 0 74.2%
+-commutative74.2%
unpow274.2%
unpow274.2%
hypot-def92.6%
Simplified92.6%
Taylor expanded in C around inf 55.9%
if -4.00000000000000003e-150 < C < 2.40000000000000004e-216 or 8.00000000000000054e-138 < C < 7.5000000000000003e-136Initial program 55.2%
associate-*r/55.3%
associate-*l/55.2%
*-commutative55.2%
Simplified84.8%
Taylor expanded in B around -inf 37.3%
if 2.40000000000000004e-216 < C < 8.00000000000000054e-138Initial program 56.4%
associate-*r/56.4%
associate-*l/56.4%
*-commutative56.4%
Simplified81.1%
Taylor expanded in B around inf 39.7%
if 7.5000000000000003e-136 < C Initial program 39.0%
associate-*r/39.0%
associate-*l/39.0%
*-commutative39.0%
Simplified64.1%
Taylor expanded in B around 0 44.9%
unpow244.9%
Simplified44.9%
Taylor expanded in B around 0 57.9%
associate-*r/57.9%
associate-/l*57.3%
Simplified57.3%
Taylor expanded in C around inf 53.9%
Final simplification49.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan 1.0))))
(if (<= C -3.4e-152)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= C 5.5e-213)
t_0
(if (<= C 5.2e-138)
(* (/ 180.0 PI) (atan -1.0))
(if (<= C 2.8e-135) t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(1.0);
double tmp;
if (C <= -3.4e-152) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (C <= 5.5e-213) {
tmp = t_0;
} else if (C <= 5.2e-138) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if (C <= 2.8e-135) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(1.0);
double tmp;
if (C <= -3.4e-152) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (C <= 5.5e-213) {
tmp = t_0;
} else if (C <= 5.2e-138) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if (C <= 2.8e-135) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(1.0) tmp = 0 if C <= -3.4e-152: tmp = (180.0 * math.atan((C / B))) / math.pi elif C <= 5.5e-213: tmp = t_0 elif C <= 5.2e-138: tmp = (180.0 / math.pi) * math.atan(-1.0) elif C <= 2.8e-135: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(1.0)) tmp = 0.0 if (C <= -3.4e-152) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (C <= 5.5e-213) tmp = t_0; elseif (C <= 5.2e-138) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif (C <= 2.8e-135) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(1.0); tmp = 0.0; if (C <= -3.4e-152) tmp = (180.0 * atan((C / B))) / pi; elseif (C <= 5.5e-213) tmp = t_0; elseif (C <= 5.2e-138) tmp = (180.0 / pi) * atan(-1.0); elseif (C <= 2.8e-135) tmp = t_0; else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.4e-152], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 5.5e-213], t$95$0, If[LessEqual[C, 5.2e-138], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.8e-135], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{if}\;C \leq -3.4 \cdot 10^{-152}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.5 \cdot 10^{-213}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-138}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 2.8 \cdot 10^{-135}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -3.39999999999999984e-152Initial program 74.7%
associate-*r/74.7%
unpow274.7%
Simplified74.7%
Taylor expanded in C around 0 74.2%
+-commutative74.2%
unpow274.2%
unpow274.2%
hypot-def92.6%
Simplified92.6%
Taylor expanded in C around inf 55.9%
if -3.39999999999999984e-152 < C < 5.50000000000000008e-213 or 5.2e-138 < C < 2.80000000000000023e-135Initial program 55.2%
associate-*r/55.3%
associate-*l/55.2%
*-commutative55.2%
Simplified84.8%
Taylor expanded in B around -inf 37.3%
if 5.50000000000000008e-213 < C < 5.2e-138Initial program 56.4%
associate-*r/56.4%
associate-*l/56.4%
*-commutative56.4%
Simplified81.1%
Taylor expanded in B around inf 39.7%
if 2.80000000000000023e-135 < C Initial program 39.0%
associate-*r/39.0%
associate-*l/39.0%
*-commutative39.0%
Simplified64.1%
Taylor expanded in B around 0 44.9%
unpow244.9%
Simplified44.9%
Taylor expanded in C around inf 53.9%
Final simplification49.8%
(FPCore (A B C)
:precision binary64
(if (<= A -3.45e-104)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -2.5e-306)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 2.5e-233)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= A 240.0)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ A (/ B -2.0))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.45e-104) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -2.5e-306) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 2.5e-233) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (A <= 240.0) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((A / (B / -2.0))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.45e-104) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -2.5e-306) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 2.5e-233) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (A <= 240.0) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((A / (B / -2.0))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.45e-104: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -2.5e-306: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 2.5e-233: tmp = (180.0 / math.pi) * math.atan((C / B)) elif A <= 240.0: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan((A / (B / -2.0))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.45e-104) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -2.5e-306) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 2.5e-233) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (A <= 240.0) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(B / -2.0))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.45e-104) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -2.5e-306) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 2.5e-233) tmp = (180.0 / pi) * atan((C / B)); elseif (A <= 240.0) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan((A / (B / -2.0))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.45e-104], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.5e-306], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.5e-233], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 240.0], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(A / N[(B / -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.45 \cdot 10^{-104}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -2.5 \cdot 10^{-306}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 2.5 \cdot 10^{-233}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;A \leq 240:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{\frac{B}{-2}}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.45000000000000022e-104Initial program 33.4%
associate-*r/33.4%
associate-*l/33.4%
*-commutative33.4%
Simplified66.8%
Taylor expanded in A around -inf 67.7%
if -3.45000000000000022e-104 < A < -2.49999999999999999e-306Initial program 48.7%
associate-*r/48.7%
associate-*l/48.7%
*-commutative48.7%
Simplified76.9%
Taylor expanded in B around -inf 39.4%
if -2.49999999999999999e-306 < A < 2.50000000000000006e-233Initial program 67.9%
associate-*r/67.9%
associate-*l/67.9%
associate-*l/67.9%
*-lft-identity67.9%
sub-neg67.9%
associate-+l-67.9%
sub-neg67.9%
remove-double-neg67.9%
+-commutative67.9%
unpow267.9%
unpow267.9%
hypot-def83.0%
Simplified83.0%
Taylor expanded in B around inf 64.3%
Taylor expanded in C around inf 42.9%
if 2.50000000000000006e-233 < A < 240Initial program 57.2%
associate-*r/57.2%
associate-*l/57.2%
*-commutative57.2%
Simplified77.3%
Taylor expanded in B around 0 21.8%
unpow221.8%
Simplified21.8%
Taylor expanded in B around 0 33.0%
associate-*r/33.0%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in C around inf 37.9%
if 240 < A Initial program 81.5%
associate-*r/81.5%
associate-*l/81.5%
*-commutative81.5%
Simplified96.9%
Taylor expanded in A around inf 75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in A around 0 75.4%
*-commutative75.4%
associate-/r/75.4%
Simplified75.4%
Final simplification57.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C B) B)))))
(if (<= A -1.02e-54)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 1.3e-209)
t_0
(if (<= A 1.4e-141)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 4.4e-29) t_0 (* 180.0 (/ (atan (/ A (/ B -2.0))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
double tmp;
if (A <= -1.02e-54) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 1.3e-209) {
tmp = t_0;
} else if (A <= 1.4e-141) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 4.4e-29) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((A / (B / -2.0))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C - B) / B));
double tmp;
if (A <= -1.02e-54) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 1.3e-209) {
tmp = t_0;
} else if (A <= 1.4e-141) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 4.4e-29) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((A / (B / -2.0))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C - B) / B)) tmp = 0 if A <= -1.02e-54: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 1.3e-209: tmp = t_0 elif A <= 1.4e-141: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 4.4e-29: tmp = t_0 else: tmp = 180.0 * (math.atan((A / (B / -2.0))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))) tmp = 0.0 if (A <= -1.02e-54) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 1.3e-209) tmp = t_0; elseif (A <= 1.4e-141) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 4.4e-29) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(B / -2.0))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C - B) / B)); tmp = 0.0; if (A <= -1.02e-54) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 1.3e-209) tmp = t_0; elseif (A <= 1.4e-141) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 4.4e-29) tmp = t_0; else tmp = 180.0 * (atan((A / (B / -2.0))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.02e-54], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.3e-209], t$95$0, If[LessEqual[A, 1.4e-141], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e-29], t$95$0, N[(180.0 * N[(N[ArcTan[N[(A / N[(B / -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{if}\;A \leq -1.02 \cdot 10^{-54}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-209}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.4 \cdot 10^{-141}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{-29}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{\frac{B}{-2}}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.01999999999999999e-54Initial program 29.5%
associate-*r/29.5%
associate-*l/29.5%
*-commutative29.5%
Simplified65.6%
Taylor expanded in A around -inf 70.8%
if -1.01999999999999999e-54 < A < 1.29999999999999992e-209 or 1.40000000000000006e-141 < A < 4.39999999999999981e-29Initial program 58.8%
associate-*r/58.9%
associate-*l/58.8%
associate-*l/58.8%
*-lft-identity58.8%
sub-neg58.8%
associate-+l-58.8%
sub-neg58.8%
remove-double-neg58.8%
+-commutative58.8%
unpow258.8%
unpow258.8%
hypot-def80.5%
Simplified80.5%
Taylor expanded in B around inf 51.1%
Taylor expanded in A around 0 50.1%
if 1.29999999999999992e-209 < A < 1.40000000000000006e-141Initial program 45.7%
associate-*r/45.7%
associate-*l/45.7%
*-commutative45.7%
Simplified60.2%
Taylor expanded in B around 0 22.2%
unpow222.2%
Simplified22.2%
Taylor expanded in B around 0 53.9%
associate-*r/53.9%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in C around inf 53.9%
if 4.39999999999999981e-29 < A Initial program 78.8%
associate-*r/78.8%
associate-*l/78.8%
*-commutative78.8%
Simplified94.8%
Taylor expanded in A around inf 70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in A around 0 70.6%
*-commutative70.6%
associate-/r/70.6%
Simplified70.6%
Final simplification62.1%
(FPCore (A B C)
:precision binary64
(if (<= A -2.2e-52)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 3.7e-209)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(if (<= A 1.8e-141)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 1.95e-120)
(* (/ 180.0 PI) (atan (/ C B)))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e-52) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 3.7e-209) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else if (A <= 1.8e-141) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 1.95e-120) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.2e-52) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 3.7e-209) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else if (A <= 1.8e-141) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 1.95e-120) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.2e-52: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 3.7e-209: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) elif A <= 1.8e-141: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 1.95e-120: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.2e-52) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 3.7e-209) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); elseif (A <= 1.8e-141) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 1.95e-120) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.2e-52) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 3.7e-209) tmp = (180.0 / pi) * atan(((C - B) / B)); elseif (A <= 1.8e-141) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 1.95e-120) tmp = (180.0 / pi) * atan((C / B)); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.2e-52], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.7e-209], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.8e-141], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.95e-120], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.2 \cdot 10^{-52}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 3.7 \cdot 10^{-209}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{-141}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.95 \cdot 10^{-120}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.20000000000000009e-52Initial program 29.5%
associate-*r/29.5%
associate-*l/29.5%
*-commutative29.5%
Simplified65.6%
Taylor expanded in A around -inf 70.8%
if -2.20000000000000009e-52 < A < 3.6999999999999998e-209Initial program 57.8%
associate-*r/57.8%
associate-*l/57.8%
associate-*l/57.8%
*-lft-identity57.8%
sub-neg57.8%
associate-+l-57.7%
sub-neg57.7%
remove-double-neg57.7%
+-commutative57.7%
unpow257.7%
unpow257.7%
hypot-def79.7%
Simplified79.7%
Taylor expanded in B around inf 49.0%
Taylor expanded in A around 0 49.0%
if 3.6999999999999998e-209 < A < 1.80000000000000007e-141Initial program 45.7%
associate-*r/45.7%
associate-*l/45.7%
*-commutative45.7%
Simplified60.2%
Taylor expanded in B around 0 22.2%
unpow222.2%
Simplified22.2%
Taylor expanded in B around 0 53.9%
associate-*r/53.9%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in C around inf 53.9%
if 1.80000000000000007e-141 < A < 1.9500000000000001e-120Initial program 70.3%
associate-*r/70.3%
associate-*l/70.3%
associate-*l/70.3%
*-lft-identity70.3%
sub-neg70.3%
associate-+l-70.3%
sub-neg70.3%
remove-double-neg70.3%
+-commutative70.3%
unpow270.3%
unpow270.3%
hypot-def83.9%
Simplified83.9%
Taylor expanded in B around inf 50.8%
Taylor expanded in C around inf 51.2%
if 1.9500000000000001e-120 < A Initial program 74.4%
associate-*r/74.4%
unpow274.4%
Simplified74.4%
Taylor expanded in C around 0 72.3%
+-commutative72.3%
unpow272.3%
unpow272.3%
hypot-def86.6%
Simplified86.6%
Taylor expanded in C around 0 72.5%
associate-*r/72.5%
mul-1-neg72.5%
+-commutative72.5%
+-commutative72.5%
unpow272.5%
unpow272.5%
hypot-def85.8%
distribute-neg-in85.8%
unsub-neg85.8%
Simplified85.8%
Taylor expanded in A around 0 73.0%
sub-neg73.0%
neg-mul-173.0%
distribute-neg-in73.0%
+-commutative73.0%
distribute-neg-in73.0%
metadata-eval73.0%
unsub-neg73.0%
Simplified73.0%
Final simplification64.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.92e+37)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(if (<= A -5.2e-301)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 6.5e-127)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= A 8e-29)
(* (/ 180.0 PI) (atan -1.0))
(* (/ 180.0 PI) (atan (/ (- A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.92e+37) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else if (A <= -5.2e-301) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 6.5e-127) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (A <= 8e-29) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.92e+37) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else if (A <= -5.2e-301) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 6.5e-127) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (A <= 8e-29) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.92e+37: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) elif A <= -5.2e-301: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 6.5e-127: tmp = (180.0 * math.atan((C / B))) / math.pi elif A <= 8e-29: tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.92e+37) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); elseif (A <= -5.2e-301) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 6.5e-127) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (A <= 8e-29) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.92e+37) tmp = (180.0 / pi) * atan((0.0 / B)); elseif (A <= -5.2e-301) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 6.5e-127) tmp = (180.0 * atan((C / B))) / pi; elseif (A <= 8e-29) tmp = (180.0 / pi) * atan(-1.0); else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.92e+37], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.2e-301], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-127], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 8e-29], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.92 \cdot 10^{+37}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{elif}\;A \leq -5.2 \cdot 10^{-301}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 8 \cdot 10^{-29}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if A < -1.91999999999999994e37Initial program 24.3%
associate-*r/24.3%
associate-*l/24.3%
*-commutative24.3%
Simplified67.0%
Taylor expanded in C around inf 46.9%
distribute-rgt1-in46.9%
metadata-eval46.9%
mul0-lft46.9%
metadata-eval46.9%
Simplified46.9%
if -1.91999999999999994e37 < A < -5.1999999999999996e-301Initial program 51.2%
associate-*r/51.2%
associate-*l/51.2%
*-commutative51.2%
Simplified73.0%
Taylor expanded in B around -inf 34.7%
if -5.1999999999999996e-301 < A < 6.49999999999999998e-127Initial program 63.1%
associate-*r/63.1%
unpow263.1%
Simplified63.1%
Taylor expanded in C around 0 61.9%
+-commutative61.9%
unpow261.9%
unpow261.9%
hypot-def74.1%
Simplified74.1%
Taylor expanded in C around inf 39.5%
if 6.49999999999999998e-127 < A < 7.99999999999999955e-29Initial program 54.6%
associate-*r/54.7%
associate-*l/54.6%
*-commutative54.6%
Simplified77.4%
Taylor expanded in B around inf 34.4%
if 7.99999999999999955e-29 < A Initial program 79.8%
associate-*r/79.8%
associate-*l/79.8%
associate-*l/79.8%
*-lft-identity79.8%
sub-neg79.8%
associate-+l-79.8%
sub-neg79.8%
remove-double-neg79.8%
+-commutative79.8%
unpow279.8%
unpow279.8%
hypot-def96.0%
Simplified96.0%
Taylor expanded in B around inf 79.2%
Taylor expanded in A around inf 70.6%
neg-mul-170.6%
distribute-neg-frac70.6%
Simplified70.6%
Final simplification48.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.48e-62)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -8.2e-296)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B 2.2e-151)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(* (/ 180.0 PI) (atan -1.0))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.48e-62) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -8.2e-296) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= 2.2e-151) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.48e-62) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -8.2e-296) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= 2.2e-151) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.48e-62: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -8.2e-296: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= 2.2e-151: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.48e-62) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -8.2e-296) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= 2.2e-151) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.48e-62) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -8.2e-296) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= 2.2e-151) tmp = (180.0 / pi) * atan((0.0 / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.48e-62], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.2e-296], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.2e-151], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.48 \cdot 10^{-62}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -8.2 \cdot 10^{-296}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-151}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.48000000000000005e-62Initial program 54.7%
associate-*r/54.8%
associate-*l/54.8%
*-commutative54.8%
Simplified78.5%
Taylor expanded in B around -inf 59.0%
if -1.48000000000000005e-62 < B < -8.19999999999999988e-296Initial program 55.2%
associate-*r/55.2%
associate-*l/55.2%
associate-*l/55.2%
*-lft-identity55.2%
sub-neg55.2%
associate-+l-53.0%
sub-neg53.0%
remove-double-neg53.0%
+-commutative53.0%
unpow253.0%
unpow253.0%
hypot-def61.9%
Simplified61.9%
Taylor expanded in B around inf 50.2%
Taylor expanded in C around inf 40.5%
if -8.19999999999999988e-296 < B < 2.1999999999999999e-151Initial program 57.9%
associate-*r/57.9%
associate-*l/57.9%
*-commutative57.9%
Simplified83.7%
Taylor expanded in C around inf 43.5%
distribute-rgt1-in43.5%
metadata-eval43.5%
mul0-lft43.5%
metadata-eval43.5%
Simplified43.5%
if 2.1999999999999999e-151 < B Initial program 55.6%
associate-*r/55.6%
associate-*l/55.6%
*-commutative55.6%
Simplified77.9%
Taylor expanded in B around inf 45.3%
Final simplification48.2%
(FPCore (A B C)
:precision binary64
(if (<= B 2e-266)
(/ (* 180.0 (atan (/ (- B A) B))) PI)
(if (<= B 1.25e-196)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2e-266) {
tmp = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
} else if (B <= 1.25e-196) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 2e-266) {
tmp = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
} else if (B <= 1.25e-196) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2e-266: tmp = (180.0 * math.atan(((B - A) / B))) / math.pi elif B <= 1.25e-196: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2e-266) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi); elseif (B <= 1.25e-196) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2e-266) tmp = (180.0 * atan(((B - A) / B))) / pi; elseif (B <= 1.25e-196) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2e-266], N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.25e-196], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2 \cdot 10^{-266}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-196}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 2e-266Initial program 57.9%
associate-*r/58.0%
unpow258.0%
Simplified58.0%
Taylor expanded in C around 0 56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-def76.6%
Simplified76.6%
Taylor expanded in C around 0 49.8%
associate-*r/49.8%
mul-1-neg49.8%
+-commutative49.8%
+-commutative49.8%
unpow249.8%
unpow249.8%
hypot-def69.5%
distribute-neg-in69.5%
unsub-neg69.5%
Simplified69.5%
Taylor expanded in B around -inf 59.4%
neg-mul-159.4%
+-commutative59.4%
unsub-neg59.4%
Simplified59.4%
if 2e-266 < B < 1.2500000000000001e-196Initial program 43.5%
associate-*r/43.5%
associate-*l/43.5%
*-commutative43.5%
Simplified83.4%
Taylor expanded in A around -inf 61.3%
if 1.2500000000000001e-196 < B Initial program 54.4%
associate-*r/54.4%
unpow254.4%
Simplified54.4%
Taylor expanded in C around 0 52.9%
+-commutative52.9%
unpow252.9%
unpow252.9%
hypot-def75.5%
Simplified75.5%
Taylor expanded in C around 0 44.9%
associate-*r/44.9%
mul-1-neg44.9%
+-commutative44.9%
+-commutative44.9%
unpow244.9%
unpow244.9%
hypot-def66.7%
distribute-neg-in66.7%
unsub-neg66.7%
Simplified66.7%
Taylor expanded in A around 0 59.5%
sub-neg59.5%
neg-mul-159.5%
distribute-neg-in59.5%
+-commutative59.5%
distribute-neg-in59.5%
metadata-eval59.5%
unsub-neg59.5%
Simplified59.5%
Final simplification59.5%
(FPCore (A B C) :precision binary64 (if (<= A -1.04e+37) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) (* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.04e+37) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.04e+37) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.04e+37: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.04e+37) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.04e+37) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan(((C - (A - B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.04e+37], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.04 \cdot 10^{+37}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
\end{array}
\end{array}
if A < -1.0400000000000001e37Initial program 24.3%
associate-*r/24.3%
associate-*l/24.3%
*-commutative24.3%
Simplified67.0%
Taylor expanded in B around 0 82.0%
associate-*r/82.0%
Simplified82.0%
if -1.0400000000000001e37 < A Initial program 64.4%
associate-*r/64.4%
associate-*l/64.4%
associate-*l/64.4%
*-lft-identity64.4%
sub-neg64.4%
associate-+l-64.3%
sub-neg64.3%
remove-double-neg64.3%
+-commutative64.3%
unpow264.3%
unpow264.3%
hypot-def82.9%
Simplified82.9%
Taylor expanded in B around -inf 63.8%
neg-mul-163.8%
unsub-neg63.8%
Simplified63.8%
Final simplification67.8%
(FPCore (A B C)
:precision binary64
(if (<= B -5.2e-87)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 3.8e-151)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-87) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 3.8e-151) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-87) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 3.8e-151) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.2e-87: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 3.8e-151: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.2e-87) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 3.8e-151) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.2e-87) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 3.8e-151) tmp = (180.0 / pi) * atan((0.0 / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.2e-87], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-151], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-151}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -5.20000000000000005e-87Initial program 55.2%
associate-*r/55.2%
associate-*l/55.2%
*-commutative55.2%
Simplified77.5%
Taylor expanded in B around -inf 57.2%
if -5.20000000000000005e-87 < B < 3.7999999999999997e-151Initial program 56.1%
associate-*r/56.1%
associate-*l/56.1%
*-commutative56.1%
Simplified83.1%
Taylor expanded in C around inf 35.2%
distribute-rgt1-in35.2%
metadata-eval35.2%
mul0-lft35.2%
metadata-eval35.2%
Simplified35.2%
if 3.7999999999999997e-151 < B Initial program 55.6%
associate-*r/55.6%
associate-*l/55.6%
*-commutative55.6%
Simplified77.9%
Taylor expanded in B around inf 45.3%
Final simplification45.8%
(FPCore (A B C) :precision binary64 (if (<= B -2e-310) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2e-310: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2e-310) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2e-310) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2e-310], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.999999999999994e-310Initial program 55.2%
associate-*r/55.2%
associate-*l/55.2%
*-commutative55.2%
Simplified79.0%
Taylor expanded in B around -inf 42.8%
if -1.999999999999994e-310 < B Initial program 56.0%
associate-*r/56.0%
associate-*l/56.0%
*-commutative56.0%
Simplified79.9%
Taylor expanded in B around inf 34.9%
Final simplification38.8%
(FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
double code(double A, double B, double C) {
return (180.0 / ((double) M_PI)) * atan(-1.0);
}
public static double code(double A, double B, double C) {
return (180.0 / Math.PI) * Math.atan(-1.0);
}
def code(A, B, C): return (180.0 / math.pi) * math.atan(-1.0)
function code(A, B, C) return Float64(Float64(180.0 / pi) * atan(-1.0)) end
function tmp = code(A, B, C) tmp = (180.0 / pi) * atan(-1.0); end
code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{180}{\pi} \cdot \tan^{-1} -1
\end{array}
Initial program 55.6%
associate-*r/55.6%
associate-*l/55.6%
*-commutative55.6%
Simplified79.5%
Taylor expanded in B around inf 18.6%
Final simplification18.6%
herbie shell --seed 2023193
(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)))