
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -0.5) (not (<= t_0 5e-8)))
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))
(/ (* 180.0 (atan (/ 1.0 (+ (* 2.0 (/ A B)) (* -2.0 (/ C B)))))) PI))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 5e-8)) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 5e-8)) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -0.5) or not (t_0 <= 5e-8): tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = (180.0 * math.atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -0.5) || !(t_0 <= 5e-8)) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(2.0 * Float64(A / B)) + Float64(-2.0 * Float64(C / B)))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -0.5) || ~((t_0 <= 5e-8))) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = (180.0 * atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 5e-8]], $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[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 5 \cdot 10^{-8}\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{2 \cdot \frac{A}{B} + -2 \cdot \frac{C}{B}}\right)}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5 or 4.9999999999999998e-8 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 57.2%
associate-*l/57.2%
*-lft-identity57.2%
+-commutative57.2%
unpow257.2%
unpow257.2%
hypot-def85.7%
Simplified85.7%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 4.9999999999999998e-8Initial program 11.3%
associate-*r/11.3%
unpow211.3%
Simplified11.3%
associate-*l/11.3%
*-un-lft-identity11.3%
associate--l-7.2%
+-commutative7.2%
unpow27.2%
hypot-udef7.2%
clear-num7.2%
Applied egg-rr7.2%
Taylor expanded in A around -inf 97.3%
Final simplification87.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))))
(if (<= A -1.96e+217)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -3.4e+142)
t_0
(if (<= A -2.15e+33)
(/ (* 180.0 (atan (/ 1.0 (+ (* 2.0 (/ A B)) (* -2.0 (/ C B)))))) PI)
(if (<= A 0.0011)
t_0
(/ (* 180.0 (atan (/ 1.0 (/ B (- (- C B) A))))) 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.96e+217) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -3.4e+142) {
tmp = t_0;
} else if (A <= -2.15e+33) {
tmp = (180.0 * atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / ((double) M_PI);
} else if (A <= 0.0011) {
tmp = t_0;
} else {
tmp = (180.0 * atan((1.0 / (B / ((C - B) - A))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
double tmp;
if (A <= -1.96e+217) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -3.4e+142) {
tmp = t_0;
} else if (A <= -2.15e+33) {
tmp = (180.0 * Math.atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / Math.PI;
} else if (A <= 0.0011) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((1.0 / (B / ((C - B) - A))))) / 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.96e+217: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -3.4e+142: tmp = t_0 elif A <= -2.15e+33: tmp = (180.0 * math.atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / math.pi elif A <= 0.0011: tmp = t_0 else: tmp = (180.0 * math.atan((1.0 / (B / ((C - B) - A))))) / 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.96e+217) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -3.4e+142) tmp = t_0; elseif (A <= -2.15e+33) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(2.0 * Float64(A / B)) + Float64(-2.0 * Float64(C / B)))))) / pi); elseif (A <= 0.0011) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(B / Float64(Float64(C - B) - A))))) / 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.96e+217) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -3.4e+142) tmp = t_0; elseif (A <= -2.15e+33) tmp = (180.0 * atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / pi; elseif (A <= 0.0011) tmp = t_0; else tmp = (180.0 * atan((1.0 / (B / ((C - B) - A))))) / 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.96e+217], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.4e+142], t$95$0, If[LessEqual[A, -2.15e+33], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 0.0011], t$95$0, N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(B / N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.96 \cdot 10^{+217}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.4 \cdot 10^{+142}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.15 \cdot 10^{+33}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{2 \cdot \frac{A}{B} + -2 \cdot \frac{C}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 0.0011:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{B}{\left(C - B\right) - A}}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.96000000000000005e217Initial program 5.9%
associate-*l/5.9%
*-lft-identity5.9%
+-commutative5.9%
unpow25.9%
unpow25.9%
hypot-def53.8%
Simplified53.8%
Taylor expanded in A around -inf 85.2%
if -1.96000000000000005e217 < A < -3.3999999999999998e142 or -2.15000000000000014e33 < A < 0.00110000000000000007Initial program 49.7%
associate-*l/49.7%
*-lft-identity49.7%
+-commutative49.7%
unpow249.7%
unpow249.7%
hypot-def73.5%
Simplified73.5%
Taylor expanded in A around 0 49.1%
unpow249.1%
unpow249.1%
hypot-def71.7%
Simplified71.7%
if -3.3999999999999998e142 < A < -2.15000000000000014e33Initial program 33.8%
associate-*r/33.8%
unpow233.8%
Simplified33.8%
associate-*l/33.8%
*-un-lft-identity33.8%
associate--l-25.7%
+-commutative25.7%
unpow225.7%
hypot-udef37.7%
clear-num37.7%
Applied egg-rr37.7%
Taylor expanded in A around -inf 66.7%
if 0.00110000000000000007 < A Initial program 76.6%
associate-*r/76.6%
unpow276.6%
Simplified76.6%
associate-*l/76.6%
*-un-lft-identity76.6%
associate--l-76.6%
+-commutative76.6%
unpow276.6%
hypot-udef94.8%
clear-num94.8%
Applied egg-rr94.8%
Taylor expanded in B around inf 83.2%
mul-1-neg83.2%
unsub-neg83.2%
Simplified83.2%
Final simplification75.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (- C (hypot B C)) B))))
(if (<= A -1.96e+217)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -3e+142)
(* 180.0 (/ t_0 PI))
(if (<= A -9.2e+32)
(/ (* 180.0 (atan (/ 1.0 (+ (* 2.0 (/ A B)) (* -2.0 (/ C B)))))) PI)
(if (<= A 0.00135)
(/ (* 180.0 t_0) PI)
(/ (* 180.0 (atan (/ 1.0 (/ B (- (- C B) A))))) PI)))))))
double code(double A, double B, double C) {
double t_0 = atan(((C - hypot(B, C)) / B));
double tmp;
if (A <= -1.96e+217) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -3e+142) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -9.2e+32) {
tmp = (180.0 * atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / ((double) M_PI);
} else if (A <= 0.00135) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else {
tmp = (180.0 * atan((1.0 / (B / ((C - B) - A))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((C - Math.hypot(B, C)) / B));
double tmp;
if (A <= -1.96e+217) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -3e+142) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -9.2e+32) {
tmp = (180.0 * Math.atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / Math.PI;
} else if (A <= 0.00135) {
tmp = (180.0 * t_0) / Math.PI;
} else {
tmp = (180.0 * Math.atan((1.0 / (B / ((C - B) - A))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((C - math.hypot(B, C)) / B)) tmp = 0 if A <= -1.96e+217: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -3e+142: tmp = 180.0 * (t_0 / math.pi) elif A <= -9.2e+32: tmp = (180.0 * math.atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / math.pi elif A <= 0.00135: tmp = (180.0 * t_0) / math.pi else: tmp = (180.0 * math.atan((1.0 / (B / ((C - B) - A))))) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(C - hypot(B, C)) / B)) tmp = 0.0 if (A <= -1.96e+217) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -3e+142) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -9.2e+32) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(Float64(2.0 * Float64(A / B)) + Float64(-2.0 * Float64(C / B)))))) / pi); elseif (A <= 0.00135) tmp = Float64(Float64(180.0 * t_0) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(B / Float64(Float64(C - B) - A))))) / 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 <= -1.96e+217) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -3e+142) tmp = 180.0 * (t_0 / pi); elseif (A <= -9.2e+32) tmp = (180.0 * atan((1.0 / ((2.0 * (A / B)) + (-2.0 * (C / B)))))) / pi; elseif (A <= 0.00135) tmp = (180.0 * t_0) / pi; else tmp = (180.0 * atan((1.0 / (B / ((C - B) - A))))) / 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, -1.96e+217], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3e+142], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.2e+32], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(N[(2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 0.00135], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(B / N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -1.96 \cdot 10^{+217}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3 \cdot 10^{+142}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{elif}\;A \leq -9.2 \cdot 10^{+32}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{2 \cdot \frac{A}{B} + -2 \cdot \frac{C}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 0.00135:\\
\;\;\;\;\frac{180 \cdot t_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{B}{\left(C - B\right) - A}}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.96000000000000005e217Initial program 5.9%
associate-*l/5.9%
*-lft-identity5.9%
+-commutative5.9%
unpow25.9%
unpow25.9%
hypot-def53.8%
Simplified53.8%
Taylor expanded in A around -inf 85.2%
if -1.96000000000000005e217 < A < -2.99999999999999975e142Initial program 23.5%
associate-*l/23.5%
*-lft-identity23.5%
+-commutative23.5%
unpow223.5%
unpow223.5%
hypot-def70.2%
Simplified70.2%
Taylor expanded in A around 0 29.6%
unpow229.6%
unpow229.6%
hypot-def63.2%
Simplified63.2%
if -2.99999999999999975e142 < A < -9.1999999999999998e32Initial program 33.8%
associate-*r/33.8%
unpow233.8%
Simplified33.8%
associate-*l/33.8%
*-un-lft-identity33.8%
associate--l-25.7%
+-commutative25.7%
unpow225.7%
hypot-udef37.7%
clear-num37.7%
Applied egg-rr37.7%
Taylor expanded in A around -inf 66.7%
if -9.1999999999999998e32 < A < 0.0013500000000000001Initial program 52.7%
associate-*r/52.7%
unpow252.7%
Simplified52.7%
associate-*l/52.7%
*-un-lft-identity52.7%
associate--l-52.7%
+-commutative52.7%
unpow252.7%
hypot-udef73.8%
clear-num73.8%
Applied egg-rr73.8%
Taylor expanded in A around 0 51.4%
unpow251.4%
unpow251.4%
hypot-def72.7%
Simplified72.7%
if 0.0013500000000000001 < A Initial program 76.6%
associate-*r/76.6%
unpow276.6%
Simplified76.6%
associate-*l/76.6%
*-un-lft-identity76.6%
associate--l-76.6%
+-commutative76.6%
unpow276.6%
hypot-udef94.8%
clear-num94.8%
Applied egg-rr94.8%
Taylor expanded in B around inf 83.2%
mul-1-neg83.2%
unsub-neg83.2%
Simplified83.2%
Final simplification75.1%
(FPCore (A B C)
:precision binary64
(if (<= C -1.8e-14)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 1400000000.0)
(* 180.0 (/ (atan (/ (- (- (hypot A B)) A) B)) PI))
(* (/ 180.0 PI) (atan (/ -0.5 (- (/ C B) (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.8e-14) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 1400000000.0) {
tmp = 180.0 * (atan(((-hypot(A, B) - A) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 / ((C / B) - (A / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.8e-14) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 1400000000.0) {
tmp = 180.0 * (Math.atan(((-Math.hypot(A, B) - A) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 / ((C / B) - (A / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.8e-14: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 1400000000.0: tmp = 180.0 * (math.atan(((-math.hypot(A, B) - A) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-0.5 / ((C / B) - (A / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.8e-14) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 1400000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-hypot(A, B)) - A) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 / Float64(Float64(C / B) - Float64(A / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.8e-14) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 1400000000.0) tmp = 180.0 * (atan(((-hypot(A, B) - A) / B)) / pi); else tmp = (180.0 / pi) * atan((-0.5 / ((C / B) - (A / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.8e-14], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1400000000.0], N[(180.0 * N[(N[ArcTan[N[(N[((-N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]) - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 / N[(N[(C / B), $MachinePrecision] - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.8 \cdot 10^{-14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1400000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-\mathsf{hypot}\left(A, B\right)\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5}{\frac{C}{B} - \frac{A}{B}}\right)\\
\end{array}
\end{array}
if C < -1.7999999999999999e-14Initial program 80.2%
associate-*l/80.2%
*-lft-identity80.2%
+-commutative80.2%
unpow280.2%
unpow280.2%
hypot-def95.7%
Simplified95.7%
Taylor expanded in A around 0 77.8%
unpow277.8%
unpow277.8%
hypot-def87.9%
Simplified87.9%
if -1.7999999999999999e-14 < C < 1.4e9Initial program 50.4%
associate-*l/50.4%
*-lft-identity50.4%
+-commutative50.4%
unpow250.4%
unpow250.4%
hypot-def75.9%
Simplified75.9%
Taylor expanded in C around 0 49.5%
mul-1-neg49.5%
+-commutative49.5%
unpow249.5%
unpow249.5%
hypot-def75.0%
Simplified75.0%
if 1.4e9 < C Initial program 18.3%
associate-*r/18.3%
unpow218.3%
Simplified18.3%
associate-*l/18.3%
*-un-lft-identity18.3%
associate--l-18.2%
+-commutative18.2%
unpow218.2%
hypot-udef45.3%
clear-num45.3%
Applied egg-rr45.3%
Taylor expanded in A around -inf 75.4%
Taylor expanded in A around 0 75.2%
associate-*r/75.4%
+-commutative75.4%
metadata-eval75.4%
cancel-sign-sub-inv75.4%
cancel-sign-sub-inv75.4%
metadata-eval75.4%
+-commutative75.4%
*-commutative75.4%
fma-udef75.4%
Simplified75.5%
Final simplification78.5%
(FPCore (A B C)
:precision binary64
(if (<= C -2e-13)
(/ (* 180.0 (atan (/ 1.0 (/ B (- C (hypot B C)))))) PI)
(if (<= C 130000000.0)
(* 180.0 (/ (atan (/ (- (- (hypot A B)) A) B)) PI))
(* (/ 180.0 PI) (atan (/ -0.5 (- (/ C B) (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2e-13) {
tmp = (180.0 * atan((1.0 / (B / (C - hypot(B, C)))))) / ((double) M_PI);
} else if (C <= 130000000.0) {
tmp = 180.0 * (atan(((-hypot(A, B) - A) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 / ((C / B) - (A / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2e-13) {
tmp = (180.0 * Math.atan((1.0 / (B / (C - Math.hypot(B, C)))))) / Math.PI;
} else if (C <= 130000000.0) {
tmp = 180.0 * (Math.atan(((-Math.hypot(A, B) - A) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 / ((C / B) - (A / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2e-13: tmp = (180.0 * math.atan((1.0 / (B / (C - math.hypot(B, C)))))) / math.pi elif C <= 130000000.0: tmp = 180.0 * (math.atan(((-math.hypot(A, B) - A) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-0.5 / ((C / B) - (A / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2e-13) tmp = Float64(Float64(180.0 * atan(Float64(1.0 / Float64(B / Float64(C - hypot(B, C)))))) / pi); elseif (C <= 130000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-hypot(A, B)) - A) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 / Float64(Float64(C / B) - Float64(A / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2e-13) tmp = (180.0 * atan((1.0 / (B / (C - hypot(B, C)))))) / pi; elseif (C <= 130000000.0) tmp = 180.0 * (atan(((-hypot(A, B) - A) / B)) / pi); else tmp = (180.0 / pi) * atan((-0.5 / ((C / B) - (A / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2e-13], N[(N[(180.0 * N[ArcTan[N[(1.0 / N[(B / N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 130000000.0], N[(180.0 * N[(N[ArcTan[N[(N[((-N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]) - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 / N[(N[(C / B), $MachinePrecision] - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2 \cdot 10^{-13}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{1}{\frac{B}{C - \mathsf{hypot}\left(B, C\right)}}\right)}{\pi}\\
\mathbf{elif}\;C \leq 130000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-\mathsf{hypot}\left(A, B\right)\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5}{\frac{C}{B} - \frac{A}{B}}\right)\\
\end{array}
\end{array}
if C < -2.0000000000000001e-13Initial program 80.2%
associate-*r/80.2%
unpow280.2%
Simplified80.2%
associate-*l/80.2%
*-un-lft-identity80.2%
associate--l-80.2%
+-commutative80.2%
unpow280.2%
hypot-udef91.3%
clear-num91.4%
Applied egg-rr91.4%
Taylor expanded in A around 0 77.8%
unpow277.8%
unpow277.8%
hypot-def87.9%
Simplified87.9%
if -2.0000000000000001e-13 < C < 1.3e8Initial program 50.4%
associate-*l/50.4%
*-lft-identity50.4%
+-commutative50.4%
unpow250.4%
unpow250.4%
hypot-def75.9%
Simplified75.9%
Taylor expanded in C around 0 49.5%
mul-1-neg49.5%
+-commutative49.5%
unpow249.5%
unpow249.5%
hypot-def75.0%
Simplified75.0%
if 1.3e8 < C Initial program 18.3%
associate-*r/18.3%
unpow218.3%
Simplified18.3%
associate-*l/18.3%
*-un-lft-identity18.3%
associate--l-18.2%
+-commutative18.2%
unpow218.2%
hypot-udef45.3%
clear-num45.3%
Applied egg-rr45.3%
Taylor expanded in A around -inf 75.4%
Taylor expanded in A around 0 75.2%
associate-*r/75.4%
+-commutative75.4%
metadata-eval75.4%
cancel-sign-sub-inv75.4%
cancel-sign-sub-inv75.4%
metadata-eval75.4%
+-commutative75.4%
*-commutative75.4%
fma-udef75.4%
Simplified75.5%
Final simplification78.5%
(FPCore (A B C)
:precision binary64
(if (<= C -4.1e+121)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= C 5.9e-149)
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
(if (or (<= C 5e-107) (not (<= C 45000000.0)))
(* (/ 180.0 PI) (atan (/ -0.5 (- (/ C B) (/ A B)))))
(* (/ 180.0 PI) (atan (/ (- (- B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.1e+121) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (C <= 5.9e-149) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
} else if ((C <= 5e-107) || !(C <= 45000000.0)) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 / ((C / B) - (A / B))));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((-B - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.1e+121) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (C <= 5.9e-149) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
} else if ((C <= 5e-107) || !(C <= 45000000.0)) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 / ((C / B) - (A / B))));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((-B - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.1e+121: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif C <= 5.9e-149: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) elif (C <= 5e-107) or not (C <= 45000000.0): tmp = (180.0 / math.pi) * math.atan((-0.5 / ((C / B) - (A / B)))) else: tmp = (180.0 / math.pi) * math.atan(((-B - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.1e+121) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (C <= 5.9e-149) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); elseif ((C <= 5e-107) || !(C <= 45000000.0)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 / Float64(Float64(C / B) - Float64(A / B))))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(-B) - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.1e+121) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (C <= 5.9e-149) tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); elseif ((C <= 5e-107) || ~((C <= 45000000.0))) tmp = (180.0 / pi) * atan((-0.5 / ((C / B) - (A / B)))); else tmp = (180.0 / pi) * atan(((-B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.1e+121], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 5.9e-149], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 5e-107], N[Not[LessEqual[C, 45000000.0]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 / N[(N[(C / B), $MachinePrecision] - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-B) - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.1 \cdot 10^{+121}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.9 \cdot 10^{-149}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{elif}\;C \leq 5 \cdot 10^{-107} \lor \neg \left(C \leq 45000000\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5}{\frac{C}{B} - \frac{A}{B}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(-B\right) - A}{B}\right)\\
\end{array}
\end{array}
if C < -4.1e121Initial program 79.9%
associate-*r/79.9%
unpow279.9%
Simplified79.9%
associate-*l/79.9%
*-un-lft-identity79.9%
associate--l-79.9%
+-commutative79.9%
unpow279.9%
hypot-udef88.2%
clear-num88.2%
Applied egg-rr88.2%
Taylor expanded in A around 0 79.9%
unpow279.9%
unpow279.9%
hypot-def88.2%
Simplified88.2%
Taylor expanded in B around -inf 86.1%
if -4.1e121 < C < 5.9000000000000002e-149Initial program 57.8%
associate-*r/57.8%
associate-*l/57.8%
associate-*l/57.8%
*-lft-identity57.8%
sub-neg57.8%
associate-+l-56.4%
sub-neg56.4%
remove-double-neg56.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-def79.8%
Simplified79.8%
Taylor expanded in B around inf 61.3%
if 5.9000000000000002e-149 < C < 4.99999999999999971e-107 or 4.5e7 < C Initial program 22.0%
associate-*r/22.0%
unpow222.0%
Simplified22.0%
associate-*l/22.0%
*-un-lft-identity22.0%
associate--l-21.9%
+-commutative21.9%
unpow221.9%
hypot-udef45.2%
clear-num45.2%
Applied egg-rr45.2%
Taylor expanded in A around -inf 72.9%
Taylor expanded in A around 0 72.7%
associate-*r/72.9%
+-commutative72.9%
metadata-eval72.9%
cancel-sign-sub-inv72.9%
cancel-sign-sub-inv72.9%
metadata-eval72.9%
+-commutative72.9%
*-commutative72.9%
fma-udef72.9%
Simplified72.9%
if 4.99999999999999971e-107 < C < 4.5e7Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
associate-*l/54.8%
*-lft-identity54.8%
sub-neg54.8%
associate-+l-54.8%
sub-neg54.8%
remove-double-neg54.8%
+-commutative54.8%
unpow254.8%
unpow254.8%
hypot-def69.5%
Simplified69.5%
Taylor expanded in B around inf 55.5%
Taylor expanded in C around 0 56.0%
associate-*r/56.0%
neg-mul-156.0%
distribute-neg-in56.0%
sub-neg56.0%
Simplified56.0%
Final simplification68.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -9.5e-172)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -3.6e-275)
t_0
(if (<= A 3.6e-252)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= A 2e-107) t_0 (* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -9.5e-172) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -3.6e-275) {
tmp = t_0;
} else if (A <= 3.6e-252) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (A <= 2e-107) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (A <= -9.5e-172) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -3.6e-275) {
tmp = t_0;
} else if (A <= 3.6e-252) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (A <= 2e-107) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -9.5e-172: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -3.6e-275: tmp = t_0 elif A <= 3.6e-252: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif A <= 2e-107: tmp = t_0 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -9.5e-172) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -3.6e-275) tmp = t_0; elseif (A <= 3.6e-252) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (A <= 2e-107) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -9.5e-172) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -3.6e-275) tmp = t_0; elseif (A <= 3.6e-252) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (A <= 2e-107) tmp = t_0; else tmp = 180.0 * (atan(((A * -2.0) / B)) / 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[A, -9.5e-172], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.6e-275], t$95$0, If[LessEqual[A, 3.6e-252], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e-107], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -9.5 \cdot 10^{-172}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.6 \cdot 10^{-275}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.6 \cdot 10^{-252}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-107}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.50000000000000053e-172Initial program 29.6%
associate-*l/29.6%
*-lft-identity29.6%
+-commutative29.6%
unpow229.6%
unpow229.6%
hypot-def60.7%
Simplified60.7%
Taylor expanded in A around -inf 51.8%
if -9.50000000000000053e-172 < A < -3.5999999999999997e-275 or 3.60000000000000023e-252 < A < 2e-107Initial program 51.0%
associate-*l/51.0%
*-lft-identity51.0%
+-commutative51.0%
unpow251.0%
unpow251.0%
hypot-def73.4%
Simplified73.4%
Taylor expanded in B around inf 48.6%
if -3.5999999999999997e-275 < A < 3.60000000000000023e-252Initial program 55.9%
associate-*l/55.9%
*-lft-identity55.9%
+-commutative55.9%
unpow255.9%
unpow255.9%
hypot-def77.3%
Simplified77.3%
Taylor expanded in C around -inf 37.7%
if 2e-107 < A Initial program 74.7%
associate-*l/74.7%
*-lft-identity74.7%
+-commutative74.7%
unpow274.7%
unpow274.7%
hypot-def91.2%
Simplified91.2%
Taylor expanded in A around inf 64.0%
*-commutative64.0%
Simplified64.0%
Final simplification53.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -4.6e-185)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(if (<= C 6.2e-173)
t_0
(if (<= C 2.4e-120)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= C 8.8e-97) 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 <= -4.6e-185) {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
} else if (C <= 6.2e-173) {
tmp = t_0;
} else if (C <= 2.4e-120) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (C <= 8.8e-97) {
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 <= -4.6e-185) {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
} else if (C <= 6.2e-173) {
tmp = t_0;
} else if (C <= 2.4e-120) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (C <= 8.8e-97) {
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 <= -4.6e-185: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi elif C <= 6.2e-173: tmp = t_0 elif C <= 2.4e-120: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif C <= 8.8e-97: 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 <= -4.6e-185) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); elseif (C <= 6.2e-173) tmp = t_0; elseif (C <= 2.4e-120) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (C <= 8.8e-97) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -4.6e-185) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; elseif (C <= 6.2e-173) tmp = t_0; elseif (C <= 2.4e-120) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (C <= 8.8e-97) 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, -4.6e-185], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 6.2e-173], t$95$0, If[LessEqual[C, 2.4e-120], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.8e-97], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 -4.6 \cdot 10^{-185}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.2 \cdot 10^{-173}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 2.4 \cdot 10^{-120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.8 \cdot 10^{-97}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.6000000000000002e-185Initial program 68.0%
associate-*r/68.0%
unpow268.0%
Simplified68.0%
associate-*l/68.0%
*-un-lft-identity68.0%
associate--l-66.9%
+-commutative66.9%
unpow266.9%
hypot-udef86.0%
clear-num86.0%
Applied egg-rr86.0%
Taylor expanded in A around 0 65.3%
unpow265.3%
unpow265.3%
hypot-def82.5%
Simplified82.5%
Taylor expanded in B around inf 67.6%
if -4.6000000000000002e-185 < C < 6.20000000000000011e-173 or 2.3999999999999999e-120 < C < 8.7999999999999996e-97Initial program 61.6%
associate-*l/61.6%
*-lft-identity61.6%
+-commutative61.6%
unpow261.6%
unpow261.6%
hypot-def77.1%
Simplified77.1%
div-sub76.0%
sub-neg76.0%
Applied egg-rr76.0%
sub-neg76.0%
Simplified76.0%
Taylor expanded in C around 0 60.7%
mul-1-neg60.7%
associate-*r/60.6%
*-rgt-identity60.6%
+-commutative60.6%
unpow260.6%
unpow260.6%
hypot-def76.1%
Simplified76.1%
Taylor expanded in B around -inf 54.2%
if 6.20000000000000011e-173 < C < 2.3999999999999999e-120Initial program 25.9%
associate-*l/25.9%
*-lft-identity25.9%
+-commutative25.9%
unpow225.9%
unpow225.9%
hypot-def58.2%
Simplified58.2%
Taylor expanded in A around -inf 43.9%
if 8.7999999999999996e-97 < C Initial program 25.8%
associate-*r/25.8%
unpow225.8%
Simplified25.8%
associate-*l/25.8%
*-un-lft-identity25.8%
associate--l-25.8%
+-commutative25.8%
unpow225.8%
hypot-udef50.3%
clear-num50.3%
Applied egg-rr50.3%
Taylor expanded in A around 0 19.7%
unpow219.7%
unpow219.7%
hypot-def41.4%
Simplified41.4%
Taylor expanded in B around 0 64.6%
Final simplification62.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -3.4e-172)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -6.8e-276)
t_0
(if (<= A 1.2e-249)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= A 1.6e-109) t_0 (* (/ 180.0 PI) (atan (- (/ A B))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -3.4e-172) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -6.8e-276) {
tmp = t_0;
} else if (A <= 1.2e-249) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (A <= 1.6e-109) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-(A / B));
}
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 (A <= -3.4e-172) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -6.8e-276) {
tmp = t_0;
} else if (A <= 1.2e-249) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (A <= 1.6e-109) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-(A / B));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -3.4e-172: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -6.8e-276: tmp = t_0 elif A <= 1.2e-249: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif A <= 1.6e-109: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(-(A / B)) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -3.4e-172) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -6.8e-276) tmp = t_0; elseif (A <= 1.2e-249) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (A <= 1.6e-109) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -3.4e-172) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -6.8e-276) tmp = t_0; elseif (A <= 1.2e-249) tmp = 180.0 * (atan((C / B)) / pi); elseif (A <= 1.6e-109) tmp = t_0; else tmp = (180.0 / pi) * atan(-(A / B)); 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[A, -3.4e-172], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6.8e-276], t$95$0, If[LessEqual[A, 1.2e-249], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.6e-109], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -3.4 \cdot 10^{-172}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -6.8 \cdot 10^{-276}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{-249}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.6 \cdot 10^{-109}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-\frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -3.3999999999999999e-172Initial program 29.6%
associate-*l/29.6%
*-lft-identity29.6%
+-commutative29.6%
unpow229.6%
unpow229.6%
hypot-def60.7%
Simplified60.7%
Taylor expanded in A around -inf 51.8%
if -3.3999999999999999e-172 < A < -6.79999999999999984e-276 or 1.20000000000000006e-249 < A < 1.6000000000000001e-109Initial program 51.0%
associate-*l/51.0%
*-lft-identity51.0%
+-commutative51.0%
unpow251.0%
unpow251.0%
hypot-def73.4%
Simplified73.4%
Taylor expanded in B around inf 48.6%
if -6.79999999999999984e-276 < A < 1.20000000000000006e-249Initial program 55.9%
associate-*r/55.9%
associate-*l/55.9%
associate-*l/55.9%
*-lft-identity55.9%
sub-neg55.9%
associate-+l-55.9%
sub-neg55.9%
remove-double-neg55.9%
+-commutative55.9%
unpow255.9%
unpow255.9%
hypot-def77.3%
Simplified77.3%
+-commutative77.3%
add-sqr-sqrt73.2%
fma-def73.2%
Applied egg-rr73.2%
Taylor expanded in C around inf 37.7%
Taylor expanded in C around 0 37.7%
if 1.6000000000000001e-109 < A Initial program 74.7%
associate-*r/74.7%
associate-*l/74.7%
associate-*l/74.7%
*-lft-identity74.7%
sub-neg74.7%
associate-+l-74.7%
sub-neg74.7%
remove-double-neg74.7%
+-commutative74.7%
unpow274.7%
unpow274.7%
hypot-def91.1%
Simplified91.1%
+-commutative91.1%
add-sqr-sqrt89.5%
fma-def89.5%
Applied egg-rr89.5%
Taylor expanded in A around inf 64.0%
mul-1-neg64.0%
Simplified64.0%
Final simplification53.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -3.2e-173)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -2.45e-275)
t_0
(if (<= A 2.4e-249)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= A 3.2e-113) t_0 (* (/ 180.0 PI) (atan (- (/ A B))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -3.2e-173) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -2.45e-275) {
tmp = t_0;
} else if (A <= 2.4e-249) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (A <= 3.2e-113) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-(A / B));
}
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 (A <= -3.2e-173) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -2.45e-275) {
tmp = t_0;
} else if (A <= 2.4e-249) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (A <= 3.2e-113) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-(A / B));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -3.2e-173: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -2.45e-275: tmp = t_0 elif A <= 2.4e-249: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif A <= 3.2e-113: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(-(A / B)) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -3.2e-173) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -2.45e-275) tmp = t_0; elseif (A <= 2.4e-249) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (A <= 3.2e-113) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -3.2e-173) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -2.45e-275) tmp = t_0; elseif (A <= 2.4e-249) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (A <= 3.2e-113) tmp = t_0; else tmp = (180.0 / pi) * atan(-(A / B)); 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[A, -3.2e-173], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.45e-275], t$95$0, If[LessEqual[A, 2.4e-249], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.2e-113], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -3.2 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.45 \cdot 10^{-275}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 2.4 \cdot 10^{-249}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-113}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-\frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -3.2e-173Initial program 29.6%
associate-*l/29.6%
*-lft-identity29.6%
+-commutative29.6%
unpow229.6%
unpow229.6%
hypot-def60.7%
Simplified60.7%
Taylor expanded in A around -inf 51.8%
if -3.2e-173 < A < -2.44999999999999991e-275 or 2.40000000000000013e-249 < A < 3.2000000000000002e-113Initial program 51.0%
associate-*l/51.0%
*-lft-identity51.0%
+-commutative51.0%
unpow251.0%
unpow251.0%
hypot-def73.4%
Simplified73.4%
Taylor expanded in B around inf 48.6%
if -2.44999999999999991e-275 < A < 2.40000000000000013e-249Initial program 55.9%
associate-*l/55.9%
*-lft-identity55.9%
+-commutative55.9%
unpow255.9%
unpow255.9%
hypot-def77.3%
Simplified77.3%
Taylor expanded in C around -inf 37.7%
if 3.2000000000000002e-113 < A Initial program 74.7%
associate-*r/74.7%
associate-*l/74.7%
associate-*l/74.7%
*-lft-identity74.7%
sub-neg74.7%
associate-+l-74.7%
sub-neg74.7%
remove-double-neg74.7%
+-commutative74.7%
unpow274.7%
unpow274.7%
hypot-def91.1%
Simplified91.1%
+-commutative91.1%
add-sqr-sqrt89.5%
fma-def89.5%
Applied egg-rr89.5%
Taylor expanded in A around inf 64.0%
mul-1-neg64.0%
Simplified64.0%
Final simplification53.3%
(FPCore (A B C)
:precision binary64
(if (<= C -2.1e-280)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(if (<= C 1.26e-225)
(* (/ 180.0 PI) (atan (- (/ A B))))
(if (<= C 2.2e-149)
(* 180.0 (/ (atan -1.0) PI))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.1e-280) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else if (C <= 1.26e-225) {
tmp = (180.0 / ((double) M_PI)) * atan(-(A / B));
} else if (C <= 2.2e-149) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.1e-280) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else if (C <= 1.26e-225) {
tmp = (180.0 / Math.PI) * Math.atan(-(A / B));
} else if (C <= 2.2e-149) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.1e-280: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) elif C <= 1.26e-225: tmp = (180.0 / math.pi) * math.atan(-(A / B)) elif C <= 2.2e-149: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.1e-280) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); elseif (C <= 1.26e-225) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-Float64(A / B)))); elseif (C <= 2.2e-149) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.1e-280) tmp = (180.0 / pi) * atan(((C - B) / B)); elseif (C <= 1.26e-225) tmp = (180.0 / pi) * atan(-(A / B)); elseif (C <= 2.2e-149) tmp = 180.0 * (atan(-1.0) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.1e-280], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.26e-225], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.2e-149], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.1 \cdot 10^{-280}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{elif}\;C \leq 1.26 \cdot 10^{-225}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-\frac{A}{B}\right)\\
\mathbf{elif}\;C \leq 2.2 \cdot 10^{-149}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.10000000000000001e-280Initial program 66.9%
associate-*r/66.9%
associate-*l/66.9%
associate-*l/66.9%
*-lft-identity66.9%
sub-neg66.9%
associate-+l-65.7%
sub-neg65.7%
remove-double-neg65.7%
+-commutative65.7%
unpow265.7%
unpow265.7%
hypot-def85.1%
Simplified85.1%
Taylor expanded in B around inf 67.9%
Taylor expanded in A around 0 63.1%
if -2.10000000000000001e-280 < C < 1.2599999999999999e-225Initial program 57.6%
associate-*r/57.6%
associate-*l/57.6%
associate-*l/57.6%
*-lft-identity57.6%
sub-neg57.6%
associate-+l-57.3%
sub-neg57.3%
remove-double-neg57.3%
+-commutative57.3%
unpow257.3%
unpow257.3%
hypot-def71.8%
Simplified71.8%
+-commutative71.8%
add-sqr-sqrt72.1%
fma-def71.9%
Applied egg-rr71.9%
Taylor expanded in A around inf 48.3%
mul-1-neg48.3%
Simplified48.3%
if 1.2599999999999999e-225 < C < 2.1999999999999998e-149Initial program 45.1%
associate-*l/45.1%
*-lft-identity45.1%
+-commutative45.1%
unpow245.1%
unpow245.1%
hypot-def75.9%
Simplified75.9%
Taylor expanded in B around inf 47.4%
if 2.1999999999999998e-149 < C Initial program 29.2%
associate-*r/29.2%
unpow229.2%
Simplified29.2%
associate-*l/29.2%
*-un-lft-identity29.2%
associate--l-29.1%
+-commutative29.1%
unpow229.1%
hypot-udef50.5%
clear-num50.5%
Applied egg-rr50.5%
Taylor expanded in A around 0 21.3%
unpow221.3%
unpow221.3%
hypot-def40.4%
Simplified40.4%
Taylor expanded in B around 0 59.5%
Final simplification59.7%
(FPCore (A B C)
:precision binary64
(if (<= C -1.65e-279)
(/ (* 180.0 (atan (+ (/ C B) -1.0))) PI)
(if (<= C 1.1e-223)
(* (/ 180.0 PI) (atan (- (/ A B))))
(if (<= C 2.85e-149)
(* 180.0 (/ (atan -1.0) PI))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.65e-279) {
tmp = (180.0 * atan(((C / B) + -1.0))) / ((double) M_PI);
} else if (C <= 1.1e-223) {
tmp = (180.0 / ((double) M_PI)) * atan(-(A / B));
} else if (C <= 2.85e-149) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.65e-279) {
tmp = (180.0 * Math.atan(((C / B) + -1.0))) / Math.PI;
} else if (C <= 1.1e-223) {
tmp = (180.0 / Math.PI) * Math.atan(-(A / B));
} else if (C <= 2.85e-149) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.65e-279: tmp = (180.0 * math.atan(((C / B) + -1.0))) / math.pi elif C <= 1.1e-223: tmp = (180.0 / math.pi) * math.atan(-(A / B)) elif C <= 2.85e-149: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.65e-279) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + -1.0))) / pi); elseif (C <= 1.1e-223) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-Float64(A / B)))); elseif (C <= 2.85e-149) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.65e-279) tmp = (180.0 * atan(((C / B) + -1.0))) / pi; elseif (C <= 1.1e-223) tmp = (180.0 / pi) * atan(-(A / B)); elseif (C <= 2.85e-149) tmp = 180.0 * (atan(-1.0) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.65e-279], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.1e-223], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.85e-149], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.65 \cdot 10^{-279}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + -1\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.1 \cdot 10^{-223}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-\frac{A}{B}\right)\\
\mathbf{elif}\;C \leq 2.85 \cdot 10^{-149}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.65e-279Initial program 66.9%
associate-*r/66.9%
unpow266.9%
Simplified66.9%
associate-*l/66.9%
*-un-lft-identity66.9%
associate--l-65.7%
+-commutative65.7%
unpow265.7%
hypot-udef85.1%
clear-num85.1%
Applied egg-rr85.1%
Taylor expanded in A around 0 62.3%
unpow262.3%
unpow262.3%
hypot-def79.7%
Simplified79.7%
Taylor expanded in B around inf 63.1%
if -1.65e-279 < C < 1.10000000000000004e-223Initial program 57.6%
associate-*r/57.6%
associate-*l/57.6%
associate-*l/57.6%
*-lft-identity57.6%
sub-neg57.6%
associate-+l-57.3%
sub-neg57.3%
remove-double-neg57.3%
+-commutative57.3%
unpow257.3%
unpow257.3%
hypot-def71.8%
Simplified71.8%
+-commutative71.8%
add-sqr-sqrt72.1%
fma-def71.9%
Applied egg-rr71.9%
Taylor expanded in A around inf 48.3%
mul-1-neg48.3%
Simplified48.3%
if 1.10000000000000004e-223 < C < 2.8499999999999999e-149Initial program 45.1%
associate-*l/45.1%
*-lft-identity45.1%
+-commutative45.1%
unpow245.1%
unpow245.1%
hypot-def75.9%
Simplified75.9%
Taylor expanded in B around inf 47.4%
if 2.8499999999999999e-149 < C Initial program 29.2%
associate-*r/29.2%
unpow229.2%
Simplified29.2%
associate-*l/29.2%
*-un-lft-identity29.2%
associate--l-29.1%
+-commutative29.1%
unpow229.1%
hypot-udef50.5%
clear-num50.5%
Applied egg-rr50.5%
Taylor expanded in A around 0 21.3%
unpow221.3%
unpow221.3%
hypot-def40.4%
Simplified40.4%
Taylor expanded in B around 0 59.5%
Final simplification59.7%
(FPCore (A B C)
:precision binary64
(if (<= C -5e+117)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= C 1.65e+38)
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5e+117) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (C <= 1.65e+38) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
} 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 <= -5e+117) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (C <= 1.65e+38) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5e+117: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif C <= 1.65e+38: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5e+117) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (C <= 1.65e+38) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5e+117) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (C <= 1.65e+38) tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5e+117], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.65e+38], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5 \cdot 10^{+117}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.65 \cdot 10^{+38}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.99999999999999983e117Initial program 79.9%
associate-*r/79.9%
unpow279.9%
Simplified79.9%
associate-*l/79.9%
*-un-lft-identity79.9%
associate--l-79.9%
+-commutative79.9%
unpow279.9%
hypot-udef88.2%
clear-num88.2%
Applied egg-rr88.2%
Taylor expanded in A around 0 79.9%
unpow279.9%
unpow279.9%
hypot-def88.2%
Simplified88.2%
Taylor expanded in B around -inf 86.1%
if -4.99999999999999983e117 < C < 1.65e38Initial program 54.2%
associate-*r/54.2%
associate-*l/54.2%
associate-*l/54.2%
*-lft-identity54.2%
sub-neg54.2%
associate-+l-53.1%
sub-neg53.1%
remove-double-neg53.1%
+-commutative53.1%
unpow253.1%
unpow253.1%
hypot-def73.7%
Simplified73.7%
Taylor expanded in B around inf 56.3%
if 1.65e38 < C Initial program 17.8%
associate-*r/17.8%
unpow217.8%
Simplified17.8%
associate-*l/17.8%
*-un-lft-identity17.8%
associate--l-17.7%
+-commutative17.7%
unpow217.7%
hypot-udef45.2%
clear-num45.2%
Applied egg-rr45.2%
Taylor expanded in A around 0 13.2%
unpow213.2%
unpow213.2%
hypot-def37.9%
Simplified37.9%
Taylor expanded in B around 0 75.2%
Final simplification65.3%
(FPCore (A B C)
:precision binary64
(if (<= C -1.2e-44)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= C 5.8e+35)
(* (/ 180.0 PI) (atan (/ (- (- B) A) B)))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.2e-44) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (C <= 5.8e+35) {
tmp = (180.0 / ((double) M_PI)) * atan(((-B - A) / B));
} else {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.2e-44) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (C <= 5.8e+35) {
tmp = (180.0 / Math.PI) * Math.atan(((-B - A) / B));
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.2e-44: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif C <= 5.8e+35: tmp = (180.0 / math.pi) * math.atan(((-B - A) / B)) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.2e-44) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (C <= 5.8e+35) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(-B) - A) / B))); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.2e-44) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (C <= 5.8e+35) tmp = (180.0 / pi) * atan(((-B - A) / B)); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.2e-44], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 5.8e+35], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-B) - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.2 \cdot 10^{-44}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.8 \cdot 10^{+35}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(-B\right) - A}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.20000000000000004e-44Initial program 77.1%
associate-*r/77.1%
unpow277.1%
Simplified77.1%
associate-*l/77.1%
*-un-lft-identity77.1%
associate--l-77.1%
+-commutative77.1%
unpow277.1%
hypot-udef88.3%
clear-num88.3%
Applied egg-rr88.3%
Taylor expanded in A around 0 74.9%
unpow274.9%
unpow274.9%
hypot-def85.2%
Simplified85.2%
Taylor expanded in B around -inf 75.4%
if -1.20000000000000004e-44 < C < 5.79999999999999989e35Initial program 49.0%
associate-*r/49.0%
associate-*l/49.0%
associate-*l/49.0%
*-lft-identity49.0%
sub-neg49.0%
associate-+l-47.7%
sub-neg47.7%
remove-double-neg47.7%
+-commutative47.7%
unpow247.7%
unpow247.7%
hypot-def69.8%
Simplified69.8%
Taylor expanded in B around inf 51.0%
Taylor expanded in C around 0 50.3%
associate-*r/50.3%
neg-mul-150.3%
distribute-neg-in50.3%
sub-neg50.3%
Simplified50.3%
if 5.79999999999999989e35 < C Initial program 17.8%
associate-*r/17.8%
unpow217.8%
Simplified17.8%
associate-*l/17.8%
*-un-lft-identity17.8%
associate--l-17.7%
+-commutative17.7%
unpow217.7%
hypot-udef45.2%
clear-num45.2%
Applied egg-rr45.2%
Taylor expanded in A around 0 13.2%
unpow213.2%
unpow213.2%
hypot-def37.9%
Simplified37.9%
Taylor expanded in B around 0 75.2%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= A -4300000.0)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 0.0175)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4300000.0) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 0.0175) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4300000.0) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 0.0175) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4300000.0: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 0.0175: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4300000.0) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 0.0175) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4300000.0) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 0.0175) tmp = (180.0 / pi) * atan(((C - B) / B)); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4300000.0], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 0.0175], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4300000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 0.0175:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.3e6Initial program 21.9%
associate-*l/21.9%
*-lft-identity21.9%
+-commutative21.9%
unpow221.9%
unpow221.9%
hypot-def56.7%
Simplified56.7%
Taylor expanded in A around -inf 60.6%
if -4.3e6 < A < 0.017500000000000002Initial program 52.6%
associate-*r/52.6%
associate-*l/52.6%
associate-*l/52.6%
*-lft-identity52.6%
sub-neg52.6%
associate-+l-52.6%
sub-neg52.6%
remove-double-neg52.6%
+-commutative52.6%
unpow252.6%
unpow252.6%
hypot-def73.7%
Simplified73.7%
Taylor expanded in B around inf 52.6%
Taylor expanded in A around 0 51.2%
if 0.017500000000000002 < A Initial program 76.6%
associate-*l/76.6%
*-lft-identity76.6%
+-commutative76.6%
unpow276.6%
unpow276.6%
hypot-def94.9%
Simplified94.9%
Taylor expanded in A around inf 73.2%
*-commutative73.2%
Simplified73.2%
Final simplification58.4%
(FPCore (A B C)
:precision binary64
(if (<= B -5.2e-120)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.12e-131)
(* 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 <= -5.2e-120) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.12e-131) {
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 <= -5.2e-120) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.12e-131) {
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 <= -5.2e-120: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.12e-131: 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 <= -5.2e-120) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.12e-131) 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 <= -5.2e-120) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.12e-131) 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, -5.2e-120], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.12e-131], 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 -5.2 \cdot 10^{-120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.12 \cdot 10^{-131}:\\
\;\;\;\;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 < -5.2000000000000002e-120Initial program 49.6%
associate-*l/49.6%
*-lft-identity49.6%
+-commutative49.6%
unpow249.6%
unpow249.6%
hypot-def70.7%
Simplified70.7%
Taylor expanded in B around -inf 43.9%
if -5.2000000000000002e-120 < B < 1.12000000000000001e-131Initial program 48.4%
associate-*l/48.4%
*-lft-identity48.4%
+-commutative48.4%
unpow248.4%
unpow248.4%
hypot-def67.8%
Simplified67.8%
Taylor expanded in C around inf 26.4%
distribute-rgt1-in26.4%
metadata-eval26.4%
mul0-lft26.4%
metadata-eval26.4%
Simplified26.4%
if 1.12000000000000001e-131 < B Initial program 51.8%
associate-*l/51.8%
*-lft-identity51.8%
+-commutative51.8%
unpow251.8%
unpow251.8%
hypot-def82.0%
Simplified82.0%
Taylor expanded in B around inf 53.6%
Final simplification42.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.08e-155)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.9e+40)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.08e-155) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.9e+40) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.08e-155) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.9e+40) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.08e-155: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.9e+40: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.08e-155) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.9e+40) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.08e-155) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.9e+40) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.08e-155], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.9e+40], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.08 \cdot 10^{-155}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.9 \cdot 10^{+40}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.08000000000000005e-155Initial program 47.6%
associate-*l/47.6%
*-lft-identity47.6%
+-commutative47.6%
unpow247.6%
unpow247.6%
hypot-def68.8%
Simplified68.8%
Taylor expanded in B around -inf 42.2%
if -1.08000000000000005e-155 < B < 2.90000000000000017e40Initial program 57.9%
associate-*r/57.9%
associate-*l/57.9%
associate-*l/57.9%
*-lft-identity57.9%
sub-neg57.9%
associate-+l-56.4%
sub-neg56.4%
remove-double-neg56.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-def64.5%
Simplified64.5%
+-commutative64.5%
add-sqr-sqrt60.8%
fma-def60.7%
Applied egg-rr60.7%
Taylor expanded in C around inf 36.4%
Taylor expanded in C around 0 36.4%
if 2.90000000000000017e40 < B Initial program 39.4%
associate-*l/39.4%
*-lft-identity39.4%
+-commutative39.4%
unpow239.4%
unpow239.4%
hypot-def82.0%
Simplified82.0%
Taylor expanded in B around inf 67.1%
Final simplification45.5%
(FPCore (A B C) :precision binary64 (if (<= B -2.7e-298) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.7e-298) {
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 <= -2.7e-298) {
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 <= -2.7e-298: 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 <= -2.7e-298) 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 <= -2.7e-298) 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, -2.7e-298], 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.7 \cdot 10^{-298}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.7000000000000001e-298Initial program 48.8%
associate-*l/48.8%
*-lft-identity48.8%
+-commutative48.8%
unpow248.8%
unpow248.8%
hypot-def69.0%
Simplified69.0%
Taylor expanded in B around -inf 32.7%
if -2.7000000000000001e-298 < B Initial program 51.3%
associate-*l/51.3%
*-lft-identity51.3%
+-commutative51.3%
unpow251.3%
unpow251.3%
hypot-def79.1%
Simplified79.1%
Taylor expanded in B around inf 42.6%
Final simplification37.7%
(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 50.0%
associate-*l/50.0%
*-lft-identity50.0%
+-commutative50.0%
unpow250.0%
unpow250.0%
hypot-def74.1%
Simplified74.1%
Taylor expanded in B around inf 22.4%
Final simplification22.4%
herbie shell --seed 2023182
(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)))