
(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 (if (<= C 9.2e+89) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B)))) (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 9.2e+89) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 9.2e+89) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 9.2e+89: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 9.2e+89) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 9.2e+89) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 9.2e+89], 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[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 9.2 \cdot 10^{+89}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 9.1999999999999996e89Initial program 63.5%
Applied egg-rr84.7%
if 9.1999999999999996e89 < C Initial program 15.1%
associate-*r/15.1%
associate-*l/15.1%
*-un-lft-identity15.1%
unpow215.1%
unpow215.1%
hypot-define52.8%
Applied egg-rr52.8%
Taylor expanded in A around 0 19.3%
unpow219.3%
unpow219.3%
hypot-define52.8%
Simplified52.8%
Taylor expanded in C around inf 82.5%
(FPCore (A B C)
:precision binary64
(if (<= C -5.9e-34)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 6.5e+86)
(/ (* 180.0 (atan (/ (+ A (hypot A B)) (- B)))) PI)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.9e-34) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 6.5e+86) {
tmp = (180.0 * atan(((A + hypot(A, 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 <= -5.9e-34) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 6.5e+86) {
tmp = (180.0 * Math.atan(((A + Math.hypot(A, 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 <= -5.9e-34: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 6.5e+86: tmp = (180.0 * math.atan(((A + math.hypot(A, 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 <= -5.9e-34) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 6.5e+86) tmp = Float64(Float64(180.0 * atan(Float64(Float64(A + hypot(A, B)) / Float64(-B)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5.9e-34) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 6.5e+86) tmp = (180.0 * atan(((A + hypot(A, 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, -5.9e-34], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.5e+86], N[(N[(180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.9 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.5 \cdot 10^{+86}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.9000000000000002e-34Initial program 80.1%
Taylor expanded in A around 0 78.5%
unpow278.5%
unpow278.5%
hypot-define91.2%
Simplified91.2%
if -5.9000000000000002e-34 < C < 6.49999999999999996e86Initial program 55.9%
associate-*r/55.9%
associate-*l/55.9%
*-un-lft-identity55.9%
unpow255.9%
unpow255.9%
hypot-define79.7%
Applied egg-rr79.7%
Taylor expanded in C around 0 55.2%
mul-1-neg55.2%
distribute-neg-frac255.2%
unpow255.2%
unpow255.2%
hypot-define78.9%
Simplified78.9%
if 6.49999999999999996e86 < C Initial program 15.1%
associate-*r/15.1%
associate-*l/15.1%
*-un-lft-identity15.1%
unpow215.1%
unpow215.1%
hypot-define52.8%
Applied egg-rr52.8%
Taylor expanded in A around 0 19.3%
unpow219.3%
unpow219.3%
hypot-define52.8%
Simplified52.8%
Taylor expanded in C around inf 82.5%
(FPCore (A B C)
:precision binary64
(if (<= C -3.7e-34)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 2.7e+87)
(* 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 <= -3.7e-34) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 2.7e+87) {
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 <= -3.7e-34) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 2.7e+87) {
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 <= -3.7e-34: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 2.7e+87: 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 <= -3.7e-34) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 2.7e+87) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / Float64(-B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.7e-34) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 2.7e+87) 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, -3.7e-34], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.7e+87], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.7 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.7 \cdot 10^{+87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.69999999999999988e-34Initial program 80.1%
Taylor expanded in A around 0 78.5%
unpow278.5%
unpow278.5%
hypot-define91.2%
Simplified91.2%
if -3.69999999999999988e-34 < C < 2.70000000000000007e87Initial program 55.9%
Taylor expanded in C around 0 55.2%
associate-*r/55.2%
mul-1-neg55.2%
+-commutative55.2%
unpow255.2%
unpow255.2%
hypot-define78.9%
Simplified78.9%
if 2.70000000000000007e87 < C Initial program 15.1%
associate-*r/15.1%
associate-*l/15.1%
*-un-lft-identity15.1%
unpow215.1%
unpow215.1%
hypot-define52.8%
Applied egg-rr52.8%
Taylor expanded in A around 0 19.3%
unpow219.3%
unpow219.3%
hypot-define52.8%
Simplified52.8%
Taylor expanded in C around inf 82.5%
Final simplification82.7%
(FPCore (A B C)
:precision binary64
(if (<= A -9.5e+96)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= A 7.2e-14)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.5e+96) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (A <= 7.2e-14) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.5e+96) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (A <= 7.2e-14) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.5e+96: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif A <= 7.2e-14: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.5e+96) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (A <= 7.2e-14) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.5e+96) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (A <= 7.2e-14) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.5e+96], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 7.2e-14], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.5 \cdot 10^{+96}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.2 \cdot 10^{-14}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -9.50000000000000089e96Initial program 14.8%
associate-*r/14.8%
associate-*l/14.8%
*-un-lft-identity14.8%
unpow214.8%
unpow214.8%
hypot-define51.2%
Applied egg-rr51.2%
Taylor expanded in A around -inf 72.1%
associate-*r/72.1%
*-commutative72.1%
Simplified72.1%
if -9.50000000000000089e96 < A < 7.1999999999999996e-14Initial program 57.6%
associate-*r/57.6%
associate-*l/57.6%
*-un-lft-identity57.6%
unpow257.6%
unpow257.6%
hypot-define80.5%
Applied egg-rr80.5%
Taylor expanded in A around 0 54.7%
unpow254.7%
unpow254.7%
hypot-define77.7%
Simplified77.7%
if 7.1999999999999996e-14 < A Initial program 76.3%
Applied egg-rr95.1%
Taylor expanded in B around -inf 85.8%
associate--l+85.8%
div-sub85.9%
Simplified85.9%
(FPCore (A B C)
:precision binary64
(if (<= A -2.25e+94)
(/ (* 180.0 (atan (/ (* B 0.5) A))) PI)
(if (<= A 1.55e-13)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.25e+94) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else if (A <= 1.55e-13) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.25e+94) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else if (A <= 1.55e-13) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.25e+94: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi elif A <= 1.55e-13: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.25e+94) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); elseif (A <= 1.55e-13) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.25e+94) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; elseif (A <= 1.55e-13) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.25e+94], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.55e-13], 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[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.25 \cdot 10^{+94}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{-13}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.24999999999999986e94Initial program 14.8%
associate-*r/14.8%
associate-*l/14.8%
*-un-lft-identity14.8%
unpow214.8%
unpow214.8%
hypot-define51.2%
Applied egg-rr51.2%
Taylor expanded in A around -inf 72.1%
associate-*r/72.1%
*-commutative72.1%
Simplified72.1%
if -2.24999999999999986e94 < A < 1.55e-13Initial program 57.6%
Taylor expanded in A around 0 54.7%
unpow254.7%
unpow254.7%
hypot-define77.7%
Simplified77.7%
if 1.55e-13 < A Initial program 76.3%
Applied egg-rr95.1%
Taylor expanded in B around -inf 85.8%
associate--l+85.8%
div-sub85.9%
Simplified85.9%
(FPCore (A B C) :precision binary64 (if (<= C 5.1e+88) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 5.1e+88) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / 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 <= 5.1e+88) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / 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 <= 5.1e+88: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / 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 <= 5.1e+88) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 5.1e+88) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 5.1e+88], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 5.1 \cdot 10^{+88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 5.0999999999999997e88Initial program 63.5%
associate-*l/63.5%
*-lft-identity63.5%
+-commutative63.5%
unpow263.5%
unpow263.5%
hypot-define84.7%
Simplified84.7%
if 5.0999999999999997e88 < C Initial program 15.1%
associate-*r/15.1%
associate-*l/15.1%
*-un-lft-identity15.1%
unpow215.1%
unpow215.1%
hypot-define52.8%
Applied egg-rr52.8%
Taylor expanded in A around 0 19.3%
unpow219.3%
unpow219.3%
hypot-define52.8%
Simplified52.8%
Taylor expanded in C around inf 82.5%
(FPCore (A B C) :precision binary64 (if (<= A -4.5e+96) (/ (* 180.0 (atan (/ (* B 0.5) A))) PI) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e+96) {
tmp = (180.0 * atan(((B * 0.5) / A))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e+96) {
tmp = (180.0 * Math.atan(((B * 0.5) / A))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.5e+96: tmp = (180.0 * math.atan(((B * 0.5) / A))) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.5e+96) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / A))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.5e+96) tmp = (180.0 * atan(((B * 0.5) / A))) / pi; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.5e+96], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.5 \cdot 10^{+96}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.49999999999999957e96Initial program 14.8%
associate-*r/14.8%
associate-*l/14.8%
*-un-lft-identity14.8%
unpow214.8%
unpow214.8%
hypot-define51.2%
Applied egg-rr51.2%
Taylor expanded in A around -inf 72.1%
associate-*r/72.1%
*-commutative72.1%
Simplified72.1%
if -4.49999999999999957e96 < A Initial program 62.6%
Simplified84.3%
(FPCore (A B C)
:precision binary64
(if (<= B -3.5e-96)
(/ (* 180.0 (atan (* A (+ (/ (+ 1.0 (/ C B)) A) (/ -1.0 B))))) PI)
(if (<= B 6e-266)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI))
(/ (* 180.0 (atan (+ (/ C B) (- -1.0 (/ A B))))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.5e-96) {
tmp = (180.0 * atan((A * (((1.0 + (C / B)) / A) + (-1.0 / B))))) / ((double) M_PI);
} else if (B <= 6e-266) {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
} 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 tmp;
if (B <= -3.5e-96) {
tmp = (180.0 * Math.atan((A * (((1.0 + (C / B)) / A) + (-1.0 / B))))) / Math.PI;
} else if (B <= 6e-266) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C / B) + (-1.0 - (A / B))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.5e-96: tmp = (180.0 * math.atan((A * (((1.0 + (C / B)) / A) + (-1.0 / B))))) / math.pi elif B <= 6e-266: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) else: tmp = (180.0 * math.atan(((C / B) + (-1.0 - (A / B))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.5e-96) tmp = Float64(Float64(180.0 * atan(Float64(A * Float64(Float64(Float64(1.0 + Float64(C / B)) / A) + Float64(-1.0 / B))))) / pi); elseif (B <= 6e-266) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.5e-96) tmp = (180.0 * atan((A * (((1.0 + (C / B)) / A) + (-1.0 / B))))) / pi; elseif (B <= 6e-266) tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); else tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.5e-96], N[(N[(180.0 * N[ArcTan[N[(A * N[(N[(N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 6e-266], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.5 \cdot 10^{-96}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(A \cdot \left(\frac{1 + \frac{C}{B}}{A} + \frac{-1}{B}\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-266}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.4999999999999999e-96Initial program 55.1%
associate-*r/55.1%
associate-*l/55.1%
*-un-lft-identity55.1%
unpow255.1%
unpow255.1%
hypot-define81.9%
Applied egg-rr81.9%
Taylor expanded in B around -inf 79.1%
associate--l+79.1%
div-sub79.1%
Simplified79.1%
Taylor expanded in A around -inf 79.1%
mul-1-neg79.1%
distribute-rgt-neg-in79.1%
+-commutative79.1%
mul-1-neg79.1%
unsub-neg79.1%
Simplified79.1%
if -3.4999999999999999e-96 < B < 5.9999999999999999e-266Initial program 51.6%
Taylor expanded in C around inf 49.1%
add-exp-log45.3%
distribute-lft-out45.3%
associate-/l*48.6%
Applied egg-rr48.6%
Taylor expanded in C around -inf 49.4%
distribute-rgt1-in49.4%
metadata-eval49.4%
mul0-lft49.4%
associate-*r/49.4%
metadata-eval49.4%
mul0-lft49.4%
metadata-eval49.4%
distribute-rgt1-in49.4%
mul-1-neg49.4%
unsub-neg49.4%
distribute-rgt1-in49.4%
metadata-eval49.4%
mul0-lft49.4%
div049.4%
neg-sub049.4%
mul-1-neg49.4%
associate-*r/49.4%
Simplified52.4%
if 5.9999999999999999e-266 < B Initial program 56.2%
associate-*r/56.2%
associate-*l/56.2%
*-un-lft-identity56.2%
unpow256.2%
unpow256.2%
hypot-define78.3%
Applied egg-rr78.3%
Taylor expanded in B around inf 69.9%
Final simplification68.6%
(FPCore (A B C)
:precision binary64
(if (<= B -3.2e-96)
(/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B)))))
(if (<= B 1.5e-262)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) C)) PI))
(/ (* 180.0 (atan (+ (/ C B) (- -1.0 (/ A B))))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.2e-96) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
} else if (B <= 1.5e-262) {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / ((double) M_PI));
} 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 tmp;
if (B <= -3.2e-96) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
} else if (B <= 1.5e-262) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C / B) + (-1.0 - (A / B))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.2e-96: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) elif B <= 1.5e-262: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / C)) / math.pi) else: tmp = (180.0 * math.atan(((C / B) + (-1.0 - (A / B))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.2e-96) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); elseif (B <= 1.5e-262) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / C)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.2e-96) tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); elseif (B <= 1.5e-262) tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / C)) / pi); else tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.2e-96], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.5e-262], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.2 \cdot 10^{-96}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.20000000000000012e-96Initial program 55.1%
Applied egg-rr81.9%
Taylor expanded in B around -inf 79.1%
associate--l+79.1%
div-sub79.1%
Simplified79.1%
if -3.20000000000000012e-96 < B < 1.50000000000000009e-262Initial program 51.6%
Taylor expanded in C around inf 49.1%
add-exp-log45.3%
distribute-lft-out45.3%
associate-/l*48.6%
Applied egg-rr48.6%
Taylor expanded in C around -inf 49.4%
distribute-rgt1-in49.4%
metadata-eval49.4%
mul0-lft49.4%
associate-*r/49.4%
metadata-eval49.4%
mul0-lft49.4%
metadata-eval49.4%
distribute-rgt1-in49.4%
mul-1-neg49.4%
unsub-neg49.4%
distribute-rgt1-in49.4%
metadata-eval49.4%
mul0-lft49.4%
div049.4%
neg-sub049.4%
mul-1-neg49.4%
associate-*r/49.4%
Simplified52.4%
if 1.50000000000000009e-262 < B Initial program 56.2%
associate-*r/56.2%
associate-*l/56.2%
*-un-lft-identity56.2%
unpow256.2%
unpow256.2%
hypot-define78.3%
Applied egg-rr78.3%
Taylor expanded in B around inf 69.9%
Final simplification68.6%
(FPCore (A B C)
:precision binary64
(if (<= C -15.5)
(/ 180.0 (/ PI (atan (/ (* C 2.0) B))))
(if (<= C -3.5e-279)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 1.65e-220)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -15.5) {
tmp = 180.0 / (((double) M_PI) / atan(((C * 2.0) / B)));
} else if (C <= -3.5e-279) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 1.65e-220) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -15.5) {
tmp = 180.0 / (Math.PI / Math.atan(((C * 2.0) / B)));
} else if (C <= -3.5e-279) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 1.65e-220) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -15.5: tmp = 180.0 / (math.pi / math.atan(((C * 2.0) / B))) elif C <= -3.5e-279: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 1.65e-220: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -15.5) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(C * 2.0) / B)))); elseif (C <= -3.5e-279) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 1.65e-220) tmp = Float64(180.0 * Float64(atan(-1.0) / 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 <= -15.5) tmp = 180.0 / (pi / atan(((C * 2.0) / B))); elseif (C <= -3.5e-279) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 1.65e-220) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -15.5], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.5e-279], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.65e-220], N[(180.0 * N[(N[ArcTan[-1.0], $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 -15.5:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}}\\
\mathbf{elif}\;C \leq -3.5 \cdot 10^{-279}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 1.65 \cdot 10^{-220}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -15.5Initial program 85.2%
Applied egg-rr96.5%
Taylor expanded in C around -inf 80.8%
if -15.5 < C < -3.5000000000000001e-279Initial program 56.0%
Taylor expanded in B around -inf 36.1%
if -3.5000000000000001e-279 < C < 1.65e-220Initial program 50.8%
Taylor expanded in B around inf 51.6%
if 1.65e-220 < C Initial program 41.6%
Applied egg-rr67.6%
Taylor expanded in C around inf 54.4%
distribute-rgt1-in54.4%
metadata-eval54.4%
mul0-lft54.4%
associate-*r/54.4%
metadata-eval54.4%
Simplified54.4%
Taylor expanded in B around 0 55.0%
Final simplification56.3%
(FPCore (A B C)
:precision binary64
(if (<= C -19.5)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= C -4.5e-280)
(* 180.0 (/ (atan 1.0) PI))
(if (<= C 6.8e-221)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -19.5) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (C <= -4.5e-280) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (C <= 6.8e-221) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -19.5) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (C <= -4.5e-280) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (C <= 6.8e-221) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -19.5: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif C <= -4.5e-280: tmp = 180.0 * (math.atan(1.0) / math.pi) elif C <= 6.8e-221: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -19.5) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (C <= -4.5e-280) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (C <= 6.8e-221) tmp = Float64(180.0 * Float64(atan(-1.0) / 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 <= -19.5) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (C <= -4.5e-280) tmp = 180.0 * (atan(1.0) / pi); elseif (C <= 6.8e-221) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -19.5], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.5e-280], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.8e-221], N[(180.0 * N[(N[ArcTan[-1.0], $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 -19.5:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.5 \cdot 10^{-280}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;C \leq 6.8 \cdot 10^{-221}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -19.5Initial program 85.2%
Taylor expanded in C around -inf 80.7%
if -19.5 < C < -4.4999999999999996e-280Initial program 56.0%
Taylor expanded in B around -inf 36.1%
if -4.4999999999999996e-280 < C < 6.8000000000000003e-221Initial program 50.8%
Taylor expanded in B around inf 51.6%
if 6.8000000000000003e-221 < C Initial program 41.6%
Applied egg-rr67.6%
Taylor expanded in C around inf 54.4%
distribute-rgt1-in54.4%
metadata-eval54.4%
mul0-lft54.4%
associate-*r/54.4%
metadata-eval54.4%
Simplified54.4%
Taylor expanded in B around 0 55.0%
Final simplification56.2%
(FPCore (A B C)
:precision binary64
(if (<= B -3.15e-96)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= B 1.15e-252)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(/ (* 180.0 (atan (/ (- C B) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.15e-96) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (B <= 1.15e-252) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.15e-96) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (B <= 1.15e-252) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.15e-96: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif B <= 1.15e-252: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi else: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.15e-96) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (B <= 1.15e-252) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.15e-96) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (B <= 1.15e-252) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; else tmp = (180.0 * atan(((C - B) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.15e-96], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.15e-252], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.15 \cdot 10^{-96}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-252}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.1499999999999998e-96Initial program 55.1%
associate-*r/55.1%
associate-*l/55.1%
*-un-lft-identity55.1%
unpow255.1%
unpow255.1%
hypot-define81.9%
Applied egg-rr81.9%
Taylor expanded in B around -inf 79.1%
associate--l+79.1%
div-sub79.1%
Simplified79.1%
Taylor expanded in C around inf 70.2%
if -3.1499999999999998e-96 < B < 1.1499999999999999e-252Initial program 53.9%
associate-*r/54.0%
associate-*l/54.0%
*-un-lft-identity54.0%
unpow254.0%
unpow254.0%
hypot-define77.7%
Applied egg-rr77.7%
Taylor expanded in A around 0 44.8%
unpow244.8%
unpow244.8%
hypot-define61.1%
Simplified61.1%
Taylor expanded in C around inf 44.0%
if 1.1499999999999999e-252 < B Initial program 55.1%
associate-*r/55.1%
associate-*l/55.1%
*-un-lft-identity55.1%
unpow255.1%
unpow255.1%
hypot-define77.8%
Applied egg-rr77.8%
Taylor expanded in A around 0 46.5%
unpow246.5%
unpow246.5%
hypot-define64.7%
Simplified64.7%
Taylor expanded in C around 0 60.4%
(FPCore (A B C)
:precision binary64
(if (<= C -2.7e-278)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= C 1.45e-217)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-278) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (C <= 1.45e-217) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.7e-278) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (C <= 1.45e-217) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.7e-278: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif C <= 1.45e-217: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.7e-278) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (C <= 1.45e-217) tmp = Float64(180.0 * Float64(atan(-1.0) / 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 <= -2.7e-278) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (C <= 1.45e-217) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.7e-278], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.45e-217], N[(180.0 * N[(N[ArcTan[-1.0], $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 -2.7 \cdot 10^{-278}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.45 \cdot 10^{-217}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.7000000000000001e-278Initial program 70.7%
associate-*r/70.7%
associate-*l/70.7%
*-un-lft-identity70.7%
unpow270.7%
unpow270.7%
hypot-define90.1%
Applied egg-rr90.1%
Taylor expanded in B around -inf 69.8%
associate--l+69.8%
div-sub72.6%
Simplified72.6%
Taylor expanded in C around inf 65.4%
if -2.7000000000000001e-278 < C < 1.44999999999999991e-217Initial program 50.8%
Taylor expanded in B around inf 51.6%
if 1.44999999999999991e-217 < C Initial program 41.6%
Applied egg-rr67.6%
Taylor expanded in C around inf 54.4%
distribute-rgt1-in54.4%
metadata-eval54.4%
mul0-lft54.4%
associate-*r/54.4%
metadata-eval54.4%
Simplified54.4%
Taylor expanded in B around 0 55.0%
(FPCore (A B C)
:precision binary64
(if (<= B -6.6e-96)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.4e-46)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.6e-96) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.4e-46) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((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 <= -6.6e-96) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.4e-46) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.6e-96: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.4e-46: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.6e-96) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.4e-46) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / 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 <= -6.6e-96) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.4e-46) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.6e-96], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.4e-46], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $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 -6.6 \cdot 10^{-96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.4 \cdot 10^{-46}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.5999999999999998e-96Initial program 55.1%
Taylor expanded in B around -inf 58.2%
if -6.5999999999999998e-96 < B < 1.3999999999999999e-46Initial program 54.5%
Applied egg-rr76.0%
Taylor expanded in C around inf 39.2%
distribute-rgt1-in39.2%
metadata-eval39.2%
mul0-lft39.2%
associate-*r/39.2%
metadata-eval39.2%
Simplified39.2%
Taylor expanded in B around 0 39.9%
if 1.3999999999999999e-46 < B Initial program 54.9%
Taylor expanded in B around inf 58.4%
(FPCore (A B C) :precision binary64 (if (<= B 1e-185) (/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))) (/ (* 180.0 (atan (+ (/ C B) (- -1.0 (/ A B))))) PI)))
double code(double A, double B, double C) {
double tmp;
if (B <= 1e-185) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
} 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 tmp;
if (B <= 1e-185) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
} else {
tmp = (180.0 * Math.atan(((C / B) + (-1.0 - (A / B))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1e-185: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) else: tmp = (180.0 * math.atan(((C / B) + (-1.0 - (A / B))))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1e-185) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1e-185) tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); else tmp = (180.0 * atan(((C / B) + (-1.0 - (A / B))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1e-185], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 10^{-185}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < 9.9999999999999999e-186Initial program 55.7%
Applied egg-rr81.1%
Taylor expanded in B around -inf 62.0%
associate--l+62.0%
div-sub64.1%
Simplified64.1%
if 9.9999999999999999e-186 < B Initial program 53.6%
associate-*r/53.6%
associate-*l/53.6%
*-un-lft-identity53.6%
unpow253.6%
unpow253.6%
hypot-define76.2%
Applied egg-rr76.2%
Taylor expanded in B around inf 70.5%
Final simplification66.8%
(FPCore (A B C) :precision binary64 (if (<= B 5e-185) (/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))) (* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5e-185) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
} 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 tmp;
if (B <= 5e-185) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 5e-185: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 5e-185) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); 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) tmp = 0.0; if (B <= 5e-185) tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 5e-185], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\mathbf{if}\;B \leq 5 \cdot 10^{-185}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\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 < 5.0000000000000003e-185Initial program 55.7%
Applied egg-rr81.1%
Taylor expanded in B around -inf 62.0%
associate--l+62.0%
div-sub64.1%
Simplified64.1%
if 5.0000000000000003e-185 < B Initial program 53.6%
Taylor expanded in B around inf 70.5%
Final simplification66.8%
(FPCore (A B C) :precision binary64 (if (<= C 9.5e-32) (/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 9.5e-32) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 9.5e-32) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 9.5e-32: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 9.5e-32) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); 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 <= 9.5e-32) tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 9.5e-32], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 9.5 \cdot 10^{-32}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 9.4999999999999999e-32Initial program 67.0%
Applied egg-rr89.7%
Taylor expanded in B around -inf 61.9%
associate--l+61.9%
div-sub63.6%
Simplified63.6%
if 9.4999999999999999e-32 < C Initial program 27.4%
Applied egg-rr55.0%
Taylor expanded in C around inf 66.1%
distribute-rgt1-in66.1%
metadata-eval66.1%
mul0-lft66.1%
associate-*r/66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in B around 0 67.1%
(FPCore (A B C) :precision binary64 (if (<= C 9.2e-37) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 9.2e-37) {
tmp = 180.0 * (atan((1.0 + ((C - 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 <= 9.2e-37) {
tmp = 180.0 * (Math.atan((1.0 + ((C - 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 <= 9.2e-37: tmp = 180.0 * (math.atan((1.0 + ((C - 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 <= 9.2e-37) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - 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 <= 9.2e-37) tmp = 180.0 * (atan((1.0 + ((C - 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, 9.2e-37], 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[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 9.2 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - 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 < 9.1999999999999999e-37Initial program 67.0%
Taylor expanded in B around -inf 61.9%
associate--l+61.9%
div-sub63.6%
Simplified63.6%
if 9.1999999999999999e-37 < C Initial program 27.4%
Applied egg-rr55.0%
Taylor expanded in C around inf 66.1%
distribute-rgt1-in66.1%
metadata-eval66.1%
mul0-lft66.1%
associate-*r/66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in B around 0 67.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.52e-133)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.4e-118)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.52e-133) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.4e-118) {
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 <= -1.52e-133) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.4e-118) {
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 <= -1.52e-133: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.4e-118: 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 <= -1.52e-133) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.4e-118) tmp = Float64(180.0 * Float64(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 <= -1.52e-133) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.4e-118) 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, -1.52e-133], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.4e-118], N[(180.0 * N[(N[ArcTan[0.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 -1.52 \cdot 10^{-133}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.52000000000000001e-133Initial program 55.7%
Taylor expanded in B around -inf 53.7%
if -1.52000000000000001e-133 < B < 5.39999999999999988e-118Initial program 51.6%
Taylor expanded in C around inf 40.9%
add-cbrt-cube34.5%
pow1/330.2%
pow330.2%
distribute-lft-out30.2%
unpow-prod-down30.2%
metadata-eval30.2%
associate-/l*31.9%
Applied egg-rr31.9%
unpow1/335.9%
Simplified35.9%
Taylor expanded in B around 0 34.8%
distribute-rgt1-in34.8%
metadata-eval34.8%
mul0-lft34.8%
div034.8%
metadata-eval34.8%
Simplified34.8%
if 5.39999999999999988e-118 < B Initial program 56.3%
Taylor expanded in B around inf 52.3%
(FPCore (A B C) :precision binary64 (if (<= B 4.2e-117) (* 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.2e-117) {
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.2e-117) {
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.2e-117: 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.2e-117) tmp = Float64(180.0 * Float64(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.2e-117) 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.2e-117], N[(180.0 * N[(N[ArcTan[0.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 4.2 \cdot 10^{-117}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 4.1999999999999998e-117Initial program 53.9%
Taylor expanded in C around inf 32.4%
add-cbrt-cube26.2%
pow1/325.8%
pow325.8%
distribute-lft-out25.8%
unpow-prod-down25.8%
metadata-eval25.8%
associate-/l*27.4%
Applied egg-rr27.4%
unpow1/327.7%
Simplified27.7%
Taylor expanded in B around 0 19.3%
distribute-rgt1-in19.3%
metadata-eval19.3%
mul0-lft19.3%
div019.3%
metadata-eval19.3%
Simplified19.3%
if 4.1999999999999998e-117 < B Initial program 56.3%
Taylor expanded in B around inf 52.3%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 54.8%
Taylor expanded in B around inf 22.1%
herbie shell --seed 2024121
(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)))