
(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 22 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 2.7e+45) (/ (* (atan (/ (- (- C A) (hypot (- A C) B)) B)) 180.0) PI) (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.7e+45) {
tmp = (atan((((C - A) - hypot((A - C), B)) / B)) * 180.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+45) {
tmp = (Math.atan((((C - A) - Math.hypot((A - C), B)) / B)) * 180.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+45: tmp = (math.atan((((C - A) - math.hypot((A - C), B)) / B)) * 180.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+45) tmp = Float64(Float64(atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)) * 180.0) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2.7e+45) tmp = (atan((((C - A) - hypot((A - C), B)) / B)) * 180.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+45], N[(N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * 180.0), $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 2.7 \cdot 10^{+45}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right) \cdot 180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 2.69999999999999984e45Initial program 63.0%
associate-*l/63.0%
*-lft-identity63.0%
+-commutative63.0%
unpow263.0%
unpow263.0%
hypot-define83.8%
Simplified83.8%
associate-*r/83.8%
associate--r+78.2%
Applied egg-rr83.8%
if 2.69999999999999984e45 < C Initial program 15.3%
associate-*l/15.3%
*-lft-identity15.3%
+-commutative15.3%
unpow215.3%
unpow215.3%
hypot-define45.3%
Simplified45.3%
associate-*r/45.3%
associate--r+36.5%
Applied egg-rr45.3%
Taylor expanded in A around 0 12.0%
unpow212.0%
unpow212.0%
hypot-define35.8%
Simplified35.8%
Taylor expanded in C around inf 79.3%
Final simplification83.0%
(FPCore (A B C)
:precision binary64
(if (<= C -1.35e+25)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(if (<= C 4.3e+48)
(/ (* 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 <= -1.35e+25) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else if (C <= 4.3e+48) {
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 <= -1.35e+25) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else if (C <= 4.3e+48) {
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 <= -1.35e+25: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi elif C <= 4.3e+48: 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 <= -1.35e+25) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); elseif (C <= 4.3e+48) 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 <= -1.35e+25) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; elseif (C <= 4.3e+48) 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, -1.35e+25], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 4.3e+48], 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 -1.35 \cdot 10^{+25}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.3 \cdot 10^{+48}:\\
\;\;\;\;\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 < -1.35e25Initial program 75.5%
associate-*l/75.5%
*-lft-identity75.5%
+-commutative75.5%
unpow275.5%
unpow275.5%
hypot-define91.6%
Simplified91.6%
associate-*r/91.6%
associate--r+88.8%
Applied egg-rr91.6%
Taylor expanded in A around 0 72.6%
unpow272.6%
unpow272.6%
hypot-define87.6%
Simplified87.6%
if -1.35e25 < C < 4.29999999999999978e48Initial program 57.1%
associate-*l/57.1%
*-lft-identity57.1%
+-commutative57.1%
unpow257.1%
unpow257.1%
hypot-define80.1%
Simplified80.1%
associate-*r/80.1%
associate--r+73.2%
Applied egg-rr80.1%
Taylor expanded in C around 0 55.9%
mul-1-neg55.9%
distribute-neg-frac255.9%
unpow255.9%
unpow255.9%
hypot-define79.0%
Simplified79.0%
if 4.29999999999999978e48 < C Initial program 15.3%
associate-*l/15.3%
*-lft-identity15.3%
+-commutative15.3%
unpow215.3%
unpow215.3%
hypot-define45.3%
Simplified45.3%
associate-*r/45.3%
associate--r+36.5%
Applied egg-rr45.3%
Taylor expanded in A around 0 12.0%
unpow212.0%
unpow212.0%
hypot-define35.8%
Simplified35.8%
Taylor expanded in C around inf 79.3%
Final simplification81.3%
(FPCore (A B C)
:precision binary64
(if (<= C -1.45e+26)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(if (<= C 3.5e+38)
(* 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 <= -1.45e+26) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else if (C <= 3.5e+38) {
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 <= -1.45e+26) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else if (C <= 3.5e+38) {
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 <= -1.45e+26: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi elif C <= 3.5e+38: 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 <= -1.45e+26) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); elseif (C <= 3.5e+38) 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 <= -1.45e+26) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; elseif (C <= 3.5e+38) 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, -1.45e+26], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 3.5e+38], 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 -1.45 \cdot 10^{+26}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.5 \cdot 10^{+38}:\\
\;\;\;\;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 < -1.45e26Initial program 75.5%
associate-*l/75.5%
*-lft-identity75.5%
+-commutative75.5%
unpow275.5%
unpow275.5%
hypot-define91.6%
Simplified91.6%
associate-*r/91.6%
associate--r+88.8%
Applied egg-rr91.6%
Taylor expanded in A around 0 72.6%
unpow272.6%
unpow272.6%
hypot-define87.6%
Simplified87.6%
if -1.45e26 < C < 3.50000000000000002e38Initial program 57.1%
Taylor expanded in C around 0 55.9%
associate-*r/55.9%
mul-1-neg55.9%
+-commutative55.9%
unpow255.9%
unpow255.9%
hypot-define79.0%
Simplified79.0%
if 3.50000000000000002e38 < C Initial program 15.3%
associate-*l/15.3%
*-lft-identity15.3%
+-commutative15.3%
unpow215.3%
unpow215.3%
hypot-define45.3%
Simplified45.3%
associate-*r/45.3%
associate--r+36.5%
Applied egg-rr45.3%
Taylor expanded in A around 0 12.0%
unpow212.0%
unpow212.0%
hypot-define35.8%
Simplified35.8%
Taylor expanded in C around inf 79.3%
Final simplification81.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.6e+92)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 6e-30)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+92) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 6e-30) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+92) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 6e-30) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.6e+92: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 6e-30: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.6e+92) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 6e-30) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.6e+92) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 6e-30) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.6e+92], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6e-30], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.6 \cdot 10^{+92}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6 \cdot 10^{-30}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.60000000000000013e92Initial program 20.2%
Taylor expanded in A around -inf 83.2%
associate-*r/83.2%
Simplified83.2%
if -1.60000000000000013e92 < A < 5.9999999999999998e-30Initial program 52.1%
associate-*l/52.1%
*-lft-identity52.1%
+-commutative52.1%
unpow252.1%
unpow252.1%
hypot-define75.0%
Simplified75.0%
associate-*r/75.0%
associate--r+74.9%
Applied egg-rr75.0%
Taylor expanded in A around 0 49.8%
unpow249.8%
unpow249.8%
hypot-define72.9%
Simplified72.9%
if 5.9999999999999998e-30 < A Initial program 85.2%
associate-*l/85.2%
*-lft-identity85.2%
+-commutative85.2%
unpow285.2%
unpow285.2%
hypot-define98.5%
Simplified98.5%
associate-*r/98.5%
associate--r+98.5%
Applied egg-rr98.5%
Taylor expanded in B around inf 87.5%
+-commutative87.5%
associate--r+87.5%
div-sub89.1%
Simplified89.1%
Final simplification78.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.3e+92)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 1.25e-30)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (+ (/ (- C A) B) -1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.3e+92) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 1.25e-30) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - A) / B) + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.3e+92) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 1.25e-30) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.3e+92: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 1.25e-30: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 * math.atan((((C - A) / B) + -1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.3e+92) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 1.25e-30) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.3e+92) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 1.25e-30) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan((((C - A) / B) + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.3e+92], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.25e-30], 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 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.3 \cdot 10^{+92}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.29999999999999974e92Initial program 20.2%
Taylor expanded in A around -inf 83.2%
associate-*r/83.2%
Simplified83.2%
if -3.29999999999999974e92 < A < 1.24999999999999993e-30Initial program 52.1%
Taylor expanded in A around 0 49.8%
unpow249.8%
unpow249.8%
hypot-define72.9%
Simplified72.9%
if 1.24999999999999993e-30 < A Initial program 85.2%
associate-*l/85.2%
*-lft-identity85.2%
+-commutative85.2%
unpow285.2%
unpow285.2%
hypot-define98.5%
Simplified98.5%
associate-*r/98.5%
associate--r+98.5%
Applied egg-rr98.5%
Taylor expanded in B around inf 87.5%
+-commutative87.5%
associate--r+87.5%
div-sub89.1%
Simplified89.1%
Final simplification78.9%
(FPCore (A B C) :precision binary64 (if (<= C 4.4e+48) (* 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 <= 4.4e+48) {
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 <= 4.4e+48) {
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 <= 4.4e+48: 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 <= 4.4e+48) 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 <= 4.4e+48) 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, 4.4e+48], 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 4.4 \cdot 10^{+48}:\\
\;\;\;\;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 < 4.3999999999999999e48Initial program 63.0%
associate-*l/63.0%
*-lft-identity63.0%
+-commutative63.0%
unpow263.0%
unpow263.0%
hypot-define83.8%
Simplified83.8%
if 4.3999999999999999e48 < C Initial program 15.3%
associate-*l/15.3%
*-lft-identity15.3%
+-commutative15.3%
unpow215.3%
unpow215.3%
hypot-define45.3%
Simplified45.3%
associate-*r/45.3%
associate--r+36.5%
Applied egg-rr45.3%
Taylor expanded in A around 0 12.0%
unpow212.0%
unpow212.0%
hypot-define35.8%
Simplified35.8%
Taylor expanded in C around inf 79.3%
Final simplification83.0%
(FPCore (A B C) :precision binary64 (if (<= A -3.3e+92) (* 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 <= -3.3e+92) {
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 <= -3.3e+92) {
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 <= -3.3e+92: 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 <= -3.3e+92) tmp = Float64(180.0 * Float64(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 <= -3.3e+92) 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, -3.3e+92], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.3 \cdot 10^{+92}:\\
\;\;\;\;180 \cdot \frac{\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 < -3.29999999999999974e92Initial program 20.2%
Taylor expanded in A around -inf 83.2%
associate-*r/83.2%
Simplified83.2%
if -3.29999999999999974e92 < A Initial program 62.4%
Simplified82.2%
Final simplification82.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.45e-9)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -3e-83)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A -7.4e-232)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 7e-110)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.45e-9) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -3e-83) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= -7.4e-232) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 7e-110) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.45e-9) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -3e-83) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= -7.4e-232) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 7e-110) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.45e-9: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -3e-83: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= -7.4e-232: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 7e-110: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.45e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -3e-83) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= -7.4e-232) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 7e-110) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.45e-9) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -3e-83) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= -7.4e-232) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 7e-110) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.45e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3e-83], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7.4e-232], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7e-110], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.45 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq -7.4 \cdot 10^{-232}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 7 \cdot 10^{-110}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.44999999999999996e-9Initial program 27.0%
Taylor expanded in A around -inf 69.6%
associate-*r/69.6%
Simplified69.6%
if -1.44999999999999996e-9 < A < -3.0000000000000001e-83Initial program 63.5%
Taylor expanded in B around inf 60.9%
if -3.0000000000000001e-83 < A < -7.39999999999999958e-232Initial program 47.4%
Taylor expanded in B around -inf 54.8%
if -7.39999999999999958e-232 < A < 6.99999999999999947e-110Initial program 52.9%
associate-*l/52.9%
*-lft-identity52.9%
+-commutative52.9%
unpow252.9%
unpow252.9%
hypot-define73.3%
Simplified73.3%
associate-*r/73.3%
associate--r+73.3%
Applied egg-rr73.3%
Taylor expanded in A around 0 51.1%
unpow251.1%
unpow251.1%
hypot-define71.8%
Simplified71.8%
Taylor expanded in C around inf 38.3%
if 6.99999999999999947e-110 < A Initial program 80.2%
Taylor expanded in A around inf 65.4%
Final simplification58.9%
(FPCore (A B C)
:precision binary64
(if (<= A -1.5e-9)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -2.95e-83)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A -2.8e-233)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 4e-150)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e-9) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -2.95e-83) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= -2.8e-233) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 4e-150) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e-9) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -2.95e-83) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= -2.8e-233) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 4e-150) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e-9: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -2.95e-83: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= -2.8e-233: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 4e-150: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -2.95e-83) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= -2.8e-233) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 4e-150) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e-9) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -2.95e-83) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= -2.8e-233) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 4e-150) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.95e-83], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.8e-233], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4e-150], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.95 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq -2.8 \cdot 10^{-233}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 4 \cdot 10^{-150}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.49999999999999999e-9Initial program 27.0%
Taylor expanded in A around -inf 69.6%
associate-*r/69.6%
Simplified69.6%
if -1.49999999999999999e-9 < A < -2.9499999999999998e-83Initial program 63.5%
Taylor expanded in B around inf 60.9%
if -2.9499999999999998e-83 < A < -2.8000000000000001e-233Initial program 46.2%
Taylor expanded in B around -inf 53.3%
if -2.8000000000000001e-233 < A < 4.00000000000000003e-150Initial program 57.0%
Taylor expanded in C around -inf 36.8%
if 4.00000000000000003e-150 < A Initial program 75.1%
Taylor expanded in A around inf 59.1%
Final simplification57.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= A -3.2e-9)
(* 180.0 (/ (atan (/ (* 0.5 (+ B (* B (/ C A)))) A)) PI))
(if (<= A -1.75e-81)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= A 1.25e-61)
(/ (* 180.0 (atan (+ t_0 1.0))) PI)
(/ (* 180.0 (atan (+ t_0 -1.0))) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -3.2e-9) {
tmp = 180.0 * (atan(((0.5 * (B + (B * (C / A)))) / A)) / ((double) M_PI));
} else if (A <= -1.75e-81) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (A <= 1.25e-61) {
tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -3.2e-9) {
tmp = 180.0 * (Math.atan(((0.5 * (B + (B * (C / A)))) / A)) / Math.PI);
} else if (A <= -1.75e-81) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (A <= 1.25e-61) {
tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if A <= -3.2e-9: tmp = 180.0 * (math.atan(((0.5 * (B + (B * (C / A)))) / A)) / math.pi) elif A <= -1.75e-81: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif A <= 1.25e-61: tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (A <= -3.2e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * Float64(B + Float64(B * Float64(C / A)))) / A)) / pi)); elseif (A <= -1.75e-81) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (A <= 1.25e-61) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (A <= -3.2e-9) tmp = 180.0 * (atan(((0.5 * (B + (B * (C / A)))) / A)) / pi); elseif (A <= -1.75e-81) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (A <= 1.25e-61) tmp = (180.0 * atan((t_0 + 1.0))) / pi; else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[A, -3.2e-9], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.75e-81], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.25e-61], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;A \leq -3.2 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.75 \cdot 10^{-81}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{-61}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.20000000000000012e-9Initial program 27.0%
Taylor expanded in A around -inf 68.5%
associate-*r/68.5%
mul-1-neg68.5%
distribute-lft-out68.5%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in A around 0 55.0%
distribute-lft-out55.0%
*-commutative55.0%
distribute-lft-out55.3%
Simplified55.3%
Taylor expanded in A around inf 68.5%
distribute-lft-out68.5%
associate-/l*70.2%
Simplified70.2%
if -3.20000000000000012e-9 < A < -1.74999999999999993e-81Initial program 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
unpow272.9%
hypot-define99.9%
Simplified99.9%
associate-*r/100.0%
associate--r+100.0%
Applied egg-rr100.0%
Taylor expanded in A around 0 72.9%
unpow272.9%
unpow272.9%
hypot-define100.0%
Simplified100.0%
Taylor expanded in C around 0 91.8%
if -1.74999999999999993e-81 < A < 1.25e-61Initial program 51.2%
associate-*l/51.2%
*-lft-identity51.2%
+-commutative51.2%
unpow251.2%
unpow251.2%
hypot-define76.0%
Simplified76.0%
associate-*r/76.0%
associate--r+76.0%
Applied egg-rr76.0%
Taylor expanded in B around -inf 58.7%
associate--l+58.7%
div-sub58.7%
Simplified58.7%
if 1.25e-61 < A Initial program 83.0%
associate-*l/83.0%
*-lft-identity83.0%
+-commutative83.0%
unpow283.0%
unpow283.0%
hypot-define97.3%
Simplified97.3%
associate-*r/97.4%
associate--r+97.4%
Applied egg-rr97.4%
Taylor expanded in B around inf 86.0%
+-commutative86.0%
associate--r+86.0%
div-sub87.4%
Simplified87.4%
Final simplification71.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= A -3.65e-9)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -5.7e-83)
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI))
(if (<= A 2.1e-62)
(/ (* 180.0 (atan (+ t_0 1.0))) PI)
(/ (* 180.0 (atan (+ t_0 -1.0))) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -3.65e-9) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -5.7e-83) {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
} else if (A <= 2.1e-62) {
tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -3.65e-9) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -5.7e-83) {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
} else if (A <= 2.1e-62) {
tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if A <= -3.65e-9: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -5.7e-83: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) elif A <= 2.1e-62: tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (A <= -3.65e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -5.7e-83) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); elseif (A <= 2.1e-62) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (A <= -3.65e-9) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -5.7e-83) tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); elseif (A <= 2.1e-62) tmp = (180.0 * atan((t_0 + 1.0))) / pi; else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[A, -3.65e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.7e-83], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.1e-62], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;A \leq -3.65 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5.7 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.1 \cdot 10^{-62}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.65000000000000001e-9Initial program 27.0%
Taylor expanded in A around -inf 69.6%
associate-*r/69.6%
Simplified69.6%
if -3.65000000000000001e-9 < A < -5.7e-83Initial program 67.9%
Taylor expanded in B around inf 84.9%
if -5.7e-83 < A < 2.0999999999999999e-62Initial program 51.6%
associate-*l/51.6%
*-lft-identity51.6%
+-commutative51.6%
unpow251.6%
unpow251.6%
hypot-define76.7%
Simplified76.7%
associate-*r/76.7%
associate--r+76.8%
Applied egg-rr76.7%
Taylor expanded in B around -inf 59.3%
associate--l+59.3%
div-sub59.3%
Simplified59.3%
if 2.0999999999999999e-62 < A Initial program 83.0%
associate-*l/83.0%
*-lft-identity83.0%
+-commutative83.0%
unpow283.0%
unpow283.0%
hypot-define97.3%
Simplified97.3%
associate-*r/97.4%
associate--r+97.4%
Applied egg-rr97.4%
Taylor expanded in B around inf 86.0%
+-commutative86.0%
associate--r+86.0%
div-sub87.4%
Simplified87.4%
Final simplification71.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= A -4.7e-9)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -2e-78)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= A 1e-62)
(/ (* 180.0 (atan (+ t_0 1.0))) PI)
(/ (* 180.0 (atan (+ t_0 -1.0))) PI))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -4.7e-9) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -2e-78) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (A <= 1e-62) {
tmp = (180.0 * atan((t_0 + 1.0))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (A <= -4.7e-9) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -2e-78) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (A <= 1e-62) {
tmp = (180.0 * Math.atan((t_0 + 1.0))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if A <= -4.7e-9: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -2e-78: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif A <= 1e-62: tmp = (180.0 * math.atan((t_0 + 1.0))) / math.pi else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (A <= -4.7e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -2e-78) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (A <= 1e-62) tmp = Float64(Float64(180.0 * atan(Float64(t_0 + 1.0))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (A <= -4.7e-9) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -2e-78) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (A <= 1e-62) tmp = (180.0 * atan((t_0 + 1.0))) / pi; else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[A, -4.7e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2e-78], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1e-62], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;A \leq -4.7 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2 \cdot 10^{-78}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 10^{-62}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + 1\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.6999999999999999e-9Initial program 27.0%
Taylor expanded in A around -inf 69.6%
associate-*r/69.6%
Simplified69.6%
if -4.6999999999999999e-9 < A < -2e-78Initial program 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
unpow272.9%
hypot-define99.9%
Simplified99.9%
associate-*r/100.0%
associate--r+100.0%
Applied egg-rr100.0%
Taylor expanded in A around 0 72.9%
unpow272.9%
unpow272.9%
hypot-define100.0%
Simplified100.0%
Taylor expanded in C around 0 91.8%
if -2e-78 < A < 1e-62Initial program 51.2%
associate-*l/51.2%
*-lft-identity51.2%
+-commutative51.2%
unpow251.2%
unpow251.2%
hypot-define76.0%
Simplified76.0%
associate-*r/76.0%
associate--r+76.0%
Applied egg-rr76.0%
Taylor expanded in B around -inf 58.7%
associate--l+58.7%
div-sub58.7%
Simplified58.7%
if 1e-62 < A Initial program 83.0%
associate-*l/83.0%
*-lft-identity83.0%
+-commutative83.0%
unpow283.0%
unpow283.0%
hypot-define97.3%
Simplified97.3%
associate-*r/97.4%
associate--r+97.4%
Applied egg-rr97.4%
Taylor expanded in B around inf 86.0%
+-commutative86.0%
associate--r+86.0%
div-sub87.4%
Simplified87.4%
Final simplification71.3%
(FPCore (A B C)
:precision binary64
(if (<= A -5.2e-9)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -9.2e-71)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= A 5e-150)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e-9) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -9.2e-71) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (A <= 5e-150) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e-9) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -9.2e-71) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (A <= 5e-150) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.2e-9: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -9.2e-71: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif A <= 5e-150: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi else: tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.2e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -9.2e-71) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (A <= 5e-150) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.2e-9) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -9.2e-71) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (A <= 5e-150) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; else tmp = (180.0 * atan((1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.2e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.2e-71], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5e-150], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.2 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -9.2 \cdot 10^{-71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-150}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.2000000000000002e-9Initial program 27.0%
Taylor expanded in A around -inf 69.6%
associate-*r/69.6%
Simplified69.6%
if -5.2000000000000002e-9 < A < -9.1999999999999994e-71Initial program 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
unpow272.9%
hypot-define99.9%
Simplified99.9%
associate-*r/100.0%
associate--r+100.0%
Applied egg-rr100.0%
Taylor expanded in A around 0 72.9%
unpow272.9%
unpow272.9%
hypot-define100.0%
Simplified100.0%
Taylor expanded in C around 0 91.8%
if -9.1999999999999994e-71 < A < 4.9999999999999999e-150Initial program 51.1%
associate-*l/51.1%
*-lft-identity51.1%
+-commutative51.1%
unpow251.1%
unpow251.1%
hypot-define77.2%
Simplified77.2%
associate-*r/77.2%
associate--r+77.2%
Applied egg-rr77.2%
Taylor expanded in B around -inf 57.3%
associate--l+57.3%
div-sub57.3%
Simplified57.3%
Taylor expanded in C around inf 56.3%
if 4.9999999999999999e-150 < A Initial program 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
unpow275.1%
hypot-define91.1%
Simplified91.1%
associate-*r/91.1%
associate--r+91.1%
Applied egg-rr91.1%
Taylor expanded in B around -inf 71.0%
associate--l+71.0%
div-sub72.0%
Simplified72.0%
Taylor expanded in C around 0 69.6%
Final simplification66.5%
(FPCore (A B C)
:precision binary64
(if (<= A -6.6e-9)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -3.2e-83)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 4.4e-150)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.6e-9) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -3.2e-83) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 4.4e-150) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.6e-9) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -3.2e-83) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 4.4e-150) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.6e-9: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -3.2e-83: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 4.4e-150: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi else: tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.6e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -3.2e-83) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 4.4e-150) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.6e-9) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -3.2e-83) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 4.4e-150) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; else tmp = (180.0 * atan((1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.6e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.2e-83], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e-150], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.6 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.2 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{-150}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.60000000000000037e-9Initial program 27.0%
Taylor expanded in A around -inf 69.6%
associate-*r/69.6%
Simplified69.6%
if -6.60000000000000037e-9 < A < -3.2000000000000001e-83Initial program 63.5%
Taylor expanded in B around inf 60.9%
if -3.2000000000000001e-83 < A < 4.3999999999999999e-150Initial program 52.2%
associate-*l/52.2%
*-lft-identity52.2%
+-commutative52.2%
unpow252.2%
unpow252.2%
hypot-define79.0%
Simplified79.0%
associate-*r/79.0%
associate--r+79.1%
Applied egg-rr79.0%
Taylor expanded in B around -inf 58.7%
associate--l+58.7%
div-sub58.7%
Simplified58.7%
Taylor expanded in C around inf 57.7%
if 4.3999999999999999e-150 < A Initial program 75.1%
associate-*l/75.1%
*-lft-identity75.1%
+-commutative75.1%
unpow275.1%
unpow275.1%
hypot-define91.1%
Simplified91.1%
associate-*r/91.1%
associate--r+91.1%
Applied egg-rr91.1%
Taylor expanded in B around -inf 71.0%
associate--l+71.0%
div-sub72.0%
Simplified72.0%
Taylor expanded in C around 0 69.6%
Final simplification65.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.45e-9)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -1.4e-83)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 2.5e-31)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.45e-9) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -1.4e-83) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 2.5e-31) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.45e-9) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -1.4e-83) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 2.5e-31) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.45e-9: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -1.4e-83: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 2.5e-31: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.45e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -1.4e-83) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 2.5e-31) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.45e-9) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -1.4e-83) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 2.5e-31) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.45e-9], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.4e-83], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.5e-31], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.45 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.4 \cdot 10^{-83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 2.5 \cdot 10^{-31}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.44999999999999996e-9Initial program 27.0%
Taylor expanded in A around -inf 69.6%
associate-*r/69.6%
Simplified69.6%
if -1.44999999999999996e-9 < A < -1.4e-83Initial program 63.5%
Taylor expanded in B around inf 60.9%
if -1.4e-83 < A < 2.5e-31Initial program 52.8%
associate-*l/52.8%
*-lft-identity52.8%
+-commutative52.8%
unpow252.8%
unpow252.8%
hypot-define78.0%
Simplified78.0%
associate-*r/78.0%
associate--r+78.1%
Applied egg-rr78.0%
Taylor expanded in B around -inf 59.7%
associate--l+59.7%
div-sub59.7%
Simplified59.7%
Taylor expanded in C around inf 56.8%
if 2.5e-31 < A Initial program 85.2%
Taylor expanded in A around inf 72.0%
Final simplification64.3%
(FPCore (A B C)
:precision binary64
(if (<= B -3.2e+105)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4e-104)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 6.2e-125)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.2e+105) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4e-104) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 6.2e-125) {
tmp = 180.0 * (atan(((A / B) * -2.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 <= -3.2e+105) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4e-104) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 6.2e-125) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.2e+105: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4e-104: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 6.2e-125: tmp = 180.0 * (math.atan(((A / B) * -2.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 <= -3.2e+105) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4e-104) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 6.2e-125) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.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 <= -3.2e+105) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4e-104) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 6.2e-125) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.2e+105], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4e-104], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 6.2e-125], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $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 -3.2 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4 \cdot 10^{-104}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 6.2 \cdot 10^{-125}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.2e105Initial program 35.2%
Taylor expanded in B around -inf 70.2%
if -3.2e105 < B < -3.99999999999999971e-104Initial program 64.3%
associate-*l/64.3%
*-lft-identity64.3%
+-commutative64.3%
unpow264.3%
unpow264.3%
hypot-define64.8%
Simplified64.8%
associate-*r/64.8%
associate--r+64.7%
Applied egg-rr64.8%
Taylor expanded in B around -inf 62.0%
associate--l+62.0%
div-sub62.0%
Simplified62.0%
Taylor expanded in C around inf 56.9%
Taylor expanded in C around inf 39.9%
if -3.99999999999999971e-104 < B < 6.20000000000000026e-125Initial program 60.7%
Taylor expanded in A around inf 46.7%
if 6.20000000000000026e-125 < B Initial program 54.3%
Taylor expanded in B around inf 58.5%
Final simplification53.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.15e-8)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -8.2e-73)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(/ (* 180.0 (atan (+ (/ (- C A) B) 1.0))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e-8) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -8.2e-73) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) / B) + 1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e-8) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -8.2e-73) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) / B) + 1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e-8: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -8.2e-73: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi else: tmp = (180.0 * math.atan((((C - A) / B) + 1.0))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e-8) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -8.2e-73) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + 1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e-8) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -8.2e-73) tmp = (180.0 * atan(((C - B) / B))) / pi; else tmp = (180.0 * atan((((C - A) / B) + 1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e-8], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.2e-73], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{-8}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8.2 \cdot 10^{-73}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.15e-8Initial program 27.0%
Taylor expanded in A around -inf 69.6%
associate-*r/69.6%
Simplified69.6%
if -1.15e-8 < A < -8.20000000000000032e-73Initial program 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
unpow272.9%
hypot-define99.9%
Simplified99.9%
associate-*r/100.0%
associate--r+100.0%
Applied egg-rr100.0%
Taylor expanded in A around 0 72.9%
unpow272.9%
unpow272.9%
hypot-define100.0%
Simplified100.0%
Taylor expanded in C around 0 91.8%
if -8.20000000000000032e-73 < A Initial program 64.3%
associate-*l/64.3%
*-lft-identity64.3%
+-commutative64.3%
unpow264.3%
unpow264.3%
hypot-define84.8%
Simplified84.8%
associate-*r/84.8%
associate--r+84.8%
Applied egg-rr84.8%
Taylor expanded in B around -inf 64.8%
associate--l+64.8%
div-sub65.4%
Simplified65.4%
Final simplification67.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.8e-8)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -1.7e-74)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e-8) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -1.7e-74) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.8e-8) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -1.7e-74) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.8e-8: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -1.7e-74: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi else: tmp = 180.0 * (math.atan((((C - A) / B) + 1.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.8e-8) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -1.7e-74) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + 1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.8e-8) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -1.7e-74) tmp = (180.0 * atan(((C - B) / B))) / pi; else tmp = 180.0 * (atan((((C - A) / B) + 1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.8e-8], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.7e-74], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.8 \cdot 10^{-8}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.7 \cdot 10^{-74}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.79999999999999991e-8Initial program 27.0%
Taylor expanded in A around -inf 69.6%
associate-*r/69.6%
Simplified69.6%
if -1.79999999999999991e-8 < A < -1.7e-74Initial program 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
unpow272.9%
hypot-define99.9%
Simplified99.9%
associate-*r/100.0%
associate--r+100.0%
Applied egg-rr100.0%
Taylor expanded in A around 0 72.9%
unpow272.9%
unpow272.9%
hypot-define100.0%
Simplified100.0%
Taylor expanded in C around 0 91.8%
if -1.7e-74 < A Initial program 64.3%
Taylor expanded in B around -inf 64.8%
associate--l+64.8%
div-sub65.4%
Simplified65.4%
Final simplification67.8%
(FPCore (A B C)
:precision binary64
(if (<= B -3.2e+105)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.6e-273)
(/ (* 180.0 (atan (/ C B))) PI)
(if (<= B 1.05e-167)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.2e+105) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.6e-273) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else if (B <= 1.05e-167) {
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 <= -3.2e+105) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.6e-273) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else if (B <= 1.05e-167) {
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 <= -3.2e+105: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.6e-273: tmp = (180.0 * math.atan((C / B))) / math.pi elif B <= 1.05e-167: 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 <= -3.2e+105) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.6e-273) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); elseif (B <= 1.05e-167) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.2e+105) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.6e-273) tmp = (180.0 * atan((C / B))) / pi; elseif (B <= 1.05e-167) 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, -3.2e+105], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.6e-273], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-167], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.2 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.6 \cdot 10^{-273}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-167}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.2e105Initial program 35.2%
Taylor expanded in B around -inf 70.2%
if -3.2e105 < B < -3.59999999999999993e-273Initial program 65.2%
associate-*l/65.2%
*-lft-identity65.2%
+-commutative65.2%
unpow265.2%
unpow265.2%
hypot-define73.2%
Simplified73.2%
associate-*r/73.2%
associate--r+67.6%
Applied egg-rr73.2%
Taylor expanded in B around -inf 61.5%
associate--l+61.5%
div-sub62.7%
Simplified62.7%
Taylor expanded in C around inf 52.5%
Taylor expanded in C around inf 42.6%
if -3.59999999999999993e-273 < B < 1.05000000000000009e-167Initial program 54.7%
associate-*l/54.7%
*-lft-identity54.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-define84.3%
Simplified84.3%
associate-*r/84.3%
associate--r+57.3%
Applied egg-rr84.3%
Taylor expanded in C around inf 41.3%
distribute-rgt1-in41.3%
metadata-eval41.3%
mul0-lft41.3%
metadata-eval41.3%
Simplified41.3%
Taylor expanded in B around 0 41.3%
if 1.05000000000000009e-167 < B Initial program 54.7%
Taylor expanded in B around inf 54.5%
Final simplification51.5%
(FPCore (A B C)
:precision binary64
(if (<= B -8.4e-128)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 8.5e-168)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.4e-128) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 8.5e-168) {
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 <= -8.4e-128) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 8.5e-168) {
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 <= -8.4e-128: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 8.5e-168: 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 <= -8.4e-128) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 8.5e-168) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.4e-128) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 8.5e-168) 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, -8.4e-128], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.5e-168], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.4 \cdot 10^{-128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 8.5 \cdot 10^{-168}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.4000000000000004e-128Initial program 50.6%
Taylor expanded in B around -inf 48.1%
if -8.4000000000000004e-128 < B < 8.4999999999999994e-168Initial program 59.9%
associate-*l/59.9%
*-lft-identity59.9%
+-commutative59.9%
unpow259.9%
unpow259.9%
hypot-define83.5%
Simplified83.5%
associate-*r/83.5%
associate--r+63.7%
Applied egg-rr83.5%
Taylor expanded in C around inf 32.4%
distribute-rgt1-in32.4%
metadata-eval32.4%
mul0-lft32.4%
metadata-eval32.4%
Simplified32.4%
Taylor expanded in B around 0 32.4%
if 8.4999999999999994e-168 < B Initial program 54.7%
Taylor expanded in B around inf 54.5%
Final simplification45.7%
(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 54.7%
Taylor expanded in B around -inf 36.2%
if -4.999999999999985e-310 < B Initial program 54.6%
Taylor expanded in B around inf 44.4%
(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.6%
Taylor expanded in B around inf 20.0%
herbie shell --seed 2024119
(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)))