
(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 20 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 (atan (* 0.5 (/ B A)))))
(if (<= A -5.8e+133)
(* 180.0 (/ t_0 PI))
(if (<= A -2.7e+76)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= A -450000.0)
(/ 1.0 (/ (/ PI 180.0) t_0))
(* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- A C)))) B))))))))
double code(double A, double B, double C) {
double t_0 = atan((0.5 * (B / A)));
double tmp;
if (A <= -5.8e+133) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -2.7e+76) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (A <= -450000.0) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / t_0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (A - C)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -5.8e+133) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -2.7e+76) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (A <= -450000.0) {
tmp = 1.0 / ((Math.PI / 180.0) / t_0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B));
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((0.5 * (B / A))) tmp = 0 if A <= -5.8e+133: tmp = 180.0 * (t_0 / math.pi) elif A <= -2.7e+76: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif A <= -450000.0: tmp = 1.0 / ((math.pi / 180.0) / t_0) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) return tmp
function code(A, B, C) t_0 = atan(Float64(0.5 * Float64(B / A))) tmp = 0.0 if (A <= -5.8e+133) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -2.7e+76) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (A <= -450000.0) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / t_0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((0.5 * (B / A))); tmp = 0.0; if (A <= -5.8e+133) tmp = 180.0 * (t_0 / pi); elseif (A <= -2.7e+76) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (A <= -450000.0) tmp = 1.0 / ((pi / 180.0) / t_0); else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (A - C)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -5.8e+133], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.7e+76], 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, -450000.0], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -5.8 \cdot 10^{+133}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -450000:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{t_0}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -5.8000000000000002e133Initial program 15.7%
Taylor expanded in A around -inf 82.6%
if -5.8000000000000002e133 < A < -2.6999999999999999e76Initial program 37.2%
Taylor expanded in A around 0 37.4%
unpow237.4%
unpow237.4%
hypot-def88.2%
Simplified88.2%
if -2.6999999999999999e76 < A < -4.5e5Initial program 21.9%
Applied egg-rr41.6%
associate-/r*41.6%
associate--l-33.8%
Simplified33.8%
Taylor expanded in A around -inf 59.9%
if -4.5e5 < A Initial program 64.6%
Taylor expanded in B around 0 64.6%
Simplified86.5%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (* 0.5 (/ B A)))))
(if (<= A -2.2e+137)
(* 180.0 (/ t_0 PI))
(if (<= A -6.6e+76)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= A -450000.0)
(/ 1.0 (/ (/ PI 180.0) t_0))
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI)))))))
double code(double A, double B, double C) {
double t_0 = atan((0.5 * (B / A)));
double tmp;
if (A <= -2.2e+137) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -6.6e+76) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (A <= -450000.0) {
tmp = 1.0 / ((((double) M_PI) / 180.0) / t_0);
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -2.2e+137) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -6.6e+76) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (A <= -450000.0) {
tmp = 1.0 / ((Math.PI / 180.0) / t_0);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((0.5 * (B / A))) tmp = 0 if A <= -2.2e+137: tmp = 180.0 * (t_0 / math.pi) elif A <= -6.6e+76: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif A <= -450000.0: tmp = 1.0 / ((math.pi / 180.0) / t_0) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(0.5 * Float64(B / A))) tmp = 0.0 if (A <= -2.2e+137) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -6.6e+76) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (A <= -450000.0) tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / t_0)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((0.5 * (B / A))); tmp = 0.0; if (A <= -2.2e+137) tmp = 180.0 * (t_0 / pi); elseif (A <= -6.6e+76) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (A <= -450000.0) tmp = 1.0 / ((pi / 180.0) / t_0); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -2.2e+137], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6.6e+76], 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, -450000.0], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / t$95$0), $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}
t_0 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -2.2 \cdot 10^{+137}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{elif}\;A \leq -6.6 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -450000:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{t_0}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.20000000000000015e137Initial program 15.7%
Taylor expanded in A around -inf 82.6%
if -2.20000000000000015e137 < A < -6.6000000000000001e76Initial program 37.2%
Taylor expanded in A around 0 37.4%
unpow237.4%
unpow237.4%
hypot-def88.2%
Simplified88.2%
if -6.6000000000000001e76 < A < -4.5e5Initial program 21.9%
Applied egg-rr41.6%
associate-/r*41.6%
associate--l-33.8%
Simplified33.8%
Taylor expanded in A around -inf 59.9%
if -4.5e5 < A Initial program 64.6%
Simplified86.5%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -1.3e+138)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 1.4e-66)
(* (atan (/ (- C (hypot B C)) B)) (/ 180.0 PI))
(/ 1.0 (/ (/ PI 180.0) (atan (/ (- (- A) (hypot B A)) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.3e+138) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 1.4e-66) {
tmp = atan(((C - hypot(B, C)) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan(((-A - hypot(B, A)) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.3e+138) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 1.4e-66) {
tmp = Math.atan(((C - Math.hypot(B, C)) / B)) * (180.0 / Math.PI);
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan(((-A - Math.hypot(B, A)) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.3e+138: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 1.4e-66: tmp = math.atan(((C - math.hypot(B, C)) / B)) * (180.0 / math.pi) else: tmp = 1.0 / ((math.pi / 180.0) / math.atan(((-A - math.hypot(B, A)) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.3e+138) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 1.4e-66) tmp = Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) * Float64(180.0 / pi)); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.3e+138) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 1.4e-66) tmp = atan(((C - hypot(B, C)) / B)) * (180.0 / pi); else tmp = 1.0 / ((pi / 180.0) / atan(((-A - hypot(B, A)) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.3e+138], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.4e-66], N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.3 \cdot 10^{+138}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.4 \cdot 10^{-66}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.3e138Initial program 15.7%
Taylor expanded in A around -inf 82.6%
if -1.3e138 < A < 1.4e-66Initial program 52.6%
Taylor expanded in A around 0 50.8%
unpow250.8%
unpow250.8%
hypot-def76.8%
Simplified76.8%
Taylor expanded in B around 0 76.8%
associate-*r/76.8%
associate-/l*76.8%
associate-/r/76.8%
Simplified76.8%
if 1.4e-66 < A Initial program 74.2%
Applied egg-rr92.0%
associate-/r*92.1%
associate--l-92.1%
Simplified92.1%
Taylor expanded in C around 0 72.4%
mul-1-neg72.4%
+-commutative72.4%
unpow272.4%
unpow272.4%
hypot-def89.5%
Simplified89.5%
Final simplification81.9%
(FPCore (A B C) :precision binary64 (if (<= C 3.9e+93) (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 3.9e+93) {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((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.9e+93) {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / 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.9e+93: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / 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.9e+93) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / 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.9e+93) tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 3.9e+93], 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], 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.9 \cdot 10^{+93}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\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.9000000000000002e93Initial program 61.5%
associate-*r/61.5%
associate-*l/61.5%
*-un-lft-identity61.5%
unpow261.5%
unpow261.5%
hypot-def85.0%
Applied egg-rr85.0%
if 3.9000000000000002e93 < C Initial program 17.7%
Taylor expanded in A around 0 20.0%
unpow220.0%
unpow220.0%
hypot-def43.5%
Simplified43.5%
Taylor expanded in B around 0 80.9%
Final simplification84.3%
(FPCore (A B C)
:precision binary64
(if (<= C -4e+96)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= C 7e+85)
(* -180.0 (/ (atan (/ (+ A (hypot B A)) B)) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4e+96) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (C <= 7e+85) {
tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / ((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 <= -4e+96) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (C <= 7e+85) {
tmp = -180.0 * (Math.atan(((A + Math.hypot(B, A)) / B)) / 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 <= -4e+96: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif C <= 7e+85: tmp = -180.0 * (math.atan(((A + math.hypot(B, A)) / B)) / 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 <= -4e+96) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (C <= 7e+85) tmp = Float64(-180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / B)) / 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 <= -4e+96) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (C <= 7e+85) tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4e+96], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7e+85], N[(-180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $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 \cdot 10^{+96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7 \cdot 10^{+85}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\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.0000000000000002e96Initial program 82.1%
Taylor expanded in B around -inf 88.7%
associate--l+88.7%
div-sub88.9%
Simplified88.9%
if -4.0000000000000002e96 < C < 7.0000000000000001e85Initial program 57.4%
Applied egg-rr83.2%
associate-/r*83.2%
associate--l-77.0%
Simplified77.0%
Taylor expanded in C around 0 53.0%
mul-1-neg53.0%
+-commutative53.0%
unpow253.0%
unpow253.0%
hypot-def79.0%
Simplified79.0%
expm1-log1p-u37.3%
expm1-udef37.3%
associate-/r/37.3%
div-inv37.3%
metadata-eval37.3%
distribute-frac-neg37.3%
atan-neg37.3%
Applied egg-rr37.3%
expm1-def37.3%
expm1-log1p79.0%
associate-*l/79.0%
*-lft-identity79.0%
neg-mul-179.0%
*-commutative79.0%
times-frac79.0%
metadata-eval79.0%
Simplified79.0%
if 7.0000000000000001e85 < C Initial program 17.7%
Taylor expanded in A around 0 20.0%
unpow220.0%
unpow220.0%
hypot-def43.5%
Simplified43.5%
Taylor expanded in B around 0 80.9%
Final simplification80.6%
(FPCore (A B C)
:precision binary64
(if (<= A -7.8e+140)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 5e-64)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* -180.0 (/ (atan (/ (+ A (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.8e+140) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 5e-64) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.8e+140) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 5e-64) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = -180.0 * (Math.atan(((A + Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.8e+140: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 5e-64: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = -180.0 * (math.atan(((A + math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.8e+140) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 5e-64) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(-180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.8e+140) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 5e-64) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.8e+140], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5e-64], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(-180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.8 \cdot 10^{+140}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-64}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.79999999999999949e140Initial program 15.7%
Taylor expanded in A around -inf 82.6%
if -7.79999999999999949e140 < A < 5.00000000000000033e-64Initial program 52.6%
Taylor expanded in A around 0 50.8%
unpow250.8%
unpow250.8%
hypot-def76.8%
Simplified76.8%
if 5.00000000000000033e-64 < A Initial program 74.2%
Applied egg-rr92.0%
associate-/r*92.1%
associate--l-92.1%
Simplified92.1%
Taylor expanded in C around 0 72.4%
mul-1-neg72.4%
+-commutative72.4%
unpow272.4%
unpow272.4%
hypot-def89.5%
Simplified89.5%
expm1-log1p-u42.5%
expm1-udef42.6%
associate-/r/42.6%
div-inv42.6%
metadata-eval42.6%
distribute-frac-neg42.6%
atan-neg42.6%
Applied egg-rr42.6%
expm1-def42.5%
expm1-log1p89.5%
associate-*l/89.5%
*-lft-identity89.5%
neg-mul-189.5%
*-commutative89.5%
times-frac89.5%
metadata-eval89.5%
Simplified89.5%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.8e+135)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 4.6e-64)
(* (atan (/ (- C (hypot B C)) B)) (/ 180.0 PI))
(* -180.0 (/ (atan (/ (+ A (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+135) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 4.6e-64) {
tmp = atan(((C - hypot(B, C)) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+135) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 4.6e-64) {
tmp = Math.atan(((C - Math.hypot(B, C)) / B)) * (180.0 / Math.PI);
} else {
tmp = -180.0 * (Math.atan(((A + Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e+135: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 4.6e-64: tmp = math.atan(((C - math.hypot(B, C)) / B)) * (180.0 / math.pi) else: tmp = -180.0 * (math.atan(((A + math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.8e+135) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 4.6e-64) tmp = Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) * Float64(180.0 / pi)); else tmp = Float64(-180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e+135) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 4.6e-64) tmp = atan(((C - hypot(B, C)) / B)) * (180.0 / pi); else tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e+135], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.6e-64], N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(-180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{+135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.6 \cdot 10^{-64}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.8000000000000001e135Initial program 15.7%
Taylor expanded in A around -inf 82.6%
if -3.8000000000000001e135 < A < 4.6000000000000003e-64Initial program 52.6%
Taylor expanded in A around 0 50.8%
unpow250.8%
unpow250.8%
hypot-def76.8%
Simplified76.8%
Taylor expanded in B around 0 76.8%
associate-*r/76.8%
associate-/l*76.8%
associate-/r/76.8%
Simplified76.8%
if 4.6000000000000003e-64 < A Initial program 74.2%
Applied egg-rr92.0%
associate-/r*92.1%
associate--l-92.1%
Simplified92.1%
Taylor expanded in C around 0 72.4%
mul-1-neg72.4%
+-commutative72.4%
unpow272.4%
unpow272.4%
hypot-def89.5%
Simplified89.5%
expm1-log1p-u42.5%
expm1-udef42.6%
associate-/r/42.6%
div-inv42.6%
metadata-eval42.6%
distribute-frac-neg42.6%
atan-neg42.6%
Applied egg-rr42.6%
expm1-def42.5%
expm1-log1p89.5%
associate-*l/89.5%
*-lft-identity89.5%
neg-mul-189.5%
*-commutative89.5%
times-frac89.5%
metadata-eval89.5%
Simplified89.5%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -8.8e-308)
(* 180.0 (/ (atan (exp t_0)) PI))
(if (<= B 3.8e-221)
(/ (* 180.0 (atan 0.0)) PI)
(/ 1.0 (/ (/ PI 180.0) (atan (+ t_0 -1.0))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -8.8e-308) {
tmp = 180.0 * (atan(exp(t_0)) / ((double) M_PI));
} else if (B <= 3.8e-221) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((t_0 + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -8.8e-308) {
tmp = 180.0 * (Math.atan(Math.exp(t_0)) / Math.PI);
} else if (B <= 3.8e-221) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((t_0 + -1.0)));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -8.8e-308: tmp = 180.0 * (math.atan(math.exp(t_0)) / math.pi) elif B <= 3.8e-221: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 1.0 / ((math.pi / 180.0) / math.atan((t_0 + -1.0))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -8.8e-308) tmp = Float64(180.0 * Float64(atan(exp(t_0)) / pi)); elseif (B <= 3.8e-221) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(t_0 + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -8.8e-308) tmp = 180.0 * (atan(exp(t_0)) / pi); elseif (B <= 3.8e-221) tmp = (180.0 * atan(0.0)) / pi; else tmp = 1.0 / ((pi / 180.0) / atan((t_0 + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -8.8e-308], N[(180.0 * N[(N[ArcTan[N[Exp[t$95$0], $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-221], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -8.8 \cdot 10^{-308}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(e^{t_0}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-221}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(t_0 + -1\right)}}\\
\end{array}
\end{array}
if B < -8.79999999999999979e-308Initial program 53.2%
add-exp-log53.2%
associate-*l/53.2%
*-un-lft-identity53.2%
unpow253.2%
unpow253.2%
hypot-def75.5%
Applied egg-rr75.5%
Taylor expanded in B around -inf 73.0%
if -8.79999999999999979e-308 < B < 3.8000000000000001e-221Initial program 63.2%
associate-*r/63.2%
associate-*l/63.2%
*-un-lft-identity63.2%
unpow263.2%
unpow263.2%
hypot-def95.5%
Applied egg-rr95.5%
div-sub33.6%
Applied egg-rr33.6%
Taylor expanded in C around inf 19.8%
distribute-lft1-in19.8%
metadata-eval19.8%
mul0-lft63.2%
metadata-eval63.2%
Simplified63.2%
if 3.8000000000000001e-221 < B Initial program 53.8%
Applied egg-rr79.6%
associate-/r*79.6%
associate--l-75.8%
Simplified75.8%
Taylor expanded in B around inf 71.8%
+-commutative71.8%
associate--r+71.8%
div-sub71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Final simplification71.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))))
(if (<= A -5.2e-6)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -2.1e-182)
t_0
(if (<= A -3.9e-264)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (or (<= A 8.2e-238) (and (not (<= A 0.8)) (<= A 1.6e+121)))
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 / B))) / ((double) M_PI));
double tmp;
if (A <= -5.2e-6) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -2.1e-182) {
tmp = t_0;
} else if (A <= -3.9e-264) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if ((A <= 8.2e-238) || (!(A <= 0.8) && (A <= 1.6e+121))) {
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 / B))) / Math.PI);
double tmp;
if (A <= -5.2e-6) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -2.1e-182) {
tmp = t_0;
} else if (A <= -3.9e-264) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if ((A <= 8.2e-238) || (!(A <= 0.8) && (A <= 1.6e+121))) {
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 / B))) / math.pi) tmp = 0 if A <= -5.2e-6: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -2.1e-182: tmp = t_0 elif A <= -3.9e-264: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif (A <= 8.2e-238) or (not (A <= 0.8) and (A <= 1.6e+121)): 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(C / B))) / pi)) tmp = 0.0 if (A <= -5.2e-6) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -2.1e-182) tmp = t_0; elseif (A <= -3.9e-264) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif ((A <= 8.2e-238) || (!(A <= 0.8) && (A <= 1.6e+121))) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 + (C / B))) / pi); tmp = 0.0; if (A <= -5.2e-6) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -2.1e-182) tmp = t_0; elseif (A <= -3.9e-264) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif ((A <= 8.2e-238) || (~((A <= 0.8)) && (A <= 1.6e+121))) 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[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.2e-6], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.1e-182], t$95$0, If[LessEqual[A, -3.9e-264], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 8.2e-238], And[N[Not[LessEqual[A, 0.8]], $MachinePrecision], LessEqual[A, 1.6e+121]]], t$95$0, N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.2 \cdot 10^{-6}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.1 \cdot 10^{-182}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3.9 \cdot 10^{-264}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 8.2 \cdot 10^{-238} \lor \neg \left(A \leq 0.8\right) \land A \leq 1.6 \cdot 10^{+121}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.20000000000000019e-6Initial program 19.7%
Taylor expanded in A around -inf 70.4%
if -5.20000000000000019e-6 < A < -2.1e-182 or -3.8999999999999999e-264 < A < 8.2000000000000002e-238 or 0.80000000000000004 < A < 1.6e121Initial program 58.5%
Taylor expanded in A around 0 50.6%
unpow250.6%
unpow250.6%
hypot-def74.2%
Simplified74.2%
Taylor expanded in B around inf 60.1%
if -2.1e-182 < A < -3.8999999999999999e-264Initial program 45.9%
Taylor expanded in A around 0 46.2%
unpow246.2%
unpow246.2%
hypot-def79.1%
Simplified79.1%
Taylor expanded in B around -inf 60.1%
if 8.2000000000000002e-238 < A < 0.80000000000000004 or 1.6e121 < A Initial program 75.9%
associate-*r/75.9%
associate-*l/75.9%
*-un-lft-identity75.9%
unpow275.9%
unpow275.9%
hypot-def93.0%
Applied egg-rr93.0%
Taylor expanded in B around -inf 77.3%
associate--l+77.3%
div-sub77.3%
Simplified77.3%
Taylor expanded in C around 0 73.9%
associate-*r/73.9%
mul-1-neg73.9%
Simplified73.9%
Final simplification67.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ -1.0 (/ C B))) PI)))
(t_1 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))))
(if (<= A -5.2e-6)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -5.4e-182)
t_0
(if (<= A -3.5e-264)
t_1
(if (<= A 1.8e-241)
t_0
(if (<= A 5.8e-6)
t_1
(if (<= A 1.6e+121)
t_0
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
double t_1 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double tmp;
if (A <= -5.2e-6) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -5.4e-182) {
tmp = t_0;
} else if (A <= -3.5e-264) {
tmp = t_1;
} else if (A <= 1.8e-241) {
tmp = t_0;
} else if (A <= 5.8e-6) {
tmp = t_1;
} else if (A <= 1.6e+121) {
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((-1.0 + (C / B))) / Math.PI);
double t_1 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
double tmp;
if (A <= -5.2e-6) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -5.4e-182) {
tmp = t_0;
} else if (A <= -3.5e-264) {
tmp = t_1;
} else if (A <= 1.8e-241) {
tmp = t_0;
} else if (A <= 5.8e-6) {
tmp = t_1;
} else if (A <= 1.6e+121) {
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((-1.0 + (C / B))) / math.pi) t_1 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) tmp = 0 if A <= -5.2e-6: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -5.4e-182: tmp = t_0 elif A <= -3.5e-264: tmp = t_1 elif A <= 1.8e-241: tmp = t_0 elif A <= 5.8e-6: tmp = t_1 elif A <= 1.6e+121: 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(-1.0 + Float64(C / B))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) tmp = 0.0 if (A <= -5.2e-6) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -5.4e-182) tmp = t_0; elseif (A <= -3.5e-264) tmp = t_1; elseif (A <= 1.8e-241) tmp = t_0; elseif (A <= 5.8e-6) tmp = t_1; elseif (A <= 1.6e+121) 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((-1.0 + (C / B))) / pi); t_1 = 180.0 * (atan((1.0 + (C / B))) / pi); tmp = 0.0; if (A <= -5.2e-6) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -5.4e-182) tmp = t_0; elseif (A <= -3.5e-264) tmp = t_1; elseif (A <= 1.8e-241) tmp = t_0; elseif (A <= 5.8e-6) tmp = t_1; elseif (A <= 1.6e+121) 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[(-1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.2e-6], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.4e-182], t$95$0, If[LessEqual[A, -3.5e-264], t$95$1, If[LessEqual[A, 1.8e-241], t$95$0, If[LessEqual[A, 5.8e-6], t$95$1, If[LessEqual[A, 1.6e+121], 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(-1 + \frac{C}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.2 \cdot 10^{-6}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5.4 \cdot 10^{-182}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3.5 \cdot 10^{-264}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{-241}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5.8 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.6 \cdot 10^{+121}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.20000000000000019e-6Initial program 19.7%
Taylor expanded in A around -inf 70.4%
if -5.20000000000000019e-6 < A < -5.39999999999999999e-182 or -3.5e-264 < A < 1.7999999999999999e-241 or 5.8000000000000004e-6 < A < 1.6e121Initial program 59.5%
Taylor expanded in A around 0 50.5%
unpow250.5%
unpow250.5%
hypot-def74.3%
Simplified74.3%
Taylor expanded in B around inf 60.3%
if -5.39999999999999999e-182 < A < -3.5e-264 or 1.7999999999999999e-241 < A < 5.8000000000000004e-6Initial program 58.1%
Taylor expanded in A around 0 51.5%
unpow251.5%
unpow251.5%
hypot-def76.5%
Simplified76.5%
Taylor expanded in B around -inf 57.0%
if 1.6e121 < A Initial program 88.1%
Taylor expanded in A around inf 88.6%
Final simplification66.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ -1.0 (/ C B))) PI))))
(if (<= A -3.4e-5)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.05e-181)
t_0
(if (<= A -4.5e-264)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= A 5e-243)
t_0
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-1.0 + (C / B))) / ((double) M_PI));
double tmp;
if (A <= -3.4e-5) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.05e-181) {
tmp = t_0;
} else if (A <= -4.5e-264) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (A <= 5e-243) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((1.0 + ((C - 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 / B))) / Math.PI);
double tmp;
if (A <= -3.4e-5) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.05e-181) {
tmp = t_0;
} else if (A <= -4.5e-264) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (A <= 5e-243) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-1.0 + (C / B))) / math.pi) tmp = 0 if A <= -3.4e-5: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.05e-181: tmp = t_0 elif A <= -4.5e-264: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif A <= 5e-243: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-1.0 + Float64(C / B))) / pi)) tmp = 0.0 if (A <= -3.4e-5) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.05e-181) tmp = t_0; elseif (A <= -4.5e-264) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (A <= 5e-243) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-1.0 + (C / B))) / pi); tmp = 0.0; if (A <= -3.4e-5) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.05e-181) tmp = t_0; elseif (A <= -4.5e-264) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (A <= 5e-243) tmp = t_0; else tmp = 180.0 * (atan((1.0 + ((C - 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[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.4e-5], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.05e-181], t$95$0, If[LessEqual[A, -4.5e-264], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5e-243], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -3.4 \cdot 10^{-5}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.05 \cdot 10^{-181}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -4.5 \cdot 10^{-264}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-243}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.4e-5Initial program 19.7%
Taylor expanded in A around -inf 70.4%
if -3.4e-5 < A < -1.05000000000000002e-181 or -4.5000000000000001e-264 < A < 5e-243Initial program 55.8%
Taylor expanded in A around 0 54.5%
unpow254.5%
unpow254.5%
hypot-def79.5%
Simplified79.5%
Taylor expanded in B around inf 64.9%
if -1.05000000000000002e-181 < A < -4.5000000000000001e-264Initial program 45.9%
Taylor expanded in A around 0 46.2%
unpow246.2%
unpow246.2%
hypot-def79.1%
Simplified79.1%
Taylor expanded in B around -inf 60.1%
if 5e-243 < A Initial program 72.1%
Taylor expanded in B around -inf 67.2%
associate--l+67.2%
div-sub67.2%
Simplified67.2%
Final simplification66.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= B -1550000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.7e-287)
t_0
(if (<= B 5.5e-219)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 3.2e-26) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double tmp;
if (B <= -1550000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.7e-287) {
tmp = t_0;
} else if (B <= 5.5e-219) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 3.2e-26) {
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((-2.0 * (A / B))) / Math.PI);
double tmp;
if (B <= -1550000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.7e-287) {
tmp = t_0;
} else if (B <= 5.5e-219) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 3.2e-26) {
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((-2.0 * (A / B))) / math.pi) tmp = 0 if B <= -1550000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.7e-287: tmp = t_0 elif B <= 5.5e-219: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 3.2e-26: 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(-2.0 * Float64(A / B))) / pi)) tmp = 0.0 if (B <= -1550000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.7e-287) tmp = t_0; elseif (B <= 5.5e-219) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 3.2e-26) 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((-2.0 * (A / B))) / pi); tmp = 0.0; if (B <= -1550000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.7e-287) tmp = t_0; elseif (B <= 5.5e-219) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 3.2e-26) 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[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1550000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.7e-287], t$95$0, If[LessEqual[B, 5.5e-219], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 3.2e-26], 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(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1550000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.7 \cdot 10^{-287}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{-219}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-26}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.55e6Initial program 42.5%
Taylor expanded in B around -inf 57.8%
if -1.55e6 < B < -4.6999999999999999e-287 or 5.50000000000000017e-219 < B < 3.2000000000000001e-26Initial program 66.7%
Taylor expanded in A around inf 39.6%
if -4.6999999999999999e-287 < B < 5.50000000000000017e-219Initial program 61.4%
associate-*r/61.4%
associate-*l/61.4%
*-un-lft-identity61.4%
unpow261.4%
unpow261.4%
hypot-def96.2%
Applied egg-rr96.2%
div-sub36.2%
Applied egg-rr36.2%
Taylor expanded in C around inf 20.6%
distribute-lft1-in20.6%
metadata-eval20.6%
mul0-lft61.4%
metadata-eval61.4%
Simplified61.4%
if 3.2000000000000001e-26 < B Initial program 47.3%
Taylor expanded in B around inf 64.9%
Final simplification53.8%
(FPCore (A B C)
:precision binary64
(if (<= B -880000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 6.8e-299)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 3.1e-222)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B 6.2e-30)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -880000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6.8e-299) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 3.1e-222) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= 6.2e-30) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((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 <= -880000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6.8e-299) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 3.1e-222) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= 6.2e-30) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -880000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6.8e-299: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 3.1e-222: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= 6.2e-30: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -880000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6.8e-299) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 3.1e-222) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= 6.2e-30) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / 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 <= -880000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6.8e-299) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 3.1e-222) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= 6.2e-30) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -880000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.8e-299], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.1e-222], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.2e-30], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $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 -880000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-299}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.1 \cdot 10^{-222}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.2 \cdot 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.8e5Initial program 42.5%
Taylor expanded in B around -inf 57.8%
if -8.8e5 < B < 6.7999999999999996e-299Initial program 66.9%
Taylor expanded in A around inf 46.3%
if 6.7999999999999996e-299 < B < 3.09999999999999979e-222Initial program 67.9%
Taylor expanded in A around 0 41.7%
unpow241.7%
unpow241.7%
hypot-def70.0%
Simplified70.0%
Taylor expanded in B around 0 63.9%
if 3.09999999999999979e-222 < B < 6.19999999999999982e-30Initial program 62.0%
Taylor expanded in A around -inf 43.2%
if 6.19999999999999982e-30 < B Initial program 48.0%
Taylor expanded in B around inf 64.3%
Final simplification55.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))))
(if (<= A -4.2e-14)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.3e-265)
t_0
(if (<= A 5.8e-241)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 5.8e+49) t_0 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double tmp;
if (A <= -4.2e-14) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.3e-265) {
tmp = t_0;
} else if (A <= 5.8e-241) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 5.8e+49) {
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((1.0 + (C / B))) / Math.PI);
double tmp;
if (A <= -4.2e-14) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.3e-265) {
tmp = t_0;
} else if (A <= 5.8e-241) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 5.8e+49) {
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((1.0 + (C / B))) / math.pi) tmp = 0 if A <= -4.2e-14: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.3e-265: tmp = t_0 elif A <= 5.8e-241: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 5.8e+49: 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(1.0 + Float64(C / B))) / pi)) tmp = 0.0 if (A <= -4.2e-14) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.3e-265) tmp = t_0; elseif (A <= 5.8e-241) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 5.8e+49) 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((1.0 + (C / B))) / pi); tmp = 0.0; if (A <= -4.2e-14) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.3e-265) tmp = t_0; elseif (A <= 5.8e-241) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 5.8e+49) 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[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.2e-14], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.3e-265], t$95$0, If[LessEqual[A, 5.8e-241], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.8e+49], 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(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -4.2 \cdot 10^{-14}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-265}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5.8 \cdot 10^{-241}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 5.8 \cdot 10^{+49}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.1999999999999998e-14Initial program 19.4%
Taylor expanded in A around -inf 68.5%
if -4.1999999999999998e-14 < A < -1.30000000000000005e-265 or 5.7999999999999998e-241 < A < 5.8e49Initial program 59.9%
Taylor expanded in A around 0 53.0%
unpow253.0%
unpow253.0%
hypot-def75.4%
Simplified75.4%
Taylor expanded in B around -inf 49.7%
if -1.30000000000000005e-265 < A < 5.7999999999999998e-241Initial program 60.9%
Taylor expanded in B around inf 53.2%
if 5.8e49 < A Initial program 77.7%
Taylor expanded in A around inf 73.1%
Final simplification59.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -4.5e-287)
(/ (* 180.0 (atan (+ 1.0 t_0))) PI)
(if (<= B 1.5e-220)
(/ (* 180.0 (atan 0.0)) PI)
(/ 1.0 (/ (/ PI 180.0) (atan (+ t_0 -1.0))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -4.5e-287) {
tmp = (180.0 * atan((1.0 + t_0))) / ((double) M_PI);
} else if (B <= 1.5e-220) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan((t_0 + -1.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -4.5e-287) {
tmp = (180.0 * Math.atan((1.0 + t_0))) / Math.PI;
} else if (B <= 1.5e-220) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan((t_0 + -1.0)));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -4.5e-287: tmp = (180.0 * math.atan((1.0 + t_0))) / math.pi elif B <= 1.5e-220: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 1.0 / ((math.pi / 180.0) / math.atan((t_0 + -1.0))) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -4.5e-287) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + t_0))) / pi); elseif (B <= 1.5e-220) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(t_0 + -1.0)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -4.5e-287) tmp = (180.0 * atan((1.0 + t_0))) / pi; elseif (B <= 1.5e-220) tmp = (180.0 * atan(0.0)) / pi; else tmp = 1.0 / ((pi / 180.0) / atan((t_0 + -1.0))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -4.5e-287], N[(N[(180.0 * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.5e-220], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -4.5 \cdot 10^{-287}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-220}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(t_0 + -1\right)}}\\
\end{array}
\end{array}
if B < -4.50000000000000017e-287Initial program 53.3%
associate-*r/53.3%
associate-*l/53.3%
*-un-lft-identity53.3%
unpow253.3%
unpow253.3%
hypot-def74.6%
Applied egg-rr74.6%
Taylor expanded in B around -inf 67.8%
associate--l+67.8%
div-sub67.9%
Simplified67.9%
if -4.50000000000000017e-287 < B < 1.50000000000000009e-220Initial program 61.4%
associate-*r/61.4%
associate-*l/61.4%
*-un-lft-identity61.4%
unpow261.4%
unpow261.4%
hypot-def96.2%
Applied egg-rr96.2%
div-sub36.2%
Applied egg-rr36.2%
Taylor expanded in C around inf 20.6%
distribute-lft1-in20.6%
metadata-eval20.6%
mul0-lft61.4%
metadata-eval61.4%
Simplified61.4%
if 1.50000000000000009e-220 < B Initial program 53.8%
Applied egg-rr79.6%
associate-/r*79.6%
associate--l-75.8%
Simplified75.8%
Taylor expanded in B around inf 71.8%
+-commutative71.8%
associate--r+71.8%
div-sub71.8%
sub-neg71.8%
metadata-eval71.8%
Simplified71.8%
Final simplification69.0%
(FPCore (A B C)
:precision binary64
(if (<= B -4.3e-287)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 2.8e-221)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.3e-287) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 2.8e-221) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.3e-287) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 2.8e-221) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.3e-287: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 2.8e-221: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.3e-287) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 2.8e-221) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.3e-287) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 2.8e-221) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.3e-287], 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.8e-221], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.3 \cdot 10^{-287}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{-221}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.2999999999999999e-287Initial program 53.3%
Taylor expanded in B around -inf 67.8%
associate--l+67.8%
div-sub67.8%
Simplified67.8%
if -4.2999999999999999e-287 < B < 2.80000000000000019e-221Initial program 61.4%
associate-*r/61.4%
associate-*l/61.4%
*-un-lft-identity61.4%
unpow261.4%
unpow261.4%
hypot-def96.2%
Applied egg-rr96.2%
div-sub36.2%
Applied egg-rr36.2%
Taylor expanded in C around inf 20.6%
distribute-lft1-in20.6%
metadata-eval20.6%
mul0-lft61.4%
metadata-eval61.4%
Simplified61.4%
if 2.80000000000000019e-221 < B Initial program 53.8%
Simplified75.8%
Taylor expanded in B around inf 71.8%
+-commutative71.8%
Simplified71.8%
Final simplification69.0%
(FPCore (A B C)
:precision binary64
(if (<= B -6.8e-287)
(/ (* 180.0 (atan (+ 1.0 (/ (- C A) B)))) PI)
(if (<= B 2.7e-221)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-287) {
tmp = (180.0 * atan((1.0 + ((C - A) / B)))) / ((double) M_PI);
} else if (B <= 2.7e-221) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-287) {
tmp = (180.0 * Math.atan((1.0 + ((C - A) / B)))) / Math.PI;
} else if (B <= 2.7e-221) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.8e-287: tmp = (180.0 * math.atan((1.0 + ((C - A) / B)))) / math.pi elif B <= 2.7e-221: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.8e-287) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(Float64(C - A) / B)))) / pi); elseif (B <= 2.7e-221) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.8e-287) tmp = (180.0 * atan((1.0 + ((C - A) / B)))) / pi; elseif (B <= 2.7e-221) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.8e-287], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.7e-221], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.8 \cdot 10^{-287}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-221}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -6.7999999999999997e-287Initial program 53.3%
associate-*r/53.3%
associate-*l/53.3%
*-un-lft-identity53.3%
unpow253.3%
unpow253.3%
hypot-def74.6%
Applied egg-rr74.6%
Taylor expanded in B around -inf 67.8%
associate--l+67.8%
div-sub67.9%
Simplified67.9%
if -6.7999999999999997e-287 < B < 2.7e-221Initial program 61.4%
associate-*r/61.4%
associate-*l/61.4%
*-un-lft-identity61.4%
unpow261.4%
unpow261.4%
hypot-def96.2%
Applied egg-rr96.2%
div-sub36.2%
Applied egg-rr36.2%
Taylor expanded in C around inf 20.6%
distribute-lft1-in20.6%
metadata-eval20.6%
mul0-lft61.4%
metadata-eval61.4%
Simplified61.4%
if 2.7e-221 < B Initial program 53.8%
Simplified75.8%
Taylor expanded in B around inf 71.8%
+-commutative71.8%
Simplified71.8%
Final simplification69.0%
(FPCore (A B C)
:precision binary64
(if (<= B -4.8e-179)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.05e-134)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.8e-179) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.05e-134) {
tmp = (180.0 * atan(0.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 <= -4.8e-179) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.05e-134) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.8e-179: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.05e-134: tmp = (180.0 * math.atan(0.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 <= -4.8e-179) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.05e-134) tmp = Float64(Float64(180.0 * atan(0.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 <= -4.8e-179) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.05e-134) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.8e-179], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.05e-134], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.8 \cdot 10^{-179}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{-134}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.8000000000000001e-179Initial program 52.1%
Taylor expanded in B around -inf 45.6%
if -4.8000000000000001e-179 < B < 2.0500000000000001e-134Initial program 58.9%
associate-*r/58.9%
associate-*l/58.9%
*-un-lft-identity58.9%
unpow258.9%
unpow258.9%
hypot-def83.6%
Applied egg-rr83.6%
div-sub46.7%
Applied egg-rr46.7%
Taylor expanded in C around inf 15.2%
distribute-lft1-in15.2%
metadata-eval15.2%
mul0-lft39.3%
metadata-eval39.3%
Simplified39.3%
if 2.0500000000000001e-134 < B Initial program 53.7%
Taylor expanded in B around inf 53.9%
Final simplification47.4%
(FPCore (A B C) :precision binary64 (if (<= B -8.8e-308) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.8e-308) {
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 <= -8.8e-308) {
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 <= -8.8e-308: 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 <= -8.8e-308) 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 <= -8.8e-308) 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, -8.8e-308], 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 -8.8 \cdot 10^{-308}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.79999999999999979e-308Initial program 53.2%
Taylor expanded in B around -inf 38.5%
if -8.79999999999999979e-308 < B Initial program 55.2%
Taylor expanded in B around inf 43.5%
Final simplification41.2%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 54.3%
Taylor expanded in B around inf 24.0%
Final simplification24.0%
herbie shell --seed 2023321
(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)))