
(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 18 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.75e+151) (* (atan (* 0.5 (/ (+ B (* C (/ B A))) A))) (/ 180.0 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.75e+151) {
tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / ((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.75e+151) {
tmp = Math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / 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.75e+151: tmp = math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / 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.75e+151) tmp = Float64(atan(Float64(0.5 * Float64(Float64(B + Float64(C * Float64(B / A))) / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - 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.75e+151) tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / 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.75e+151], N[(N[ArcTan[N[(0.5 * N[(N[(B + N[(C * N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.75 \cdot 10^{+151}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B + C \cdot \frac{B}{A}}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.7500000000000001e151Initial program 4.4%
Taylor expanded in A around -inf 87.7%
associate-*r/87.7%
mul-1-neg87.7%
distribute-lft-out87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in B around 0 87.7%
associate-*r/87.9%
associate-*r/87.9%
+-commutative87.9%
*-commutative87.9%
associate-*r/93.4%
fma-undefine93.4%
*-commutative93.4%
associate-/l*93.5%
associate-/l*93.5%
Simplified93.5%
fma-undefine93.5%
Applied egg-rr93.5%
if -1.7500000000000001e151 < A Initial program 60.2%
associate-*l/60.2%
*-lft-identity60.2%
+-commutative60.2%
unpow260.2%
unpow260.2%
hypot-define80.2%
Simplified80.2%
Final simplification82.2%
(FPCore (A B C)
:precision binary64
(if (<= A -5.8e+141)
(* (atan (* 0.5 (/ (+ B (* C (/ B A))) A))) (/ 180.0 PI))
(if (<= A 4.1e-141)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* (atan (/ (+ A (hypot A B)) B)) (/ -180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.8e+141) {
tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / ((double) M_PI));
} else if (A <= 4.1e-141) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = atan(((A + hypot(A, B)) / B)) * (-180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.8e+141) {
tmp = Math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / Math.PI);
} else if (A <= 4.1e-141) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = Math.atan(((A + Math.hypot(A, B)) / B)) * (-180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.8e+141: tmp = math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / math.pi) elif A <= 4.1e-141: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = math.atan(((A + math.hypot(A, B)) / B)) * (-180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.8e+141) tmp = Float64(atan(Float64(0.5 * Float64(Float64(B + Float64(C * Float64(B / A))) / A))) * Float64(180.0 / pi)); elseif (A <= 4.1e-141) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(atan(Float64(Float64(A + hypot(A, B)) / B)) * Float64(-180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.8e+141) tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / pi); elseif (A <= 4.1e-141) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = atan(((A + hypot(A, B)) / B)) * (-180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.8e+141], N[(N[ArcTan[N[(0.5 * N[(N[(B + N[(C * N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.1e-141], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(-180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.8 \cdot 10^{+141}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B + C \cdot \frac{B}{A}}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 4.1 \cdot 10^{-141}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right) \cdot \frac{-180}{\pi}\\
\end{array}
\end{array}
if A < -5.80000000000000013e141Initial program 11.4%
Taylor expanded in A around -inf 86.9%
associate-*r/86.9%
mul-1-neg86.9%
distribute-lft-out86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in B around 0 86.9%
associate-*r/87.1%
associate-*r/87.1%
+-commutative87.1%
*-commutative87.1%
associate-*r/92.2%
fma-undefine92.2%
*-commutative92.2%
associate-/l*92.2%
associate-/l*92.2%
Simplified92.2%
fma-undefine92.2%
Applied egg-rr92.2%
if -5.80000000000000013e141 < A < 4.10000000000000002e-141Initial program 50.3%
Taylor expanded in A around 0 50.6%
+-commutative50.6%
unpow250.6%
unpow250.6%
hypot-define74.9%
Simplified74.9%
if 4.10000000000000002e-141 < A Initial program 74.2%
Taylor expanded in C around 0 69.5%
associate-*r/69.5%
mul-1-neg69.5%
unpow269.5%
unpow269.5%
hypot-define80.0%
Simplified80.0%
associate-*r/79.9%
distribute-frac-neg79.9%
atan-neg79.9%
Applied egg-rr79.9%
distribute-rgt-neg-out79.9%
distribute-lft-neg-in79.9%
metadata-eval79.9%
Simplified79.9%
Taylor expanded in A around 0 69.5%
unpow269.5%
unpow269.5%
hypot-undefine80.0%
associate-*r/79.9%
associate-*l/80.0%
*-commutative80.0%
Simplified80.0%
Final simplification79.5%
(FPCore (A B C)
:precision binary64
(if (<= A -4.1e+141)
(* (atan (* 0.5 (/ (+ B (* C (/ B A))) A))) (/ 180.0 PI))
(if (<= A 7e-157)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.1e+141) {
tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / ((double) M_PI));
} else if (A <= 7e-157) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.1e+141) {
tmp = Math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / Math.PI);
} else if (A <= 7e-157) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.1e+141: tmp = math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / math.pi) elif A <= 7e-157: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.1e+141) tmp = Float64(atan(Float64(0.5 * Float64(Float64(B + Float64(C * Float64(B / A))) / A))) * Float64(180.0 / pi)); elseif (A <= 7e-157) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.1e+141) tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / pi); elseif (A <= 7e-157) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.1e+141], N[(N[ArcTan[N[(0.5 * N[(N[(B + N[(C * N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7e-157], 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[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.1 \cdot 10^{+141}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B + C \cdot \frac{B}{A}}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 7 \cdot 10^{-157}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -4.10000000000000022e141Initial program 11.4%
Taylor expanded in A around -inf 86.9%
associate-*r/86.9%
mul-1-neg86.9%
distribute-lft-out86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in B around 0 86.9%
associate-*r/87.1%
associate-*r/87.1%
+-commutative87.1%
*-commutative87.1%
associate-*r/92.2%
fma-undefine92.2%
*-commutative92.2%
associate-/l*92.2%
associate-/l*92.2%
Simplified92.2%
fma-undefine92.2%
Applied egg-rr92.2%
if -4.10000000000000022e141 < A < 7.0000000000000004e-157Initial program 50.0%
Taylor expanded in A around 0 50.2%
+-commutative50.2%
unpow250.2%
unpow250.2%
hypot-define74.7%
Simplified74.7%
if 7.0000000000000004e-157 < A Initial program 74.5%
*-commutative74.5%
associate--l-74.5%
+-commutative74.5%
unpow274.5%
unpow274.5%
hypot-undefine87.8%
div-inv87.8%
clear-num87.8%
un-div-inv87.8%
Applied egg-rr87.8%
Taylor expanded in B around -inf 76.1%
associate--l+76.1%
div-sub78.5%
Simplified78.5%
Final simplification78.9%
(FPCore (A B C) :precision binary64 (if (<= A -8.9e+74) (* (atan (* 0.5 (/ (+ B (* C (/ B A))) A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.9e+74) {
tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / ((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 <= -8.9e+74) {
tmp = Math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / 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 <= -8.9e+74: tmp = math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / 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 <= -8.9e+74) tmp = Float64(atan(Float64(0.5 * Float64(Float64(B + Float64(C * Float64(B / A))) / A))) * Float64(180.0 / 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 <= -8.9e+74) tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / 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, -8.9e+74], N[(N[ArcTan[N[(0.5 * N[(N[(B + N[(C * N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / 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 -8.9 \cdot 10^{+74}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B + C \cdot \frac{B}{A}}{A}\right) \cdot \frac{180}{\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 < -8.9000000000000002e74Initial program 17.2%
Taylor expanded in A around -inf 79.2%
associate-*r/79.2%
mul-1-neg79.2%
distribute-lft-out79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in B around 0 79.2%
associate-*r/79.3%
associate-*r/79.3%
+-commutative79.3%
*-commutative79.3%
associate-*r/83.1%
fma-undefine83.1%
*-commutative83.1%
associate-/l*83.3%
associate-/l*83.3%
Simplified83.3%
fma-undefine83.3%
Applied egg-rr83.3%
if -8.9000000000000002e74 < A Initial program 62.5%
Simplified81.4%
Final simplification81.9%
(FPCore (A B C) :precision binary64 (if (<= A -1.15e-141) (* (atan (* 0.5 (/ (+ B (* C (/ B A))) A))) (/ 180.0 PI)) (/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e-141) {
tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e-141) {
tmp = Math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e-141: tmp = math.atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / math.pi) else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e-141) tmp = Float64(atan(Float64(0.5 * Float64(Float64(B + Float64(C * Float64(B / A))) / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e-141) tmp = atan((0.5 * ((B + (C * (B / A))) / A))) * (180.0 / pi); else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e-141], N[(N[ArcTan[N[(0.5 * N[(N[(B + N[(C * N[(B / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{-141}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B + C \cdot \frac{B}{A}}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.14999999999999997e-141Initial program 26.7%
Taylor expanded in A around -inf 65.3%
associate-*r/65.3%
mul-1-neg65.3%
distribute-lft-out65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in B around 0 65.3%
associate-*r/65.4%
associate-*r/65.4%
+-commutative65.4%
*-commutative65.4%
associate-*r/68.1%
fma-undefine68.1%
*-commutative68.1%
associate-/l*68.1%
associate-/l*68.1%
Simplified68.1%
fma-undefine68.1%
Applied egg-rr68.1%
if -1.14999999999999997e-141 < A Initial program 67.7%
*-commutative67.7%
associate--l-67.7%
+-commutative67.7%
unpow267.7%
unpow267.7%
hypot-undefine85.9%
div-inv85.9%
clear-num85.9%
un-div-inv85.9%
Applied egg-rr85.9%
Taylor expanded in B around -inf 65.9%
associate--l+65.9%
div-sub67.2%
Simplified67.2%
Final simplification67.6%
(FPCore (A B C) :precision binary64 (if (<= A -5.1e-142) (* (/ 180.0 PI) (atan (* 0.5 (/ (* B (+ 1.0 (/ C A))) A)))) (/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e-142) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B * (1.0 + (C / A))) / A)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.1e-142) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B * (1.0 + (C / A))) / A)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.1e-142: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B * (1.0 + (C / A))) / A))) else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.1e-142) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B * Float64(1.0 + Float64(C / A))) / A)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.1e-142) tmp = (180.0 / pi) * atan((0.5 * ((B * (1.0 + (C / A))) / A))); else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.1e-142], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B * N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.1 \cdot 10^{-142}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B \cdot \left(1 + \frac{C}{A}\right)}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -5.1000000000000001e-142Initial program 26.7%
Taylor expanded in A around -inf 65.3%
associate-*r/65.3%
mul-1-neg65.3%
distribute-lft-out65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in B around 0 65.3%
associate-*r/65.4%
associate-*r/65.4%
+-commutative65.4%
*-commutative65.4%
associate-*r/68.1%
fma-undefine68.1%
*-commutative68.1%
associate-/l*68.1%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in B around 0 67.3%
if -5.1000000000000001e-142 < A Initial program 67.7%
*-commutative67.7%
associate--l-67.7%
+-commutative67.7%
unpow267.7%
unpow267.7%
hypot-undefine85.9%
div-inv85.9%
clear-num85.9%
un-div-inv85.9%
Applied egg-rr85.9%
Taylor expanded in B around -inf 65.9%
associate--l+65.9%
div-sub67.2%
Simplified67.2%
Final simplification67.3%
(FPCore (A B C) :precision binary64 (if (<= A -1.7e-141) (* 180.0 (/ (atan (* 0.5 (/ (+ B (/ (* C B) A)) A))) PI)) (/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e-141) {
tmp = 180.0 * (atan((0.5 * ((B + ((C * B) / A)) / A))) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.7e-141) {
tmp = 180.0 * (Math.atan((0.5 * ((B + ((C * B) / A)) / A))) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.7e-141: tmp = 180.0 * (math.atan((0.5 * ((B + ((C * B) / A)) / A))) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.7e-141) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B + Float64(Float64(C * B) / A)) / A))) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.7e-141) tmp = 180.0 * (atan((0.5 * ((B + ((C * B) / A)) / A))) / pi); else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.7e-141], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B + N[(N[(C * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.7 \cdot 10^{-141}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B + \frac{C \cdot B}{A}}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -1.6999999999999999e-141Initial program 26.7%
Taylor expanded in A around -inf 65.3%
associate-*r/65.3%
mul-1-neg65.3%
distribute-lft-out65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in B around 0 65.3%
if -1.6999999999999999e-141 < A Initial program 67.7%
*-commutative67.7%
associate--l-67.7%
+-commutative67.7%
unpow267.7%
unpow267.7%
hypot-undefine85.9%
div-inv85.9%
clear-num85.9%
un-div-inv85.9%
Applied egg-rr85.9%
Taylor expanded in B around -inf 65.9%
associate--l+65.9%
div-sub67.2%
Simplified67.2%
Final simplification66.5%
(FPCore (A B C)
:precision binary64
(if (<= A -8.2e-274)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 1.45e-51)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e-274) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 1.45e-51) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e-274) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 1.45e-51) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.2e-274: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 1.45e-51: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.2e-274) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 1.45e-51) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.2e-274) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 1.45e-51) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.2e-274], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.45e-51], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.2 \cdot 10^{-274}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{-51}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.19999999999999975e-274Initial program 35.6%
Taylor expanded in A around -inf 62.0%
associate-*r/62.0%
mul-1-neg62.0%
distribute-lft-out62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in B around 0 62.0%
associate-*r/62.1%
associate-*r/62.1%
+-commutative62.1%
*-commutative62.1%
associate-*r/64.0%
fma-undefine64.0%
*-commutative64.0%
associate-/l*64.0%
associate-/l*64.0%
Simplified64.0%
Taylor expanded in C around 0 61.8%
if -8.19999999999999975e-274 < A < 1.44999999999999986e-51Initial program 53.7%
Taylor expanded in C around inf 42.1%
Taylor expanded in B around 0 27.2%
distribute-rgt1-in27.2%
metadata-eval27.2%
mul0-lft27.2%
metadata-eval27.2%
+-lft-identity27.2%
*-commutative27.2%
associate-*l/27.2%
Simplified27.2%
Taylor expanded in B around 0 42.1%
associate-*r/42.3%
Simplified42.3%
if 1.44999999999999986e-51 < A Initial program 80.0%
associate-*l/80.0%
*-lft-identity80.0%
+-commutative80.0%
unpow280.0%
unpow280.0%
hypot-define94.3%
Simplified94.3%
Taylor expanded in A around inf 70.9%
*-commutative70.9%
Simplified70.9%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.25e-286)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 4.4e-51)
(* (/ 180.0 PI) (atan (* B (/ -0.5 C))))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e-286) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 4.4e-51) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / C)));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.25e-286) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 4.4e-51) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / C)));
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.25e-286: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 4.4e-51: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / C))) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.25e-286) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 4.4e-51) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / C)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.25e-286) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 4.4e-51) tmp = (180.0 / pi) * atan((B * (-0.5 / C))); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.25e-286], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.4e-51], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.25 \cdot 10^{-286}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{-51}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.25000000000000009e-286Initial program 35.6%
Taylor expanded in A around -inf 62.0%
associate-*r/62.0%
mul-1-neg62.0%
distribute-lft-out62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in B around 0 62.0%
associate-*r/62.1%
associate-*r/62.1%
+-commutative62.1%
*-commutative62.1%
associate-*r/64.0%
fma-undefine64.0%
*-commutative64.0%
associate-/l*64.0%
associate-/l*64.0%
Simplified64.0%
Taylor expanded in C around 0 61.8%
if -1.25000000000000009e-286 < A < 4.4e-51Initial program 53.7%
Taylor expanded in C around inf 42.1%
Taylor expanded in A around inf 42.1%
Simplified42.2%
if 4.4e-51 < A Initial program 80.0%
associate-*l/80.0%
*-lft-identity80.0%
+-commutative80.0%
unpow280.0%
unpow280.0%
hypot-define94.3%
Simplified94.3%
Taylor expanded in A around inf 70.9%
*-commutative70.9%
Simplified70.9%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(if (<= A -5.4e-285)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 1.32e-51)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e-285) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 1.32e-51) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e-285) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 1.32e-51) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.4e-285: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 1.32e-51: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.4e-285) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 1.32e-51) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.4e-285) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 1.32e-51) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.4e-285], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.32e-51], 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[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.4 \cdot 10^{-285}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 1.32 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.3999999999999997e-285Initial program 35.6%
Taylor expanded in A around -inf 62.0%
associate-*r/62.0%
mul-1-neg62.0%
distribute-lft-out62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in B around 0 62.0%
associate-*r/62.1%
associate-*r/62.1%
+-commutative62.1%
*-commutative62.1%
associate-*r/64.0%
fma-undefine64.0%
*-commutative64.0%
associate-/l*64.0%
associate-/l*64.0%
Simplified64.0%
Taylor expanded in C around 0 61.8%
if -5.3999999999999997e-285 < A < 1.31999999999999998e-51Initial program 53.7%
Taylor expanded in C around inf 42.1%
Taylor expanded in A around inf 42.1%
if 1.31999999999999998e-51 < A Initial program 80.0%
associate-*l/80.0%
*-lft-identity80.0%
+-commutative80.0%
unpow280.0%
unpow280.0%
hypot-define94.3%
Simplified94.3%
Taylor expanded in A around inf 70.9%
*-commutative70.9%
Simplified70.9%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(if (<= A -9.9e-287)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(if (<= A 7e-52)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -9.9e-287) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
} else if (A <= 7e-52) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -9.9e-287) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else if (A <= 7e-52) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -9.9e-287: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) elif A <= 7e-52: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -9.9e-287) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)); elseif (A <= 7e-52) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -9.9e-287) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); elseif (A <= 7e-52) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -9.9e-287], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7e-52], 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[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -9.9 \cdot 10^{-287}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7 \cdot 10^{-52}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.89999999999999979e-287Initial program 35.6%
Taylor expanded in A around -inf 61.7%
associate-*r/61.7%
Simplified61.7%
if -9.89999999999999979e-287 < A < 7.0000000000000001e-52Initial program 53.7%
Taylor expanded in C around inf 42.1%
Taylor expanded in A around inf 42.1%
if 7.0000000000000001e-52 < A Initial program 80.0%
associate-*l/80.0%
*-lft-identity80.0%
+-commutative80.0%
unpow280.0%
unpow280.0%
hypot-define94.3%
Simplified94.3%
Taylor expanded in A around inf 70.9%
*-commutative70.9%
Simplified70.9%
(FPCore (A B C)
:precision binary64
(if (<= B -1e+71)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.8e+86)
(* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e+71) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.8e+86) {
tmp = 180.0 * (atan(((0.5 * B) / A)) / ((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 <= -1e+71) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.8e+86) {
tmp = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e+71: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.8e+86: tmp = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e+71) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.8e+86) tmp = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / 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 <= -1e+71) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.8e+86) tmp = 180.0 * (atan(((0.5 * B) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e+71], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.8e+86], N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $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 \cdot 10^{+71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.8 \cdot 10^{+86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1e71Initial program 45.7%
Taylor expanded in B around -inf 67.8%
if -1e71 < B < 5.79999999999999981e86Initial program 56.0%
Taylor expanded in A around -inf 40.1%
associate-*r/40.1%
Simplified40.1%
if 5.79999999999999981e86 < B Initial program 41.7%
Taylor expanded in B around inf 66.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.65e+69)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.4e-55)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.65e+69) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.4e-55) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.65e+69) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.4e-55) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.65e+69: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.4e-55: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.65e+69) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.4e-55) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.65e+69) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.4e-55) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.65e+69], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.4e-55], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.65 \cdot 10^{+69}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.4 \cdot 10^{-55}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.6499999999999999e69Initial program 44.8%
Taylor expanded in B around -inf 66.6%
if -1.6499999999999999e69 < B < 4.3999999999999999e-55Initial program 53.4%
Taylor expanded in C around inf 33.7%
Taylor expanded in A around inf 33.7%
if 4.3999999999999999e-55 < B Initial program 53.2%
Taylor expanded in B around inf 50.5%
(FPCore (A B C) :precision binary64 (if (<= A -2.5e-141) (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))) (/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e-141) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e-141) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.5e-141: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.5e-141) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.5e-141) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.5e-141], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.5 \cdot 10^{-141}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.5e-141Initial program 26.7%
Taylor expanded in A around -inf 65.3%
associate-*r/65.3%
mul-1-neg65.3%
distribute-lft-out65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in B around 0 65.3%
associate-*r/65.4%
associate-*r/65.4%
+-commutative65.4%
*-commutative65.4%
associate-*r/68.1%
fma-undefine68.1%
*-commutative68.1%
associate-/l*68.1%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in C around 0 64.9%
if -2.5e-141 < A Initial program 67.7%
*-commutative67.7%
associate--l-67.7%
+-commutative67.7%
unpow267.7%
unpow267.7%
hypot-undefine85.9%
div-inv85.9%
clear-num85.9%
un-div-inv85.9%
Applied egg-rr85.9%
Taylor expanded in B around -inf 65.9%
associate--l+65.9%
div-sub67.2%
Simplified67.2%
Final simplification66.3%
(FPCore (A B C) :precision binary64 (if (<= A -2.5e-141) (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.5e-141) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} 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 (A <= -2.5e-141) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.5e-141: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.5e-141) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); else tmp = Float64(180.0 * Float64(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 (A <= -2.5e-141) tmp = (180.0 / pi) * atan((0.5 * (B / A))); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.5e-141], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.5 \cdot 10^{-141}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.5e-141Initial program 26.7%
Taylor expanded in A around -inf 65.3%
associate-*r/65.3%
mul-1-neg65.3%
distribute-lft-out65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in B around 0 65.3%
associate-*r/65.4%
associate-*r/65.4%
+-commutative65.4%
*-commutative65.4%
associate-*r/68.1%
fma-undefine68.1%
*-commutative68.1%
associate-/l*68.1%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in C around 0 64.9%
if -2.5e-141 < A Initial program 67.7%
Taylor expanded in B around -inf 65.9%
associate--l+65.9%
div-sub67.2%
Simplified67.2%
Final simplification66.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.25e-105)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4e-197)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.25e-105) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4e-197) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.25e-105) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4e-197) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.25e-105: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4e-197: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.25e-105) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4e-197) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.25e-105) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4e-197) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.25e-105], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-197], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.25 \cdot 10^{-105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.24999999999999991e-105Initial program 49.1%
Taylor expanded in B around -inf 46.6%
if -1.24999999999999991e-105 < B < 3.9999999999999999e-197Initial program 55.3%
Taylor expanded in C around inf 36.4%
Taylor expanded in B around 0 37.2%
distribute-rgt1-in37.2%
metadata-eval37.2%
mul0-lft37.2%
div037.2%
metadata-eval37.2%
Simplified37.2%
if 3.9999999999999999e-197 < B Initial program 51.6%
Taylor expanded in B around inf 42.2%
(FPCore (A B C) :precision binary64 (if (<= B 4e-197) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 4e-197) {
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 <= 4e-197) {
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 <= 4e-197: 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 <= 4e-197) tmp = Float64(180.0 * Float64(atan(0.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 4e-197) 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, 4e-197], N[(180.0 * N[(N[ArcTan[0.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 4 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 3.9999999999999999e-197Initial program 51.8%
Taylor expanded in C around inf 29.1%
Taylor expanded in B around 0 19.1%
distribute-rgt1-in19.1%
metadata-eval19.1%
mul0-lft19.1%
div019.1%
metadata-eval19.1%
Simplified19.1%
if 3.9999999999999999e-197 < B Initial program 51.6%
Taylor expanded in B around inf 42.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 51.7%
Taylor expanded in B around inf 18.3%
herbie shell --seed 2024129
(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)))