
(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 (<= A -1.5e+152) (/ 180.0 (/ PI (atan (* 0.5 (/ B A))))) (/ 1.0 (/ (/ PI 180.0) (atan (/ (- C (+ A (hypot (- A C) B))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+152) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else {
tmp = 1.0 / ((((double) M_PI) / 180.0) / atan(((C - (A + hypot((A - C), B))) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+152) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else {
tmp = 1.0 / ((Math.PI / 180.0) / Math.atan(((C - (A + Math.hypot((A - C), B))) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+152: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) else: tmp = 1.0 / ((math.pi / 180.0) / math.atan(((C - (A + math.hypot((A - C), B))) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+152) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); else tmp = Float64(1.0 / Float64(Float64(pi / 180.0) / atan(Float64(Float64(C - Float64(A + hypot(Float64(A - C), B))) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e+152) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); else tmp = 1.0 / ((pi / 180.0) / atan(((C - (A + hypot((A - C), B))) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+152], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(Pi / 180.0), $MachinePrecision] / N[ArcTan[N[(N[(C - N[(A + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+152}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\frac{\pi}{180}}{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.49999999999999995e152Initial program 13.7%
associate-*r/13.7%
associate-/l*13.7%
associate--r+10.8%
*-commutative10.8%
associate--r+13.7%
+-commutative13.7%
unpow213.7%
unpow213.7%
hypot-udef50.1%
associate--r+26.5%
div-inv26.5%
Applied egg-rr50.1%
Taylor expanded in A around -inf 86.6%
if -1.49999999999999995e152 < A Initial program 56.6%
Applied egg-rr80.5%
associate-/r*80.5%
associate--l-80.6%
Simplified80.6%
Final simplification81.4%
(FPCore (A B C)
:precision binary64
(if (<= C -2.3e-11)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 7.4e+53)
(* 180.0 (/ (atan (* (+ A (hypot B A)) (/ -1.0 B))) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.3e-11) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 7.4e+53) {
tmp = 180.0 * (atan(((A + hypot(B, A)) * (-1.0 / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.3e-11) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 7.4e+53) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, A)) * (-1.0 / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.3e-11: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 7.4e+53: tmp = 180.0 * (math.atan(((A + math.hypot(B, A)) * (-1.0 / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.3e-11) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 7.4e+53) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) * Float64(-1.0 / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.3e-11) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 7.4e+53) tmp = 180.0 * (atan(((A + hypot(B, A)) * (-1.0 / B))) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.3e-11], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.4e+53], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.3 \cdot 10^{-11}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 7.4 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\left(A + \mathsf{hypot}\left(B, A\right)\right) \cdot \frac{-1}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -2.30000000000000014e-11Initial program 76.6%
associate--l-76.6%
Simplified76.6%
Taylor expanded in A around 0 76.6%
unpow276.6%
unpow276.6%
hypot-def90.2%
Simplified90.2%
if -2.30000000000000014e-11 < C < 7.4e53Initial program 54.8%
associate--l-54.1%
Simplified54.1%
Taylor expanded in C around 0 53.9%
mul-1-neg53.9%
+-commutative53.9%
unpow253.9%
unpow253.9%
hypot-def77.1%
Simplified77.1%
if 7.4e53 < C Initial program 16.0%
associate-*r/16.0%
associate-/l*16.0%
associate--r+16.0%
*-commutative16.0%
associate--r+16.0%
+-commutative16.0%
unpow216.0%
unpow216.0%
hypot-udef55.2%
associate--r+51.9%
div-inv51.9%
Applied egg-rr55.2%
Taylor expanded in C around inf 43.1%
+-commutative43.1%
associate--l+43.1%
neg-mul-143.1%
unpow243.1%
sqr-neg43.1%
unpow243.1%
neg-mul-143.1%
distribute-lft-in43.1%
neg-mul-143.1%
neg-mul-143.1%
remove-double-neg43.1%
+-commutative43.1%
neg-mul-143.1%
distribute-rgt1-in43.1%
metadata-eval43.1%
mul0-lft43.1%
Simplified43.1%
Taylor expanded in A around 0 71.4%
Final simplification79.1%
(FPCore (A B C) :precision binary64 (if (<= A -9.5e+151) (/ 180.0 (/ PI (atan (* 0.5 (/ B A))))) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.5e+151) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} 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 <= -9.5e+151) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} 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 <= -9.5e+151: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) 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 <= -9.5e+151) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); 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 <= -9.5e+151) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); 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, -9.5e+151], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 -9.5 \cdot 10^{+151}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\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 < -9.5000000000000001e151Initial program 13.7%
associate-*r/13.7%
associate-/l*13.7%
associate--r+10.8%
*-commutative10.8%
associate--r+13.7%
+-commutative13.7%
unpow213.7%
unpow213.7%
hypot-udef50.1%
associate--r+26.5%
div-inv26.5%
Applied egg-rr50.1%
Taylor expanded in A around -inf 86.6%
if -9.5000000000000001e151 < A Initial program 56.6%
Simplified80.6%
Final simplification81.4%
(FPCore (A B C)
:precision binary64
(if (<= C -2.5e-11)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 5.8e+53)
(* 180.0 (/ (atan (/ (- (- (hypot B A)) A) B)) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.5e-11) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 5.8e+53) {
tmp = 180.0 * (atan(((-hypot(B, A) - A) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.5e-11) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 5.8e+53) {
tmp = 180.0 * (Math.atan(((-Math.hypot(B, A) - A) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.5e-11: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 5.8e+53: tmp = 180.0 * (math.atan(((-math.hypot(B, A) - A) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.5e-11) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 5.8e+53) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-hypot(B, A)) - A) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.5e-11) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 5.8e+53) tmp = 180.0 * (atan(((-hypot(B, A) - A) / B)) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.5e-11], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.8e+53], N[(180.0 * N[(N[ArcTan[N[(N[((-N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]) - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.5 \cdot 10^{-11}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.8 \cdot 10^{+53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-\mathsf{hypot}\left(B, A\right)\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -2.50000000000000009e-11Initial program 76.6%
associate--l-76.6%
Simplified76.6%
Taylor expanded in A around 0 76.6%
unpow276.6%
unpow276.6%
hypot-def90.2%
Simplified90.2%
if -2.50000000000000009e-11 < C < 5.8000000000000004e53Initial program 54.8%
associate--l-54.1%
Simplified54.1%
Taylor expanded in C around 0 53.9%
associate-*r/53.9%
mul-1-neg53.9%
+-commutative53.9%
unpow253.9%
unpow253.9%
hypot-def77.1%
Simplified77.1%
if 5.8000000000000004e53 < C Initial program 16.0%
associate-*r/16.0%
associate-/l*16.0%
associate--r+16.0%
*-commutative16.0%
associate--r+16.0%
+-commutative16.0%
unpow216.0%
unpow216.0%
hypot-udef55.2%
associate--r+51.9%
div-inv51.9%
Applied egg-rr55.2%
Taylor expanded in C around inf 43.1%
+-commutative43.1%
associate--l+43.1%
neg-mul-143.1%
unpow243.1%
sqr-neg43.1%
unpow243.1%
neg-mul-143.1%
distribute-lft-in43.1%
neg-mul-143.1%
neg-mul-143.1%
remove-double-neg43.1%
+-commutative43.1%
neg-mul-143.1%
distribute-rgt1-in43.1%
metadata-eval43.1%
mul0-lft43.1%
Simplified43.1%
Taylor expanded in A around 0 71.4%
Final simplification79.1%
(FPCore (A B C)
:precision binary64
(if (<= C -2.2e-11)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 8.5e+53)
(/ 180.0 (/ PI (atan (/ (- (- A) (hypot A B)) B))))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.2e-11) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 8.5e+53) {
tmp = 180.0 / (((double) M_PI) / atan(((-A - hypot(A, B)) / B)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.2e-11) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 8.5e+53) {
tmp = 180.0 / (Math.PI / Math.atan(((-A - Math.hypot(A, B)) / B)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.2e-11: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 8.5e+53: tmp = 180.0 / (math.pi / math.atan(((-A - math.hypot(A, B)) / B))) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.2e-11) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 8.5e+53) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.2e-11) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 8.5e+53) tmp = 180.0 / (pi / atan(((-A - hypot(A, B)) / B))); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.2e-11], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.5e+53], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.2 \cdot 10^{-11}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.5 \cdot 10^{+53}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -2.2000000000000002e-11Initial program 76.6%
associate--l-76.6%
Simplified76.6%
Taylor expanded in A around 0 76.6%
unpow276.6%
unpow276.6%
hypot-def90.2%
Simplified90.2%
if -2.2000000000000002e-11 < C < 8.5000000000000002e53Initial program 54.8%
associate-*r/54.8%
associate-/l*54.8%
associate--r+54.1%
*-commutative54.1%
associate--r+54.8%
+-commutative54.8%
unpow254.8%
unpow254.8%
hypot-udef78.5%
associate--r+74.7%
div-inv74.7%
Applied egg-rr78.5%
Taylor expanded in C around 0 53.9%
mul-1-neg53.9%
unpow253.9%
unpow253.9%
hypot-def77.1%
Simplified77.1%
if 8.5000000000000002e53 < C Initial program 16.0%
associate-*r/16.0%
associate-/l*16.0%
associate--r+16.0%
*-commutative16.0%
associate--r+16.0%
+-commutative16.0%
unpow216.0%
unpow216.0%
hypot-udef55.2%
associate--r+51.9%
div-inv51.9%
Applied egg-rr55.2%
Taylor expanded in C around inf 43.1%
+-commutative43.1%
associate--l+43.1%
neg-mul-143.1%
unpow243.1%
sqr-neg43.1%
unpow243.1%
neg-mul-143.1%
distribute-lft-in43.1%
neg-mul-143.1%
neg-mul-143.1%
remove-double-neg43.1%
+-commutative43.1%
neg-mul-143.1%
distribute-rgt1-in43.1%
metadata-eval43.1%
mul0-lft43.1%
Simplified43.1%
Taylor expanded in A around 0 71.4%
Final simplification79.1%
(FPCore (A B C)
:precision binary64
(if (<= C -0.25)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 1.3e+53)
(/ (* 180.0 (atan (/ (- (- A) (hypot A B)) B))) PI)
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -0.25) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 1.3e+53) {
tmp = (180.0 * atan(((-A - hypot(A, B)) / B))) / ((double) M_PI);
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -0.25) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 1.3e+53) {
tmp = (180.0 * Math.atan(((-A - Math.hypot(A, B)) / B))) / Math.PI;
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -0.25: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 1.3e+53: tmp = (180.0 * math.atan(((-A - math.hypot(A, B)) / B))) / math.pi else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -0.25) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 1.3e+53) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B))) / pi); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -0.25) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 1.3e+53) tmp = (180.0 * atan(((-A - hypot(A, B)) / B))) / pi; else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -0.25], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.3e+53], 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[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -0.25:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.3 \cdot 10^{+53}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -0.25Initial program 76.6%
associate--l-76.6%
Simplified76.6%
Taylor expanded in A around 0 76.6%
unpow276.6%
unpow276.6%
hypot-def90.2%
Simplified90.2%
if -0.25 < C < 1.29999999999999999e53Initial program 54.8%
associate-*r/54.8%
Applied egg-rr78.5%
Taylor expanded in C around 0 53.9%
mul-1-neg53.9%
unpow253.9%
unpow253.9%
hypot-def77.1%
Simplified77.1%
if 1.29999999999999999e53 < C Initial program 16.0%
associate-*r/16.0%
associate-/l*16.0%
associate--r+16.0%
*-commutative16.0%
associate--r+16.0%
+-commutative16.0%
unpow216.0%
unpow216.0%
hypot-udef55.2%
associate--r+51.9%
div-inv51.9%
Applied egg-rr55.2%
Taylor expanded in C around inf 43.1%
+-commutative43.1%
associate--l+43.1%
neg-mul-143.1%
unpow243.1%
sqr-neg43.1%
unpow243.1%
neg-mul-143.1%
distribute-lft-in43.1%
neg-mul-143.1%
neg-mul-143.1%
remove-double-neg43.1%
+-commutative43.1%
neg-mul-143.1%
distribute-rgt1-in43.1%
metadata-eval43.1%
mul0-lft43.1%
Simplified43.1%
Taylor expanded in A around 0 71.4%
Final simplification79.1%
(FPCore (A B C)
:precision binary64
(if (<= A -8.2e+151)
(/ 180.0 (/ PI (atan (* 0.5 (/ B A)))))
(if (<= A 4.2e+81)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e+151) {
tmp = 180.0 / (((double) M_PI) / atan((0.5 * (B / A))));
} else if (A <= 4.2e+81) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e+151) {
tmp = 180.0 / (Math.PI / Math.atan((0.5 * (B / A))));
} else if (A <= 4.2e+81) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.2e+151: tmp = 180.0 / (math.pi / math.atan((0.5 * (B / A)))) elif A <= 4.2e+81: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.2e+151) tmp = Float64(180.0 / Float64(pi / atan(Float64(0.5 * Float64(B / A))))); elseif (A <= 4.2e+81) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.2e+151) tmp = 180.0 / (pi / atan((0.5 * (B / A)))); elseif (A <= 4.2e+81) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.2e+151], N[(180.0 / N[(Pi / N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.2e+81], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.2 \cdot 10^{+151}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}}\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{+81}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -8.1999999999999996e151Initial program 13.7%
associate-*r/13.7%
associate-/l*13.7%
associate--r+10.8%
*-commutative10.8%
associate--r+13.7%
+-commutative13.7%
unpow213.7%
unpow213.7%
hypot-udef50.1%
associate--r+26.5%
div-inv26.5%
Applied egg-rr50.1%
Taylor expanded in A around -inf 86.6%
if -8.1999999999999996e151 < A < 4.1999999999999997e81Initial program 52.3%
associate--l-52.4%
Simplified52.4%
Taylor expanded in A around 0 48.4%
unpow248.4%
unpow248.4%
hypot-def73.0%
Simplified73.0%
if 4.1999999999999997e81 < A Initial program 74.3%
associate-*r/74.3%
associate-/l*74.3%
associate--r+74.3%
*-commutative74.3%
associate--r+74.3%
+-commutative74.3%
unpow274.3%
unpow274.3%
hypot-udef95.6%
associate--r+95.6%
div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in B around inf 80.1%
neg-mul-180.1%
unsub-neg80.1%
Simplified80.1%
Final simplification76.0%
(FPCore (A B C)
:precision binary64
(if (<= B -6e-273)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 4.2e-223)
(* 180.0 (/ (atan (* (/ 1.0 B) (* 0.5 (* B (/ B A))))) PI))
(/ (* 180.0 (atan (/ (- (- C B) A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6e-273) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 4.2e-223) {
tmp = 180.0 * (atan(((1.0 / B) * (0.5 * (B * (B / A))))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - B) - A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6e-273) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 4.2e-223) {
tmp = 180.0 * (Math.atan(((1.0 / B) * (0.5 * (B * (B / A))))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - B) - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6e-273: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 4.2e-223: tmp = 180.0 * (math.atan(((1.0 / B) * (0.5 * (B * (B / A))))) / math.pi) else: tmp = (180.0 * math.atan((((C - B) - A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6e-273) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 4.2e-223) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(0.5 * Float64(B * Float64(B / A))))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B) - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6e-273) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 4.2e-223) tmp = 180.0 * (atan(((1.0 / B) * (0.5 * (B * (B / A))))) / pi); else tmp = (180.0 * atan((((C - B) - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6e-273], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e-223], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(0.5 * N[(B * N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6 \cdot 10^{-273}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{-223}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(0.5 \cdot \left(B \cdot \frac{B}{A}\right)\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.99999999999999975e-273Initial program 52.9%
associate--l-52.9%
Simplified52.9%
Taylor expanded in B around -inf 70.1%
associate--l+70.1%
div-sub70.1%
Simplified70.1%
if -5.99999999999999975e-273 < B < 4.19999999999999965e-223Initial program 41.7%
associate--l-37.2%
Simplified37.2%
Taylor expanded in A around -inf 54.3%
unpow254.3%
*-un-lft-identity54.3%
times-frac56.7%
/-rgt-identity56.7%
Applied egg-rr56.7%
if 4.19999999999999965e-223 < B Initial program 50.5%
associate-*r/50.6%
Applied egg-rr74.4%
Taylor expanded in B around inf 65.3%
neg-mul-165.3%
unsub-neg65.3%
Simplified65.3%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(if (<= B -6.6e-124)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.32e-269)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 4e-220)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.6e-9)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(* 180.0 (/ (atan -1.0) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.6e-124) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.32e-269) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 4e-220) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.6e-9) {
tmp = 180.0 * (atan(((C / 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 <= -6.6e-124) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.32e-269) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 4e-220) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.6e-9) {
tmp = 180.0 * (Math.atan(((C / 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 <= -6.6e-124: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.32e-269: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 4e-220: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.6e-9: tmp = 180.0 * (math.atan(((C / 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 <= -6.6e-124) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.32e-269) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 4e-220) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.6e-9) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / 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 <= -6.6e-124) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.32e-269) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 4e-220) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.6e-9) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.6e-124], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.32e-269], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-220], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.6e-9], N[(180.0 * N[(N[ArcTan[N[(N[(C / 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 -6.6 \cdot 10^{-124}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.32 \cdot 10^{-269}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-220}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.6 \cdot 10^{-9}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.59999999999999969e-124Initial program 51.1%
associate--l-51.1%
Simplified51.1%
Taylor expanded in B around -inf 55.1%
if -6.59999999999999969e-124 < B < -1.32000000000000007e-269Initial program 59.9%
associate--l-59.9%
Simplified59.9%
Taylor expanded in A around inf 47.5%
if -1.32000000000000007e-269 < B < 3.99999999999999997e-220Initial program 42.4%
associate--l-38.3%
Simplified38.3%
Taylor expanded in C around inf 54.1%
associate-*r/54.1%
distribute-rgt1-in54.1%
metadata-eval54.1%
mul0-lft54.1%
metadata-eval54.1%
Simplified54.1%
if 3.99999999999999997e-220 < B < 1.60000000000000006e-9Initial program 56.5%
associate--l-56.9%
Simplified56.9%
Taylor expanded in C around -inf 41.3%
if 1.60000000000000006e-9 < B Initial program 45.5%
associate--l-45.5%
Simplified45.5%
Taylor expanded in B around inf 58.8%
Final simplification52.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ C B))) PI)))
(t_1 (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))))
(if (<= A -9e+54)
t_1
(if (<= A -8.6e-19)
t_0
(if (<= A -1.05e-183)
t_1
(if (<= A 5.4e-21) t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
double t_1 = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
double tmp;
if (A <= -9e+54) {
tmp = t_1;
} else if (A <= -8.6e-19) {
tmp = t_0;
} else if (A <= -1.05e-183) {
tmp = t_1;
} else if (A <= 5.4e-21) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
double t_1 = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
double tmp;
if (A <= -9e+54) {
tmp = t_1;
} else if (A <= -8.6e-19) {
tmp = t_0;
} else if (A <= -1.05e-183) {
tmp = t_1;
} else if (A <= 5.4e-21) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) t_1 = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) tmp = 0 if A <= -9e+54: tmp = t_1 elif A <= -8.6e-19: tmp = t_0 elif A <= -1.05e-183: tmp = t_1 elif A <= 5.4e-21: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)) tmp = 0.0 if (A <= -9e+54) tmp = t_1; elseif (A <= -8.6e-19) tmp = t_0; elseif (A <= -1.05e-183) tmp = t_1; elseif (A <= 5.4e-21) tmp = t_0; 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) t_0 = 180.0 * (atan((1.0 + (C / B))) / pi); t_1 = 180.0 * (atan(((0.5 * B) / A)) / pi); tmp = 0.0; if (A <= -9e+54) tmp = t_1; elseif (A <= -8.6e-19) tmp = t_0; elseif (A <= -1.05e-183) tmp = t_1; elseif (A <= 5.4e-21) tmp = t_0; else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -9e+54], t$95$1, If[LessEqual[A, -8.6e-19], t$95$0, If[LessEqual[A, -1.05e-183], t$95$1, If[LessEqual[A, 5.4e-21], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -9 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -8.6 \cdot 10^{-19}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.05 \cdot 10^{-183}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 5.4 \cdot 10^{-21}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.99999999999999968e54 or -8.6e-19 < A < -1.0500000000000001e-183Initial program 24.6%
associate--l-23.6%
Simplified23.6%
Taylor expanded in A around -inf 60.3%
associate-*r/60.3%
Simplified60.3%
if -8.99999999999999968e54 < A < -8.6e-19 or -1.0500000000000001e-183 < A < 5.4000000000000002e-21Initial program 63.2%
associate--l-63.2%
Simplified63.2%
Taylor expanded in B around -inf 59.5%
associate--l+59.5%
div-sub59.5%
Simplified59.5%
Taylor expanded in C around inf 58.0%
if 5.4000000000000002e-21 < A Initial program 65.5%
associate--l-65.5%
Simplified65.5%
Taylor expanded in B around -inf 68.0%
associate--l+68.0%
div-sub68.1%
Simplified68.1%
Taylor expanded in C around 0 67.1%
neg-mul-167.1%
distribute-neg-frac67.1%
Simplified67.1%
Taylor expanded in A around 0 67.1%
mul-1-neg67.1%
distribute-frac-neg67.1%
distribute-frac-neg67.1%
sub-neg67.1%
Simplified67.1%
Final simplification61.2%
(FPCore (A B C)
:precision binary64
(if (<= B -1.7e-270)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= B 9e-217)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 0.0024)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.7e-270) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (B <= 9e-217) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 0.0024) {
tmp = 180.0 * (atan(((C / 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 <= -1.7e-270) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (B <= 9e-217) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 0.0024) {
tmp = 180.0 * (Math.atan(((C / 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 <= -1.7e-270: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif B <= 9e-217: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 0.0024: tmp = 180.0 * (math.atan(((C / 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 <= -1.7e-270) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (B <= 9e-217) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 0.0024) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / 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 <= -1.7e-270) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (B <= 9e-217) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 0.0024) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.7e-270], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9e-217], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 0.0024], N[(180.0 * N[(N[ArcTan[N[(N[(C / 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 -1.7 \cdot 10^{-270}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-217}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 0.0024:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.7e-270Initial program 52.9%
associate--l-52.9%
Simplified52.9%
Taylor expanded in B around -inf 70.4%
associate--l+70.4%
div-sub70.4%
Simplified70.4%
Taylor expanded in C around inf 59.7%
if -1.7e-270 < B < 8.9999999999999997e-217Initial program 42.4%
associate--l-38.3%
Simplified38.3%
Taylor expanded in C around inf 54.1%
associate-*r/54.1%
distribute-rgt1-in54.1%
metadata-eval54.1%
mul0-lft54.1%
metadata-eval54.1%
Simplified54.1%
if 8.9999999999999997e-217 < B < 0.00239999999999999979Initial program 56.5%
associate--l-56.9%
Simplified56.9%
Taylor expanded in C around -inf 41.3%
if 0.00239999999999999979 < B Initial program 45.5%
associate--l-45.5%
Simplified45.5%
Taylor expanded in B around inf 58.8%
Final simplification55.3%
(FPCore (A B C)
:precision binary64
(if (<= B -2.3e-269)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 3.5e-221)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.3e-269) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 3.5e-221) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.3e-269) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 3.5e-221) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.3e-269: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 3.5e-221: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.3e-269) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 3.5e-221) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.3e-269) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 3.5e-221) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.3e-269], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e-221], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.3 \cdot 10^{-269}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-221}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -2.3e-269Initial program 52.9%
associate--l-52.9%
Simplified52.9%
Taylor expanded in B around -inf 70.4%
associate--l+70.4%
div-sub70.4%
Simplified70.4%
if -2.3e-269 < B < 3.4999999999999999e-221Initial program 42.4%
associate--l-38.3%
Simplified38.3%
Taylor expanded in C around inf 54.1%
associate-*r/54.1%
distribute-rgt1-in54.1%
metadata-eval54.1%
mul0-lft54.1%
metadata-eval54.1%
Simplified54.1%
if 3.4999999999999999e-221 < B Initial program 50.5%
associate-*r/50.6%
associate-/l*50.5%
associate--r+50.7%
*-commutative50.7%
associate--r+50.5%
+-commutative50.5%
unpow250.5%
unpow250.5%
hypot-udef74.4%
associate--r+72.7%
div-inv72.7%
Applied egg-rr74.4%
Taylor expanded in B around inf 65.3%
neg-mul-165.3%
unsub-neg65.3%
Simplified65.3%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.1e-270)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 8.2e-218)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ (* 180.0 (atan (/ (- (- C B) A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.1e-270) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 8.2e-218) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((((C - B) - A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.1e-270) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 8.2e-218) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((((C - B) - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.1e-270: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 8.2e-218: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = (180.0 * math.atan((((C - B) - A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.1e-270) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 8.2e-218) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - B) - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.1e-270) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 8.2e-218) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = (180.0 * atan((((C - B) - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.1e-270], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.2e-218], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.1 \cdot 10^{-270}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.2 \cdot 10^{-218}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.0999999999999999e-270Initial program 52.9%
associate--l-52.9%
Simplified52.9%
Taylor expanded in B around -inf 70.4%
associate--l+70.4%
div-sub70.4%
Simplified70.4%
if -1.0999999999999999e-270 < B < 8.1999999999999995e-218Initial program 42.4%
associate--l-38.3%
Simplified38.3%
Taylor expanded in C around inf 54.1%
associate-*r/54.1%
distribute-rgt1-in54.1%
metadata-eval54.1%
mul0-lft54.1%
metadata-eval54.1%
Simplified54.1%
if 8.1999999999999995e-218 < B Initial program 50.5%
associate-*r/50.6%
Applied egg-rr74.4%
Taylor expanded in B around inf 65.3%
neg-mul-165.3%
unsub-neg65.3%
Simplified65.3%
Final simplification66.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.02e-123)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -7.5e-270)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 1.5e-138)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.02e-123) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -7.5e-270) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 1.5e-138) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.02e-123) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -7.5e-270) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 1.5e-138) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.02e-123: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -7.5e-270: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 1.5e-138: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.02e-123) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -7.5e-270) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 1.5e-138) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.02e-123) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -7.5e-270) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 1.5e-138) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.02e-123], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.5e-270], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.5e-138], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.02 \cdot 10^{-123}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -7.5 \cdot 10^{-270}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-138}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.02e-123Initial program 51.1%
associate--l-51.1%
Simplified51.1%
Taylor expanded in B around -inf 55.1%
if -1.02e-123 < B < -7.4999999999999997e-270Initial program 59.9%
associate--l-59.9%
Simplified59.9%
Taylor expanded in A around inf 47.5%
if -7.4999999999999997e-270 < B < 1.5e-138Initial program 47.8%
associate--l-46.0%
Simplified46.0%
Taylor expanded in C around inf 41.8%
associate-*r/41.8%
distribute-rgt1-in41.8%
metadata-eval41.8%
mul0-lft41.8%
metadata-eval41.8%
Simplified41.8%
if 1.5e-138 < B Initial program 49.7%
associate--l-49.8%
Simplified49.8%
Taylor expanded in B around inf 47.9%
Final simplification49.4%
(FPCore (A B C)
:precision binary64
(if (<= C -1e-36)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 1.66e+198)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* 180.0 (/ (atan (/ 0.0 B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1e-36) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 1.66e+198) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1e-36) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 1.66e+198) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1e-36: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 1.66e+198: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1e-36) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 1.66e+198) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1e-36) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 1.66e+198) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 * (atan((0.0 / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1e-36], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.66e+198], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1 \cdot 10^{-36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.66 \cdot 10^{+198}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\end{array}
\end{array}
if C < -9.9999999999999994e-37Initial program 76.9%
associate--l-75.5%
Simplified75.5%
Taylor expanded in B around -inf 77.0%
associate--l+77.0%
div-sub77.1%
Simplified77.1%
Taylor expanded in C around inf 77.2%
if -9.9999999999999994e-37 < C < 1.6600000000000001e198Initial program 46.9%
associate--l-46.9%
Simplified46.9%
Taylor expanded in B around -inf 44.5%
associate--l+44.5%
div-sub44.5%
Simplified44.5%
Taylor expanded in C around 0 44.5%
neg-mul-144.5%
distribute-neg-frac44.5%
Simplified44.5%
Taylor expanded in A around 0 44.5%
mul-1-neg44.5%
distribute-frac-neg44.5%
distribute-frac-neg44.5%
sub-neg44.5%
Simplified44.5%
if 1.6600000000000001e198 < C Initial program 4.3%
associate--l-4.3%
Simplified4.3%
Taylor expanded in C around inf 50.0%
associate-*r/50.0%
distribute-rgt1-in50.0%
metadata-eval50.0%
mul0-lft50.0%
metadata-eval50.0%
Simplified50.0%
Final simplification54.1%
(FPCore (A B C)
:precision binary64
(if (<= C -2.05e-34)
(* 180.0 (/ (atan (+ 1.0 (/ C B))) PI))
(if (<= C 1.6e-50)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.05e-34) {
tmp = 180.0 * (atan((1.0 + (C / B))) / ((double) M_PI));
} else if (C <= 1.6e-50) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.05e-34) {
tmp = 180.0 * (Math.atan((1.0 + (C / B))) / Math.PI);
} else if (C <= 1.6e-50) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.05e-34: tmp = 180.0 * (math.atan((1.0 + (C / B))) / math.pi) elif C <= 1.6e-50: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.05e-34) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(C / B))) / pi)); elseif (C <= 1.6e-50) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.05e-34) tmp = 180.0 * (atan((1.0 + (C / B))) / pi); elseif (C <= 1.6e-50) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.05e-34], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.6e-50], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.05 \cdot 10^{-34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.6 \cdot 10^{-50}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -2.0500000000000002e-34Initial program 76.2%
associate--l-76.2%
Simplified76.2%
Taylor expanded in B around -inf 79.2%
associate--l+79.2%
div-sub79.3%
Simplified79.3%
Taylor expanded in C around inf 79.4%
if -2.0500000000000002e-34 < C < 1.6e-50Initial program 57.0%
associate--l-56.2%
Simplified56.2%
Taylor expanded in B around -inf 52.3%
associate--l+52.3%
div-sub52.3%
Simplified52.3%
Taylor expanded in C around 0 52.0%
neg-mul-152.0%
distribute-neg-frac52.0%
Simplified52.0%
Taylor expanded in A around 0 52.0%
mul-1-neg52.0%
distribute-frac-neg52.0%
distribute-frac-neg52.0%
sub-neg52.0%
Simplified52.0%
if 1.6e-50 < C Initial program 21.6%
associate-*r/21.7%
associate-/l*21.6%
associate--r+21.6%
*-commutative21.6%
associate--r+21.6%
+-commutative21.6%
unpow221.6%
unpow221.6%
hypot-udef54.9%
associate--r+52.1%
div-inv52.1%
Applied egg-rr54.9%
Taylor expanded in C around inf 35.9%
+-commutative35.9%
associate--l+35.9%
neg-mul-135.9%
unpow235.9%
sqr-neg35.9%
unpow235.9%
neg-mul-135.9%
distribute-lft-in35.9%
neg-mul-135.9%
neg-mul-135.9%
remove-double-neg35.9%
+-commutative35.9%
neg-mul-135.9%
distribute-rgt1-in35.9%
metadata-eval35.9%
mul0-lft35.9%
Simplified35.9%
Taylor expanded in A around 0 63.8%
Final simplification63.2%
(FPCore (A B C) :precision binary64 (if (<= C 2.35e-43) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (/ 180.0 (/ PI (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.35e-43) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 2.35e-43) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2.35e-43: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2.35e-43) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2.35e-43) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2.35e-43], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2.35 \cdot 10^{-43}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < 2.35e-43Initial program 64.6%
associate--l-64.1%
Simplified64.1%
Taylor expanded in B around -inf 62.9%
associate--l+62.9%
div-sub63.0%
Simplified63.0%
if 2.35e-43 < C Initial program 21.6%
associate-*r/21.7%
associate-/l*21.6%
associate--r+21.6%
*-commutative21.6%
associate--r+21.6%
+-commutative21.6%
unpow221.6%
unpow221.6%
hypot-udef54.9%
associate--r+52.1%
div-inv52.1%
Applied egg-rr54.9%
Taylor expanded in C around inf 35.9%
+-commutative35.9%
associate--l+35.9%
neg-mul-135.9%
unpow235.9%
sqr-neg35.9%
unpow235.9%
neg-mul-135.9%
distribute-lft-in35.9%
neg-mul-135.9%
neg-mul-135.9%
remove-double-neg35.9%
+-commutative35.9%
neg-mul-135.9%
distribute-rgt1-in35.9%
metadata-eval35.9%
mul0-lft35.9%
Simplified35.9%
Taylor expanded in A around 0 63.8%
Final simplification63.2%
(FPCore (A B C)
:precision binary64
(if (<= B -1.05e-178)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 9.6e-139)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-178) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 9.6e-139) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.05e-178) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 9.6e-139) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.05e-178: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 9.6e-139: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.05e-178) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 9.6e-139) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.05e-178) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 9.6e-139) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.05e-178], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.6e-139], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.05 \cdot 10^{-178}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 9.6 \cdot 10^{-139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.05e-178Initial program 50.8%
associate--l-50.8%
Simplified50.8%
Taylor expanded in B around -inf 51.3%
if -1.05e-178 < B < 9.60000000000000059e-139Initial program 52.6%
associate--l-51.2%
Simplified51.2%
Taylor expanded in C around inf 37.3%
associate-*r/37.3%
distribute-rgt1-in37.3%
metadata-eval37.3%
mul0-lft37.3%
metadata-eval37.3%
Simplified37.3%
if 9.60000000000000059e-139 < B Initial program 49.7%
associate--l-49.8%
Simplified49.8%
Taylor expanded in B around inf 47.9%
Final simplification46.7%
(FPCore (A B C) :precision binary64 (if (<= B -4.7e-293) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.7e-293) {
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 <= -4.7e-293) {
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 <= -4.7e-293: 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 <= -4.7e-293) 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 <= -4.7e-293) 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, -4.7e-293], 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 -4.7 \cdot 10^{-293}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.70000000000000013e-293Initial program 51.7%
associate--l-51.7%
Simplified51.7%
Taylor expanded in B around -inf 44.5%
if -4.70000000000000013e-293 < B Initial program 50.0%
associate--l-49.4%
Simplified49.4%
Taylor expanded in B around inf 36.2%
Final simplification40.3%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 50.9%
associate--l-50.5%
Simplified50.5%
Taylor expanded in B around inf 19.3%
Final simplification19.3%
herbie shell --seed 2023332
(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)))