
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= C 3.3e+139) (* 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 <= 3.3e+139) {
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 <= 3.3e+139) {
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 <= 3.3e+139: 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 <= 3.3e+139) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 3.3e+139) 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, 3.3e+139], 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[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.3 \cdot 10^{+139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 3.3000000000000002e139Initial program 63.7%
associate-*l/63.7%
*-lft-identity63.7%
+-commutative63.7%
unpow263.7%
unpow263.7%
hypot-define83.8%
Simplified83.8%
if 3.3000000000000002e139 < C Initial program 7.0%
Taylor expanded in C around inf 78.2%
Taylor expanded in A around inf 78.2%
(FPCore (A B C)
:precision binary64
(if (<= C -2.9e+19)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(if (<= C 1.25e+136)
(* 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 <= -2.9e+19) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else if (C <= 1.25e+136) {
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 <= -2.9e+19) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else if (C <= 1.25e+136) {
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 <= -2.9e+19: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) elif C <= 1.25e+136: 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 <= -2.9e+19) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); elseif (C <= 1.25e+136) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-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 <= -2.9e+19) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); elseif (C <= 1.25e+136) 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, -2.9e+19], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.25e+136], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.9 \cdot 10^{+19}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.25 \cdot 10^{+136}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.9e19Initial program 82.3%
Taylor expanded in A around 0 82.1%
+-commutative82.1%
unpow282.1%
unpow282.1%
hypot-define93.7%
Simplified93.7%
if -2.9e19 < C < 1.25e136Initial program 56.3%
Taylor expanded in C around 0 54.5%
associate-*r/54.5%
mul-1-neg54.5%
unpow254.5%
unpow254.5%
hypot-define78.0%
Simplified78.0%
if 1.25e136 < C Initial program 7.0%
Taylor expanded in C around inf 78.2%
Taylor expanded in A around inf 78.2%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(if (<= C -1.9e+20)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(if (<= C 9.2e+135)
(/ (* -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.9e+20) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else if (C <= 9.2e+135) {
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.9e+20) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else if (C <= 9.2e+135) {
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.9e+20: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) elif C <= 9.2e+135: 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.9e+20) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); elseif (C <= 9.2e+135) tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(A, B)) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.9e+20) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); elseif (C <= 9.2e+135) 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.9e+20], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.2e+135], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.9 \cdot 10^{+20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 9.2 \cdot 10^{+135}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.9e20Initial program 82.3%
Taylor expanded in A around 0 82.1%
+-commutative82.1%
unpow282.1%
unpow282.1%
hypot-define93.7%
Simplified93.7%
if -1.9e20 < C < 9.2000000000000005e135Initial program 56.3%
Taylor expanded in C around 0 54.5%
associate-*r/54.5%
mul-1-neg54.5%
unpow254.5%
unpow254.5%
hypot-define78.0%
Simplified78.0%
associate-*r/78.0%
distribute-frac-neg78.0%
atan-neg78.0%
Applied egg-rr78.0%
distribute-rgt-neg-out78.0%
distribute-lft-neg-in78.0%
metadata-eval78.0%
Simplified78.0%
if 9.2000000000000005e135 < C Initial program 7.0%
Taylor expanded in C around inf 78.2%
Taylor expanded in A around inf 78.2%
(FPCore (A B C)
:precision binary64
(if (<= A -1.26e+176)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 2.5e+50)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* 180.0 (/ (atan (/ (- C (* B (+ 1.0 (/ A B)))) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.26e+176) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 2.5e+50) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B * (1.0 + (A / B)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.26e+176) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 2.5e+50) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B * (1.0 + (A / B)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.26e+176: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 2.5e+50: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B * (1.0 + (A / B)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.26e+176) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 2.5e+50) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B * Float64(1.0 + Float64(A / B)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.26e+176) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 2.5e+50) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 * (atan(((C - (B * (1.0 + (A / B)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.26e+176], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.5e+50], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B * N[(1.0 + N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.26 \cdot 10^{+176}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.5 \cdot 10^{+50}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B \cdot \left(1 + \frac{A}{B}\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.2599999999999999e176Initial program 5.7%
Taylor expanded in A around -inf 91.8%
associate-*r/91.8%
Simplified91.8%
if -1.2599999999999999e176 < A < 2.5e50Initial program 53.9%
Taylor expanded in A around 0 50.0%
+-commutative50.0%
unpow250.0%
unpow250.0%
hypot-define74.2%
Simplified74.2%
if 2.5e50 < A Initial program 85.6%
Simplified96.0%
Taylor expanded in B around inf 91.7%
Final simplification78.8%
(FPCore (A B C) :precision binary64 (if (<= A -1.26e+176) (* 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 <= -1.26e+176) {
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 <= -1.26e+176) {
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 <= -1.26e+176: 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 <= -1.26e+176) 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 <= -1.26e+176) 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, -1.26e+176], 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 -1.26 \cdot 10^{+176}:\\
\;\;\;\;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 < -1.2599999999999999e176Initial program 5.7%
Taylor expanded in A around -inf 91.8%
associate-*r/91.8%
Simplified91.8%
if -1.2599999999999999e176 < A Initial program 60.2%
Simplified80.1%
Final simplification81.0%
(FPCore (A B C)
:precision binary64
(if (<= C -1.05e+125)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= C -1.4e-12)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= C 9.5e-55)
(/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.05e+125) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (C <= -1.4e-12) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (C <= 9.5e-55) {
tmp = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.05e+125) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (C <= -1.4e-12) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (C <= 9.5e-55) {
tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.05e+125: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif C <= -1.4e-12: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif C <= 9.5e-55: tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.05e+125) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (C <= -1.4e-12) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (C <= 9.5e-55) tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.05e+125) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (C <= -1.4e-12) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (C <= 9.5e-55) tmp = (180.0 * atan((1.0 - (A / B)))) / pi; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.05e+125], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, -1.4e-12], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 9.5e-55], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.05 \cdot 10^{+125}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 9.5 \cdot 10^{-55}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.05e125Initial program 87.5%
Simplified97.7%
Taylor expanded in B around inf 95.8%
Taylor expanded in A around 0 95.9%
Taylor expanded in B around -inf 95.9%
associate-*r/95.9%
mul-1-neg95.9%
sub-neg95.9%
Simplified95.9%
if -1.05e125 < C < -1.4000000000000001e-12Initial program 67.2%
associate-*r/67.2%
Applied egg-rr87.2%
Taylor expanded in B around -inf 73.2%
associate--l+73.2%
div-sub73.2%
Simplified73.2%
Taylor expanded in A around 0 73.3%
+-commutative73.3%
Simplified73.3%
if -1.4000000000000001e-12 < C < 9.5000000000000006e-55Initial program 62.8%
associate-*r/62.8%
Applied egg-rr84.2%
Taylor expanded in B around -inf 58.5%
associate--l+58.5%
div-sub58.5%
Simplified58.5%
Taylor expanded in C around 0 58.6%
if 9.5000000000000006e-55 < C Initial program 20.6%
Taylor expanded in C around inf 63.2%
Taylor expanded in A around inf 63.2%
Final simplification67.4%
(FPCore (A B C)
:precision binary64
(if (<= C -2e+128)
(* 180.0 (/ (atan (/ (- C B) B)) PI))
(if (<= C -4.6e-5)
(/ (* 180.0 (atan (+ 1.0 (/ C B)))) PI)
(if (<= C 1.3e-44)
(/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2e+128) {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
} else if (C <= -4.6e-5) {
tmp = (180.0 * atan((1.0 + (C / B)))) / ((double) M_PI);
} else if (C <= 1.3e-44) {
tmp = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2e+128) {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
} else if (C <= -4.6e-5) {
tmp = (180.0 * Math.atan((1.0 + (C / B)))) / Math.PI;
} else if (C <= 1.3e-44) {
tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2e+128: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) elif C <= -4.6e-5: tmp = (180.0 * math.atan((1.0 + (C / B)))) / math.pi elif C <= 1.3e-44: tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2e+128) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); elseif (C <= -4.6e-5) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); elseif (C <= 1.3e-44) tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2e+128) tmp = 180.0 * (atan(((C - B) / B)) / pi); elseif (C <= -4.6e-5) tmp = (180.0 * atan((1.0 + (C / B)))) / pi; elseif (C <= 1.3e-44) tmp = (180.0 * atan((1.0 - (A / B)))) / pi; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2e+128], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.6e-5], N[(N[(180.0 * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 1.3e-44], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2 \cdot 10^{+128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.3 \cdot 10^{-44}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.0000000000000002e128Initial program 87.5%
Simplified97.7%
Taylor expanded in B around inf 95.8%
Taylor expanded in A around 0 95.9%
if -2.0000000000000002e128 < C < -4.6e-5Initial program 67.2%
associate-*r/67.2%
Applied egg-rr87.2%
Taylor expanded in B around -inf 73.2%
associate--l+73.2%
div-sub73.2%
Simplified73.2%
Taylor expanded in A around 0 73.3%
+-commutative73.3%
Simplified73.3%
if -4.6e-5 < C < 1.2999999999999999e-44Initial program 62.8%
associate-*r/62.8%
Applied egg-rr84.2%
Taylor expanded in B around -inf 58.5%
associate--l+58.5%
div-sub58.5%
Simplified58.5%
Taylor expanded in C around 0 58.6%
if 1.2999999999999999e-44 < C Initial program 20.6%
Taylor expanded in C around inf 63.2%
Taylor expanded in A around inf 63.2%
Final simplification67.4%
(FPCore (A B C)
:precision binary64
(if (<= B -4.8e-62)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.26e-239)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 1.3e+103)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.8e-62) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.26e-239) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 1.3e+103) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.8e-62) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.26e-239) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 1.3e+103) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.8e-62: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.26e-239: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 1.3e+103: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.8e-62) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.26e-239) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 1.3e+103) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.8e-62) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.26e-239) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 1.3e+103) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.8e-62], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.26e-239], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.3e+103], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.8 \cdot 10^{-62}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.26 \cdot 10^{-239}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{+103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.79999999999999967e-62Initial program 64.7%
Taylor expanded in B around -inf 64.8%
if -4.79999999999999967e-62 < B < -1.25999999999999991e-239Initial program 35.4%
associate-*r/35.4%
Applied egg-rr65.8%
div-sub37.0%
Applied egg-rr37.0%
Taylor expanded in C around inf 15.8%
distribute-lft1-in15.8%
metadata-eval15.8%
mul0-lft31.9%
metadata-eval31.9%
Simplified31.9%
if -1.25999999999999991e-239 < B < 1.3000000000000001e103Initial program 66.0%
Simplified67.9%
Taylor expanded in B around inf 61.3%
Taylor expanded in C around inf 35.9%
if 1.3000000000000001e103 < B Initial program 32.0%
Taylor expanded in B around inf 76.0%
(FPCore (A B C)
:precision binary64
(if (<= A -9e+18)
(* (atan (* B (/ 0.5 A))) (/ 180.0 PI))
(if (<= A 3.25e+43)
(/ (* 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 <= -9e+18) {
tmp = atan((B * (0.5 / A))) * (180.0 / ((double) M_PI));
} else if (A <= 3.25e+43) {
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 <= -9e+18) {
tmp = Math.atan((B * (0.5 / A))) * (180.0 / Math.PI);
} else if (A <= 3.25e+43) {
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 <= -9e+18: tmp = math.atan((B * (0.5 / A))) * (180.0 / math.pi) elif A <= 3.25e+43: 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 <= -9e+18) tmp = Float64(atan(Float64(B * Float64(0.5 / A))) * Float64(180.0 / pi)); elseif (A <= 3.25e+43) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + Float64(C / B)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9e+18) tmp = atan((B * (0.5 / A))) * (180.0 / pi); elseif (A <= 3.25e+43) 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, -9e+18], N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.25e+43], 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[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9 \cdot 10^{+18}:\\
\;\;\;\;\tan^{-1} \left(B \cdot \frac{0.5}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 3.25 \cdot 10^{+43}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9e18Initial program 24.4%
associate-*r/24.4%
Applied egg-rr59.7%
Taylor expanded in A around -inf 61.8%
Taylor expanded in B around 0 61.9%
associate-*r/61.8%
*-commutative61.8%
associate-/l*62.0%
associate-*r/62.0%
*-commutative62.0%
associate-/l*62.0%
Simplified62.0%
if -9e18 < A < 3.2499999999999999e43Initial program 58.4%
associate-*r/58.4%
Applied egg-rr81.6%
Taylor expanded in B around -inf 57.8%
associate--l+57.8%
div-sub57.8%
Simplified57.8%
Taylor expanded in A around 0 55.1%
+-commutative55.1%
Simplified55.1%
if 3.2499999999999999e43 < A Initial program 85.6%
Simplified96.0%
Taylor expanded in B around inf 91.7%
Taylor expanded in C around 0 89.6%
distribute-lft-in89.6%
metadata-eval89.6%
mul-1-neg89.6%
unsub-neg89.6%
Simplified89.6%
Final simplification63.0%
(FPCore (A B C)
:precision binary64
(if (<= B -4e-61)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.8e-245)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (- -1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4e-61) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.8e-245) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((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 (B <= -4e-61) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.8e-245) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4e-61: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.8e-245: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / 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 (B <= -4e-61) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.8e-245) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4e-61) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.8e-245) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan((-1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4e-61], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.8e-245], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.8 \cdot 10^{-245}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -4.0000000000000002e-61Initial program 64.7%
Taylor expanded in B around -inf 64.8%
if -4.0000000000000002e-61 < B < -5.7999999999999999e-245Initial program 35.4%
Taylor expanded in C around inf 44.1%
Taylor expanded in A around inf 44.1%
if -5.7999999999999999e-245 < B Initial program 56.3%
Simplified73.5%
Taylor expanded in B around inf 67.5%
Taylor expanded in C around 0 58.3%
distribute-lft-in58.3%
metadata-eval58.3%
mul-1-neg58.3%
unsub-neg58.3%
Simplified58.3%
(FPCore (A B C)
:precision binary64
(if (<= C -1.3e-24)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= C 2.2e-127)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-24) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (C <= 2.2e-127) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-24) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (C <= 2.2e-127) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.3e-24: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif C <= 2.2e-127: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.3e-24) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (C <= 2.2e-127) 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 <= -1.3e-24) tmp = 180.0 * (atan((C / B)) / pi); elseif (C <= 2.2e-127) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.3e-24], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.2e-127], 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 -1.3 \cdot 10^{-24}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.2 \cdot 10^{-127}:\\
\;\;\;\;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 < -1.3e-24Initial program 78.6%
Simplified88.4%
Taylor expanded in B around inf 74.9%
Taylor expanded in C around inf 69.1%
if -1.3e-24 < C < 2.2000000000000001e-127Initial program 63.4%
Taylor expanded in B around -inf 37.5%
if 2.2000000000000001e-127 < C Initial program 26.0%
Taylor expanded in C around inf 59.5%
Taylor expanded in A around inf 59.5%
(FPCore (A B C)
:precision binary64
(if (<= B -1.3e-93)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.3e+103)
(* 180.0 (/ (atan (/ A (- B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.3e-93) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.3e+103) {
tmp = 180.0 * (atan((A / -B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.3e-93) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.3e+103) {
tmp = 180.0 * (Math.atan((A / -B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.3e-93: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.3e+103: tmp = 180.0 * (math.atan((A / -B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.3e-93) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.3e+103) tmp = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.3e-93) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.3e+103) tmp = 180.0 * (atan((A / -B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.3e-93], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e+103], N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.3 \cdot 10^{-93}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{+103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.2999999999999999e-93Initial program 58.8%
Taylor expanded in B around -inf 58.0%
if -1.2999999999999999e-93 < B < 1.3000000000000001e103Initial program 61.2%
Simplified65.1%
Taylor expanded in B around inf 55.5%
Taylor expanded in A around inf 40.5%
associate-*r/40.5%
mul-1-neg40.5%
Simplified40.5%
if 1.3000000000000001e103 < B Initial program 32.0%
Taylor expanded in B around inf 76.0%
Final simplification52.5%
(FPCore (A B C) :precision binary64 (if (<= B 2e-237) (/ (* 180.0 (atan (/ (- (+ C B) A) B))) PI) (* 180.0 (/ (atan (- (/ C B) (+ 1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2e-237) {
tmp = (180.0 * atan((((C + B) - A) / B))) / ((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 <= 2e-237) {
tmp = (180.0 * Math.atan((((C + B) - A) / B))) / 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 <= 2e-237: tmp = (180.0 * math.atan((((C + B) - A) / B))) / 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 <= 2e-237) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C + B) - A) / B))) / pi); 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 <= 2e-237) tmp = (180.0 * atan((((C + B) - A) / B))) / 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, 2e-237], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C + B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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 2 \cdot 10^{-237}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C + B\right) - A}{B}\right)}{\pi}\\
\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 < 2e-237Initial program 57.7%
associate-*r/57.7%
Applied egg-rr81.9%
Taylor expanded in B around -inf 66.4%
associate--l+66.4%
div-sub67.8%
Simplified67.8%
Taylor expanded in B around 0 67.8%
if 2e-237 < B Initial program 53.7%
Taylor expanded in B around inf 69.0%
Final simplification68.3%
(FPCore (A B C) :precision binary64 (if (<= B -1e-236) (/ (* 180.0 (atan (/ (- (+ C B) A) B))) PI) (/ (* 180.0 (atan (+ -1.0 (/ (- C A) B)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-236) {
tmp = (180.0 * atan((((C + B) - A) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((-1.0 + ((C - A) / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-236) {
tmp = (180.0 * Math.atan((((C + B) - A) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((-1.0 + ((C - A) / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-236: tmp = (180.0 * math.atan((((C + B) - A) / B))) / math.pi else: tmp = (180.0 * math.atan((-1.0 + ((C - A) / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-236) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C + B) - A) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(Float64(C - A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-236) tmp = (180.0 * atan((((C + B) - A) / B))) / pi; else tmp = (180.0 * atan((-1.0 + ((C - A) / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-236], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C + B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-236}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C + B\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1e-236Initial program 55.3%
associate-*r/55.3%
Applied egg-rr80.8%
Taylor expanded in B around -inf 68.9%
associate--l+68.9%
div-sub69.7%
Simplified69.7%
Taylor expanded in B around 0 69.7%
if -1e-236 < B Initial program 56.6%
associate-*r/56.6%
Applied egg-rr78.2%
Taylor expanded in B around inf 66.3%
sub-neg66.3%
+-commutative66.3%
mul-1-neg66.3%
distribute-lft-in66.3%
metadata-eval66.3%
associate-+l+66.3%
+-commutative66.3%
mul-1-neg66.3%
sub-neg66.3%
div-sub67.0%
Simplified67.0%
Final simplification68.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1e-222)
(/ (* 180.0 (atan (+ 1.0 t_0))) PI)
(/ (* 180.0 (atan (+ -1.0 t_0))) PI))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1e-222) {
tmp = (180.0 * atan((1.0 + t_0))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((-1.0 + t_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 (B <= -1e-222) {
tmp = (180.0 * Math.atan((1.0 + t_0))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((-1.0 + t_0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1e-222: tmp = (180.0 * math.atan((1.0 + t_0))) / math.pi else: tmp = (180.0 * math.atan((-1.0 + t_0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1e-222) tmp = Float64(Float64(180.0 * atan(Float64(1.0 + t_0))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + t_0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1e-222) tmp = (180.0 * atan((1.0 + t_0))) / pi; else tmp = (180.0 * atan((-1.0 + t_0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1e-222], N[(N[(180.0 * N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1 \cdot 10^{-222}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + t\_0\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.00000000000000005e-222Initial program 55.3%
associate-*r/55.3%
Applied egg-rr80.8%
Taylor expanded in B around -inf 68.9%
associate--l+68.9%
div-sub69.7%
Simplified69.7%
if -1.00000000000000005e-222 < B Initial program 56.6%
associate-*r/56.6%
Applied egg-rr78.2%
Taylor expanded in B around inf 66.3%
sub-neg66.3%
+-commutative66.3%
mul-1-neg66.3%
distribute-lft-in66.3%
metadata-eval66.3%
associate-+l+66.3%
+-commutative66.3%
mul-1-neg66.3%
sub-neg66.3%
div-sub67.0%
Simplified67.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1e-290)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(/ (* 180.0 (atan (+ -1.0 t_0))) PI))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -1e-290) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-1.0 + t_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 (B <= -1e-290) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-1.0 + t_0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -1e-290: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) else: tmp = (180.0 * math.atan((-1.0 + t_0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -1e-290) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + t_0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -1e-290) tmp = 180.0 * (atan((1.0 + t_0)) / pi); else tmp = (180.0 * atan((-1.0 + t_0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -1e-290], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1 \cdot 10^{-290}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + t\_0\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.0000000000000001e-290Initial program 56.1%
Taylor expanded in B around -inf 67.3%
associate--l+67.3%
div-sub68.0%
Simplified68.0%
if -1.0000000000000001e-290 < B Initial program 55.8%
associate-*r/55.8%
Applied egg-rr77.4%
Taylor expanded in B around inf 67.8%
sub-neg67.8%
+-commutative67.8%
mul-1-neg67.8%
distribute-lft-in67.8%
metadata-eval67.8%
associate-+l+67.8%
+-commutative67.8%
mul-1-neg67.8%
sub-neg67.8%
div-sub68.6%
Simplified68.6%
(FPCore (A B C) :precision binary64 (if (<= B 2e-120) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (/ (- C B) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2e-120) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((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 <= 2e-120) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2e-120: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / 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 <= 2e-120) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2e-120) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 * (atan(((C - B) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2e-120], 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[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2 \cdot 10^{-120}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.99999999999999996e-120Initial program 59.6%
Taylor expanded in B around -inf 66.2%
associate--l+66.2%
div-sub67.4%
Simplified67.4%
if 1.99999999999999996e-120 < B Initial program 48.8%
Simplified75.8%
Taylor expanded in B around inf 70.2%
Taylor expanded in A around 0 62.6%
(FPCore (A B C)
:precision binary64
(if (<= B -5.2e-62)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.3e-83)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-62) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.3e-83) {
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 <= -5.2e-62) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.3e-83) {
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 <= -5.2e-62: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.3e-83: 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 <= -5.2e-62) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.3e-83) 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 <= -5.2e-62) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.3e-83) 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, -5.2e-62], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.3e-83], 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 -5.2 \cdot 10^{-62}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.3 \cdot 10^{-83}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.1999999999999999e-62Initial program 64.7%
Taylor expanded in B around -inf 64.8%
if -5.1999999999999999e-62 < B < 3.2999999999999999e-83Initial program 52.3%
associate-*r/52.3%
Applied egg-rr72.6%
div-sub49.2%
Applied egg-rr49.2%
Taylor expanded in C around inf 12.1%
distribute-lft1-in12.1%
metadata-eval12.1%
mul0-lft26.4%
metadata-eval26.4%
Simplified26.4%
if 3.2999999999999999e-83 < B Initial program 50.8%
Taylor expanded in B around inf 51.6%
(FPCore (A B C) :precision binary64 (if (<= B -5e-311) (* 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-311) {
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-311) {
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-311: 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-311) 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-311) 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-311], 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^{-311}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.00000000000023e-311Initial program 56.8%
Taylor expanded in B around -inf 47.1%
if -5.00000000000023e-311 < B Initial program 55.1%
Taylor expanded in B around inf 37.2%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 56.0%
Taylor expanded in B around inf 18.8%
herbie shell --seed 2024170
(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)))