
(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 24 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) (+ (- A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))
(t_1 (- (- C A) (hypot (- A C) B))))
(if (<= t_0 -5e-62)
(/ (* 180.0 (atan (/ t_1 B))) PI)
(if (<= t_0 0.0)
(*
180.0
(/ (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))) PI))
(* 180.0 (/ (atan (/ 1.0 (/ B t_1))) PI))))))
double code(double A, double B, double C) {
double t_0 = (-1.0 / B) * ((A - C) + sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double t_1 = (C - A) - hypot((A - C), B);
double tmp;
if (t_0 <= -5e-62) {
tmp = (180.0 * atan((t_1 / B))) / ((double) M_PI);
} else if (t_0 <= 0.0) {
tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 / (B / t_1))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (-1.0 / B) * ((A - C) + Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double t_1 = (C - A) - Math.hypot((A - C), B);
double tmp;
if (t_0 <= -5e-62) {
tmp = (180.0 * Math.atan((t_1 / B))) / Math.PI;
} else if (t_0 <= 0.0) {
tmp = 180.0 * (Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 / (B / t_1))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (-1.0 / B) * ((A - C) + math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) t_1 = (C - A) - math.hypot((A - C), B) tmp = 0 if t_0 <= -5e-62: tmp = (180.0 * math.atan((t_1 / B))) / math.pi elif t_0 <= 0.0: tmp = 180.0 * (math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / math.pi) else: tmp = 180.0 * (math.atan((1.0 / (B / t_1))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(-1.0 / B) * Float64(Float64(A - C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) t_1 = Float64(Float64(C - A) - hypot(Float64(A - C), B)) tmp = 0.0 if (t_0 <= -5e-62) tmp = Float64(Float64(180.0 * atan(Float64(t_1 / B))) / pi); elseif (t_0 <= 0.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(B / t_1))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (-1.0 / B) * ((A - C) + sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); t_1 = (C - A) - hypot((A - C), B); tmp = 0.0; if (t_0 <= -5e-62) tmp = (180.0 * atan((t_1 / B))) / pi; elseif (t_0 <= 0.0) tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / pi); else tmp = 180.0 * (atan((1.0 / (B / t_1))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-62], N[(N[(180.0 * N[ArcTan[N[(t$95$1 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(B / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} \cdot \left(\left(A - C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
t_1 := \left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-62}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{t\_1}{B}\right)}{\pi}\\
\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{\frac{B}{t\_1}}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -5.0000000000000002e-62Initial program 59.9%
associate-*r/59.9%
associate-*l/59.9%
*-un-lft-identity59.9%
unpow259.9%
unpow259.9%
hypot-define91.7%
Applied egg-rr91.7%
if -5.0000000000000002e-62 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.0Initial program 18.9%
associate--l-9.5%
+-commutative9.5%
unpow29.5%
unpow29.5%
hypot-undefine9.5%
associate-/r/9.5%
associate--r+18.9%
hypot-undefine18.9%
unpow218.9%
unpow218.9%
+-commutative18.9%
unpow218.9%
unpow218.9%
hypot-define18.9%
Applied egg-rr18.9%
Taylor expanded in A around -inf 87.2%
associate-*r*87.2%
mul-1-neg87.2%
associate-*r/87.2%
associate-*r/87.2%
metadata-eval87.2%
Simplified87.2%
if -0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 60.5%
associate--l-60.5%
+-commutative60.5%
unpow260.5%
unpow260.5%
hypot-undefine82.9%
associate-/r/82.9%
associate--r+88.0%
hypot-undefine60.5%
unpow260.5%
unpow260.5%
+-commutative60.5%
unpow260.5%
unpow260.5%
hypot-define88.0%
Applied egg-rr88.0%
Final simplification89.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))))
(if (<= A -1.28e+209)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -4.2e+174)
t_0
(if (<= A -4.6e+101)
(*
180.0
(/ (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))) PI))
(if (<= A 4.7e+113) t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
double tmp;
if (A <= -1.28e+209) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -4.2e+174) {
tmp = t_0;
} else if (A <= -4.6e+101) {
tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / ((double) M_PI));
} else if (A <= 4.7e+113) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
double tmp;
if (A <= -1.28e+209) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -4.2e+174) {
tmp = t_0;
} else if (A <= -4.6e+101) {
tmp = 180.0 * (Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / Math.PI);
} else if (A <= 4.7e+113) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) tmp = 0 if A <= -1.28e+209: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -4.2e+174: tmp = t_0 elif A <= -4.6e+101: tmp = 180.0 * (math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / math.pi) elif A <= 4.7e+113: tmp = t_0 else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)) tmp = 0.0 if (A <= -1.28e+209) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -4.2e+174) tmp = t_0; elseif (A <= -4.6e+101) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A)))))) / pi)); elseif (A <= 4.7e+113) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); tmp = 0.0; if (A <= -1.28e+209) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -4.2e+174) tmp = t_0; elseif (A <= -4.6e+101) tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / pi); elseif (A <= 4.7e+113) tmp = t_0; else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.28e+209], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4.2e+174], t$95$0, If[LessEqual[A, -4.6e+101], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.7e+113], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.28 \cdot 10^{+209}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4.2 \cdot 10^{+174}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;A \leq -4.6 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.7 \cdot 10^{+113}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.28e209Initial program 9.9%
Taylor expanded in A around -inf 83.5%
associate-*r/83.5%
Simplified83.5%
div-inv83.4%
*-commutative83.4%
Applied egg-rr83.4%
Taylor expanded in B around 0 83.5%
if -1.28e209 < A < -4.20000000000000033e174 or -4.6000000000000003e101 < A < 4.6999999999999998e113Initial program 55.2%
Taylor expanded in A around 0 49.7%
unpow249.7%
unpow249.7%
hypot-define79.3%
Simplified79.3%
if -4.20000000000000033e174 < A < -4.6000000000000003e101Initial program 15.8%
associate--l-6.3%
+-commutative6.3%
unpow26.3%
unpow26.3%
hypot-undefine29.5%
associate-/r/29.5%
associate--r+39.3%
hypot-undefine15.8%
unpow215.8%
unpow215.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define39.3%
Applied egg-rr39.3%
Taylor expanded in A around -inf 84.4%
associate-*r*84.4%
mul-1-neg84.4%
associate-*r/84.4%
associate-*r/84.4%
metadata-eval84.4%
Simplified84.4%
if 4.6999999999999998e113 < A Initial program 93.5%
Taylor expanded in A around inf 94.6%
Final simplification82.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (- C (hypot B C)) B))))
(if (<= A -3.05e+208)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -5.1e+175)
(* 180.0 (/ t_0 PI))
(if (<= A -8.5e+110)
(*
180.0
(/ (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))) PI))
(if (<= A 4.4e+113)
(/ (* 180.0 t_0) PI)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan(((C - hypot(B, C)) / B));
double tmp;
if (A <= -3.05e+208) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -5.1e+175) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -8.5e+110) {
tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / ((double) M_PI));
} else if (A <= 4.4e+113) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((C - Math.hypot(B, C)) / B));
double tmp;
if (A <= -3.05e+208) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -5.1e+175) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -8.5e+110) {
tmp = 180.0 * (Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / Math.PI);
} else if (A <= 4.4e+113) {
tmp = (180.0 * t_0) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((C - math.hypot(B, C)) / B)) tmp = 0 if A <= -3.05e+208: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -5.1e+175: tmp = 180.0 * (t_0 / math.pi) elif A <= -8.5e+110: tmp = 180.0 * (math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / math.pi) elif A <= 4.4e+113: tmp = (180.0 * t_0) / math.pi else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(C - hypot(B, C)) / B)) tmp = 0.0 if (A <= -3.05e+208) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -5.1e+175) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -8.5e+110) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A)))))) / pi)); elseif (A <= 4.4e+113) tmp = Float64(Float64(180.0 * t_0) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((C - hypot(B, C)) / B)); tmp = 0.0; if (A <= -3.05e+208) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -5.1e+175) tmp = 180.0 * (t_0 / pi); elseif (A <= -8.5e+110) tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / pi); elseif (A <= 4.4e+113) tmp = (180.0 * t_0) / pi; else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -3.05e+208], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.1e+175], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.5e+110], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e+113], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{if}\;A \leq -3.05 \cdot 10^{+208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5.1 \cdot 10^{+175}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{elif}\;A \leq -8.5 \cdot 10^{+110}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{+113}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.04999999999999988e208Initial program 9.9%
Taylor expanded in A around -inf 83.5%
associate-*r/83.5%
Simplified83.5%
div-inv83.4%
*-commutative83.4%
Applied egg-rr83.4%
Taylor expanded in B around 0 83.5%
if -3.04999999999999988e208 < A < -5.10000000000000007e175Initial program 16.1%
Taylor expanded in A around 0 16.1%
unpow216.1%
unpow216.1%
hypot-define100.0%
Simplified100.0%
if -5.10000000000000007e175 < A < -8.5000000000000004e110Initial program 15.8%
associate--l-6.3%
+-commutative6.3%
unpow26.3%
unpow26.3%
hypot-undefine29.5%
associate-/r/29.5%
associate--r+39.3%
hypot-undefine15.8%
unpow215.8%
unpow215.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define39.3%
Applied egg-rr39.3%
Taylor expanded in A around -inf 84.4%
associate-*r*84.4%
mul-1-neg84.4%
associate-*r/84.4%
associate-*r/84.4%
metadata-eval84.4%
Simplified84.4%
if -8.5000000000000004e110 < A < 4.40000000000000021e113Initial program 56.5%
Taylor expanded in A around 0 50.9%
unpow250.9%
unpow250.9%
hypot-define78.6%
Simplified78.6%
associate-*r/78.6%
Applied egg-rr78.6%
if 4.40000000000000021e113 < A Initial program 93.5%
Taylor expanded in A around inf 94.6%
Final simplification82.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.85e+229)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (or (<= A -4.4e+175) (not (<= A -6e+120)))
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(*
180.0
(/ (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.85e+229) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if ((A <= -4.4e+175) || !(A <= -6e+120)) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.85e+229) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if ((A <= -4.4e+175) || !(A <= -6e+120)) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.85e+229: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif (A <= -4.4e+175) or not (A <= -6e+120): tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.85e+229) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif ((A <= -4.4e+175) || !(A <= -6e+120)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A)))))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.85e+229) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif ((A <= -4.4e+175) || ~((A <= -6e+120))) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.85e+229], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -4.4e+175], N[Not[LessEqual[A, -6e+120]], $MachinePrecision]], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.85 \cdot 10^{+229}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4.4 \cdot 10^{+175} \lor \neg \left(A \leq -6 \cdot 10^{+120}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.85000000000000001e229Initial program 10.4%
Taylor expanded in A around -inf 89.2%
associate-*r/89.2%
Simplified89.2%
div-inv89.1%
*-commutative89.1%
Applied egg-rr89.1%
Taylor expanded in B around 0 89.2%
if -1.85000000000000001e229 < A < -4.3999999999999999e175 or -6e120 < A Initial program 60.4%
associate-*l/60.4%
*-lft-identity60.4%
+-commutative60.4%
unpow260.4%
unpow260.4%
hypot-define85.6%
Simplified85.6%
if -4.3999999999999999e175 < A < -6e120Initial program 7.4%
associate--l-6.6%
+-commutative6.6%
unpow26.6%
unpow26.6%
hypot-undefine32.1%
associate-/r/32.1%
associate--r+33.3%
hypot-undefine7.4%
unpow27.4%
unpow27.4%
+-commutative7.4%
unpow27.4%
unpow27.4%
hypot-define33.3%
Applied egg-rr33.3%
Taylor expanded in A around -inf 82.9%
associate-*r*82.9%
mul-1-neg82.9%
associate-*r/82.9%
associate-*r/82.9%
metadata-eval82.9%
Simplified82.9%
Final simplification85.7%
(FPCore (A B C)
:precision binary64
(if (<= A -2.45e+208)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -4.8e+175)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= A -8.6e+107)
(*
180.0
(/ (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))) PI))
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.45e+208) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -4.8e+175) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (A <= -8.6e+107) {
tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.45e+208) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -4.8e+175) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (A <= -8.6e+107) {
tmp = 180.0 * (Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.45e+208: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -4.8e+175: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif A <= -8.6e+107: tmp = 180.0 * (math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.45e+208) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -4.8e+175) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (A <= -8.6e+107) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A)))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.45e+208) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -4.8e+175) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (A <= -8.6e+107) tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.45e+208], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4.8e+175], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.6e+107], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.45 \cdot 10^{+208}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4.8 \cdot 10^{+175}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8.6 \cdot 10^{+107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.4499999999999998e208Initial program 9.9%
Taylor expanded in A around -inf 83.5%
associate-*r/83.5%
Simplified83.5%
div-inv83.4%
*-commutative83.4%
Applied egg-rr83.4%
Taylor expanded in B around 0 83.5%
if -2.4499999999999998e208 < A < -4.8e175Initial program 16.1%
Taylor expanded in A around 0 16.1%
unpow216.1%
unpow216.1%
hypot-define100.0%
Simplified100.0%
if -4.8e175 < A < -8.5999999999999999e107Initial program 15.8%
associate--l-6.3%
+-commutative6.3%
unpow26.3%
unpow26.3%
hypot-undefine29.5%
associate-/r/29.5%
associate--r+39.3%
hypot-undefine15.8%
unpow215.8%
unpow215.8%
+-commutative15.8%
unpow215.8%
unpow215.8%
hypot-define39.3%
Applied egg-rr39.3%
Taylor expanded in A around -inf 84.4%
associate-*r*84.4%
mul-1-neg84.4%
associate-*r/84.4%
associate-*r/84.4%
metadata-eval84.4%
Simplified84.4%
if -8.5999999999999999e107 < A Initial program 62.5%
Simplified84.4%
Final simplification84.7%
(FPCore (A B C)
:precision binary64
(if (<= A -1.12e+229)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.7e+175)
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(if (<= A -9.4e+120)
(*
180.0
(/ (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))) PI))
(/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.12e+229) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.7e+175) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else if (A <= -9.4e+120) {
tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.12e+229) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.7e+175) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else if (A <= -9.4e+120) {
tmp = 180.0 * (Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.12e+229: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.7e+175: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) elif A <= -9.4e+120: tmp = 180.0 * (math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / math.pi) else: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.12e+229) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.7e+175) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); elseif (A <= -9.4e+120) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A)))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.12e+229) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.7e+175) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); elseif (A <= -9.4e+120) tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / pi); else tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.12e+229], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.7e+175], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.4e+120], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.12 \cdot 10^{+229}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.7 \cdot 10^{+175}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -9.4 \cdot 10^{+120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.12e229Initial program 10.4%
Taylor expanded in A around -inf 89.2%
associate-*r/89.2%
Simplified89.2%
div-inv89.1%
*-commutative89.1%
Applied egg-rr89.1%
Taylor expanded in B around 0 89.2%
if -1.12e229 < A < -1.70000000000000014e175Initial program 12.9%
associate-*l/12.9%
*-lft-identity12.9%
+-commutative12.9%
unpow212.9%
unpow212.9%
hypot-define90.4%
Simplified90.4%
if -1.70000000000000014e175 < A < -9.39999999999999987e120Initial program 7.4%
associate--l-6.6%
+-commutative6.6%
unpow26.6%
unpow26.6%
hypot-undefine32.1%
associate-/r/32.1%
associate--r+33.3%
hypot-undefine7.4%
unpow27.4%
unpow27.4%
+-commutative7.4%
unpow27.4%
unpow27.4%
hypot-define33.3%
Applied egg-rr33.3%
Taylor expanded in A around -inf 82.9%
associate-*r*82.9%
mul-1-neg82.9%
associate-*r/82.9%
associate-*r/82.9%
metadata-eval82.9%
Simplified82.9%
if -9.39999999999999987e120 < A Initial program 62.6%
associate-*r/62.6%
associate-*l/62.6%
*-un-lft-identity62.6%
unpow262.6%
unpow262.6%
hypot-define85.4%
Applied egg-rr85.4%
Final simplification85.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -0.415)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.5e-240)
t_0
(if (<= B 1.26e-282)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 5.2e-71)
t_0
(if (<= B 1.3e+76)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -0.415) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.5e-240) {
tmp = t_0;
} else if (B <= 1.26e-282) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 5.2e-71) {
tmp = t_0;
} else if (B <= 1.3e+76) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -0.415) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.5e-240) {
tmp = t_0;
} else if (B <= 1.26e-282) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 5.2e-71) {
tmp = t_0;
} else if (B <= 1.3e+76) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -0.415: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.5e-240: tmp = t_0 elif B <= 1.26e-282: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 5.2e-71: tmp = t_0 elif B <= 1.3e+76: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -0.415) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.5e-240) tmp = t_0; elseif (B <= 1.26e-282) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 5.2e-71) tmp = t_0; elseif (B <= 1.3e+76) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -0.415) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.5e-240) tmp = t_0; elseif (B <= 1.26e-282) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 5.2e-71) tmp = t_0; elseif (B <= 1.3e+76) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -0.415], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.5e-240], t$95$0, If[LessEqual[B, 1.26e-282], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e-71], t$95$0, If[LessEqual[B, 1.3e+76], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -0.415:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.5 \cdot 10^{-240}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.26 \cdot 10^{-282}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-71}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -0.41499999999999998Initial program 46.2%
Taylor expanded in B around -inf 65.2%
if -0.41499999999999998 < B < -3.50000000000000016e-240 or 1.26000000000000003e-282 < B < 5.1999999999999997e-71Initial program 59.9%
Taylor expanded in B around inf 52.2%
Taylor expanded in C around inf 42.3%
if -3.50000000000000016e-240 < B < 1.26000000000000003e-282Initial program 58.0%
Taylor expanded in C around inf 53.7%
associate-*r/53.7%
distribute-rgt1-in53.7%
metadata-eval53.7%
mul0-lft53.7%
metadata-eval53.7%
Simplified53.7%
if 5.1999999999999997e-71 < B < 1.3e76Initial program 78.2%
Taylor expanded in A around inf 50.6%
if 1.3e76 < B Initial program 36.2%
Taylor expanded in B around inf 73.0%
Final simplification54.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= C -6.5e-105)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C -5.9e-252)
t_0
(if (<= C -5.5e-294)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= C 1.85e-231)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 5.2e-113)
t_0
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (C <= -6.5e-105) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= -5.9e-252) {
tmp = t_0;
} else if (C <= -5.5e-294) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (C <= 1.85e-231) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 5.2e-113) {
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.atan(-1.0) / Math.PI);
double tmp;
if (C <= -6.5e-105) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= -5.9e-252) {
tmp = t_0;
} else if (C <= -5.5e-294) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (C <= 1.85e-231) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 5.2e-113) {
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.atan(-1.0) / math.pi) tmp = 0 if C <= -6.5e-105: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= -5.9e-252: tmp = t_0 elif C <= -5.5e-294: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif C <= 1.85e-231: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 5.2e-113: 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(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (C <= -6.5e-105) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= -5.9e-252) tmp = t_0; elseif (C <= -5.5e-294) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (C <= 1.85e-231) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 5.2e-113) 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 * (atan(-1.0) / pi); tmp = 0.0; if (C <= -6.5e-105) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= -5.9e-252) tmp = t_0; elseif (C <= -5.5e-294) tmp = 180.0 * (atan((A / -B)) / pi); elseif (C <= 1.85e-231) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 5.2e-113) 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[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -6.5e-105], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -5.9e-252], t$95$0, If[LessEqual[C, -5.5e-294], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.85e-231], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.2e-113], 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 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;C \leq -6.5 \cdot 10^{-105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -5.9 \cdot 10^{-252}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -5.5 \cdot 10^{-294}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.85 \cdot 10^{-231}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-113}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -6.50000000000000006e-105Initial program 79.5%
Taylor expanded in B around inf 75.7%
Taylor expanded in C around inf 64.8%
if -6.50000000000000006e-105 < C < -5.8999999999999995e-252 or 1.84999999999999997e-231 < C < 5.1999999999999998e-113Initial program 55.7%
Taylor expanded in B around inf 40.7%
if -5.8999999999999995e-252 < C < -5.5e-294Initial program 76.5%
Taylor expanded in B around inf 82.1%
Taylor expanded in A around inf 64.5%
associate-*r/64.5%
mul-1-neg64.5%
Simplified64.5%
if -5.5e-294 < C < 1.84999999999999997e-231Initial program 49.3%
Taylor expanded in B around -inf 47.0%
if 5.1999999999999998e-113 < C Initial program 22.6%
Taylor expanded in A around 0 18.1%
unpow218.1%
unpow218.1%
hypot-define56.4%
Simplified56.4%
Taylor expanded in C around inf 62.8%
Final simplification58.2%
(FPCore (A B C)
:precision binary64
(if (<= C -3.4e-104)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C -4.6e-253)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C -2.8e-294)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= C 1.25e-235)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 1.68e-40)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.4e-104) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= -4.6e-253) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= -2.8e-294) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (C <= 1.25e-235) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 1.68e-40) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -3.4e-104) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= -4.6e-253) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= -2.8e-294) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (C <= 1.25e-235) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 1.68e-40) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -3.4e-104: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= -4.6e-253: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= -2.8e-294: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif C <= 1.25e-235: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 1.68e-40: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -3.4e-104) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= -4.6e-253) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= -2.8e-294) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (C <= 1.25e-235) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 1.68e-40) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.4e-104) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= -4.6e-253) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= -2.8e-294) tmp = 180.0 * (atan((A / -B)) / pi); elseif (C <= 1.25e-235) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 1.68e-40) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.4e-104], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.6e-253], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.8e-294], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.25e-235], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.68e-40], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.4 \cdot 10^{-104}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.6 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq -2.8 \cdot 10^{-294}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.25 \cdot 10^{-235}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 1.68 \cdot 10^{-40}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.40000000000000015e-104Initial program 79.5%
Taylor expanded in B around inf 75.7%
Taylor expanded in C around inf 64.8%
if -3.40000000000000015e-104 < C < -4.6000000000000001e-253Initial program 58.5%
Taylor expanded in B around inf 42.8%
if -4.6000000000000001e-253 < C < -2.79999999999999991e-294Initial program 76.5%
Taylor expanded in B around inf 82.1%
Taylor expanded in A around inf 64.5%
associate-*r/64.5%
mul-1-neg64.5%
Simplified64.5%
if -2.79999999999999991e-294 < C < 1.2499999999999999e-235Initial program 49.3%
Taylor expanded in B around -inf 47.0%
if 1.2499999999999999e-235 < C < 1.6800000000000001e-40Initial program 45.4%
Taylor expanded in A around -inf 41.6%
associate-*r/41.6%
Simplified41.6%
div-inv41.6%
*-commutative41.6%
Applied egg-rr41.6%
Taylor expanded in B around 0 41.6%
if 1.6800000000000001e-40 < C Initial program 21.1%
Taylor expanded in A around 0 18.3%
unpow218.3%
unpow218.3%
hypot-define60.9%
Simplified60.9%
Taylor expanded in C around inf 67.1%
Final simplification58.6%
(FPCore (A B C)
:precision binary64
(if (<= C -8.5e-106)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -4.4e-254)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C -4.7e-295)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= C 1.65e-239)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 3.6e-40)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8.5e-106) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -4.4e-254) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= -4.7e-295) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (C <= 1.65e-239) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 3.6e-40) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -8.5e-106) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -4.4e-254) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= -4.7e-295) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (C <= 1.65e-239) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 3.6e-40) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -8.5e-106: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -4.4e-254: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= -4.7e-295: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif C <= 1.65e-239: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 3.6e-40: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -8.5e-106) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -4.4e-254) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= -4.7e-295) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (C <= 1.65e-239) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 3.6e-40) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8.5e-106) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -4.4e-254) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= -4.7e-295) tmp = 180.0 * (atan((A / -B)) / pi); elseif (C <= 1.65e-239) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 3.6e-40) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8.5e-106], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.4e-254], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.7e-295], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.65e-239], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.6e-40], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8.5 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.4 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq -4.7 \cdot 10^{-295}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.65 \cdot 10^{-239}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 3.6 \cdot 10^{-40}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -8.4999999999999998e-106Initial program 79.5%
Taylor expanded in C around -inf 65.2%
if -8.4999999999999998e-106 < C < -4.4000000000000002e-254Initial program 58.5%
Taylor expanded in B around inf 42.8%
if -4.4000000000000002e-254 < C < -4.6999999999999998e-295Initial program 76.5%
Taylor expanded in B around inf 82.1%
Taylor expanded in A around inf 64.5%
associate-*r/64.5%
mul-1-neg64.5%
Simplified64.5%
if -4.6999999999999998e-295 < C < 1.64999999999999998e-239Initial program 49.3%
Taylor expanded in B around -inf 47.0%
if 1.64999999999999998e-239 < C < 3.6e-40Initial program 45.4%
Taylor expanded in A around -inf 41.6%
associate-*r/41.6%
Simplified41.6%
div-inv41.6%
*-commutative41.6%
Applied egg-rr41.6%
Taylor expanded in B around 0 41.6%
if 3.6e-40 < C Initial program 21.1%
Taylor expanded in A around 0 18.3%
unpow218.3%
unpow218.3%
hypot-define60.9%
Simplified60.9%
Taylor expanded in C around inf 67.1%
Final simplification58.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -5.2e+96)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C -2.1e-106)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 5.8e-286)
t_0
(if (<= C 9.8e-241)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 6.6e-25)
t_0
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -5.2e+96) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= -2.1e-106) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 5.8e-286) {
tmp = t_0;
} else if (C <= 9.8e-241) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 6.6e-25) {
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.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -5.2e+96) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= -2.1e-106) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 5.8e-286) {
tmp = t_0;
} else if (C <= 9.8e-241) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 6.6e-25) {
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.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -5.2e+96: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= -2.1e-106: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 5.8e-286: tmp = t_0 elif C <= 9.8e-241: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 6.6e-25: 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(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -5.2e+96) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= -2.1e-106) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 5.8e-286) tmp = t_0; elseif (C <= 9.8e-241) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 6.6e-25) 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 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -5.2e+96) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= -2.1e-106) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 5.8e-286) tmp = t_0; elseif (C <= 9.8e-241) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 6.6e-25) 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[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5.2e+96], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.1e-106], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.8e-286], t$95$0, If[LessEqual[C, 9.8e-241], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.6e-25], 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 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -5.2 \cdot 10^{+96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.1 \cdot 10^{-106}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.8 \cdot 10^{-286}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 9.8 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 6.6 \cdot 10^{-25}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.2e96Initial program 79.2%
Taylor expanded in A around 0 79.2%
unpow279.2%
unpow279.2%
hypot-define94.1%
Simplified94.1%
Taylor expanded in C around 0 88.9%
if -5.2e96 < C < -2.10000000000000003e-106Initial program 79.9%
Taylor expanded in A around 0 69.1%
unpow269.1%
unpow269.1%
hypot-define77.5%
Simplified77.5%
Taylor expanded in B around -inf 71.2%
if -2.10000000000000003e-106 < C < 5.7999999999999996e-286 or 9.7999999999999997e-241 < C < 6.5999999999999997e-25Initial program 52.9%
Taylor expanded in B around inf 55.4%
Taylor expanded in C around 0 54.3%
neg-mul-154.3%
distribute-neg-in54.3%
metadata-eval54.3%
unsub-neg54.3%
Simplified54.3%
if 5.7999999999999996e-286 < C < 9.7999999999999997e-241Initial program 51.4%
Taylor expanded in B around -inf 60.4%
if 6.5999999999999997e-25 < C Initial program 21.2%
Taylor expanded in A around 0 18.2%
unpow218.2%
unpow218.2%
hypot-define59.7%
Simplified59.7%
Taylor expanded in C around inf 68.5%
Final simplification68.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -7e+94)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C -9.2e-107)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 5.8e-286)
t_0
(if (<= C 8.2e-242)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 1.42e-24)
t_0
(* (atan (* -0.5 (/ B C))) (/ 180.0 PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -7e+94) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= -9.2e-107) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 5.8e-286) {
tmp = t_0;
} else if (C <= 8.2e-242) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 1.42e-24) {
tmp = t_0;
} else {
tmp = atan((-0.5 * (B / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -7e+94) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= -9.2e-107) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 5.8e-286) {
tmp = t_0;
} else if (C <= 8.2e-242) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 1.42e-24) {
tmp = t_0;
} else {
tmp = Math.atan((-0.5 * (B / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -7e+94: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= -9.2e-107: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 5.8e-286: tmp = t_0 elif C <= 8.2e-242: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 1.42e-24: tmp = t_0 else: tmp = math.atan((-0.5 * (B / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -7e+94) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= -9.2e-107) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 5.8e-286) tmp = t_0; elseif (C <= 8.2e-242) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 1.42e-24) tmp = t_0; else tmp = Float64(atan(Float64(-0.5 * Float64(B / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -7e+94) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= -9.2e-107) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 5.8e-286) tmp = t_0; elseif (C <= 8.2e-242) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 1.42e-24) tmp = t_0; else tmp = atan((-0.5 * (B / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -7e+94], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -9.2e-107], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.8e-286], t$95$0, If[LessEqual[C, 8.2e-242], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.42e-24], t$95$0, N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -7 \cdot 10^{+94}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -9.2 \cdot 10^{-107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.8 \cdot 10^{-286}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 8.2 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 1.42 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -6.9999999999999994e94Initial program 79.2%
Taylor expanded in A around 0 79.2%
unpow279.2%
unpow279.2%
hypot-define94.1%
Simplified94.1%
Taylor expanded in C around 0 88.9%
if -6.9999999999999994e94 < C < -9.20000000000000014e-107Initial program 79.9%
Taylor expanded in A around 0 69.1%
unpow269.1%
unpow269.1%
hypot-define77.5%
Simplified77.5%
Taylor expanded in B around -inf 71.2%
if -9.20000000000000014e-107 < C < 5.7999999999999996e-286 or 8.19999999999999942e-242 < C < 1.42e-24Initial program 52.9%
Taylor expanded in B around inf 55.4%
Taylor expanded in C around 0 54.3%
neg-mul-154.3%
distribute-neg-in54.3%
metadata-eval54.3%
unsub-neg54.3%
Simplified54.3%
if 5.7999999999999996e-286 < C < 8.19999999999999942e-242Initial program 51.4%
Taylor expanded in B around -inf 60.4%
if 1.42e-24 < C Initial program 21.2%
Taylor expanded in A around 0 18.2%
unpow218.2%
unpow218.2%
hypot-define59.7%
Simplified59.7%
associate-*r/59.7%
Applied egg-rr59.7%
Taylor expanded in C around -inf 18.2%
associate-*r/18.3%
*-commutative18.3%
associate-/l*18.3%
mul-1-neg18.3%
distribute-neg-frac218.3%
neg-mul-118.3%
unsub-neg18.3%
+-commutative18.3%
unpow218.3%
unpow218.3%
hypot-define59.7%
Simplified59.7%
Taylor expanded in C around inf 68.8%
Final simplification68.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -5e+94)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= C -1.92e-103)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 5.2e-286)
t_0
(if (<= C 1.05e-240)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 8.5e-25)
t_0
(* (atan (* -0.5 (/ B C))) (/ 180.0 PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -5e+94) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (C <= -1.92e-103) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 5.2e-286) {
tmp = t_0;
} else if (C <= 1.05e-240) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 8.5e-25) {
tmp = t_0;
} else {
tmp = atan((-0.5 * (B / C))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -5e+94) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (C <= -1.92e-103) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 5.2e-286) {
tmp = t_0;
} else if (C <= 1.05e-240) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 8.5e-25) {
tmp = t_0;
} else {
tmp = Math.atan((-0.5 * (B / C))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -5e+94: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif C <= -1.92e-103: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 5.2e-286: tmp = t_0 elif C <= 1.05e-240: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 8.5e-25: tmp = t_0 else: tmp = math.atan((-0.5 * (B / C))) * (180.0 / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -5e+94) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (C <= -1.92e-103) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 5.2e-286) tmp = t_0; elseif (C <= 1.05e-240) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 8.5e-25) tmp = t_0; else tmp = Float64(atan(Float64(-0.5 * Float64(B / C))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -5e+94) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (C <= -1.92e-103) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 5.2e-286) tmp = t_0; elseif (C <= 1.05e-240) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 8.5e-25) tmp = t_0; else tmp = atan((-0.5 * (B / C))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5e+94], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -1.92e-103], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.2e-286], t$95$0, If[LessEqual[C, 1.05e-240], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.5e-25], t$95$0, N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -5 \cdot 10^{+94}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.92 \cdot 10^{-103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-286}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 1.05 \cdot 10^{-240}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 8.5 \cdot 10^{-25}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -5.0000000000000001e94Initial program 79.2%
Taylor expanded in A around 0 79.2%
unpow279.2%
unpow279.2%
hypot-define94.1%
Simplified94.1%
associate-*r/94.1%
Applied egg-rr94.1%
Taylor expanded in C around 0 88.9%
if -5.0000000000000001e94 < C < -1.9200000000000001e-103Initial program 79.9%
Taylor expanded in A around 0 69.1%
unpow269.1%
unpow269.1%
hypot-define77.5%
Simplified77.5%
Taylor expanded in B around -inf 71.2%
if -1.9200000000000001e-103 < C < 5.1999999999999999e-286 or 1.04999999999999997e-240 < C < 8.49999999999999981e-25Initial program 52.9%
Taylor expanded in B around inf 55.4%
Taylor expanded in C around 0 54.3%
neg-mul-154.3%
distribute-neg-in54.3%
metadata-eval54.3%
unsub-neg54.3%
Simplified54.3%
if 5.1999999999999999e-286 < C < 1.04999999999999997e-240Initial program 51.4%
Taylor expanded in B around -inf 60.4%
if 8.49999999999999981e-25 < C Initial program 21.2%
Taylor expanded in A around 0 18.2%
unpow218.2%
unpow218.2%
hypot-define59.7%
Simplified59.7%
associate-*r/59.7%
Applied egg-rr59.7%
Taylor expanded in C around -inf 18.2%
associate-*r/18.3%
*-commutative18.3%
associate-/l*18.3%
mul-1-neg18.3%
distribute-neg-frac218.3%
neg-mul-118.3%
unsub-neg18.3%
+-commutative18.3%
unpow218.3%
unpow218.3%
hypot-define59.7%
Simplified59.7%
Taylor expanded in C around inf 68.8%
Final simplification68.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -0.21)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.4e-240)
t_0
(if (<= B 1.16e-281)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 5.4e-71)
t_0
(if (<= B 1.3e+76)
(* 180.0 (/ (atan (/ A (- B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -0.21) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.4e-240) {
tmp = t_0;
} else if (B <= 1.16e-281) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 5.4e-71) {
tmp = t_0;
} else if (B <= 1.3e+76) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -0.21) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.4e-240) {
tmp = t_0;
} else if (B <= 1.16e-281) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 5.4e-71) {
tmp = t_0;
} else if (B <= 1.3e+76) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -0.21: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.4e-240: tmp = t_0 elif B <= 1.16e-281: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 5.4e-71: tmp = t_0 elif B <= 1.3e+76: tmp = 180.0 * (math.atan((A / -B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -0.21) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.4e-240) tmp = t_0; elseif (B <= 1.16e-281) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 5.4e-71) tmp = t_0; elseif (B <= 1.3e+76) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -0.21) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.4e-240) tmp = t_0; elseif (B <= 1.16e-281) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 5.4e-71) tmp = t_0; elseif (B <= 1.3e+76) tmp = 180.0 * (atan((A / -B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -0.21], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.4e-240], t$95$0, If[LessEqual[B, 1.16e-281], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.4e-71], t$95$0, If[LessEqual[B, 1.3e+76], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -0.21:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.4 \cdot 10^{-240}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.16 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{-71}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -0.209999999999999992Initial program 46.2%
Taylor expanded in B around -inf 65.2%
if -0.209999999999999992 < B < -4.3999999999999999e-240 or 1.15999999999999999e-281 < B < 5.4000000000000003e-71Initial program 59.9%
Taylor expanded in B around inf 52.2%
Taylor expanded in C around inf 42.3%
if -4.3999999999999999e-240 < B < 1.15999999999999999e-281Initial program 58.0%
Taylor expanded in C around inf 53.7%
associate-*r/53.7%
distribute-rgt1-in53.7%
metadata-eval53.7%
mul0-lft53.7%
metadata-eval53.7%
Simplified53.7%
if 5.4000000000000003e-71 < B < 1.3e76Initial program 78.2%
Taylor expanded in B around inf 76.8%
Taylor expanded in A around inf 50.6%
associate-*r/50.6%
mul-1-neg50.6%
Simplified50.6%
if 1.3e76 < B Initial program 36.2%
Taylor expanded in B around inf 73.0%
Final simplification54.6%
(FPCore (A B C)
:precision binary64
(if (<= C -4.8e-251)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C -7e-294)
(* 180.0 (/ (atan (/ A (- B))) PI))
(if (<= C 7.4e-232)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 3.2e-39)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.8e-251) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= -7e-294) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else if (C <= 7.4e-232) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 3.2e-39) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.8e-251) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= -7e-294) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else if (C <= 7.4e-232) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 3.2e-39) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.8e-251: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= -7e-294: tmp = 180.0 * (math.atan((A / -B)) / math.pi) elif C <= 7.4e-232: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 3.2e-39: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.8e-251) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= -7e-294) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); elseif (C <= 7.4e-232) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 3.2e-39) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.8e-251) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= -7e-294) tmp = 180.0 * (atan((A / -B)) / pi); elseif (C <= 7.4e-232) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 3.2e-39) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.8e-251], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -7e-294], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.4e-232], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.2e-39], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.8 \cdot 10^{-251}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -7 \cdot 10^{-294}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.4 \cdot 10^{-232}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 3.2 \cdot 10^{-39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.79999999999999992e-251Initial program 76.0%
Taylor expanded in A around 0 70.2%
unpow270.2%
unpow270.2%
hypot-define83.8%
Simplified83.8%
Taylor expanded in B around -inf 67.2%
if -4.79999999999999992e-251 < C < -7.00000000000000064e-294Initial program 71.7%
Taylor expanded in B around inf 83.6%
Taylor expanded in A around inf 59.3%
associate-*r/59.3%
mul-1-neg59.3%
Simplified59.3%
if -7.00000000000000064e-294 < C < 7.39999999999999958e-232Initial program 49.3%
Taylor expanded in B around -inf 47.0%
if 7.39999999999999958e-232 < C < 3.1999999999999998e-39Initial program 45.4%
Taylor expanded in A around -inf 41.6%
associate-*r/41.6%
Simplified41.6%
div-inv41.6%
*-commutative41.6%
Applied egg-rr41.6%
Taylor expanded in B around 0 41.6%
if 3.1999999999999998e-39 < C Initial program 21.1%
Taylor expanded in A around 0 18.3%
unpow218.3%
unpow218.3%
hypot-define60.9%
Simplified60.9%
Taylor expanded in C around inf 67.1%
Final simplification61.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI))))
(if (<= C -1.05e-107)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 4.8e-286)
t_0
(if (<= C 2.85e-242)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 5.5e-26) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -1.05e-107) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 4.8e-286) {
tmp = t_0;
} else if (C <= 2.85e-242) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 5.5e-26) {
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.atan((-1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -1.05e-107) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 4.8e-286) {
tmp = t_0;
} else if (C <= 2.85e-242) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 5.5e-26) {
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.atan((-1.0 - (A / B))) / math.pi) tmp = 0 if C <= -1.05e-107: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 4.8e-286: tmp = t_0 elif C <= 2.85e-242: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 5.5e-26: 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(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -1.05e-107) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 4.8e-286) tmp = t_0; elseif (C <= 2.85e-242) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 5.5e-26) 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 * (atan((-1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -1.05e-107) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 4.8e-286) tmp = t_0; elseif (C <= 2.85e-242) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 5.5e-26) 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[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.05e-107], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.8e-286], t$95$0, If[LessEqual[C, 2.85e-242], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.5e-26], 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 := 180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.05 \cdot 10^{-107}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.8 \cdot 10^{-286}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 2.85 \cdot 10^{-242}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 5.5 \cdot 10^{-26}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.05e-107Initial program 79.5%
Taylor expanded in A around 0 74.2%
unpow274.2%
unpow274.2%
hypot-define85.9%
Simplified85.9%
Taylor expanded in B around -inf 73.9%
if -1.05e-107 < C < 4.79999999999999987e-286 or 2.85000000000000016e-242 < C < 5.5000000000000005e-26Initial program 52.9%
Taylor expanded in B around inf 55.4%
Taylor expanded in C around 0 54.3%
neg-mul-154.3%
distribute-neg-in54.3%
metadata-eval54.3%
unsub-neg54.3%
Simplified54.3%
if 4.79999999999999987e-286 < C < 2.85000000000000016e-242Initial program 51.4%
Taylor expanded in B around -inf 60.4%
if 5.5000000000000005e-26 < C Initial program 21.2%
Taylor expanded in A around 0 18.2%
unpow218.2%
unpow218.2%
hypot-define59.7%
Simplified59.7%
Taylor expanded in C around inf 68.5%
Final simplification65.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -3.4e-49)
t_0
(if (<= B -1.6e-97)
(*
180.0
(/ (atan (/ 1.0 (* A (- (/ 2.0 B) (/ (* C 2.0) (* B A)))))) PI))
(if (<= B 1e-164)
t_0
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -3.4e-49) {
tmp = t_0;
} else if (B <= -1.6e-97) {
tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / ((double) M_PI));
} else if (B <= 1e-164) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C / B) + (-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((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -3.4e-49) {
tmp = t_0;
} else if (B <= -1.6e-97) {
tmp = 180.0 * (Math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / Math.PI);
} else if (B <= 1e-164) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -3.4e-49: tmp = t_0 elif B <= -1.6e-97: tmp = 180.0 * (math.atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / math.pi) elif B <= 1e-164: tmp = t_0 else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -3.4e-49) tmp = t_0; elseif (B <= -1.6e-97) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(A * Float64(Float64(2.0 / B) - Float64(Float64(C * 2.0) / Float64(B * A)))))) / pi)); elseif (B <= 1e-164) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -3.4e-49) tmp = t_0; elseif (B <= -1.6e-97) tmp = 180.0 * (atan((1.0 / (A * ((2.0 / B) - ((C * 2.0) / (B * A)))))) / pi); elseif (B <= 1e-164) tmp = t_0; else tmp = 180.0 * (atan(((C / B) + (-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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.4e-49], t$95$0, If[LessEqual[B, -1.6e-97], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(A * N[(N[(2.0 / B), $MachinePrecision] - N[(N[(C * 2.0), $MachinePrecision] / N[(B * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1e-164], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -3.4 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-97}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{A \cdot \left(\frac{2}{B} - \frac{C \cdot 2}{B \cdot A}\right)}\right)}{\pi}\\
\mathbf{elif}\;B \leq 10^{-164}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.40000000000000005e-49 or -1.5999999999999999e-97 < B < 9.99999999999999962e-165Initial program 58.9%
Taylor expanded in B around -inf 63.9%
associate--l+63.9%
div-sub65.9%
Simplified65.9%
if -3.40000000000000005e-49 < B < -1.5999999999999999e-97Initial program 12.2%
associate--l-12.4%
+-commutative12.4%
unpow212.4%
unpow212.4%
hypot-undefine31.1%
associate-/r/31.3%
associate--r+46.2%
hypot-undefine12.2%
unpow212.2%
unpow212.2%
+-commutative12.2%
unpow212.2%
unpow212.2%
hypot-define46.2%
Applied egg-rr46.2%
Taylor expanded in A around -inf 71.6%
associate-*r*71.6%
mul-1-neg71.6%
associate-*r/71.6%
associate-*r/71.6%
metadata-eval71.6%
Simplified71.6%
if 9.99999999999999962e-165 < B Initial program 53.2%
Taylor expanded in B around inf 76.2%
Final simplification69.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -2.2e-49)
t_0
(if (<= B -5.6e-91)
(* (atan (* -0.5 (/ B C))) (/ 180.0 PI))
(if (<= B 1e-164)
t_0
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -2.2e-49) {
tmp = t_0;
} else if (B <= -5.6e-91) {
tmp = atan((-0.5 * (B / C))) * (180.0 / ((double) M_PI));
} else if (B <= 1e-164) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C / B) + (-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((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -2.2e-49) {
tmp = t_0;
} else if (B <= -5.6e-91) {
tmp = Math.atan((-0.5 * (B / C))) * (180.0 / Math.PI);
} else if (B <= 1e-164) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -2.2e-49: tmp = t_0 elif B <= -5.6e-91: tmp = math.atan((-0.5 * (B / C))) * (180.0 / math.pi) elif B <= 1e-164: tmp = t_0 else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -2.2e-49) tmp = t_0; elseif (B <= -5.6e-91) tmp = Float64(atan(Float64(-0.5 * Float64(B / C))) * Float64(180.0 / pi)); elseif (B <= 1e-164) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -2.2e-49) tmp = t_0; elseif (B <= -5.6e-91) tmp = atan((-0.5 * (B / C))) * (180.0 / pi); elseif (B <= 1e-164) tmp = t_0; else tmp = 180.0 * (atan(((C / B) + (-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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.2e-49], t$95$0, If[LessEqual[B, -5.6e-91], N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1e-164], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.2 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -5.6 \cdot 10^{-91}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;B \leq 10^{-164}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.1999999999999999e-49 or -5.6e-91 < B < 9.99999999999999962e-165Initial program 58.6%
Taylor expanded in B around -inf 63.5%
associate--l+63.5%
div-sub65.5%
Simplified65.5%
if -2.1999999999999999e-49 < B < -5.6e-91Initial program 13.1%
Taylor expanded in A around 0 13.8%
unpow213.8%
unpow213.8%
hypot-define43.6%
Simplified43.6%
associate-*r/43.5%
Applied egg-rr43.5%
Taylor expanded in C around -inf 13.8%
associate-*r/13.7%
*-commutative13.7%
associate-/l*13.7%
mul-1-neg13.7%
distribute-neg-frac213.7%
neg-mul-113.7%
unsub-neg13.7%
+-commutative13.7%
unpow213.7%
unpow213.7%
hypot-define43.5%
Simplified43.5%
Taylor expanded in C around inf 52.6%
if 9.99999999999999962e-165 < B Initial program 53.2%
Taylor expanded in B around inf 76.2%
Final simplification68.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -1.8e-49)
t_0
(if (<= B -1.65e-94)
(* 180.0 (/ (atan (/ 1.0 (+ 1.0 (/ (- A C) B)))) PI))
(if (<= B 1e-164)
t_0
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -1.8e-49) {
tmp = t_0;
} else if (B <= -1.65e-94) {
tmp = 180.0 * (atan((1.0 / (1.0 + ((A - C) / B)))) / ((double) M_PI));
} else if (B <= 1e-164) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C / B) + (-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((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -1.8e-49) {
tmp = t_0;
} else if (B <= -1.65e-94) {
tmp = 180.0 * (Math.atan((1.0 / (1.0 + ((A - C) / B)))) / Math.PI);
} else if (B <= 1e-164) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -1.8e-49: tmp = t_0 elif B <= -1.65e-94: tmp = 180.0 * (math.atan((1.0 / (1.0 + ((A - C) / B)))) / math.pi) elif B <= 1e-164: tmp = t_0 else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -1.8e-49) tmp = t_0; elseif (B <= -1.65e-94) tmp = Float64(180.0 * Float64(atan(Float64(1.0 / Float64(1.0 + Float64(Float64(A - C) / B)))) / pi)); elseif (B <= 1e-164) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -1.8e-49) tmp = t_0; elseif (B <= -1.65e-94) tmp = 180.0 * (atan((1.0 / (1.0 + ((A - C) / B)))) / pi); elseif (B <= 1e-164) tmp = t_0; else tmp = 180.0 * (atan(((C / B) + (-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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.8e-49], t$95$0, If[LessEqual[B, -1.65e-94], N[(180.0 * N[(N[ArcTan[N[(1.0 / N[(1.0 + N[(N[(A - C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1e-164], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.8 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -1.65 \cdot 10^{-94}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{1 + \frac{A - C}{B}}\right)}{\pi}\\
\mathbf{elif}\;B \leq 10^{-164}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.79999999999999985e-49 or -1.6500000000000001e-94 < B < 9.99999999999999962e-165Initial program 58.9%
Taylor expanded in B around -inf 63.9%
associate--l+63.9%
div-sub65.9%
Simplified65.9%
if -1.79999999999999985e-49 < B < -1.6500000000000001e-94Initial program 12.2%
associate--l-12.4%
+-commutative12.4%
unpow212.4%
unpow212.4%
hypot-undefine31.1%
associate-/r/31.3%
associate--r+46.2%
hypot-undefine12.2%
unpow212.2%
unpow212.2%
+-commutative12.2%
unpow212.2%
unpow212.2%
hypot-define46.2%
Applied egg-rr46.2%
Taylor expanded in B around -inf 51.5%
mul-1-neg51.5%
unsub-neg51.5%
Simplified51.5%
if 9.99999999999999962e-165 < B Initial program 53.2%
Taylor expanded in B around inf 76.2%
Final simplification69.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -0.36)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -8.5e-241)
t_0
(if (<= B 8.2e-283)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 5.2e-92) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double tmp;
if (B <= -0.36) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -8.5e-241) {
tmp = t_0;
} else if (B <= 8.2e-283) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 5.2e-92) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double tmp;
if (B <= -0.36) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -8.5e-241) {
tmp = t_0;
} else if (B <= 8.2e-283) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 5.2e-92) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) tmp = 0 if B <= -0.36: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -8.5e-241: tmp = t_0 elif B <= 8.2e-283: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 5.2e-92: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) tmp = 0.0 if (B <= -0.36) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -8.5e-241) tmp = t_0; elseif (B <= 8.2e-283) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 5.2e-92) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); tmp = 0.0; if (B <= -0.36) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -8.5e-241) tmp = t_0; elseif (B <= 8.2e-283) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 5.2e-92) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -0.36], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.5e-241], t$95$0, If[LessEqual[B, 8.2e-283], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.2e-92], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -0.36:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-241}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 8.2 \cdot 10^{-283}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-92}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -0.35999999999999999Initial program 46.2%
Taylor expanded in B around -inf 65.2%
if -0.35999999999999999 < B < -8.49999999999999974e-241 or 8.19999999999999973e-283 < B < 5.2e-92Initial program 60.4%
Taylor expanded in B around inf 52.2%
Taylor expanded in C around inf 43.8%
if -8.49999999999999974e-241 < B < 8.19999999999999973e-283Initial program 58.0%
Taylor expanded in C around inf 53.7%
associate-*r/53.7%
distribute-rgt1-in53.7%
metadata-eval53.7%
mul0-lft53.7%
metadata-eval53.7%
Simplified53.7%
if 5.2e-92 < B Initial program 53.2%
Taylor expanded in B around inf 54.6%
Final simplification52.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -1.8e-49)
t_0
(if (<= B -3.6e-91)
(* (atan (* -0.5 (/ B C))) (/ 180.0 PI))
(if (<= B 9.5e-92) t_0 (* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -1.8e-49) {
tmp = t_0;
} else if (B <= -3.6e-91) {
tmp = atan((-0.5 * (B / C))) * (180.0 / ((double) M_PI));
} else if (B <= 9.5e-92) {
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((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -1.8e-49) {
tmp = t_0;
} else if (B <= -3.6e-91) {
tmp = Math.atan((-0.5 * (B / C))) * (180.0 / Math.PI);
} else if (B <= 9.5e-92) {
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((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -1.8e-49: tmp = t_0 elif B <= -3.6e-91: tmp = math.atan((-0.5 * (B / C))) * (180.0 / math.pi) elif B <= 9.5e-92: 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(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -1.8e-49) tmp = t_0; elseif (B <= -3.6e-91) tmp = Float64(atan(Float64(-0.5 * Float64(B / C))) * Float64(180.0 / pi)); elseif (B <= 9.5e-92) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -1.8e-49) tmp = t_0; elseif (B <= -3.6e-91) tmp = atan((-0.5 * (B / C))) * (180.0 / pi); elseif (B <= 9.5e-92) 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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.8e-49], t$95$0, If[LessEqual[B, -3.6e-91], N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.5e-92], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.8 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -3.6 \cdot 10^{-91}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-92}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.79999999999999985e-49 or -3.6e-91 < B < 9.49999999999999946e-92Initial program 58.2%
Taylor expanded in B around -inf 62.8%
associate--l+62.8%
div-sub64.6%
Simplified64.6%
if -1.79999999999999985e-49 < B < -3.6e-91Initial program 13.1%
Taylor expanded in A around 0 13.8%
unpow213.8%
unpow213.8%
hypot-define43.6%
Simplified43.6%
associate-*r/43.5%
Applied egg-rr43.5%
Taylor expanded in C around -inf 13.8%
associate-*r/13.7%
*-commutative13.7%
associate-/l*13.7%
mul-1-neg13.7%
distribute-neg-frac213.7%
neg-mul-113.7%
unsub-neg13.7%
+-commutative13.7%
unpow213.7%
unpow213.7%
hypot-define43.5%
Simplified43.5%
Taylor expanded in C around inf 52.6%
if 9.49999999999999946e-92 < B Initial program 53.2%
Taylor expanded in B around inf 79.2%
Taylor expanded in C around 0 71.6%
neg-mul-171.6%
distribute-neg-in71.6%
metadata-eval71.6%
unsub-neg71.6%
Simplified71.6%
Final simplification66.4%
(FPCore (A B C)
:precision binary64
(if (<= B -7.2e-50)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.8e-112)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7.2e-50) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.8e-112) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -7.2e-50) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.8e-112) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7.2e-50: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.8e-112: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7.2e-50) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.8e-112) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -7.2e-50) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.8e-112) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7.2e-50], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-112], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -7.2 \cdot 10^{-50}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-112}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -7.19999999999999958e-50Initial program 50.1%
Taylor expanded in B around -inf 56.4%
if -7.19999999999999958e-50 < B < 4.8000000000000001e-112Initial program 58.4%
Taylor expanded in C around inf 31.5%
associate-*r/31.5%
distribute-rgt1-in31.5%
metadata-eval31.5%
mul0-lft31.5%
metadata-eval31.5%
Simplified31.5%
if 4.8000000000000001e-112 < B Initial program 54.4%
Taylor expanded in B around inf 53.7%
Final simplification45.5%
(FPCore (A B C) :precision binary64 (if (<= B -2e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.999999999999994e-310Initial program 54.9%
Taylor expanded in B around -inf 37.0%
if -1.999999999999994e-310 < B Initial program 54.8%
Taylor expanded in B around inf 39.5%
Final simplification38.3%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 54.8%
Taylor expanded in B around inf 20.6%
Final simplification20.6%
herbie shell --seed 2024077
(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)))