
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
(* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -0.5) or not (t_0 <= 0.0): tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -0.5) || !(t_0 <= 0.0)) tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -0.5) || ~((t_0 <= 0.0))) tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5 or -0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 55.9%
associate-*r/55.9%
associate-*l/55.9%
*-commutative55.9%
Simplified89.1%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0Initial program 19.8%
associate-*r/19.8%
associate-*l/19.8%
*-commutative19.8%
Simplified19.8%
Taylor expanded in B around 0 98.5%
associate-*r/98.5%
Simplified98.5%
Final simplification90.2%
(FPCore (A B C)
:precision binary64
(if (<= C -4.1e+96)
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
(if (<= C 2.2e+67)
(* (/ 180.0 PI) (atan (/ (- (- A) (hypot A B)) B)))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.1e+96) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
} else if (C <= 2.2e+67) {
tmp = (180.0 / ((double) M_PI)) * atan(((-A - hypot(A, B)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -4.1e+96) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
} else if (C <= 2.2e+67) {
tmp = (180.0 / Math.PI) * Math.atan(((-A - Math.hypot(A, B)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -4.1e+96: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) elif C <= 2.2e+67: tmp = (180.0 / math.pi) * math.atan(((-A - math.hypot(A, B)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -4.1e+96) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); elseif (C <= 2.2e+67) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -4.1e+96) tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); elseif (C <= 2.2e+67) tmp = (180.0 / pi) * atan(((-A - hypot(A, B)) / B)); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -4.1e+96], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.2e+67], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.1 \cdot 10^{+96}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{elif}\;C \leq 2.2 \cdot 10^{+67}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if C < -4.09999999999999998e96Initial program 80.3%
associate-*r/80.3%
associate-*l/80.3%
associate-*l/80.3%
*-lft-identity80.3%
sub-neg80.3%
associate-+l-80.3%
sub-neg80.3%
remove-double-neg80.3%
+-commutative80.3%
unpow280.3%
unpow280.3%
hypot-def97.3%
Simplified97.3%
Taylor expanded in B around inf 89.7%
if -4.09999999999999998e96 < C < 2.2e67Initial program 54.2%
associate-*r/54.2%
associate-*l/54.2%
*-commutative54.2%
Simplified82.2%
Taylor expanded in C around 0 49.0%
mul-1-neg49.0%
+-commutative49.0%
unpow249.0%
unpow249.0%
hypot-def77.2%
Simplified77.2%
if 2.2e67 < C Initial program 15.9%
associate-*r/15.9%
associate-*l/15.9%
*-commutative15.9%
Simplified62.0%
Taylor expanded in B around 0 79.6%
associate-*r/79.6%
Simplified79.6%
Final simplification79.4%
(FPCore (A B C)
:precision binary64
(if (<= C -1.55e+97)
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
(if (<= C 9.2e+66)
(/ (* -180.0 (atan (/ (+ A (hypot B A)) B))) PI)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.55e+97) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
} else if (C <= 9.2e+66) {
tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.55e+97) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
} else if (C <= 9.2e+66) {
tmp = (-180.0 * Math.atan(((A + Math.hypot(B, A)) / B))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.55e+97: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) elif C <= 9.2e+66: tmp = (-180.0 * math.atan(((A + math.hypot(B, A)) / B))) / math.pi else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.55e+97) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); elseif (C <= 9.2e+66) tmp = Float64(Float64(-180.0 * atan(Float64(Float64(A + hypot(B, A)) / B))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.55e+97) tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); elseif (C <= 9.2e+66) tmp = (-180.0 * atan(((A + hypot(B, A)) / B))) / pi; else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.55e+97], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.2e+66], N[(N[(-180.0 * N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.55 \cdot 10^{+97}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{elif}\;C \leq 9.2 \cdot 10^{+66}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if C < -1.54999999999999991e97Initial program 80.3%
associate-*r/80.3%
associate-*l/80.3%
associate-*l/80.3%
*-lft-identity80.3%
sub-neg80.3%
associate-+l-80.3%
sub-neg80.3%
remove-double-neg80.3%
+-commutative80.3%
unpow280.3%
unpow280.3%
hypot-def97.3%
Simplified97.3%
Taylor expanded in B around inf 89.7%
if -1.54999999999999991e97 < C < 9.2e66Initial program 54.2%
associate-*r/54.2%
associate-*l/54.2%
associate-*l/54.2%
*-lft-identity54.2%
sub-neg54.2%
associate-+l-53.0%
sub-neg53.0%
remove-double-neg53.0%
+-commutative53.0%
unpow253.0%
unpow253.0%
hypot-def70.7%
Simplified70.7%
add-cube-cbrt70.1%
pow370.1%
Applied egg-rr70.1%
Taylor expanded in C around 0 49.0%
associate-*r/49.0%
mul-1-neg49.0%
+-commutative49.0%
unpow249.0%
unpow249.0%
hypot-def77.2%
Simplified77.2%
expm1-log1p-u45.5%
expm1-udef45.5%
distribute-frac-neg45.5%
atan-neg45.5%
Applied egg-rr45.5%
expm1-def45.5%
expm1-log1p77.2%
associate-*l/77.2%
distribute-rgt-neg-out77.2%
distribute-lft-neg-in77.2%
metadata-eval77.2%
hypot-def49.0%
unpow249.0%
unpow249.0%
+-commutative49.0%
unpow249.0%
unpow249.0%
hypot-def77.2%
Simplified77.2%
if 9.2e66 < C Initial program 15.9%
associate-*r/15.9%
associate-*l/15.9%
*-commutative15.9%
Simplified62.0%
Taylor expanded in B around 0 79.6%
associate-*r/79.6%
Simplified79.6%
Final simplification79.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- A) B))))
(t_1 (* (/ 180.0 PI) (atan 0.0))))
(if (<= B -2.35e-35)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -1.3e-180)
t_0
(if (<= B -6.4e-227)
t_1
(if (<= B -1.45e-291)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B 2.9e-115)
t_1
(if (<= B 4.4e+133) t_0 (* (/ 180.0 PI) (atan -1.0))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-A / B));
double t_1 = (180.0 / ((double) M_PI)) * atan(0.0);
double tmp;
if (B <= -2.35e-35) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -1.3e-180) {
tmp = t_0;
} else if (B <= -6.4e-227) {
tmp = t_1;
} else if (B <= -1.45e-291) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= 2.9e-115) {
tmp = t_1;
} else if (B <= 4.4e+133) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((-A / B));
double t_1 = (180.0 / Math.PI) * Math.atan(0.0);
double tmp;
if (B <= -2.35e-35) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -1.3e-180) {
tmp = t_0;
} else if (B <= -6.4e-227) {
tmp = t_1;
} else if (B <= -1.45e-291) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= 2.9e-115) {
tmp = t_1;
} else if (B <= 4.4e+133) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-A / B)) t_1 = (180.0 / math.pi) * math.atan(0.0) tmp = 0 if B <= -2.35e-35: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -1.3e-180: tmp = t_0 elif B <= -6.4e-227: tmp = t_1 elif B <= -1.45e-291: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= 2.9e-115: tmp = t_1 elif B <= 4.4e+133: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))) t_1 = Float64(Float64(180.0 / pi) * atan(0.0)) tmp = 0.0 if (B <= -2.35e-35) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -1.3e-180) tmp = t_0; elseif (B <= -6.4e-227) tmp = t_1; elseif (B <= -1.45e-291) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= 2.9e-115) tmp = t_1; elseif (B <= 4.4e+133) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-A / B)); t_1 = (180.0 / pi) * atan(0.0); tmp = 0.0; if (B <= -2.35e-35) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -1.3e-180) tmp = t_0; elseif (B <= -6.4e-227) tmp = t_1; elseif (B <= -1.45e-291) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= 2.9e-115) tmp = t_1; elseif (B <= 4.4e+133) tmp = t_0; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.35e-35], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.3e-180], t$95$0, If[LessEqual[B, -6.4e-227], t$95$1, If[LessEqual[B, -1.45e-291], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.9e-115], t$95$1, If[LessEqual[B, 4.4e+133], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} 0\\
\mathbf{if}\;B \leq -2.35 \cdot 10^{-35}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -1.3 \cdot 10^{-180}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -6.4 \cdot 10^{-227}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -1.45 \cdot 10^{-291}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 2.9 \cdot 10^{-115}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 4.4 \cdot 10^{+133}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -2.35e-35Initial program 43.3%
associate-*r/43.3%
associate-*l/43.3%
*-commutative43.3%
Simplified79.8%
Taylor expanded in B around -inf 66.7%
if -2.35e-35 < B < -1.2999999999999999e-180 or 2.8999999999999998e-115 < B < 4.4e133Initial program 72.5%
associate-*r/72.5%
associate-*l/72.5%
associate-*l/72.6%
*-lft-identity72.6%
sub-neg72.6%
associate-+l-72.5%
sub-neg72.5%
remove-double-neg72.5%
+-commutative72.5%
unpow272.5%
unpow272.5%
hypot-def76.0%
Simplified76.0%
Taylor expanded in B around inf 65.9%
Taylor expanded in A around inf 42.3%
mul-1-neg42.3%
Simplified42.3%
if -1.2999999999999999e-180 < B < -6.40000000000000021e-227 or -1.45000000000000001e-291 < B < 2.8999999999999998e-115Initial program 36.1%
associate-*r/36.1%
associate-*l/36.1%
associate-*l/36.1%
*-lft-identity36.1%
sub-neg36.1%
associate-+l-32.8%
sub-neg32.8%
remove-double-neg32.8%
+-commutative32.8%
unpow232.8%
unpow232.8%
hypot-def47.4%
Simplified47.4%
div-sub27.4%
Applied egg-rr27.4%
Taylor expanded in C around inf 17.0%
distribute-rgt1-in17.0%
metadata-eval17.0%
mul0-lft49.0%
metadata-eval49.0%
Simplified49.0%
if -6.40000000000000021e-227 < B < -1.45000000000000001e-291Initial program 82.7%
associate-*r/82.7%
associate-*l/82.7%
associate-*l/82.7%
*-lft-identity82.7%
sub-neg82.7%
associate-+l-82.4%
sub-neg82.4%
remove-double-neg82.4%
+-commutative82.4%
unpow282.4%
unpow282.4%
hypot-def82.5%
Simplified82.5%
Taylor expanded in B around inf 82.3%
Taylor expanded in C around inf 64.6%
if 4.4e133 < B Initial program 29.6%
associate-*r/29.6%
associate-*l/29.6%
*-commutative29.6%
Simplified91.5%
Taylor expanded in B around inf 84.6%
Final simplification56.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* C 2.0) B)))))
(if (<= A -4.1e-97)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A -2.1e-172)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A -1.9e-239)
t_0
(if (<= A 2.9e-259)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 2.35e-79) t_0 (* (/ 180.0 PI) (atan (/ (- A) B))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
double tmp;
if (A <= -4.1e-97) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= -2.1e-172) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= -1.9e-239) {
tmp = t_0;
} else if (A <= 2.9e-259) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 2.35e-79) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
double tmp;
if (A <= -4.1e-97) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= -2.1e-172) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= -1.9e-239) {
tmp = t_0;
} else if (A <= 2.9e-259) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 2.35e-79) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) tmp = 0 if A <= -4.1e-97: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= -2.1e-172: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= -1.9e-239: tmp = t_0 elif A <= 2.9e-259: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 2.35e-79: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))) tmp = 0.0 if (A <= -4.1e-97) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= -2.1e-172) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= -1.9e-239) tmp = t_0; elseif (A <= 2.9e-259) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 2.35e-79) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C * 2.0) / B)); tmp = 0.0; if (A <= -4.1e-97) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= -2.1e-172) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= -1.9e-239) tmp = t_0; elseif (A <= 2.9e-259) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 2.35e-79) tmp = t_0; else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.1e-97], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.1e-172], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.9e-239], t$95$0, If[LessEqual[A, 2.9e-259], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.35e-79], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{if}\;A \leq -4.1 \cdot 10^{-97}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq -2.1 \cdot 10^{-172}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq -1.9 \cdot 10^{-239}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 2.9 \cdot 10^{-259}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 2.35 \cdot 10^{-79}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if A < -4.09999999999999993e-97Initial program 19.4%
associate-*r/19.4%
associate-*l/19.4%
*-commutative19.4%
Simplified67.4%
Taylor expanded in A around -inf 64.1%
associate-*r/64.1%
Applied egg-rr64.1%
if -4.09999999999999993e-97 < A < -2.0999999999999999e-172Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -2.0999999999999999e-172 < A < -1.9000000000000001e-239 or 2.90000000000000009e-259 < A < 2.3500000000000001e-79Initial program 74.6%
associate-*r/74.6%
associate-*l/74.6%
*-commutative74.6%
Simplified92.7%
Taylor expanded in C around -inf 53.6%
if -1.9000000000000001e-239 < A < 2.90000000000000009e-259Initial program 50.2%
associate-*r/50.1%
associate-*l/50.2%
*-commutative50.2%
Simplified79.6%
Taylor expanded in B around -inf 40.8%
if 2.3500000000000001e-79 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
Taylor expanded in B around inf 75.4%
Taylor expanded in A around inf 67.6%
mul-1-neg67.6%
Simplified67.6%
Final simplification60.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* C 2.0) B)))))
(if (<= A -2.85e-99)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A -3.9e-173)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A -3.8e-239)
t_0
(if (<= A 1.3e-256)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 7.5e-78)
t_0
(* (/ 180.0 PI) (atan (/ (* A -2.0) B))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
double tmp;
if (A <= -2.85e-99) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= -3.9e-173) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= -3.8e-239) {
tmp = t_0;
} else if (A <= 1.3e-256) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 7.5e-78) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
double tmp;
if (A <= -2.85e-99) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= -3.9e-173) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= -3.8e-239) {
tmp = t_0;
} else if (A <= 1.3e-256) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 7.5e-78) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) tmp = 0 if A <= -2.85e-99: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= -3.9e-173: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= -3.8e-239: tmp = t_0 elif A <= 1.3e-256: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 7.5e-78: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))) tmp = 0.0 if (A <= -2.85e-99) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= -3.9e-173) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= -3.8e-239) tmp = t_0; elseif (A <= 1.3e-256) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 7.5e-78) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C * 2.0) / B)); tmp = 0.0; if (A <= -2.85e-99) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= -3.9e-173) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= -3.8e-239) tmp = t_0; elseif (A <= 1.3e-256) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 7.5e-78) tmp = t_0; else tmp = (180.0 / pi) * atan(((A * -2.0) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.85e-99], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.9e-173], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.8e-239], t$95$0, If[LessEqual[A, 1.3e-256], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.5e-78], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{if}\;A \leq -2.85 \cdot 10^{-99}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq -3.9 \cdot 10^{-173}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq -3.8 \cdot 10^{-239}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-256}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 7.5 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -2.85000000000000016e-99Initial program 19.4%
associate-*r/19.4%
associate-*l/19.4%
*-commutative19.4%
Simplified67.4%
Taylor expanded in A around -inf 64.1%
associate-*r/64.1%
Applied egg-rr64.1%
if -2.85000000000000016e-99 < A < -3.89999999999999987e-173Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -3.89999999999999987e-173 < A < -3.8000000000000002e-239 or 1.3e-256 < A < 7.50000000000000041e-78Initial program 74.6%
associate-*r/74.6%
associate-*l/74.6%
*-commutative74.6%
Simplified92.7%
Taylor expanded in C around -inf 53.6%
if -3.8000000000000002e-239 < A < 1.3e-256Initial program 50.2%
associate-*r/50.1%
associate-*l/50.2%
*-commutative50.2%
Simplified79.6%
Taylor expanded in B around -inf 40.8%
if 7.50000000000000041e-78 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
*-commutative79.4%
Simplified95.0%
Taylor expanded in A around inf 67.6%
*-commutative67.6%
Simplified67.6%
Final simplification60.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* C 2.0) B)))))
(if (<= A -2.9e-99)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A -3.05e-171)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A -1.45e-236)
t_0
(if (<= A 3e-255)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 4.6e-97)
t_0
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
double tmp;
if (A <= -2.9e-99) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= -3.05e-171) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= -1.45e-236) {
tmp = t_0;
} else if (A <= 3e-255) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 4.6e-97) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
double tmp;
if (A <= -2.9e-99) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= -3.05e-171) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= -1.45e-236) {
tmp = t_0;
} else if (A <= 3e-255) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 4.6e-97) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) tmp = 0 if A <= -2.9e-99: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= -3.05e-171: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= -1.45e-236: tmp = t_0 elif A <= 3e-255: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 4.6e-97: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))) tmp = 0.0 if (A <= -2.9e-99) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= -3.05e-171) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= -1.45e-236) tmp = t_0; elseif (A <= 3e-255) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 4.6e-97) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C * 2.0) / B)); tmp = 0.0; if (A <= -2.9e-99) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= -3.05e-171) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= -1.45e-236) tmp = t_0; elseif (A <= 3e-255) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 4.6e-97) tmp = t_0; else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.9e-99], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.05e-171], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.45e-236], t$95$0, If[LessEqual[A, 3e-255], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.6e-97], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{if}\;A \leq -2.9 \cdot 10^{-99}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq -3.05 \cdot 10^{-171}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq -1.45 \cdot 10^{-236}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-255}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 4.6 \cdot 10^{-97}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -2.89999999999999985e-99Initial program 19.4%
associate-*r/19.4%
associate-*l/19.4%
*-commutative19.4%
Simplified67.4%
Taylor expanded in A around -inf 64.1%
associate-*r/64.1%
Applied egg-rr64.1%
if -2.89999999999999985e-99 < A < -3.05e-171Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -3.05e-171 < A < -1.45e-236 or 3.00000000000000002e-255 < A < 4.59999999999999988e-97Initial program 73.5%
associate-*r/73.5%
associate-*l/73.5%
*-commutative73.5%
Simplified92.4%
Taylor expanded in C around -inf 53.7%
if -1.45e-236 < A < 3.00000000000000002e-255Initial program 50.2%
associate-*r/50.1%
associate-*l/50.2%
*-commutative50.2%
Simplified79.6%
Taylor expanded in B around -inf 40.8%
if 4.59999999999999988e-97 < A Initial program 79.9%
associate-*r/79.9%
associate-*l/79.9%
associate-*l/79.9%
*-lft-identity79.9%
sub-neg79.9%
associate-+l-79.9%
sub-neg79.9%
remove-double-neg79.9%
+-commutative79.9%
unpow279.9%
unpow279.9%
hypot-def95.1%
Simplified95.1%
add-cube-cbrt94.7%
pow394.7%
Applied egg-rr94.7%
Taylor expanded in C around 0 78.1%
associate-*r/78.1%
mul-1-neg78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-def89.2%
Simplified89.2%
Taylor expanded in A around 0 75.2%
sub-neg75.2%
mul-1-neg75.2%
distribute-neg-in75.2%
+-commutative75.2%
distribute-neg-in75.2%
metadata-eval75.2%
unsub-neg75.2%
Simplified75.2%
Final simplification63.4%
(FPCore (A B C)
:precision binary64
(if (<= A -7e+96)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A -1.45e-71)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(if (<= A -5.8e-99)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -3.95e-171)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A 3.8e-79)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(* (/ 180.0 PI) (atan (- 1.0 (/ A B))))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7e+96) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= -1.45e-71) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else if (A <= -5.8e-99) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -3.95e-171) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= 3.8e-79) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7e+96) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= -1.45e-71) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else if (A <= -5.8e-99) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -3.95e-171) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= 3.8e-79) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7e+96: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= -1.45e-71: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) elif A <= -5.8e-99: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -3.95e-171: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= 3.8e-79: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7e+96) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= -1.45e-71) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); elseif (A <= -5.8e-99) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -3.95e-171) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= 3.8e-79) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7e+96) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= -1.45e-71) tmp = (180.0 / pi) * atan(((C - B) / B)); elseif (A <= -5.8e-99) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -3.95e-171) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= 3.8e-79) tmp = (180.0 / pi) * atan(((B + C) / B)); else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7e+96], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.45e-71], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -5.8e-99], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.95e-171], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7 \cdot 10^{+96}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq -1.45 \cdot 10^{-71}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{elif}\;A \leq -5.8 \cdot 10^{-99}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -3.95 \cdot 10^{-171}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -6.9999999999999998e96Initial program 13.5%
associate-*r/13.5%
associate-*l/13.5%
*-commutative13.5%
Simplified69.7%
Taylor expanded in A around -inf 81.1%
associate-*r/81.2%
Applied egg-rr81.2%
if -6.9999999999999998e96 < A < -1.4499999999999999e-71Initial program 24.1%
associate-*r/24.1%
associate-*l/24.1%
associate-*l/24.1%
*-lft-identity24.1%
sub-neg24.1%
associate-+l-24.0%
sub-neg24.0%
remove-double-neg24.0%
+-commutative24.0%
unpow224.0%
unpow224.0%
hypot-def62.3%
Simplified62.3%
Taylor expanded in B around inf 51.1%
Taylor expanded in A around 0 51.8%
if -1.4499999999999999e-71 < A < -5.79999999999999971e-99Initial program 40.5%
associate-*r/40.5%
associate-*l/40.5%
*-commutative40.5%
Simplified71.0%
Taylor expanded in A around -inf 53.4%
if -5.79999999999999971e-99 < A < -3.9499999999999999e-171Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -3.9499999999999999e-171 < A < 3.8000000000000001e-79Initial program 67.1%
associate-*r/67.1%
associate-*l/67.1%
associate-*l/67.1%
*-lft-identity67.1%
sub-neg67.1%
associate-+l-67.1%
sub-neg67.1%
remove-double-neg67.1%
+-commutative67.1%
unpow267.1%
unpow267.1%
hypot-def88.7%
Simplified88.7%
Taylor expanded in B around -inf 71.3%
neg-mul-171.3%
unsub-neg71.3%
Simplified71.3%
Taylor expanded in A around 0 69.9%
if 3.8000000000000001e-79 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
add-cube-cbrt94.6%
pow394.6%
Applied egg-rr94.6%
Taylor expanded in C around 0 78.1%
associate-*r/78.1%
mul-1-neg78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-def89.5%
Simplified89.5%
Taylor expanded in B around -inf 80.8%
mul-1-neg80.8%
unsub-neg80.8%
Simplified80.8%
Final simplification72.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (* 0.5 (/ B A)))))
(if (<= A -7e+96)
(/ t_0 (* PI 0.005555555555555556))
(if (<= A -7e-68)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(if (<= A -3e-99)
(* (/ 180.0 PI) t_0)
(if (<= A -8.2e-171)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A 2.3e-78)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(* (/ 180.0 PI) (atan (- 1.0 (/ A B)))))))))))
double code(double A, double B, double C) {
double t_0 = atan((0.5 * (B / A)));
double tmp;
if (A <= -7e+96) {
tmp = t_0 / (((double) M_PI) * 0.005555555555555556);
} else if (A <= -7e-68) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else if (A <= -3e-99) {
tmp = (180.0 / ((double) M_PI)) * t_0;
} else if (A <= -8.2e-171) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= 2.3e-78) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -7e+96) {
tmp = t_0 / (Math.PI * 0.005555555555555556);
} else if (A <= -7e-68) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else if (A <= -3e-99) {
tmp = (180.0 / Math.PI) * t_0;
} else if (A <= -8.2e-171) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= 2.3e-78) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((0.5 * (B / A))) tmp = 0 if A <= -7e+96: tmp = t_0 / (math.pi * 0.005555555555555556) elif A <= -7e-68: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) elif A <= -3e-99: tmp = (180.0 / math.pi) * t_0 elif A <= -8.2e-171: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= 2.3e-78: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 - (A / B))) return tmp
function code(A, B, C) t_0 = atan(Float64(0.5 * Float64(B / A))) tmp = 0.0 if (A <= -7e+96) tmp = Float64(t_0 / Float64(pi * 0.005555555555555556)); elseif (A <= -7e-68) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); elseif (A <= -3e-99) tmp = Float64(Float64(180.0 / pi) * t_0); elseif (A <= -8.2e-171) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= 2.3e-78) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((0.5 * (B / A))); tmp = 0.0; if (A <= -7e+96) tmp = t_0 / (pi * 0.005555555555555556); elseif (A <= -7e-68) tmp = (180.0 / pi) * atan(((C - B) / B)); elseif (A <= -3e-99) tmp = (180.0 / pi) * t_0; elseif (A <= -8.2e-171) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= 2.3e-78) tmp = (180.0 / pi) * atan(((B + C) / B)); else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -7e+96], N[(t$95$0 / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7e-68], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3e-99], N[(N[(180.0 / Pi), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[A, -8.2e-171], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.3e-78], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -7 \cdot 10^{+96}:\\
\;\;\;\;\frac{t_0}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-68}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{elif}\;A \leq -3 \cdot 10^{-99}:\\
\;\;\;\;\frac{180}{\pi} \cdot t_0\\
\mathbf{elif}\;A \leq -8.2 \cdot 10^{-171}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{-78}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -6.9999999999999998e96Initial program 13.5%
associate-*r/13.5%
associate-*l/13.5%
*-commutative13.5%
Simplified69.7%
Taylor expanded in A around -inf 81.1%
associate-*r/81.2%
Applied egg-rr81.2%
expm1-log1p-u79.4%
expm1-udef51.7%
*-commutative51.7%
associate-/l*51.7%
Applied egg-rr51.7%
expm1-def78.4%
expm1-log1p80.1%
associate-/r/81.1%
Simplified81.1%
associate-/r/80.1%
*-commutative80.1%
clear-num80.1%
un-div-inv80.1%
associate-/r/81.1%
associate-/r/80.1%
div-inv80.1%
clear-num81.2%
div-inv81.2%
metadata-eval81.2%
Applied egg-rr81.2%
if -6.9999999999999998e96 < A < -7.00000000000000026e-68Initial program 24.1%
associate-*r/24.1%
associate-*l/24.1%
associate-*l/24.1%
*-lft-identity24.1%
sub-neg24.1%
associate-+l-24.0%
sub-neg24.0%
remove-double-neg24.0%
+-commutative24.0%
unpow224.0%
unpow224.0%
hypot-def62.3%
Simplified62.3%
Taylor expanded in B around inf 51.1%
Taylor expanded in A around 0 51.8%
if -7.00000000000000026e-68 < A < -3.00000000000000006e-99Initial program 40.5%
associate-*r/40.5%
associate-*l/40.5%
*-commutative40.5%
Simplified71.0%
Taylor expanded in A around -inf 53.4%
if -3.00000000000000006e-99 < A < -8.2e-171Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -8.2e-171 < A < 2.3000000000000002e-78Initial program 67.1%
associate-*r/67.1%
associate-*l/67.1%
associate-*l/67.1%
*-lft-identity67.1%
sub-neg67.1%
associate-+l-67.1%
sub-neg67.1%
remove-double-neg67.1%
+-commutative67.1%
unpow267.1%
unpow267.1%
hypot-def88.7%
Simplified88.7%
Taylor expanded in B around -inf 71.3%
neg-mul-171.3%
unsub-neg71.3%
Simplified71.3%
Taylor expanded in A around 0 69.9%
if 2.3000000000000002e-78 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
add-cube-cbrt94.6%
pow394.6%
Applied egg-rr94.6%
Taylor expanded in C around 0 78.1%
associate-*r/78.1%
mul-1-neg78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-def89.5%
Simplified89.5%
Taylor expanded in B around -inf 80.8%
mul-1-neg80.8%
unsub-neg80.8%
Simplified80.8%
Final simplification72.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ C B)))))
(if (<= A -2.3e-99)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -6.5e-174)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A -9.8e-237)
t_0
(if (<= A 1.4e-259)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 3.1e-77) t_0 (* (/ 180.0 PI) (atan (/ (- A) B))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((C / B));
double tmp;
if (A <= -2.3e-99) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -6.5e-174) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= -9.8e-237) {
tmp = t_0;
} else if (A <= 1.4e-259) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 3.1e-77) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((C / B));
double tmp;
if (A <= -2.3e-99) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -6.5e-174) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= -9.8e-237) {
tmp = t_0;
} else if (A <= 1.4e-259) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 3.1e-77) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((C / B)) tmp = 0 if A <= -2.3e-99: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -6.5e-174: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= -9.8e-237: tmp = t_0 elif A <= 1.4e-259: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 3.1e-77: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(C / B))) tmp = 0.0 if (A <= -2.3e-99) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -6.5e-174) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= -9.8e-237) tmp = t_0; elseif (A <= 1.4e-259) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 3.1e-77) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((C / B)); tmp = 0.0; if (A <= -2.3e-99) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -6.5e-174) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= -9.8e-237) tmp = t_0; elseif (A <= 1.4e-259) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 3.1e-77) tmp = t_0; else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.3e-99], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6.5e-174], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.8e-237], t$95$0, If[LessEqual[A, 1.4e-259], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.1e-77], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;A \leq -2.3 \cdot 10^{-99}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -6.5 \cdot 10^{-174}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq -9.8 \cdot 10^{-237}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.4 \cdot 10^{-259}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 3.1 \cdot 10^{-77}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if A < -2.2999999999999998e-99Initial program 19.4%
associate-*r/19.4%
associate-*l/19.4%
*-commutative19.4%
Simplified67.4%
Taylor expanded in A around -inf 64.1%
Taylor expanded in B around 0 64.0%
if -2.2999999999999998e-99 < A < -6.50000000000000009e-174Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -6.50000000000000009e-174 < A < -9.8000000000000002e-237 or 1.4e-259 < A < 3.10000000000000008e-77Initial program 74.6%
associate-*r/74.6%
associate-*l/74.6%
associate-*l/74.6%
*-lft-identity74.6%
sub-neg74.6%
associate-+l-74.6%
sub-neg74.6%
remove-double-neg74.6%
+-commutative74.6%
unpow274.6%
unpow274.6%
hypot-def92.7%
Simplified92.7%
Taylor expanded in B around inf 64.2%
Taylor expanded in C around inf 53.6%
if -9.8000000000000002e-237 < A < 1.4e-259Initial program 50.2%
associate-*r/50.1%
associate-*l/50.2%
*-commutative50.2%
Simplified79.6%
Taylor expanded in B around -inf 40.8%
if 3.10000000000000008e-77 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
Taylor expanded in B around inf 75.4%
Taylor expanded in A around inf 67.6%
mul-1-neg67.6%
Simplified67.6%
Final simplification60.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ C B)))))
(if (<= A -3.3e-99)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -9.5e-171)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A -1.3e-237)
t_0
(if (<= A 1.05e-262)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 2.8e-78) t_0 (* (/ 180.0 PI) (atan (/ (- A) B))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((C / B));
double tmp;
if (A <= -3.3e-99) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -9.5e-171) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= -1.3e-237) {
tmp = t_0;
} else if (A <= 1.05e-262) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 2.8e-78) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((C / B));
double tmp;
if (A <= -3.3e-99) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -9.5e-171) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= -1.3e-237) {
tmp = t_0;
} else if (A <= 1.05e-262) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 2.8e-78) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((C / B)) tmp = 0 if A <= -3.3e-99: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -9.5e-171: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= -1.3e-237: tmp = t_0 elif A <= 1.05e-262: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 2.8e-78: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(C / B))) tmp = 0.0 if (A <= -3.3e-99) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -9.5e-171) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= -1.3e-237) tmp = t_0; elseif (A <= 1.05e-262) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 2.8e-78) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((C / B)); tmp = 0.0; if (A <= -3.3e-99) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -9.5e-171) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= -1.3e-237) tmp = t_0; elseif (A <= 1.05e-262) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 2.8e-78) tmp = t_0; else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.3e-99], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.5e-171], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.3e-237], t$95$0, If[LessEqual[A, 1.05e-262], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e-78], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;A \leq -3.3 \cdot 10^{-99}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -9.5 \cdot 10^{-171}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq -1.3 \cdot 10^{-237}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{-262}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if A < -3.29999999999999986e-99Initial program 19.4%
associate-*r/19.4%
associate-*l/19.4%
*-commutative19.4%
Simplified67.4%
Taylor expanded in A around -inf 64.1%
if -3.29999999999999986e-99 < A < -9.4999999999999994e-171Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -9.4999999999999994e-171 < A < -1.3000000000000001e-237 or 1.05e-262 < A < 2.80000000000000024e-78Initial program 74.6%
associate-*r/74.6%
associate-*l/74.6%
associate-*l/74.6%
*-lft-identity74.6%
sub-neg74.6%
associate-+l-74.6%
sub-neg74.6%
remove-double-neg74.6%
+-commutative74.6%
unpow274.6%
unpow274.6%
hypot-def92.7%
Simplified92.7%
Taylor expanded in B around inf 64.2%
Taylor expanded in C around inf 53.6%
if -1.3000000000000001e-237 < A < 1.05e-262Initial program 50.2%
associate-*r/50.1%
associate-*l/50.2%
*-commutative50.2%
Simplified79.6%
Taylor expanded in B around -inf 40.8%
if 2.80000000000000024e-78 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
Taylor expanded in B around inf 75.4%
Taylor expanded in A around inf 67.6%
mul-1-neg67.6%
Simplified67.6%
Final simplification60.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ C B)))))
(if (<= A -2.5e-99)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A -4.4e-172)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A -1.5e-240)
t_0
(if (<= A 3.5e-256)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 5.6e-80) t_0 (* (/ 180.0 PI) (atan (/ (- A) B))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((C / B));
double tmp;
if (A <= -2.5e-99) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= -4.4e-172) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= -1.5e-240) {
tmp = t_0;
} else if (A <= 3.5e-256) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 5.6e-80) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((C / B));
double tmp;
if (A <= -2.5e-99) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= -4.4e-172) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= -1.5e-240) {
tmp = t_0;
} else if (A <= 3.5e-256) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 5.6e-80) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((C / B)) tmp = 0 if A <= -2.5e-99: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= -4.4e-172: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= -1.5e-240: tmp = t_0 elif A <= 3.5e-256: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 5.6e-80: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(C / B))) tmp = 0.0 if (A <= -2.5e-99) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= -4.4e-172) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= -1.5e-240) tmp = t_0; elseif (A <= 3.5e-256) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 5.6e-80) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((C / B)); tmp = 0.0; if (A <= -2.5e-99) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= -4.4e-172) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= -1.5e-240) tmp = t_0; elseif (A <= 3.5e-256) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 5.6e-80) tmp = t_0; else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.5e-99], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4.4e-172], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.5e-240], t$95$0, If[LessEqual[A, 3.5e-256], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.6e-80], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;A \leq -2.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq -4.4 \cdot 10^{-172}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq -1.5 \cdot 10^{-240}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-256}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 5.6 \cdot 10^{-80}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if A < -2.49999999999999985e-99Initial program 19.4%
associate-*r/19.4%
associate-*l/19.4%
*-commutative19.4%
Simplified67.4%
Taylor expanded in A around -inf 64.1%
associate-*r/64.1%
Applied egg-rr64.1%
if -2.49999999999999985e-99 < A < -4.40000000000000018e-172Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -4.40000000000000018e-172 < A < -1.49999999999999995e-240 or 3.50000000000000014e-256 < A < 5.59999999999999978e-80Initial program 74.6%
associate-*r/74.6%
associate-*l/74.6%
associate-*l/74.6%
*-lft-identity74.6%
sub-neg74.6%
associate-+l-74.6%
sub-neg74.6%
remove-double-neg74.6%
+-commutative74.6%
unpow274.6%
unpow274.6%
hypot-def92.7%
Simplified92.7%
Taylor expanded in B around inf 64.2%
Taylor expanded in C around inf 53.6%
if -1.49999999999999995e-240 < A < 3.50000000000000014e-256Initial program 50.2%
associate-*r/50.1%
associate-*l/50.2%
*-commutative50.2%
Simplified79.6%
Taylor expanded in B around -inf 40.8%
if 5.59999999999999978e-80 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
Taylor expanded in B around inf 75.4%
Taylor expanded in A around inf 67.6%
mul-1-neg67.6%
Simplified67.6%
Final simplification60.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan 0.0)))
(t_1 (* (/ 180.0 PI) (atan (/ C B)))))
(if (<= B -1.86e-180)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -4.1e-227)
t_0
(if (<= B -1.5e-293)
t_1
(if (<= B 4.5e-121)
t_0
(if (<= B 94000.0) t_1 (* (/ 180.0 PI) (atan -1.0)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(0.0);
double t_1 = (180.0 / ((double) M_PI)) * atan((C / B));
double tmp;
if (B <= -1.86e-180) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -4.1e-227) {
tmp = t_0;
} else if (B <= -1.5e-293) {
tmp = t_1;
} else if (B <= 4.5e-121) {
tmp = t_0;
} else if (B <= 94000.0) {
tmp = t_1;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(0.0);
double t_1 = (180.0 / Math.PI) * Math.atan((C / B));
double tmp;
if (B <= -1.86e-180) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -4.1e-227) {
tmp = t_0;
} else if (B <= -1.5e-293) {
tmp = t_1;
} else if (B <= 4.5e-121) {
tmp = t_0;
} else if (B <= 94000.0) {
tmp = t_1;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(0.0) t_1 = (180.0 / math.pi) * math.atan((C / B)) tmp = 0 if B <= -1.86e-180: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -4.1e-227: tmp = t_0 elif B <= -1.5e-293: tmp = t_1 elif B <= 4.5e-121: tmp = t_0 elif B <= 94000.0: tmp = t_1 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(0.0)) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(C / B))) tmp = 0.0 if (B <= -1.86e-180) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -4.1e-227) tmp = t_0; elseif (B <= -1.5e-293) tmp = t_1; elseif (B <= 4.5e-121) tmp = t_0; elseif (B <= 94000.0) tmp = t_1; else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(0.0); t_1 = (180.0 / pi) * atan((C / B)); tmp = 0.0; if (B <= -1.86e-180) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -4.1e-227) tmp = t_0; elseif (B <= -1.5e-293) tmp = t_1; elseif (B <= 4.5e-121) tmp = t_0; elseif (B <= 94000.0) tmp = t_1; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.86e-180], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.1e-227], t$95$0, If[LessEqual[B, -1.5e-293], t$95$1, If[LessEqual[B, 4.5e-121], t$95$0, If[LessEqual[B, 94000.0], t$95$1, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} 0\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;B \leq -1.86 \cdot 10^{-180}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -4.1 \cdot 10^{-227}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.5 \cdot 10^{-293}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 4.5 \cdot 10^{-121}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 94000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.86e-180Initial program 55.5%
associate-*r/55.5%
associate-*l/55.5%
*-commutative55.5%
Simplified82.8%
Taylor expanded in B around -inf 53.3%
if -1.86e-180 < B < -4.10000000000000009e-227 or -1.5000000000000001e-293 < B < 4.5000000000000003e-121Initial program 37.2%
associate-*r/37.2%
associate-*l/37.2%
associate-*l/37.2%
*-lft-identity37.2%
sub-neg37.2%
associate-+l-33.6%
sub-neg33.6%
remove-double-neg33.6%
+-commutative33.6%
unpow233.6%
unpow233.6%
hypot-def48.7%
Simplified48.7%
div-sub28.0%
Applied egg-rr28.0%
Taylor expanded in C around inf 17.5%
distribute-rgt1-in17.5%
metadata-eval17.5%
mul0-lft50.5%
metadata-eval50.5%
Simplified50.5%
if -4.10000000000000009e-227 < B < -1.5000000000000001e-293 or 4.5000000000000003e-121 < B < 94000Initial program 74.0%
associate-*r/74.0%
associate-*l/74.0%
associate-*l/74.0%
*-lft-identity74.0%
sub-neg74.0%
associate-+l-74.2%
sub-neg74.2%
remove-double-neg74.2%
+-commutative74.2%
unpow274.2%
unpow274.2%
hypot-def78.5%
Simplified78.5%
Taylor expanded in B around inf 72.5%
Taylor expanded in C around inf 47.9%
if 94000 < B Initial program 42.2%
associate-*r/42.2%
associate-*l/42.2%
*-commutative42.2%
Simplified78.6%
Taylor expanded in B around inf 61.1%
Final simplification53.5%
(FPCore (A B C)
:precision binary64
(if (<= A -8.6e-98)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A -2.1e-172)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A -2.1e-242)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(* (/ 180.0 PI) (atan (- 1.0 (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e-98) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= -2.1e-172) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= -2.1e-242) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.6e-98) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= -2.1e-172) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= -2.1e-242) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.6e-98: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= -2.1e-172: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= -2.1e-242: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.6e-98) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= -2.1e-172) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= -2.1e-242) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.6e-98) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= -2.1e-172) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= -2.1e-242) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.6e-98], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.1e-172], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.1e-242], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.6 \cdot 10^{-98}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq -2.1 \cdot 10^{-172}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq -2.1 \cdot 10^{-242}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -8.59999999999999977e-98Initial program 19.4%
associate-*r/19.4%
associate-*l/19.4%
*-commutative19.4%
Simplified67.4%
Taylor expanded in A around -inf 64.1%
associate-*r/64.1%
Applied egg-rr64.1%
if -8.59999999999999977e-98 < A < -2.0999999999999999e-172Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -2.0999999999999999e-172 < A < -2.10000000000000019e-242Initial program 73.3%
associate-*r/73.3%
associate-*l/73.3%
*-commutative73.3%
Simplified95.2%
Taylor expanded in C around -inf 61.4%
if -2.10000000000000019e-242 < A Initial program 73.3%
associate-*r/73.2%
associate-*l/73.3%
associate-*l/73.3%
*-lft-identity73.3%
sub-neg73.3%
associate-+l-73.3%
sub-neg73.3%
remove-double-neg73.3%
+-commutative73.3%
unpow273.3%
unpow273.3%
hypot-def91.3%
Simplified91.3%
add-cube-cbrt90.8%
pow390.8%
Applied egg-rr90.8%
Taylor expanded in C around 0 63.3%
associate-*r/63.3%
mul-1-neg63.3%
+-commutative63.3%
unpow263.3%
unpow263.3%
hypot-def76.9%
Simplified76.9%
Taylor expanded in B around -inf 63.7%
mul-1-neg63.7%
unsub-neg63.7%
Simplified63.7%
Final simplification63.7%
(FPCore (A B C)
:precision binary64
(if (<= A -3.5e-99)
(* (/ 180.0 PI) (atan (/ (* B 0.5) A)))
(if (<= A -3.8e-170)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A 1.25e-79)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(* (/ 180.0 PI) (atan (- 1.0 (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e-99) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * 0.5) / A));
} else if (A <= -3.8e-170) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= 1.25e-79) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.5e-99) {
tmp = (180.0 / Math.PI) * Math.atan(((B * 0.5) / A));
} else if (A <= -3.8e-170) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= 1.25e-79) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.5e-99: tmp = (180.0 / math.pi) * math.atan(((B * 0.5) / A)) elif A <= -3.8e-170: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= 1.25e-79: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.5e-99) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * 0.5) / A))); elseif (A <= -3.8e-170) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= 1.25e-79) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.5e-99) tmp = (180.0 / pi) * atan(((B * 0.5) / A)); elseif (A <= -3.8e-170) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= 1.25e-79) tmp = (180.0 / pi) * atan(((B + C) / B)); else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.5e-99], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.8e-170], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.25e-79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)\\
\mathbf{elif}\;A \leq -3.8 \cdot 10^{-170}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{-79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -3.4999999999999999e-99Initial program 19.4%
associate-*r/19.4%
associate-*l/19.4%
*-commutative19.4%
Simplified67.4%
Taylor expanded in A around -inf 64.1%
associate-*r/64.1%
Applied egg-rr64.1%
if -3.4999999999999999e-99 < A < -3.7999999999999998e-170Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified52.5%
Taylor expanded in B around 0 69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in C around inf 64.0%
if -3.7999999999999998e-170 < A < 1.25e-79Initial program 67.1%
associate-*r/67.1%
associate-*l/67.1%
associate-*l/67.1%
*-lft-identity67.1%
sub-neg67.1%
associate-+l-67.1%
sub-neg67.1%
remove-double-neg67.1%
+-commutative67.1%
unpow267.1%
unpow267.1%
hypot-def88.7%
Simplified88.7%
Taylor expanded in B around -inf 71.3%
neg-mul-171.3%
unsub-neg71.3%
Simplified71.3%
Taylor expanded in A around 0 69.9%
if 1.25e-79 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
add-cube-cbrt94.6%
pow394.6%
Applied egg-rr94.6%
Taylor expanded in C around 0 78.1%
associate-*r/78.1%
mul-1-neg78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-def89.5%
Simplified89.5%
Taylor expanded in B around -inf 80.8%
mul-1-neg80.8%
unsub-neg80.8%
Simplified80.8%
Final simplification70.7%
(FPCore (A B C)
:precision binary64
(if (<= A -3.8e-170)
(* 180.0 (/ (atan (/ (* B 0.5) (- A C))) PI))
(if (<= A 8.4e-78)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(* (/ 180.0 PI) (atan (- 1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e-170) {
tmp = 180.0 * (atan(((B * 0.5) / (A - C))) / ((double) M_PI));
} else if (A <= 8.4e-78) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e-170) {
tmp = 180.0 * (Math.atan(((B * 0.5) / (A - C))) / Math.PI);
} else if (A <= 8.4e-78) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e-170: tmp = 180.0 * (math.atan(((B * 0.5) / (A - C))) / math.pi) elif A <= 8.4e-78: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.8e-170) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / Float64(A - C))) / pi)); elseif (A <= 8.4e-78) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e-170) tmp = 180.0 * (atan(((B * 0.5) / (A - C))) / pi); elseif (A <= 8.4e-78) tmp = (180.0 / pi) * atan(((B + C) / B)); else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e-170], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 8.4e-78], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{-170}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 8.4 \cdot 10^{-78}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -3.7999999999999998e-170Initial program 20.5%
associate-*r/20.5%
associate-*l/20.5%
*-commutative20.5%
Simplified65.4%
Taylor expanded in B around 0 68.4%
associate-*r/68.4%
Simplified68.4%
Taylor expanded in C around -inf 68.3%
associate-*r/68.3%
*-commutative68.3%
mul-1-neg68.3%
sub-neg68.3%
Simplified68.3%
if -3.7999999999999998e-170 < A < 8.4000000000000002e-78Initial program 67.1%
associate-*r/67.1%
associate-*l/67.1%
associate-*l/67.1%
*-lft-identity67.1%
sub-neg67.1%
associate-+l-67.1%
sub-neg67.1%
remove-double-neg67.1%
+-commutative67.1%
unpow267.1%
unpow267.1%
hypot-def88.7%
Simplified88.7%
Taylor expanded in B around -inf 71.3%
neg-mul-171.3%
unsub-neg71.3%
Simplified71.3%
Taylor expanded in A around 0 69.9%
if 8.4000000000000002e-78 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
add-cube-cbrt94.6%
pow394.6%
Applied egg-rr94.6%
Taylor expanded in C around 0 78.1%
associate-*r/78.1%
mul-1-neg78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-def89.5%
Simplified89.5%
Taylor expanded in B around -inf 80.8%
mul-1-neg80.8%
unsub-neg80.8%
Simplified80.8%
Final simplification72.5%
(FPCore (A B C)
:precision binary64
(if (<= A -3.75e-171)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 2.7e-79)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(* (/ 180.0 PI) (atan (- 1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.75e-171) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 2.7e-79) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.75e-171) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 2.7e-79) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.75e-171: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 2.7e-79: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.75e-171) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 2.7e-79) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.75e-171) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 2.7e-79) tmp = (180.0 / pi) * atan(((B + C) / B)); else tmp = (180.0 / pi) * atan((1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.75e-171], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.7e-79], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.75 \cdot 10^{-171}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 2.7 \cdot 10^{-79}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -3.75000000000000017e-171Initial program 20.5%
associate-*r/20.5%
associate-*l/20.5%
*-commutative20.5%
Simplified65.4%
Taylor expanded in B around 0 68.4%
associate-*r/68.4%
Simplified68.4%
if -3.75000000000000017e-171 < A < 2.7000000000000002e-79Initial program 67.1%
associate-*r/67.1%
associate-*l/67.1%
associate-*l/67.1%
*-lft-identity67.1%
sub-neg67.1%
associate-+l-67.1%
sub-neg67.1%
remove-double-neg67.1%
+-commutative67.1%
unpow267.1%
unpow267.1%
hypot-def88.7%
Simplified88.7%
Taylor expanded in B around -inf 71.3%
neg-mul-171.3%
unsub-neg71.3%
Simplified71.3%
Taylor expanded in A around 0 69.9%
if 2.7000000000000002e-79 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
add-cube-cbrt94.6%
pow394.6%
Applied egg-rr94.6%
Taylor expanded in C around 0 78.1%
associate-*r/78.1%
mul-1-neg78.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-def89.5%
Simplified89.5%
Taylor expanded in B around -inf 80.8%
mul-1-neg80.8%
unsub-neg80.8%
Simplified80.8%
Final simplification72.5%
(FPCore (A B C) :precision binary64 (if (<= A -7.8e-175) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) (* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.8e-175) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.8e-175) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.8e-175: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.8e-175) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.8e-175) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan(((C - (A - B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.8e-175], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.8 \cdot 10^{-175}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
\end{array}
\end{array}
if A < -7.79999999999999997e-175Initial program 20.5%
associate-*r/20.5%
associate-*l/20.5%
*-commutative20.5%
Simplified65.4%
Taylor expanded in B around 0 68.4%
associate-*r/68.4%
Simplified68.4%
if -7.79999999999999997e-175 < A Initial program 73.3%
associate-*r/73.3%
associate-*l/73.3%
associate-*l/73.3%
*-lft-identity73.3%
sub-neg73.3%
associate-+l-73.3%
sub-neg73.3%
remove-double-neg73.3%
+-commutative73.3%
unpow273.3%
unpow273.3%
hypot-def91.9%
Simplified91.9%
Taylor expanded in B around -inf 76.0%
neg-mul-176.0%
unsub-neg76.0%
Simplified76.0%
Final simplification72.9%
(FPCore (A B C)
:precision binary64
(if (<= A -2.4e-174)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 6.5e-80)
(* (/ 180.0 PI) (atan (/ C B)))
(* (/ 180.0 PI) (atan (/ (- A) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e-174) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 6.5e-80) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.4e-174) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 6.5e-80) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.4e-174: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 6.5e-80: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.4e-174) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 6.5e-80) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.4e-174) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 6.5e-80) tmp = (180.0 / pi) * atan((C / B)); else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.4e-174], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-80], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.4 \cdot 10^{-174}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-80}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if A < -2.4e-174Initial program 20.5%
associate-*r/20.5%
associate-*l/20.5%
*-commutative20.5%
Simplified65.4%
Taylor expanded in A around -inf 57.0%
Taylor expanded in B around 0 56.9%
if -2.4e-174 < A < 6.49999999999999984e-80Initial program 67.1%
associate-*r/67.1%
associate-*l/67.1%
associate-*l/67.1%
*-lft-identity67.1%
sub-neg67.1%
associate-+l-67.1%
sub-neg67.1%
remove-double-neg67.1%
+-commutative67.1%
unpow267.1%
unpow267.1%
hypot-def88.7%
Simplified88.7%
Taylor expanded in B around inf 55.5%
Taylor expanded in C around inf 43.2%
if 6.49999999999999984e-80 < A Initial program 79.4%
associate-*r/79.4%
associate-*l/79.4%
associate-*l/79.4%
*-lft-identity79.4%
sub-neg79.4%
associate-+l-79.4%
sub-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
unpow279.4%
unpow279.4%
hypot-def95.0%
Simplified95.0%
Taylor expanded in B around inf 75.4%
Taylor expanded in A around inf 67.6%
mul-1-neg67.6%
Simplified67.6%
Final simplification56.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.86e-180)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 1.25e-51)
(* (/ 180.0 PI) (atan 0.0))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.86e-180) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 1.25e-51) {
tmp = (180.0 / ((double) M_PI)) * atan(0.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.86e-180) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 1.25e-51) {
tmp = (180.0 / Math.PI) * Math.atan(0.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.86e-180: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 1.25e-51: tmp = (180.0 / math.pi) * math.atan(0.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.86e-180) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 1.25e-51) tmp = Float64(Float64(180.0 / pi) * atan(0.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.86e-180) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 1.25e-51) tmp = (180.0 / pi) * atan(0.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.86e-180], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.25e-51], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.86 \cdot 10^{-180}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.25 \cdot 10^{-51}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.86e-180Initial program 55.5%
associate-*r/55.5%
associate-*l/55.5%
*-commutative55.5%
Simplified82.8%
Taylor expanded in B around -inf 53.3%
if -1.86e-180 < B < 1.25000000000000001e-51Initial program 49.4%
associate-*r/49.4%
associate-*l/49.4%
associate-*l/49.4%
*-lft-identity49.4%
sub-neg49.4%
associate-+l-47.2%
sub-neg47.2%
remove-double-neg47.2%
+-commutative47.2%
unpow247.2%
unpow247.2%
hypot-def59.1%
Simplified59.1%
div-sub43.5%
Applied egg-rr43.5%
Taylor expanded in C around inf 14.5%
distribute-rgt1-in14.5%
metadata-eval14.5%
mul0-lft38.8%
metadata-eval38.8%
Simplified38.8%
if 1.25000000000000001e-51 < B Initial program 49.4%
associate-*r/49.4%
associate-*l/49.4%
*-commutative49.4%
Simplified79.6%
Taylor expanded in B around inf 53.4%
Final simplification48.2%
(FPCore (A B C) :precision binary64 (if (<= B -9e-303) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9e-303) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -9e-303) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -9e-303: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -9e-303) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -9e-303) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -9e-303], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -9 \cdot 10^{-303}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -9.0000000000000002e-303Initial program 56.8%
associate-*r/56.8%
associate-*l/56.8%
*-commutative56.8%
Simplified84.5%
Taylor expanded in B around -inf 45.0%
if -9.0000000000000002e-303 < B Initial program 47.3%
associate-*r/47.3%
associate-*l/47.3%
*-commutative47.3%
Simplified78.0%
Taylor expanded in B around inf 33.0%
Final simplification38.5%
(FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
double code(double A, double B, double C) {
return (180.0 / ((double) M_PI)) * atan(-1.0);
}
public static double code(double A, double B, double C) {
return (180.0 / Math.PI) * Math.atan(-1.0);
}
def code(A, B, C): return (180.0 / math.pi) * math.atan(-1.0)
function code(A, B, C) return Float64(Float64(180.0 / pi) * atan(-1.0)) end
function tmp = code(A, B, C) tmp = (180.0 / pi) * atan(-1.0); end
code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{180}{\pi} \cdot \tan^{-1} -1
\end{array}
Initial program 51.6%
associate-*r/51.6%
associate-*l/51.6%
*-commutative51.6%
Simplified81.0%
Taylor expanded in B around inf 18.8%
Final simplification18.8%
herbie shell --seed 2023175
(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)))