
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= A -62000000000000.0) (* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0))))) (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- A C)))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -62000000000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (A - C)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -62000000000000.0) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -62000000000000.0: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0)))) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -62000000000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0))))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -62000000000000.0) tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0)))); else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (A - C)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -62000000000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -62000000000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -6.2e13Initial program 24.5%
associate-*l/24.5%
*-lft-identity24.5%
+-commutative24.5%
unpow224.5%
unpow224.5%
hypot-def53.3%
Simplified53.3%
Taylor expanded in A around -inf 79.4%
distribute-lft-out79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
Simplified79.3%
Taylor expanded in B around 0 79.4%
associate-*r/79.4%
*-commutative79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
fma-udef79.3%
associate-/l*79.0%
associate-/r/79.3%
*-commutative79.3%
remove-double-neg79.3%
mul-1-neg79.3%
fma-neg79.3%
Simplified79.3%
if -6.2e13 < A Initial program 67.2%
associate-*r/67.2%
associate-*l/67.2%
associate-*l/67.2%
*-lft-identity67.2%
sub-neg67.2%
associate-+l-67.2%
sub-neg67.2%
remove-double-neg67.2%
+-commutative67.2%
unpow267.2%
unpow267.2%
hypot-def86.5%
Simplified86.5%
Final simplification84.5%
(FPCore (A B C) :precision binary64 (if (<= A -8e+14) (* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0))))) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8e+14) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8e+14) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8e+14: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0)))) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8e+14) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0))))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8e+14) tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0)))); else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8e+14], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8 \cdot 10^{+14}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8e14Initial program 24.5%
associate-*l/24.5%
*-lft-identity24.5%
+-commutative24.5%
unpow224.5%
unpow224.5%
hypot-def53.3%
Simplified53.3%
Taylor expanded in A around -inf 79.4%
distribute-lft-out79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
Simplified79.3%
Taylor expanded in B around 0 79.4%
associate-*r/79.4%
*-commutative79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
fma-udef79.3%
associate-/l*79.0%
associate-/r/79.3%
*-commutative79.3%
remove-double-neg79.3%
mul-1-neg79.3%
fma-neg79.3%
Simplified79.3%
if -8e14 < A Initial program 67.2%
associate-*l/67.2%
*-lft-identity67.2%
+-commutative67.2%
unpow267.2%
unpow267.2%
hypot-def86.4%
Simplified86.4%
Final simplification84.5%
(FPCore (A B C)
:precision binary64
(if (<= A -8.2e+15)
(* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
(if (<= A 3.2e-43)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (- (- A) (hypot A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e+15) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else if (A <= 3.2e-43) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.2e+15) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else if (A <= 3.2e-43) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(A, B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.2e+15: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0)))) elif A <= 3.2e-43: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((-A - math.hypot(A, B)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.2e+15) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0))))); elseif (A <= 3.2e-43) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.2e+15) tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0)))); elseif (A <= 3.2e-43) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.2e+15], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.2e-43], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-43}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8.2e15Initial program 24.5%
associate-*l/24.5%
*-lft-identity24.5%
+-commutative24.5%
unpow224.5%
unpow224.5%
hypot-def53.3%
Simplified53.3%
Taylor expanded in A around -inf 79.4%
distribute-lft-out79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
Simplified79.3%
Taylor expanded in B around 0 79.4%
associate-*r/79.4%
*-commutative79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
fma-udef79.3%
associate-/l*79.0%
associate-/r/79.3%
*-commutative79.3%
remove-double-neg79.3%
mul-1-neg79.3%
fma-neg79.3%
Simplified79.3%
if -8.2e15 < A < 3.19999999999999985e-43Initial program 59.9%
associate-*l/59.9%
*-lft-identity59.9%
+-commutative59.9%
unpow259.9%
unpow259.9%
hypot-def81.3%
Simplified81.3%
Taylor expanded in A around 0 58.2%
unpow258.2%
unpow258.2%
hypot-def79.6%
Simplified79.6%
if 3.19999999999999985e-43 < A Initial program 77.7%
associate-*l/77.7%
*-lft-identity77.7%
+-commutative77.7%
unpow277.7%
unpow277.7%
hypot-def93.9%
Simplified93.9%
Taylor expanded in C around 0 76.6%
mul-1-neg76.6%
+-commutative76.6%
unpow276.6%
unpow276.6%
hypot-def90.1%
Simplified90.1%
Final simplification82.7%
(FPCore (A B C)
:precision binary64
(if (<= A -1e+15)
(* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
(if (<= A 1.46e-42)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (atan (/ (- (- A) (hypot A B)) B)) (* PI 0.005555555555555556)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1e+15) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else if (A <= 1.46e-42) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = atan(((-A - hypot(A, B)) / B)) / (((double) M_PI) * 0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1e+15) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else if (A <= 1.46e-42) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = Math.atan(((-A - Math.hypot(A, B)) / B)) / (Math.PI * 0.005555555555555556);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1e+15: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0)))) elif A <= 1.46e-42: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = math.atan(((-A - math.hypot(A, B)) / B)) / (math.pi * 0.005555555555555556) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1e+15) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0))))); elseif (A <= 1.46e-42) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)) / Float64(pi * 0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1e+15) tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0)))); elseif (A <= 1.46e-42) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = atan(((-A - hypot(A, B)) / B)) / (pi * 0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1e+15], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.46e-42], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1 \cdot 10^{+15}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\
\mathbf{elif}\;A \leq 1.46 \cdot 10^{-42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi \cdot 0.005555555555555556}\\
\end{array}
\end{array}
if A < -1e15Initial program 24.5%
associate-*l/24.5%
*-lft-identity24.5%
+-commutative24.5%
unpow224.5%
unpow224.5%
hypot-def53.3%
Simplified53.3%
Taylor expanded in A around -inf 79.4%
distribute-lft-out79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
Simplified79.3%
Taylor expanded in B around 0 79.4%
associate-*r/79.4%
*-commutative79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
fma-udef79.3%
associate-/l*79.0%
associate-/r/79.3%
*-commutative79.3%
remove-double-neg79.3%
mul-1-neg79.3%
fma-neg79.3%
Simplified79.3%
if -1e15 < A < 1.46000000000000001e-42Initial program 59.9%
associate-*l/59.9%
*-lft-identity59.9%
+-commutative59.9%
unpow259.9%
unpow259.9%
hypot-def81.3%
Simplified81.3%
Taylor expanded in A around 0 58.2%
unpow258.2%
unpow258.2%
hypot-def79.6%
Simplified79.6%
if 1.46000000000000001e-42 < A Initial program 77.7%
associate-*l/77.7%
*-lft-identity77.7%
+-commutative77.7%
unpow277.7%
unpow277.7%
hypot-def93.9%
Simplified93.9%
associate-*r/93.9%
associate--r+93.9%
associate-*l/93.8%
*-commutative93.8%
associate--r+93.8%
clear-num93.8%
un-div-inv93.9%
associate--r+93.9%
div-inv93.9%
metadata-eval93.9%
Applied egg-rr93.9%
associate--r+93.9%
Simplified93.9%
Taylor expanded in C around 0 76.6%
mul-1-neg76.6%
+-commutative76.6%
unpow276.6%
unpow276.6%
hypot-def90.1%
Simplified90.2%
Final simplification82.7%
(FPCore (A B C)
:precision binary64
(if (<= A -34000000000000.0)
(* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
(if (<= A 2.36e+83)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (/ (- (- C B) A) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -34000000000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else if (A <= 2.36e+83) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -34000000000000.0) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else if (A <= 2.36e+83) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -34000000000000.0: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0)))) elif A <= 2.36e+83: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -34000000000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0))))); elseif (A <= 2.36e+83) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -34000000000000.0) tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0)))); elseif (A <= 2.36e+83) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan((((C - B) - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -34000000000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.36e+83], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -34000000000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\
\mathbf{elif}\;A \leq 2.36 \cdot 10^{+83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.4e13Initial program 24.5%
associate-*l/24.5%
*-lft-identity24.5%
+-commutative24.5%
unpow224.5%
unpow224.5%
hypot-def53.3%
Simplified53.3%
Taylor expanded in A around -inf 79.4%
distribute-lft-out79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
Simplified79.3%
Taylor expanded in B around 0 79.4%
associate-*r/79.4%
*-commutative79.4%
*-commutative79.4%
unpow279.4%
times-frac79.3%
fma-udef79.3%
associate-/l*79.0%
associate-/r/79.3%
*-commutative79.3%
remove-double-neg79.3%
mul-1-neg79.3%
fma-neg79.3%
Simplified79.3%
if -3.4e13 < A < 2.3599999999999999e83Initial program 60.7%
associate-*l/60.7%
*-lft-identity60.7%
+-commutative60.7%
unpow260.7%
unpow260.7%
hypot-def82.4%
Simplified82.4%
Taylor expanded in A around 0 57.0%
unpow257.0%
unpow257.0%
hypot-def78.7%
Simplified78.7%
if 2.3599999999999999e83 < A Initial program 83.7%
associate-*l/83.7%
*-lft-identity83.7%
+-commutative83.7%
unpow283.7%
unpow283.7%
hypot-def96.6%
Simplified96.6%
Taylor expanded in B around inf 84.8%
neg-mul-184.8%
unsub-neg84.8%
Simplified84.8%
Final simplification80.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI)))
(t_1 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
(if (<= A -2.2e-77)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -4.1e-122)
t_0
(if (<= A -2.7e-294)
t_1
(if (<= A 1.15e-282)
t_0
(if (<= A 350.0)
t_1
(if (<= A 2.7e+19)
t_0
(if (<= A 1.55e+82)
t_1
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double t_1 = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
double tmp;
if (A <= -2.2e-77) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -4.1e-122) {
tmp = t_0;
} else if (A <= -2.7e-294) {
tmp = t_1;
} else if (A <= 1.15e-282) {
tmp = t_0;
} else if (A <= 350.0) {
tmp = t_1;
} else if (A <= 2.7e+19) {
tmp = t_0;
} else if (A <= 1.55e+82) {
tmp = t_1;
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
double tmp;
if (A <= -2.2e-77) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -4.1e-122) {
tmp = t_0;
} else if (A <= -2.7e-294) {
tmp = t_1;
} else if (A <= 1.15e-282) {
tmp = t_0;
} else if (A <= 350.0) {
tmp = t_1;
} else if (A <= 2.7e+19) {
tmp = t_0;
} else if (A <= 1.55e+82) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) t_1 = 180.0 * (math.atan(((B + C) / B)) / math.pi) tmp = 0 if A <= -2.2e-77: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -4.1e-122: tmp = t_0 elif A <= -2.7e-294: tmp = t_1 elif A <= 1.15e-282: tmp = t_0 elif A <= 350.0: tmp = t_1 elif A <= 2.7e+19: tmp = t_0 elif A <= 1.55e+82: tmp = t_1 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)) tmp = 0.0 if (A <= -2.2e-77) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -4.1e-122) tmp = t_0; elseif (A <= -2.7e-294) tmp = t_1; elseif (A <= 1.15e-282) tmp = t_0; elseif (A <= 350.0) tmp = t_1; elseif (A <= 2.7e+19) tmp = t_0; elseif (A <= 1.55e+82) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); t_1 = 180.0 * (atan(((B + C) / B)) / pi); tmp = 0.0; if (A <= -2.2e-77) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -4.1e-122) tmp = t_0; elseif (A <= -2.7e-294) tmp = t_1; elseif (A <= 1.15e-282) tmp = t_0; elseif (A <= 350.0) tmp = t_1; elseif (A <= 2.7e+19) tmp = t_0; elseif (A <= 1.55e+82) tmp = t_1; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.2e-77], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4.1e-122], t$95$0, If[LessEqual[A, -2.7e-294], t$95$1, If[LessEqual[A, 1.15e-282], t$95$0, If[LessEqual[A, 350.0], t$95$1, If[LessEqual[A, 2.7e+19], t$95$0, If[LessEqual[A, 1.55e+82], t$95$1, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -2.2 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4.1 \cdot 10^{-122}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{-294}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.15 \cdot 10^{-282}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 350:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 2.7 \cdot 10^{+19}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.20000000000000007e-77Initial program 26.6%
associate-*l/26.6%
*-lft-identity26.6%
+-commutative26.6%
unpow226.6%
unpow226.6%
hypot-def54.8%
Simplified54.8%
Taylor expanded in A around -inf 70.3%
if -2.20000000000000007e-77 < A < -4.1e-122 or -2.7000000000000001e-294 < A < 1.1499999999999999e-282 or 350 < A < 2.7e19Initial program 55.4%
associate-*l/55.4%
*-lft-identity55.4%
+-commutative55.4%
unpow255.4%
unpow255.4%
hypot-def85.7%
Simplified85.7%
Taylor expanded in B around inf 65.4%
if -4.1e-122 < A < -2.7000000000000001e-294 or 1.1499999999999999e-282 < A < 350 or 2.7e19 < A < 1.55000000000000016e82Initial program 65.8%
associate-*l/65.8%
*-lft-identity65.8%
+-commutative65.8%
unpow265.8%
unpow265.8%
hypot-def84.6%
Simplified84.6%
Taylor expanded in B around -inf 62.4%
Taylor expanded in A around 0 58.4%
if 1.55000000000000016e82 < A Initial program 83.7%
associate-*l/83.7%
*-lft-identity83.7%
+-commutative83.7%
unpow283.7%
unpow283.7%
hypot-def96.6%
Simplified96.6%
Taylor expanded in A around inf 79.6%
*-commutative79.6%
Simplified79.6%
Final simplification67.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.55e-36)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (or (<= A -2.4e-183)
(and (not (<= A -3e-267)) (or (<= A 5e-282) (not (<= A 5.5e-186)))))
(* 180.0 (/ (atan (/ (- (- C B) A) B)) PI))
(* 180.0 (/ (atan (/ (+ B C) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e-36) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if ((A <= -2.4e-183) || (!(A <= -3e-267) && ((A <= 5e-282) || !(A <= 5.5e-186)))) {
tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.55e-36) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if ((A <= -2.4e-183) || (!(A <= -3e-267) && ((A <= 5e-282) || !(A <= 5.5e-186)))) {
tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.55e-36: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif (A <= -2.4e-183) or (not (A <= -3e-267) and ((A <= 5e-282) or not (A <= 5.5e-186))): tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.55e-36) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif ((A <= -2.4e-183) || (!(A <= -3e-267) && ((A <= 5e-282) || !(A <= 5.5e-186)))) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.55e-36) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif ((A <= -2.4e-183) || (~((A <= -3e-267)) && ((A <= 5e-282) || ~((A <= 5.5e-186))))) tmp = 180.0 * (atan((((C - B) - A) / B)) / pi); else tmp = 180.0 * (atan(((B + C) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.55e-36], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -2.4e-183], And[N[Not[LessEqual[A, -3e-267]], $MachinePrecision], Or[LessEqual[A, 5e-282], N[Not[LessEqual[A, 5.5e-186]], $MachinePrecision]]]], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.55 \cdot 10^{-36}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.4 \cdot 10^{-183} \lor \neg \left(A \leq -3 \cdot 10^{-267}\right) \land \left(A \leq 5 \cdot 10^{-282} \lor \neg \left(A \leq 5.5 \cdot 10^{-186}\right)\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.5499999999999999e-36Initial program 24.4%
associate-*l/24.4%
*-lft-identity24.4%
+-commutative24.4%
unpow224.4%
unpow224.4%
hypot-def54.3%
Simplified54.3%
Taylor expanded in A around -inf 72.9%
if -1.5499999999999999e-36 < A < -2.39999999999999993e-183 or -3e-267 < A < 5.0000000000000001e-282 or 5.5000000000000001e-186 < A Initial program 68.0%
associate-*l/68.0%
*-lft-identity68.0%
+-commutative68.0%
unpow268.0%
unpow268.0%
hypot-def87.0%
Simplified87.0%
Taylor expanded in B around inf 71.4%
neg-mul-171.4%
unsub-neg71.4%
Simplified71.4%
if -2.39999999999999993e-183 < A < -3e-267 or 5.0000000000000001e-282 < A < 5.5000000000000001e-186Initial program 76.1%
associate-*l/76.1%
*-lft-identity76.1%
+-commutative76.1%
unpow276.1%
unpow276.1%
hypot-def90.7%
Simplified90.7%
Taylor expanded in B around -inf 77.9%
Taylor expanded in A around 0 78.1%
Final simplification72.7%
(FPCore (A B C)
:precision binary64
(if (<= A -4e-76)
(* (/ 180.0 PI) (atan (* 0.5 (* (/ B A) (- (/ C A) -1.0)))))
(if (or (<= A -9e-181)
(and (not (<= A -5e-271)) (or (<= A 9e-282) (not (<= A 5.8e-186)))))
(* 180.0 (/ (atan (/ (- (- C B) A) B)) PI))
(* 180.0 (/ (atan (/ (+ B C) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4e-76) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else if ((A <= -9e-181) || (!(A <= -5e-271) && ((A <= 9e-282) || !(A <= 5.8e-186)))) {
tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4e-76) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * ((B / A) * ((C / A) - -1.0))));
} else if ((A <= -9e-181) || (!(A <= -5e-271) && ((A <= 9e-282) || !(A <= 5.8e-186)))) {
tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4e-76: tmp = (180.0 / math.pi) * math.atan((0.5 * ((B / A) * ((C / A) - -1.0)))) elif (A <= -9e-181) or (not (A <= -5e-271) and ((A <= 9e-282) or not (A <= 5.8e-186))): tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4e-76) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(Float64(B / A) * Float64(Float64(C / A) - -1.0))))); elseif ((A <= -9e-181) || (!(A <= -5e-271) && ((A <= 9e-282) || !(A <= 5.8e-186)))) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4e-76) tmp = (180.0 / pi) * atan((0.5 * ((B / A) * ((C / A) - -1.0)))); elseif ((A <= -9e-181) || (~((A <= -5e-271)) && ((A <= 9e-282) || ~((A <= 5.8e-186))))) tmp = 180.0 * (atan((((C - B) - A) / B)) / pi); else tmp = 180.0 * (atan(((B + C) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4e-76], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] * N[(N[(C / A), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, -9e-181], And[N[Not[LessEqual[A, -5e-271]], $MachinePrecision], Or[LessEqual[A, 9e-282], N[Not[LessEqual[A, 5.8e-186]], $MachinePrecision]]]], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{-76}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} \cdot \left(\frac{C}{A} - -1\right)\right)\right)\\
\mathbf{elif}\;A \leq -9 \cdot 10^{-181} \lor \neg \left(A \leq -5 \cdot 10^{-271}\right) \land \left(A \leq 9 \cdot 10^{-282} \lor \neg \left(A \leq 5.8 \cdot 10^{-186}\right)\right):\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.99999999999999971e-76Initial program 26.9%
associate-*l/26.9%
*-lft-identity26.9%
+-commutative26.9%
unpow226.9%
unpow226.9%
hypot-def55.4%
Simplified55.4%
Taylor expanded in A around -inf 74.1%
distribute-lft-out74.1%
*-commutative74.1%
unpow274.1%
times-frac74.0%
Simplified74.0%
Taylor expanded in B around 0 74.1%
associate-*r/74.2%
*-commutative74.2%
*-commutative74.2%
unpow274.2%
times-frac74.0%
fma-udef74.0%
associate-/l*73.8%
associate-/r/74.0%
*-commutative74.0%
remove-double-neg74.0%
mul-1-neg74.0%
fma-neg74.0%
Simplified74.0%
if -3.99999999999999971e-76 < A < -8.9999999999999998e-181 or -5.0000000000000002e-271 < A < 9.00000000000000017e-282 or 5.80000000000000038e-186 < A Initial program 67.8%
associate-*l/67.8%
*-lft-identity67.8%
+-commutative67.8%
unpow267.8%
unpow267.8%
hypot-def87.3%
Simplified87.3%
Taylor expanded in B around inf 71.3%
neg-mul-171.3%
unsub-neg71.3%
Simplified71.3%
if -8.9999999999999998e-181 < A < -5.0000000000000002e-271 or 9.00000000000000017e-282 < A < 5.80000000000000038e-186Initial program 76.1%
associate-*l/76.1%
*-lft-identity76.1%
+-commutative76.1%
unpow276.1%
unpow276.1%
hypot-def90.7%
Simplified90.7%
Taylor expanded in B around -inf 77.9%
Taylor expanded in A around 0 78.1%
Final simplification73.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))) (t_1 (* 180.0 (/ (atan 1.0) PI))))
(if (<= A -2.9e-78)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.6e-181)
t_0
(if (<= A -1.9e-267)
t_1
(if (<= A 1.9e-282)
t_0
(if (<= A 1.9e-123)
t_1
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (A <= -2.9e-78) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.6e-181) {
tmp = t_0;
} else if (A <= -1.9e-267) {
tmp = t_1;
} else if (A <= 1.9e-282) {
tmp = t_0;
} else if (A <= 1.9e-123) {
tmp = t_1;
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (A <= -2.9e-78) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.6e-181) {
tmp = t_0;
} else if (A <= -1.9e-267) {
tmp = t_1;
} else if (A <= 1.9e-282) {
tmp = t_0;
} else if (A <= 1.9e-123) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) t_1 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if A <= -2.9e-78: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.6e-181: tmp = t_0 elif A <= -1.9e-267: tmp = t_1 elif A <= 1.9e-282: tmp = t_0 elif A <= 1.9e-123: tmp = t_1 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) t_1 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (A <= -2.9e-78) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.6e-181) tmp = t_0; elseif (A <= -1.9e-267) tmp = t_1; elseif (A <= 1.9e-282) tmp = t_0; elseif (A <= 1.9e-123) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); t_1 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (A <= -2.9e-78) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.6e-181) tmp = t_0; elseif (A <= -1.9e-267) tmp = t_1; elseif (A <= 1.9e-282) tmp = t_0; elseif (A <= 1.9e-123) tmp = t_1; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.9e-78], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.6e-181], t$95$0, If[LessEqual[A, -1.9e-267], t$95$1, If[LessEqual[A, 1.9e-282], t$95$0, If[LessEqual[A, 1.9e-123], t$95$1, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;A \leq -2.9 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.6 \cdot 10^{-181}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.9 \cdot 10^{-267}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.9 \cdot 10^{-282}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.9 \cdot 10^{-123}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.9000000000000001e-78Initial program 26.6%
associate-*l/26.6%
*-lft-identity26.6%
+-commutative26.6%
unpow226.6%
unpow226.6%
hypot-def54.8%
Simplified54.8%
Taylor expanded in A around -inf 70.3%
if -2.9000000000000001e-78 < A < -1.6000000000000001e-181 or -1.90000000000000001e-267 < A < 1.89999999999999996e-282Initial program 58.0%
associate-*l/58.0%
*-lft-identity58.0%
+-commutative58.0%
unpow258.0%
unpow258.0%
hypot-def81.9%
Simplified81.9%
Taylor expanded in B around inf 45.1%
if -1.6000000000000001e-181 < A < -1.90000000000000001e-267 or 1.89999999999999996e-282 < A < 1.89999999999999998e-123Initial program 70.2%
associate-*l/70.2%
*-lft-identity70.2%
+-commutative70.2%
unpow270.2%
unpow270.2%
hypot-def83.4%
Simplified83.4%
Taylor expanded in B around -inf 45.1%
if 1.89999999999999998e-123 < A Initial program 74.1%
associate-*l/74.2%
*-lft-identity74.2%
+-commutative74.2%
unpow274.2%
unpow274.2%
hypot-def93.7%
Simplified93.7%
Taylor expanded in A around inf 62.6%
*-commutative62.6%
Simplified62.6%
Final simplification59.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI)))
(t_1 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
(if (<= A -3.2e-78)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -8.4e-122)
t_0
(if (<= A -2.55e-294)
t_1
(if (<= A 2e-282)
t_0
(if (<= A 3.9e-120) t_1 (* 180.0 (/ (atan (/ (- B A) B)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double t_1 = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
double tmp;
if (A <= -3.2e-78) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -8.4e-122) {
tmp = t_0;
} else if (A <= -2.55e-294) {
tmp = t_1;
} else if (A <= 2e-282) {
tmp = t_0;
} else if (A <= 3.9e-120) {
tmp = t_1;
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double t_1 = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
double tmp;
if (A <= -3.2e-78) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -8.4e-122) {
tmp = t_0;
} else if (A <= -2.55e-294) {
tmp = t_1;
} else if (A <= 2e-282) {
tmp = t_0;
} else if (A <= 3.9e-120) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) t_1 = 180.0 * (math.atan(((B + C) / B)) / math.pi) tmp = 0 if A <= -3.2e-78: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -8.4e-122: tmp = t_0 elif A <= -2.55e-294: tmp = t_1 elif A <= 2e-282: tmp = t_0 elif A <= 3.9e-120: tmp = t_1 else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)) tmp = 0.0 if (A <= -3.2e-78) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -8.4e-122) tmp = t_0; elseif (A <= -2.55e-294) tmp = t_1; elseif (A <= 2e-282) tmp = t_0; elseif (A <= 3.9e-120) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); t_1 = 180.0 * (atan(((B + C) / B)) / pi); tmp = 0.0; if (A <= -3.2e-78) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -8.4e-122) tmp = t_0; elseif (A <= -2.55e-294) tmp = t_1; elseif (A <= 2e-282) tmp = t_0; elseif (A <= 3.9e-120) tmp = t_1; else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.2e-78], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.4e-122], t$95$0, If[LessEqual[A, -2.55e-294], t$95$1, If[LessEqual[A, 2e-282], t$95$0, If[LessEqual[A, 3.9e-120], t$95$1, N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -3.2 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8.4 \cdot 10^{-122}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.55 \cdot 10^{-294}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-282}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.9 \cdot 10^{-120}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.2e-78Initial program 26.6%
associate-*l/26.6%
*-lft-identity26.6%
+-commutative26.6%
unpow226.6%
unpow226.6%
hypot-def54.8%
Simplified54.8%
Taylor expanded in A around -inf 70.3%
if -3.2e-78 < A < -8.39999999999999969e-122 or -2.55000000000000003e-294 < A < 2e-282Initial program 58.5%
associate-*l/58.5%
*-lft-identity58.5%
+-commutative58.5%
unpow258.5%
unpow258.5%
hypot-def86.3%
Simplified86.3%
Taylor expanded in B around inf 63.7%
if -8.39999999999999969e-122 < A < -2.55000000000000003e-294 or 2e-282 < A < 3.9000000000000002e-120Initial program 67.4%
associate-*l/67.4%
*-lft-identity67.4%
+-commutative67.4%
unpow267.4%
unpow267.4%
hypot-def81.8%
Simplified81.8%
Taylor expanded in B around -inf 62.4%
Taylor expanded in A around 0 62.5%
if 3.9000000000000002e-120 < A Initial program 73.8%
associate-*l/73.9%
*-lft-identity73.9%
+-commutative73.9%
unpow273.9%
unpow273.9%
hypot-def93.6%
Simplified93.6%
Taylor expanded in B around -inf 70.6%
Taylor expanded in C around 0 68.6%
Final simplification67.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -4.5e-78)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -6.6e-122)
t_0
(if (<= A -2.8e-294)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 5.5e-282)
t_0
(* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -4.5e-78) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -6.6e-122) {
tmp = t_0;
} else if (A <= -2.8e-294) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 5.5e-282) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (A <= -4.5e-78) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -6.6e-122) {
tmp = t_0;
} else if (A <= -2.8e-294) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 5.5e-282) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -4.5e-78: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -6.6e-122: tmp = t_0 elif A <= -2.8e-294: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 5.5e-282: tmp = t_0 else: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -4.5e-78) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -6.6e-122) tmp = t_0; elseif (A <= -2.8e-294) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 5.5e-282) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -4.5e-78) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -6.6e-122) tmp = t_0; elseif (A <= -2.8e-294) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 5.5e-282) tmp = t_0; else tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.5e-78], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6.6e-122], t$95$0, If[LessEqual[A, -2.8e-294], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.5e-282], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -4.5 \cdot 10^{-78}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -6.6 \cdot 10^{-122}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.8 \cdot 10^{-294}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.5 \cdot 10^{-282}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.5e-78Initial program 26.6%
associate-*l/26.6%
*-lft-identity26.6%
+-commutative26.6%
unpow226.6%
unpow226.6%
hypot-def54.8%
Simplified54.8%
Taylor expanded in A around -inf 70.3%
if -4.5e-78 < A < -6.59999999999999999e-122 or -2.79999999999999991e-294 < A < 5.5000000000000001e-282Initial program 58.5%
associate-*l/58.5%
*-lft-identity58.5%
+-commutative58.5%
unpow258.5%
unpow258.5%
hypot-def86.3%
Simplified86.3%
Taylor expanded in B around inf 63.7%
if -6.59999999999999999e-122 < A < -2.79999999999999991e-294Initial program 62.7%
associate-*l/62.7%
*-lft-identity62.7%
+-commutative62.7%
unpow262.7%
unpow262.7%
hypot-def85.5%
Simplified85.5%
Taylor expanded in B around -inf 60.8%
Taylor expanded in A around 0 61.1%
if 5.5000000000000001e-282 < A Initial program 73.5%
associate-*l/73.6%
*-lft-identity73.6%
+-commutative73.6%
unpow273.6%
unpow273.6%
hypot-def89.6%
Simplified89.6%
Taylor expanded in B around -inf 68.9%
Final simplification67.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))) (t_1 (* 180.0 (/ (atan 1.0) PI))))
(if (<= A -2.5e-77)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -8.2e-175)
t_0
(if (<= A -1.66e-267)
t_1
(if (<= A 2.8e-282)
t_0
(if (<= A 1.35e-130) t_1 (* 180.0 (/ (atan (/ (- A) B)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double t_1 = 180.0 * (atan(1.0) / ((double) M_PI));
double tmp;
if (A <= -2.5e-77) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -8.2e-175) {
tmp = t_0;
} else if (A <= -1.66e-267) {
tmp = t_1;
} else if (A <= 2.8e-282) {
tmp = t_0;
} else if (A <= 1.35e-130) {
tmp = t_1;
} else {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double t_1 = 180.0 * (Math.atan(1.0) / Math.PI);
double tmp;
if (A <= -2.5e-77) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -8.2e-175) {
tmp = t_0;
} else if (A <= -1.66e-267) {
tmp = t_1;
} else if (A <= 2.8e-282) {
tmp = t_0;
} else if (A <= 1.35e-130) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) t_1 = 180.0 * (math.atan(1.0) / math.pi) tmp = 0 if A <= -2.5e-77: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -8.2e-175: tmp = t_0 elif A <= -1.66e-267: tmp = t_1 elif A <= 2.8e-282: tmp = t_0 elif A <= 1.35e-130: tmp = t_1 else: tmp = 180.0 * (math.atan((-A / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) t_1 = Float64(180.0 * Float64(atan(1.0) / pi)) tmp = 0.0 if (A <= -2.5e-77) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -8.2e-175) tmp = t_0; elseif (A <= -1.66e-267) tmp = t_1; elseif (A <= 2.8e-282) tmp = t_0; elseif (A <= 1.35e-130) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); t_1 = 180.0 * (atan(1.0) / pi); tmp = 0.0; if (A <= -2.5e-77) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -8.2e-175) tmp = t_0; elseif (A <= -1.66e-267) tmp = t_1; elseif (A <= 2.8e-282) tmp = t_0; elseif (A <= 1.35e-130) tmp = t_1; else tmp = 180.0 * (atan((-A / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.5e-77], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.2e-175], t$95$0, If[LessEqual[A, -1.66e-267], t$95$1, If[LessEqual[A, 2.8e-282], t$95$0, If[LessEqual[A, 1.35e-130], t$95$1, N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{if}\;A \leq -2.5 \cdot 10^{-77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8.2 \cdot 10^{-175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.66 \cdot 10^{-267}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-282}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.35 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.49999999999999982e-77Initial program 26.6%
associate-*l/26.6%
*-lft-identity26.6%
+-commutative26.6%
unpow226.6%
unpow226.6%
hypot-def54.8%
Simplified54.8%
Taylor expanded in A around -inf 70.3%
if -2.49999999999999982e-77 < A < -8.19999999999999997e-175 or -1.6600000000000001e-267 < A < 2.7999999999999999e-282Initial program 58.0%
associate-*l/58.0%
*-lft-identity58.0%
+-commutative58.0%
unpow258.0%
unpow258.0%
hypot-def81.9%
Simplified81.9%
Taylor expanded in B around inf 45.1%
if -8.19999999999999997e-175 < A < -1.6600000000000001e-267 or 2.7999999999999999e-282 < A < 1.34999999999999996e-130Initial program 70.2%
associate-*l/70.2%
*-lft-identity70.2%
+-commutative70.2%
unpow270.2%
unpow270.2%
hypot-def83.4%
Simplified83.4%
Taylor expanded in B around -inf 45.1%
if 1.34999999999999996e-130 < A Initial program 74.1%
associate-*l/74.2%
*-lft-identity74.2%
+-commutative74.2%
unpow274.2%
unpow274.2%
hypot-def93.7%
Simplified93.7%
Taylor expanded in B around -inf 70.9%
Taylor expanded in A around inf 61.3%
associate-*r/61.3%
mul-1-neg61.3%
Simplified61.3%
Final simplification58.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -7e-185)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5.5e-289)
t_0
(if (<= B 8e-161)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 1.08e-66) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -7e-185) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5.5e-289) {
tmp = t_0;
} else if (B <= 8e-161) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 1.08e-66) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -7e-185) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5.5e-289) {
tmp = t_0;
} else if (B <= 8e-161) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 1.08e-66) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -7e-185: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5.5e-289: tmp = t_0 elif B <= 8e-161: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 1.08e-66: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -7e-185) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5.5e-289) tmp = t_0; elseif (B <= 8e-161) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 1.08e-66) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -7e-185) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5.5e-289) tmp = t_0; elseif (B <= 8e-161) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 1.08e-66) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -7e-185], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.5e-289], t$95$0, If[LessEqual[B, 8e-161], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.08e-66], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -7 \cdot 10^{-185}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{-289}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 8 \cdot 10^{-161}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.08 \cdot 10^{-66}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.9999999999999996e-185Initial program 56.4%
associate-*l/56.4%
*-lft-identity56.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-def74.5%
Simplified74.5%
Taylor expanded in B around -inf 44.4%
if -6.9999999999999996e-185 < B < 5.5000000000000004e-289 or 8.00000000000000022e-161 < B < 1.08000000000000006e-66Initial program 47.2%
associate-*l/47.2%
*-lft-identity47.2%
+-commutative47.2%
unpow247.2%
unpow247.2%
hypot-def76.1%
Simplified76.1%
Taylor expanded in C around inf 42.8%
distribute-rgt1-in42.8%
metadata-eval42.8%
mul0-lft42.8%
metadata-eval42.8%
Simplified42.8%
if 5.5000000000000004e-289 < B < 8.00000000000000022e-161Initial program 72.7%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
unpow272.7%
hypot-def79.0%
Simplified79.0%
Taylor expanded in B around -inf 65.5%
Taylor expanded in C around inf 47.9%
if 1.08000000000000006e-66 < B Initial program 55.0%
associate-*l/55.0%
*-lft-identity55.0%
+-commutative55.0%
unpow255.0%
unpow255.0%
hypot-def81.9%
Simplified81.9%
Taylor expanded in B around inf 61.5%
Final simplification49.2%
(FPCore (A B C)
:precision binary64
(if (<= B -8.2e-197)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.7e-163)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= B 1.04e-66)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.2e-197) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.7e-163) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (B <= 1.04e-66) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.2e-197) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.7e-163) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (B <= 1.04e-66) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.2e-197: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.7e-163: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif B <= 1.04e-66: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.2e-197) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.7e-163) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (B <= 1.04e-66) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.2e-197) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.7e-163) tmp = 180.0 * (atan((-A / B)) / pi); elseif (B <= 1.04e-66) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.2e-197], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.7e-163], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.04e-66], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.2 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.7 \cdot 10^{-163}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.04 \cdot 10^{-66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.2e-197Initial program 54.7%
associate-*l/54.7%
*-lft-identity54.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-def73.3%
Simplified73.3%
Taylor expanded in B around -inf 43.1%
if -8.2e-197 < B < 3.6999999999999999e-163Initial program 68.4%
associate-*l/68.4%
*-lft-identity68.4%
+-commutative68.4%
unpow268.4%
unpow268.4%
hypot-def85.0%
Simplified85.0%
Taylor expanded in B around -inf 55.6%
Taylor expanded in A around inf 47.3%
associate-*r/47.3%
mul-1-neg47.3%
Simplified47.3%
if 3.6999999999999999e-163 < B < 1.04e-66Initial program 21.7%
associate-*l/21.7%
*-lft-identity21.7%
+-commutative21.7%
unpow221.7%
unpow221.7%
hypot-def57.3%
Simplified57.3%
Taylor expanded in C around inf 39.6%
distribute-rgt1-in39.6%
metadata-eval39.6%
mul0-lft39.6%
metadata-eval39.6%
Simplified39.6%
if 1.04e-66 < B Initial program 55.0%
associate-*l/55.0%
*-lft-identity55.0%
+-commutative55.0%
unpow255.0%
unpow255.0%
hypot-def81.9%
Simplified81.9%
Taylor expanded in B around inf 61.5%
Final simplification49.1%
(FPCore (A B C)
:precision binary64
(if (<= B -4.1e-190)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.04e-66)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.1e-190) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.04e-66) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.1e-190) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.04e-66) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.1e-190: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.04e-66: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.1e-190) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.04e-66) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.1e-190) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.04e-66) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.1e-190], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.04e-66], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.1 \cdot 10^{-190}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.04 \cdot 10^{-66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.1000000000000002e-190Initial program 56.4%
associate-*l/56.4%
*-lft-identity56.4%
+-commutative56.4%
unpow256.4%
unpow256.4%
hypot-def74.5%
Simplified74.5%
Taylor expanded in B around -inf 44.4%
if -4.1000000000000002e-190 < B < 1.04e-66Initial program 55.5%
associate-*l/55.5%
*-lft-identity55.5%
+-commutative55.5%
unpow255.5%
unpow255.5%
hypot-def77.1%
Simplified77.1%
Taylor expanded in C around inf 34.2%
distribute-rgt1-in34.2%
metadata-eval34.2%
mul0-lft34.2%
metadata-eval34.2%
Simplified34.2%
if 1.04e-66 < B Initial program 55.0%
associate-*l/55.0%
*-lft-identity55.0%
+-commutative55.0%
unpow255.0%
unpow255.0%
hypot-def81.9%
Simplified81.9%
Taylor expanded in B around inf 61.5%
Final simplification45.4%
(FPCore (A B C) :precision binary64 (if (<= B -5.5e-305) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.5e-305) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.5e-305) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.5e-305: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.5e-305) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.5e-305) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.5e-305], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.5 \cdot 10^{-305}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.5e-305Initial program 57.4%
associate-*l/57.4%
*-lft-identity57.4%
+-commutative57.4%
unpow257.4%
unpow257.4%
hypot-def76.4%
Simplified76.4%
Taylor expanded in B around -inf 35.4%
if -5.5e-305 < B Initial program 54.1%
associate-*l/54.1%
*-lft-identity54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-def78.5%
Simplified78.5%
Taylor expanded in B around inf 37.5%
Final simplification36.5%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 55.7%
associate-*l/55.7%
*-lft-identity55.7%
+-commutative55.7%
unpow255.7%
unpow255.7%
hypot-def77.5%
Simplified77.5%
Taylor expanded in B around inf 20.5%
Final simplification20.5%
herbie shell --seed 2023256
(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)))