
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
(/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))
(* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 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 <= 0.0)) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else {
tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / ((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 <= 0.0)) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / 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 <= 0.0): tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = math.atan((-0.5 * (B / (C - A)))) * (180.0 / 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 <= 0.0)) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); else tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / 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 <= 0.0))) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / 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, 0.0]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t\_0 \leq -0.5 \lor \neg \left(t\_0 \leq 0\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < -0.5 or 0.0 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) Initial program 66.2%
clear-num66.2%
un-div-inv66.2%
associate-*l/66.2%
*-un-lft-identity66.2%
unpow266.2%
unpow266.2%
hypot-define90.7%
Applied egg-rr90.7%
if -0.5 < (*.f64 (/.f64 #s(literal 1 binary64) B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))) < 0.0Initial program 24.8%
Simplified11.2%
Taylor expanded in B around 0 99.6%
Final simplification92.2%
(FPCore (A B C)
:precision binary64
(if (<= A -2.8e-76)
(/ (* 180.0 (atan (* -0.5 (/ B (- C A))))) PI)
(if (<= A 2.8e-22)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e-76) {
tmp = (180.0 * atan((-0.5 * (B / (C - A))))) / ((double) M_PI);
} else if (A <= 2.8e-22) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} 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 <= -2.8e-76) {
tmp = (180.0 * Math.atan((-0.5 * (B / (C - A))))) / Math.PI;
} else if (A <= 2.8e-22) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} 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 <= -2.8e-76: tmp = (180.0 * math.atan((-0.5 * (B / (C - A))))) / math.pi elif A <= 2.8e-22: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) 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 <= -2.8e-76) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / Float64(C - A))))) / pi); elseif (A <= 2.8e-22) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.8e-76) tmp = (180.0 * atan((-0.5 * (B / (C - A))))) / pi; elseif (A <= 2.8e-22) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = 180.0 * (atan(((A + hypot(B, A)) / -B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.8e-76], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.8e-22], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $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 -2.8 \cdot 10^{-76}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\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 < -2.8000000000000001e-76Initial program 27.9%
Simplified38.1%
associate-*r/38.2%
Applied egg-rr38.2%
Taylor expanded in B around 0 71.6%
if -2.8000000000000001e-76 < A < 2.79999999999999995e-22Initial program 67.1%
clear-num67.1%
un-div-inv67.1%
associate-*l/67.1%
*-un-lft-identity67.1%
unpow267.1%
unpow267.1%
hypot-define85.0%
Applied egg-rr85.0%
Taylor expanded in A around 0 63.1%
unpow263.1%
unpow263.1%
hypot-define81.2%
Simplified81.2%
if 2.79999999999999995e-22 < A Initial program 79.5%
Taylor expanded in C around 0 79.3%
associate-*r/79.3%
mul-1-neg79.3%
+-commutative79.3%
unpow279.3%
unpow279.3%
hypot-define87.6%
Simplified87.6%
Final simplification80.2%
(FPCore (A B C)
:precision binary64
(if (<= A -3.4e-76)
(/ (* 180.0 (atan (* -0.5 (/ B (- C A))))) PI)
(if (<= A 3.2e-18)
(/ 180.0 (/ PI (atan (/ (- C (hypot B C)) B))))
(* (/ 180.0 PI) (atan (/ (+ C (* B (- -1.0 (/ A B)))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.4e-76) {
tmp = (180.0 * atan((-0.5 * (B / (C - A))))) / ((double) M_PI);
} else if (A <= 3.2e-18) {
tmp = 180.0 / (((double) M_PI) / atan(((C - hypot(B, C)) / B)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.4e-76) {
tmp = (180.0 * Math.atan((-0.5 * (B / (C - A))))) / Math.PI;
} else if (A <= 3.2e-18) {
tmp = 180.0 / (Math.PI / Math.atan(((C - Math.hypot(B, C)) / B)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.4e-76: tmp = (180.0 * math.atan((-0.5 * (B / (C - A))))) / math.pi elif A <= 3.2e-18: tmp = 180.0 / (math.pi / math.atan(((C - math.hypot(B, C)) / B))) else: tmp = (180.0 / math.pi) * math.atan(((C + (B * (-1.0 - (A / B)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.4e-76) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / Float64(C - A))))) / pi); elseif (A <= 3.2e-18) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - hypot(B, C)) / B)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B * Float64(-1.0 - Float64(A / B)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.4e-76) tmp = (180.0 * atan((-0.5 * (B / (C - A))))) / pi; elseif (A <= 3.2e-18) tmp = 180.0 / (pi / atan(((C - hypot(B, C)) / B))); else tmp = (180.0 / pi) * atan(((C + (B * (-1.0 - (A / B)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.4e-76], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 3.2e-18], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B * N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.4 \cdot 10^{-76}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-18}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + B \cdot \left(-1 - \frac{A}{B}\right)}{B}\right)\\
\end{array}
\end{array}
if A < -3.3999999999999999e-76Initial program 27.9%
Simplified38.1%
associate-*r/38.2%
Applied egg-rr38.2%
Taylor expanded in B around 0 71.6%
if -3.3999999999999999e-76 < A < 3.1999999999999999e-18Initial program 67.0%
clear-num67.0%
un-div-inv67.0%
associate-*l/67.0%
*-un-lft-identity67.0%
unpow267.0%
unpow267.0%
hypot-define85.2%
Applied egg-rr85.2%
Taylor expanded in A around 0 63.0%
unpow263.0%
unpow263.0%
hypot-define81.6%
Simplified81.6%
if 3.1999999999999999e-18 < A Initial program 80.1%
Simplified94.4%
Taylor expanded in B around inf 80.0%
Final simplification78.3%
(FPCore (A B C)
:precision binary64
(if (<= A -4.2e-77)
(/ (* 180.0 (atan (* -0.5 (/ B (- C A))))) PI)
(if (<= A 5.4e-17)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* (/ 180.0 PI) (atan (/ (+ C (* B (- -1.0 (/ A B)))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.2e-77) {
tmp = (180.0 * atan((-0.5 * (B / (C - A))))) / ((double) M_PI);
} else if (A <= 5.4e-17) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.2e-77) {
tmp = (180.0 * Math.atan((-0.5 * (B / (C - A))))) / Math.PI;
} else if (A <= 5.4e-17) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.2e-77: tmp = (180.0 * math.atan((-0.5 * (B / (C - A))))) / math.pi elif A <= 5.4e-17: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C + (B * (-1.0 - (A / B)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.2e-77) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / Float64(C - A))))) / pi); elseif (A <= 5.4e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B * Float64(-1.0 - Float64(A / B)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.2e-77) tmp = (180.0 * atan((-0.5 * (B / (C - A))))) / pi; elseif (A <= 5.4e-17) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 / pi) * atan(((C + (B * (-1.0 - (A / B)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.2e-77], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5.4e-17], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B * N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.2 \cdot 10^{-77}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.4 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + B \cdot \left(-1 - \frac{A}{B}\right)}{B}\right)\\
\end{array}
\end{array}
if A < -4.20000000000000031e-77Initial program 27.9%
Simplified38.1%
associate-*r/38.2%
Applied egg-rr38.2%
Taylor expanded in B around 0 71.6%
if -4.20000000000000031e-77 < A < 5.4000000000000002e-17Initial program 67.0%
Taylor expanded in A around 0 63.0%
unpow263.0%
unpow263.0%
hypot-define81.6%
Simplified81.6%
if 5.4000000000000002e-17 < A Initial program 80.1%
Simplified94.4%
Taylor expanded in B around inf 80.0%
Final simplification78.3%
(FPCore (A B C) :precision binary64 (if (<= A -1.25e-76) (/ (* 180.0 (atan (* -0.5 (/ B (- C A))))) PI) (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- C A)))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e-76) {
tmp = (180.0 * atan((-0.5 * (B / (C - A))))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (C - A)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e-76) {
tmp = (180.0 * Math.atan((-0.5 * (B / (C - A))))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.25e-76: tmp = (180.0 * math.atan((-0.5 * (B / (C - A))))) / math.pi else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.25e-76) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / Float64(C - A))))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.25e-76) tmp = (180.0 * atan((-0.5 * (B / (C - A))))) / pi; else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (C - A)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e-76], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{-76}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -1.2499999999999999e-76Initial program 27.9%
Simplified38.1%
associate-*r/38.2%
Applied egg-rr38.2%
Taylor expanded in B around 0 71.6%
if -1.2499999999999999e-76 < A Initial program 71.7%
Simplified88.5%
Final simplification83.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (* -0.5 (/ B (- C A)))))
(t_1 (* t_0 (/ 180.0 PI)))
(t_2 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -6e-87)
t_2
(if (<= B -1.7e-185)
t_1
(if (<= B 9.5e-274)
t_2
(if (<= B 3.6e-119)
t_1
(if (or (<= B 1.95e-32) (not (<= B 950.0)))
(/ 180.0 (/ PI (atan (/ (- C B) B))))
(/ (* 180.0 t_0) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / (C - A))));
double t_1 = t_0 * (180.0 / ((double) M_PI));
double t_2 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -6e-87) {
tmp = t_2;
} else if (B <= -1.7e-185) {
tmp = t_1;
} else if (B <= 9.5e-274) {
tmp = t_2;
} else if (B <= 3.6e-119) {
tmp = t_1;
} else if ((B <= 1.95e-32) || !(B <= 950.0)) {
tmp = 180.0 / (((double) M_PI) / atan(((C - B) / B)));
} else {
tmp = (180.0 * t_0) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((-0.5 * (B / (C - A))));
double t_1 = t_0 * (180.0 / Math.PI);
double t_2 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -6e-87) {
tmp = t_2;
} else if (B <= -1.7e-185) {
tmp = t_1;
} else if (B <= 9.5e-274) {
tmp = t_2;
} else if (B <= 3.6e-119) {
tmp = t_1;
} else if ((B <= 1.95e-32) || !(B <= 950.0)) {
tmp = 180.0 / (Math.PI / Math.atan(((C - B) / B)));
} else {
tmp = (180.0 * t_0) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / (C - A)))) t_1 = t_0 * (180.0 / math.pi) t_2 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -6e-87: tmp = t_2 elif B <= -1.7e-185: tmp = t_1 elif B <= 9.5e-274: tmp = t_2 elif B <= 3.6e-119: tmp = t_1 elif (B <= 1.95e-32) or not (B <= 950.0): tmp = 180.0 / (math.pi / math.atan(((C - B) / B))) else: tmp = (180.0 * t_0) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(-0.5 * Float64(B / Float64(C - A)))) t_1 = Float64(t_0 * Float64(180.0 / pi)) t_2 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -6e-87) tmp = t_2; elseif (B <= -1.7e-185) tmp = t_1; elseif (B <= 9.5e-274) tmp = t_2; elseif (B <= 3.6e-119) tmp = t_1; elseif ((B <= 1.95e-32) || !(B <= 950.0)) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - B) / B)))); else tmp = Float64(Float64(180.0 * t_0) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((-0.5 * (B / (C - A)))); t_1 = t_0 * (180.0 / pi); t_2 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -6e-87) tmp = t_2; elseif (B <= -1.7e-185) tmp = t_1; elseif (B <= 9.5e-274) tmp = t_2; elseif (B <= 3.6e-119) tmp = t_1; elseif ((B <= 1.95e-32) || ~((B <= 950.0))) tmp = 180.0 / (pi / atan(((C - B) / B))); else tmp = (180.0 * t_0) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6e-87], t$95$2, If[LessEqual[B, -1.7e-185], t$95$1, If[LessEqual[B, 9.5e-274], t$95$2, If[LessEqual[B, 3.6e-119], t$95$1, If[Or[LessEqual[B, 1.95e-32], N[Not[LessEqual[B, 950.0]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
t_1 := t\_0 \cdot \frac{180}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -6 \cdot 10^{-87}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-274}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.95 \cdot 10^{-32} \lor \neg \left(B \leq 950\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\
\end{array}
\end{array}
if B < -6.00000000000000033e-87 or -1.6999999999999999e-185 < B < 9.5000000000000009e-274Initial program 69.0%
Taylor expanded in B around -inf 79.7%
associate--l+79.7%
div-sub79.7%
Simplified79.7%
if -6.00000000000000033e-87 < B < -1.6999999999999999e-185 or 9.5000000000000009e-274 < B < 3.6e-119Initial program 41.1%
Simplified50.2%
Taylor expanded in B around 0 68.4%
if 3.6e-119 < B < 1.9500000000000001e-32 or 950 < B Initial program 62.1%
clear-num62.1%
un-div-inv62.1%
associate-*l/62.1%
*-un-lft-identity62.1%
unpow262.1%
unpow262.1%
hypot-define81.9%
Applied egg-rr81.9%
Taylor expanded in A around 0 54.9%
unpow254.9%
unpow254.9%
hypot-define70.3%
Simplified70.3%
Taylor expanded in C around 0 69.7%
if 1.9500000000000001e-32 < B < 950Initial program 19.7%
Simplified20.1%
associate-*r/20.1%
Applied egg-rr20.1%
Taylor expanded in B around 0 83.2%
Final simplification74.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI)))
(t_1 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -6.6e-88)
t_1
(if (<= B -1.3e-183)
t_0
(if (<= B 1.02e-273)
t_1
(if (or (<= B 2.1e-117) (and (not (<= B 4.9e-33)) (<= B 700.0)))
t_0
(/ 180.0 (/ PI (atan (/ (- C B) B))))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
double t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -6.6e-88) {
tmp = t_1;
} else if (B <= -1.3e-183) {
tmp = t_0;
} else if (B <= 1.02e-273) {
tmp = t_1;
} else if ((B <= 2.1e-117) || (!(B <= 4.9e-33) && (B <= 700.0))) {
tmp = t_0;
} else {
tmp = 180.0 / (((double) M_PI) / atan(((C - B) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
double t_1 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -6.6e-88) {
tmp = t_1;
} else if (B <= -1.3e-183) {
tmp = t_0;
} else if (B <= 1.02e-273) {
tmp = t_1;
} else if ((B <= 2.1e-117) || (!(B <= 4.9e-33) && (B <= 700.0))) {
tmp = t_0;
} else {
tmp = 180.0 / (Math.PI / Math.atan(((C - B) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi) t_1 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -6.6e-88: tmp = t_1 elif B <= -1.3e-183: tmp = t_0 elif B <= 1.02e-273: tmp = t_1 elif (B <= 2.1e-117) or (not (B <= 4.9e-33) and (B <= 700.0)): tmp = t_0 else: tmp = 180.0 / (math.pi / math.atan(((C - B) / B))) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -6.6e-88) tmp = t_1; elseif (B <= -1.3e-183) tmp = t_0; elseif (B <= 1.02e-273) tmp = t_1; elseif ((B <= 2.1e-117) || (!(B <= 4.9e-33) && (B <= 700.0))) tmp = t_0; else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - B) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / pi); t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -6.6e-88) tmp = t_1; elseif (B <= -1.3e-183) tmp = t_0; elseif (B <= 1.02e-273) tmp = t_1; elseif ((B <= 2.1e-117) || (~((B <= 4.9e-33)) && (B <= 700.0))) tmp = t_0; else tmp = 180.0 / (pi / atan(((C - B) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.6e-88], t$95$1, If[LessEqual[B, -1.3e-183], t$95$0, If[LessEqual[B, 1.02e-273], t$95$1, If[Or[LessEqual[B, 2.1e-117], And[N[Not[LessEqual[B, 4.9e-33]], $MachinePrecision], LessEqual[B, 700.0]]], t$95$0, N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -6.6 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -1.3 \cdot 10^{-183}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.02 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-117} \lor \neg \left(B \leq 4.9 \cdot 10^{-33}\right) \land B \leq 700:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\
\end{array}
\end{array}
if B < -6.59999999999999987e-88 or -1.2999999999999999e-183 < B < 1.0200000000000001e-273Initial program 69.0%
Taylor expanded in B around -inf 79.7%
associate--l+79.7%
div-sub79.7%
Simplified79.7%
if -6.59999999999999987e-88 < B < -1.2999999999999999e-183 or 1.0200000000000001e-273 < B < 2.0999999999999999e-117 or 4.8999999999999998e-33 < B < 700Initial program 39.2%
Simplified47.5%
Taylor expanded in B around 0 69.7%
if 2.0999999999999999e-117 < B < 4.8999999999999998e-33 or 700 < B Initial program 62.1%
clear-num62.1%
un-div-inv62.1%
associate-*l/62.1%
*-un-lft-identity62.1%
unpow262.1%
unpow262.1%
hypot-define81.9%
Applied egg-rr81.9%
Taylor expanded in A around 0 54.9%
unpow254.9%
unpow254.9%
hypot-define70.3%
Simplified70.3%
Taylor expanded in C around 0 69.7%
Final simplification74.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))
(t_1 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
(if (<= B -1.1e-33)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.45e-93)
t_0
(if (<= B -2.05e-137)
t_1
(if (<= B -4.5e-238)
t_0
(if (<= B 2.3e-51)
t_1
(if (<= B 28500.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
double tmp;
if (B <= -1.1e-33) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.45e-93) {
tmp = t_0;
} else if (B <= -2.05e-137) {
tmp = t_1;
} else if (B <= -4.5e-238) {
tmp = t_0;
} else if (B <= 2.3e-51) {
tmp = t_1;
} else if (B <= 28500.0) {
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((-0.5 * (B / C))) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
double tmp;
if (B <= -1.1e-33) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.45e-93) {
tmp = t_0;
} else if (B <= -2.05e-137) {
tmp = t_1;
} else if (B <= -4.5e-238) {
tmp = t_0;
} else if (B <= 2.3e-51) {
tmp = t_1;
} else if (B <= 28500.0) {
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((-0.5 * (B / C))) / math.pi) t_1 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) tmp = 0 if B <= -1.1e-33: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.45e-93: tmp = t_0 elif B <= -2.05e-137: tmp = t_1 elif B <= -4.5e-238: tmp = t_0 elif B <= 2.3e-51: tmp = t_1 elif B <= 28500.0: 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(-0.5 * Float64(B / C))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) tmp = 0.0 if (B <= -1.1e-33) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.45e-93) tmp = t_0; elseif (B <= -2.05e-137) tmp = t_1; elseif (B <= -4.5e-238) tmp = t_0; elseif (B <= 2.3e-51) tmp = t_1; elseif (B <= 28500.0) 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((-0.5 * (B / C))) / pi); t_1 = 180.0 * (atan((0.5 * (B / A))) / pi); tmp = 0.0; if (B <= -1.1e-33) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.45e-93) tmp = t_0; elseif (B <= -2.05e-137) tmp = t_1; elseif (B <= -4.5e-238) tmp = t_0; elseif (B <= 2.3e-51) tmp = t_1; elseif (B <= 28500.0) 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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.1e-33], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.45e-93], t$95$0, If[LessEqual[B, -2.05e-137], t$95$1, If[LessEqual[B, -4.5e-238], t$95$0, If[LessEqual[B, 2.3e-51], t$95$1, If[LessEqual[B, 28500.0], 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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.1 \cdot 10^{-33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.45 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -2.05 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -4.5 \cdot 10^{-238}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 2.3 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 28500:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.10000000000000003e-33Initial program 61.9%
Taylor expanded in B around -inf 66.2%
if -1.10000000000000003e-33 < B < -1.4499999999999999e-93 or -2.0499999999999999e-137 < B < -4.49999999999999996e-238 or 2.30000000000000002e-51 < B < 28500Initial program 51.0%
Taylor expanded in C around inf 52.6%
+-commutative52.6%
associate-*r/52.6%
mul-1-neg52.6%
distribute-rgt1-in52.6%
metadata-eval52.6%
mul0-lft52.6%
metadata-eval52.6%
Simplified52.6%
Taylor expanded in B around 0 52.6%
if -1.4499999999999999e-93 < B < -2.0499999999999999e-137 or -4.49999999999999996e-238 < B < 2.30000000000000002e-51Initial program 62.0%
Taylor expanded in A around -inf 39.6%
if 28500 < B Initial program 59.0%
Taylor expanded in B around inf 58.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.1e-88)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (or (<= B -7.8e-187) (and (not (<= B 1.05e-273)) (<= B 1.45e-140)))
(* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI))
(* (/ 180.0 PI) (atan (/ (+ C (* B (- -1.0 (/ A B)))) B))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.1e-88) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if ((B <= -7.8e-187) || (!(B <= 1.05e-273) && (B <= 1.45e-140))) {
tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.1e-88) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if ((B <= -7.8e-187) || (!(B <= 1.05e-273) && (B <= 1.45e-140))) {
tmp = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.1e-88: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif (B <= -7.8e-187) or (not (B <= 1.05e-273) and (B <= 1.45e-140)): tmp = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C + (B * (-1.0 - (A / B)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.1e-88) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif ((B <= -7.8e-187) || (!(B <= 1.05e-273) && (B <= 1.45e-140))) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B * Float64(-1.0 - Float64(A / B)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.1e-88) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif ((B <= -7.8e-187) || (~((B <= 1.05e-273)) && (B <= 1.45e-140))) tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / pi); else tmp = (180.0 / pi) * atan(((C + (B * (-1.0 - (A / B)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.1e-88], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, -7.8e-187], And[N[Not[LessEqual[B, 1.05e-273]], $MachinePrecision], LessEqual[B, 1.45e-140]]], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B * N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.1 \cdot 10^{-88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -7.8 \cdot 10^{-187} \lor \neg \left(B \leq 1.05 \cdot 10^{-273}\right) \land B \leq 1.45 \cdot 10^{-140}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + B \cdot \left(-1 - \frac{A}{B}\right)}{B}\right)\\
\end{array}
\end{array}
if B < -1.10000000000000002e-88Initial program 63.2%
Taylor expanded in B around -inf 86.6%
associate--l+86.6%
div-sub86.6%
Simplified86.6%
if -1.10000000000000002e-88 < B < -7.7999999999999998e-187 or 1.0500000000000001e-273 < B < 1.44999999999999999e-140Initial program 40.3%
Simplified49.9%
Taylor expanded in B around 0 69.6%
if -7.7999999999999998e-187 < B < 1.0500000000000001e-273 or 1.44999999999999999e-140 < B Initial program 65.1%
Simplified76.7%
Taylor expanded in B around inf 71.7%
Final simplification75.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI)))
(t_1 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -2.2e-88)
t_1
(if (<= B -2.05e-184)
t_0
(if (<= B 9e-274)
t_1
(if (<= B 1.45e-140)
t_0
(/ 180.0 (/ PI (atan (+ (/ C B) (- -1.0 (/ A B))))))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
double t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -2.2e-88) {
tmp = t_1;
} else if (B <= -2.05e-184) {
tmp = t_0;
} else if (B <= 9e-274) {
tmp = t_1;
} else if (B <= 1.45e-140) {
tmp = t_0;
} else {
tmp = 180.0 / (((double) M_PI) / atan(((C / B) + (-1.0 - (A / B)))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
double t_1 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -2.2e-88) {
tmp = t_1;
} else if (B <= -2.05e-184) {
tmp = t_0;
} else if (B <= 9e-274) {
tmp = t_1;
} else if (B <= 1.45e-140) {
tmp = t_0;
} else {
tmp = 180.0 / (Math.PI / Math.atan(((C / B) + (-1.0 - (A / B)))));
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi) t_1 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -2.2e-88: tmp = t_1 elif B <= -2.05e-184: tmp = t_0 elif B <= 9e-274: tmp = t_1 elif B <= 1.45e-140: tmp = t_0 else: tmp = 180.0 / (math.pi / math.atan(((C / B) + (-1.0 - (A / B))))) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -2.2e-88) tmp = t_1; elseif (B <= -2.05e-184) tmp = t_0; elseif (B <= 9e-274) tmp = t_1; elseif (B <= 1.45e-140) tmp = t_0; else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / pi); t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -2.2e-88) tmp = t_1; elseif (B <= -2.05e-184) tmp = t_0; elseif (B <= 9e-274) tmp = t_1; elseif (B <= 1.45e-140) tmp = t_0; else tmp = 180.0 / (pi / atan(((C / B) + (-1.0 - (A / B))))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.2e-88], t$95$1, If[LessEqual[B, -2.05e-184], t$95$0, If[LessEqual[B, 9e-274], t$95$1, If[LessEqual[B, 1.45e-140], t$95$0, N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.2 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}}\\
\end{array}
\end{array}
if B < -2.20000000000000005e-88 or -2.05e-184 < B < 8.99999999999999982e-274Initial program 69.0%
Taylor expanded in B around -inf 79.7%
associate--l+79.7%
div-sub79.7%
Simplified79.7%
if -2.20000000000000005e-88 < B < -2.05e-184 or 8.99999999999999982e-274 < B < 1.44999999999999999e-140Initial program 40.3%
Simplified49.9%
Taylor expanded in B around 0 69.6%
if 1.44999999999999999e-140 < B Initial program 58.8%
clear-num58.8%
un-div-inv58.8%
associate-*l/58.8%
*-un-lft-identity58.8%
unpow258.8%
unpow258.8%
hypot-define76.6%
Applied egg-rr76.6%
Taylor expanded in B around inf 73.8%
Final simplification75.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI)))
(t_1 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -2.8e-87)
t_1
(if (<= B -1.92e-184)
t_0
(if (<= B 1.18e-273)
t_1
(if (<= B 9.5e-141)
t_0
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
double t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -2.8e-87) {
tmp = t_1;
} else if (B <= -1.92e-184) {
tmp = t_0;
} else if (B <= 1.18e-273) {
tmp = t_1;
} else if (B <= 9.5e-141) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
double t_1 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -2.8e-87) {
tmp = t_1;
} else if (B <= -1.92e-184) {
tmp = t_0;
} else if (B <= 1.18e-273) {
tmp = t_1;
} else if (B <= 9.5e-141) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi) t_1 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -2.8e-87: tmp = t_1 elif B <= -1.92e-184: tmp = t_0 elif B <= 1.18e-273: tmp = t_1 elif B <= 9.5e-141: tmp = t_0 else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -2.8e-87) tmp = t_1; elseif (B <= -1.92e-184) tmp = t_0; elseif (B <= 1.18e-273) tmp = t_1; elseif (B <= 9.5e-141) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / pi); t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -2.8e-87) tmp = t_1; elseif (B <= -1.92e-184) tmp = t_0; elseif (B <= 1.18e-273) tmp = t_1; elseif (B <= 9.5e-141) tmp = t_0; else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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-87], t$95$1, If[LessEqual[B, -1.92e-184], t$95$0, If[LessEqual[B, 1.18e-273], t$95$1, If[LessEqual[B, 9.5e-141], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.8 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -1.92 \cdot 10^{-184}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.18 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-141}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.8000000000000001e-87 or -1.9200000000000001e-184 < B < 1.17999999999999991e-273Initial program 69.0%
Taylor expanded in B around -inf 79.7%
associate--l+79.7%
div-sub79.7%
Simplified79.7%
if -2.8000000000000001e-87 < B < -1.9200000000000001e-184 or 1.17999999999999991e-273 < B < 9.49999999999999996e-141Initial program 40.3%
Simplified49.9%
Taylor expanded in B around 0 69.6%
if 9.49999999999999996e-141 < B Initial program 58.8%
Taylor expanded in B around inf 73.8%
Final simplification75.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= B -2.6e-37)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.35e-236)
t_0
(if (<= B 1.04e-193)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4700.0) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (B <= -2.6e-37) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.35e-236) {
tmp = t_0;
} else if (B <= 1.04e-193) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4700.0) {
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((-0.5 * (B / C))) / Math.PI);
double tmp;
if (B <= -2.6e-37) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.35e-236) {
tmp = t_0;
} else if (B <= 1.04e-193) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4700.0) {
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((-0.5 * (B / C))) / math.pi) tmp = 0 if B <= -2.6e-37: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.35e-236: tmp = t_0 elif B <= 1.04e-193: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4700.0: 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(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (B <= -2.6e-37) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.35e-236) tmp = t_0; elseif (B <= 1.04e-193) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4700.0) 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((-0.5 * (B / C))) / pi); tmp = 0.0; if (B <= -2.6e-37) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.35e-236) tmp = t_0; elseif (B <= 1.04e-193) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4700.0) 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[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.6e-37], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.35e-236], t$95$0, If[LessEqual[B, 1.04e-193], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4700.0], 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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.6 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.35 \cdot 10^{-236}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.04 \cdot 10^{-193}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4700:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.5999999999999998e-37Initial program 61.9%
Taylor expanded in B around -inf 66.2%
if -2.5999999999999998e-37 < B < -2.35000000000000013e-236 or 1.04000000000000001e-193 < B < 4700Initial program 50.5%
Taylor expanded in C around inf 40.1%
+-commutative40.1%
associate-*r/40.1%
mul-1-neg40.1%
distribute-rgt1-in40.1%
metadata-eval40.1%
mul0-lft40.1%
metadata-eval40.1%
Simplified40.1%
Taylor expanded in B around 0 40.1%
if -2.35000000000000013e-236 < B < 1.04000000000000001e-193Initial program 72.2%
Taylor expanded in C around inf 40.0%
associate-*r/40.0%
mul-1-neg40.0%
distribute-rgt1-in40.0%
metadata-eval40.0%
mul0-lft40.0%
metadata-eval40.0%
Simplified40.0%
if 4700 < B Initial program 59.0%
Taylor expanded in B around inf 58.8%
(FPCore (A B C)
:precision binary64
(if (<= C -1.75e-32)
(/ 180.0 (/ PI (atan (/ (- C B) B))))
(if (<= C 1.15e+31)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.75e-32) {
tmp = 180.0 / (((double) M_PI) / atan(((C - B) / B)));
} else if (C <= 1.15e+31) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.75e-32) {
tmp = 180.0 / (Math.PI / Math.atan(((C - B) / B)));
} else if (C <= 1.15e+31) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.75e-32: tmp = 180.0 / (math.pi / math.atan(((C - B) / B))) elif C <= 1.15e+31: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.75e-32) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C - B) / B)))); elseif (C <= 1.15e+31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.75e-32) tmp = 180.0 / (pi / atan(((C - B) / B))); elseif (C <= 1.15e+31) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.75e-32], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.15e+31], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.75 \cdot 10^{-32}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C - B}{B}\right)}}\\
\mathbf{elif}\;C \leq 1.15 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -1.7499999999999999e-32Initial program 80.3%
clear-num80.3%
un-div-inv80.4%
associate-*l/80.4%
*-un-lft-identity80.4%
unpow280.4%
unpow280.4%
hypot-define92.3%
Applied egg-rr92.3%
Taylor expanded in A around 0 80.4%
unpow280.4%
unpow280.4%
hypot-define87.0%
Simplified87.0%
Taylor expanded in C around 0 79.8%
if -1.7499999999999999e-32 < C < 1.15e31Initial program 63.2%
Taylor expanded in C around 0 59.2%
associate-*r/59.2%
mul-1-neg59.2%
+-commutative59.2%
unpow259.2%
unpow259.2%
hypot-define77.6%
Simplified77.6%
Taylor expanded in B around -inf 51.1%
mul-1-neg51.1%
unsub-neg51.1%
Simplified51.1%
if 1.15e31 < C Initial program 24.7%
clear-num24.7%
un-div-inv24.7%
associate-*l/24.7%
*-un-lft-identity24.7%
unpow224.7%
unpow224.7%
hypot-define59.4%
Applied egg-rr59.4%
Taylor expanded in A around 0 23.3%
unpow223.3%
unpow223.3%
hypot-define52.0%
Simplified52.0%
Taylor expanded in C around inf 70.9%
(FPCore (A B C)
:precision binary64
(if (<= C -2.3e-165)
(/ 180.0 (/ PI (atan (+ 1.0 (/ C B)))))
(if (<= C 1.2e+31)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.3e-165) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + (C / B))));
} else if (C <= 1.2e+31) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.3e-165) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + (C / B))));
} else if (C <= 1.2e+31) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.3e-165: tmp = 180.0 / (math.pi / math.atan((1.0 + (C / B)))) elif C <= 1.2e+31: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.3e-165) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(C / B))))); elseif (C <= 1.2e+31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.3e-165) tmp = 180.0 / (pi / atan((1.0 + (C / B)))); elseif (C <= 1.2e+31) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.3e-165], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.2e+31], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.3 \cdot 10^{-165}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C}{B}\right)}}\\
\mathbf{elif}\;C \leq 1.2 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -2.3e-165Initial program 78.4%
clear-num78.4%
un-div-inv78.5%
associate-*l/78.5%
*-un-lft-identity78.5%
unpow278.5%
unpow278.5%
hypot-define91.2%
Applied egg-rr91.2%
Taylor expanded in B around -inf 74.5%
associate--l+74.5%
div-sub74.5%
Simplified74.5%
Taylor expanded in C around inf 70.7%
if -2.3e-165 < C < 1.19999999999999991e31Initial program 61.1%
Taylor expanded in C around 0 60.1%
associate-*r/60.1%
mul-1-neg60.1%
+-commutative60.1%
unpow260.1%
unpow260.1%
hypot-define78.9%
Simplified78.9%
Taylor expanded in B around -inf 51.5%
mul-1-neg51.5%
unsub-neg51.5%
Simplified51.5%
if 1.19999999999999991e31 < C Initial program 24.7%
clear-num24.7%
un-div-inv24.7%
associate-*l/24.7%
*-un-lft-identity24.7%
unpow224.7%
unpow224.7%
hypot-define59.4%
Applied egg-rr59.4%
Taylor expanded in A around 0 23.3%
unpow223.3%
unpow223.3%
hypot-define52.0%
Simplified52.0%
Taylor expanded in C around inf 70.9%
(FPCore (A B C)
:precision binary64
(if (<= C -1.5e+80)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 7.5e+31)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.5e+80) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 7.5e+31) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.5e+80) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 7.5e+31) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.5e+80: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 7.5e+31: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.5e+80) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 7.5e+31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.5e+80) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 7.5e+31) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.5e+80], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.5e+31], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.5 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.5 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -1.49999999999999993e80Initial program 86.0%
Taylor expanded in C around -inf 81.6%
if -1.49999999999999993e80 < C < 7.5e31Initial program 63.8%
Taylor expanded in C around 0 58.8%
associate-*r/58.8%
mul-1-neg58.8%
+-commutative58.8%
unpow258.8%
unpow258.8%
hypot-define77.3%
Simplified77.3%
Taylor expanded in B around -inf 50.7%
mul-1-neg50.7%
unsub-neg50.7%
Simplified50.7%
if 7.5e31 < C Initial program 24.7%
clear-num24.7%
un-div-inv24.7%
associate-*l/24.7%
*-un-lft-identity24.7%
unpow224.7%
unpow224.7%
hypot-define59.4%
Applied egg-rr59.4%
Taylor expanded in A around 0 23.3%
unpow223.3%
unpow223.3%
hypot-define52.0%
Simplified52.0%
Taylor expanded in C around inf 70.9%
(FPCore (A B C)
:precision binary64
(if (<= C -1.2e+80)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 1.75e+31)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.2e+80) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 1.75e+31) {
tmp = 180.0 * (atan((1.0 - (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 <= -1.2e+80) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 1.75e+31) {
tmp = 180.0 * (Math.atan((1.0 - (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 <= -1.2e+80: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 1.75e+31: tmp = 180.0 * (math.atan((1.0 - (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 <= -1.2e+80) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 1.75e+31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(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 <= -1.2e+80) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 1.75e+31) tmp = 180.0 * (atan((1.0 - (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, -1.2e+80], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.75e+31], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.2 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.75 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{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 < -1.1999999999999999e80Initial program 86.0%
Taylor expanded in C around -inf 81.6%
if -1.1999999999999999e80 < C < 1.75e31Initial program 63.8%
Taylor expanded in C around 0 58.8%
associate-*r/58.8%
mul-1-neg58.8%
+-commutative58.8%
unpow258.8%
unpow258.8%
hypot-define77.3%
Simplified77.3%
Taylor expanded in B around -inf 50.7%
mul-1-neg50.7%
unsub-neg50.7%
Simplified50.7%
if 1.75e31 < C Initial program 24.7%
Taylor expanded in C around inf 70.8%
+-commutative70.8%
associate-*r/70.8%
mul-1-neg70.8%
distribute-rgt1-in70.8%
metadata-eval70.8%
mul0-lft70.8%
metadata-eval70.8%
Simplified70.8%
Taylor expanded in B around 0 70.8%
(FPCore (A B C)
:precision binary64
(if (<= C -7e-153)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C 7.8e-207)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -7e-153) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= 7.8e-207) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -7e-153) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= 7.8e-207) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -7e-153: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= 7.8e-207: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -7e-153) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= 7.8e-207) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -7e-153) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= 7.8e-207) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -7e-153], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.8e-207], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -7 \cdot 10^{-153}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.8 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -6.99999999999999961e-153Initial program 79.8%
Taylor expanded in C around -inf 62.3%
if -6.99999999999999961e-153 < C < 7.80000000000000042e-207Initial program 55.6%
Taylor expanded in A around -inf 37.7%
if 7.80000000000000042e-207 < C Initial program 42.6%
Taylor expanded in C around inf 57.1%
+-commutative57.1%
associate-*r/57.1%
mul-1-neg57.1%
distribute-rgt1-in57.1%
metadata-eval57.1%
mul0-lft57.1%
metadata-eval57.1%
Simplified57.1%
Taylor expanded in B around 0 57.1%
(FPCore (A B C)
:precision binary64
(if (<= B -9e-84)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.8e-189)
(* 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 <= -9e-84) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.8e-189) {
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 <= -9e-84) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.8e-189) {
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 <= -9e-84: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.8e-189: 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 <= -9e-84) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.8e-189) 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 <= -9e-84) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.8e-189) 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, -9e-84], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.8e-189], 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 -9 \cdot 10^{-84}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-189}:\\
\;\;\;\;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 < -9.00000000000000031e-84Initial program 63.2%
Taylor expanded in B around -inf 61.3%
if -9.00000000000000031e-84 < B < 1.80000000000000008e-189Initial program 58.1%
Taylor expanded in C around inf 34.3%
associate-*r/34.3%
mul-1-neg34.3%
distribute-rgt1-in34.3%
metadata-eval34.3%
mul0-lft34.3%
metadata-eval34.3%
Simplified34.3%
if 1.80000000000000008e-189 < B Initial program 56.8%
Taylor expanded in B around inf 43.4%
(FPCore (A B C) :precision binary64 (if (<= C 1.6e+31) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (/ 180.0 (/ PI (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.6e+31) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.6e+31) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.6e+31: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.6e+31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.6e+31) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.6e+31], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.6 \cdot 10^{+31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < 1.6e31Initial program 69.6%
Taylor expanded in B around -inf 62.7%
associate--l+62.7%
div-sub62.7%
Simplified62.7%
if 1.6e31 < C Initial program 24.7%
clear-num24.7%
un-div-inv24.7%
associate-*l/24.7%
*-un-lft-identity24.7%
unpow224.7%
unpow224.7%
hypot-define59.4%
Applied egg-rr59.4%
Taylor expanded in A around 0 23.3%
unpow223.3%
unpow223.3%
hypot-define52.0%
Simplified52.0%
Taylor expanded in C around inf 70.9%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 59.3%
Taylor expanded in B around -inf 39.5%
if -4.999999999999985e-310 < B Initial program 58.8%
Taylor expanded in B around inf 36.0%
(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 59.1%
Taylor expanded in B around inf 18.7%
herbie shell --seed 2024096
(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)))