
(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 19 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 -6.2e+83) (* 180.0 (/ (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))) PI)) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e+83) {
tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e+83) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.2e+83: tmp = 180.0 * (math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / math.pi) else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.2e+83) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A))))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.2e+83) tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / pi); else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.2e+83], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.2 \cdot 10^{+83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.19999999999999984e83Initial program 18.1%
associate-*l/18.1%
*-lft-identity18.1%
+-commutative18.1%
unpow218.1%
unpow218.1%
hypot-def49.8%
Simplified49.8%
Taylor expanded in A around -inf 77.4%
distribute-lft-out77.4%
*-commutative77.4%
unpow277.4%
times-frac81.8%
Simplified81.8%
if -6.19999999999999984e83 < A Initial program 61.0%
associate-*l/61.0%
*-lft-identity61.0%
+-commutative61.0%
unpow261.0%
unpow261.0%
hypot-def84.7%
Simplified84.7%
Final simplification84.2%
(FPCore (A B C)
:precision binary64
(if (<= A -3.8e+80)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))) PI))
(if (<= A 6.8e-155)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (/ (- C (+ A (hypot A B))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+80) {
tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / ((double) M_PI));
} else if (A <= 6.8e-155) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(A, B))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.8e+80) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / Math.PI);
} else if (A <= 6.8e-155) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(A, B))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.8e+80: tmp = 180.0 * (math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / math.pi) elif A <= 6.8e-155: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(A, B))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.8e+80) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A))))) / pi)); elseif (A <= 6.8e-155) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(A, B))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.8e+80) tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / pi); elseif (A <= 6.8e-155) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan(((C - (A + hypot(A, B))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.8e+80], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.8e-155], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.8 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.8 \cdot 10^{-155}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A, B\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -3.79999999999999997e80Initial program 22.0%
associate-*l/22.0%
*-lft-identity22.0%
+-commutative22.0%
unpow222.0%
unpow222.0%
hypot-def51.8%
Simplified51.8%
Taylor expanded in A around -inf 76.6%
distribute-lft-out76.6%
*-commutative76.6%
unpow276.6%
times-frac80.8%
Simplified80.8%
if -3.79999999999999997e80 < A < 6.8e-155Initial program 47.2%
associate-*r/47.2%
associate-*l/47.2%
associate-*l/47.2%
*-lft-identity47.2%
sub-neg47.2%
associate-+l-46.0%
sub-neg46.0%
remove-double-neg46.0%
+-commutative46.0%
unpow246.0%
unpow246.0%
hypot-def74.9%
Simplified74.9%
Taylor expanded in A around 0 46.9%
unpow246.9%
unpow246.9%
hypot-def75.9%
Simplified75.9%
if 6.8e-155 < A Initial program 75.4%
associate-*r/75.4%
associate-*l/75.4%
associate-*l/75.4%
*-lft-identity75.4%
sub-neg75.4%
associate-+l-75.4%
sub-neg75.4%
remove-double-neg75.4%
+-commutative75.4%
unpow275.4%
unpow275.4%
hypot-def94.3%
Simplified94.3%
Taylor expanded in C around 0 73.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-def90.3%
Simplified90.3%
Final simplification82.4%
(FPCore (A B C)
:precision binary64
(if (<= A -3.75e+80)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))) PI))
(if (<= A 6.5e-87)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* 180.0 (/ (atan (/ (- (- A) (hypot A B)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.75e+80) {
tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / ((double) M_PI));
} else if (A <= 6.5e-87) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} 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 <= -3.75e+80) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / Math.PI);
} else if (A <= 6.5e-87) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} 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 <= -3.75e+80: tmp = 180.0 * (math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / math.pi) elif A <= 6.5e-87: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) 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 <= -3.75e+80) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A))))) / pi)); elseif (A <= 6.5e-87) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); 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 <= -3.75e+80) tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / pi); elseif (A <= 6.5e-87) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.75e+80], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-87], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $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 -3.75 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-87}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\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 < -3.74999999999999997e80Initial program 22.0%
associate-*l/22.0%
*-lft-identity22.0%
+-commutative22.0%
unpow222.0%
unpow222.0%
hypot-def51.8%
Simplified51.8%
Taylor expanded in A around -inf 76.6%
distribute-lft-out76.6%
*-commutative76.6%
unpow276.6%
times-frac80.8%
Simplified80.8%
if -3.74999999999999997e80 < A < 6.5000000000000003e-87Initial program 51.1%
associate-*r/51.1%
associate-*l/51.1%
associate-*l/51.1%
*-lft-identity51.1%
sub-neg51.1%
associate-+l-50.1%
sub-neg50.1%
remove-double-neg50.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-def77.0%
Simplified77.0%
Taylor expanded in A around 0 49.6%
unpow249.6%
unpow249.6%
hypot-def76.7%
Simplified76.7%
if 6.5000000000000003e-87 < A Initial program 74.4%
associate-*l/74.4%
*-lft-identity74.4%
+-commutative74.4%
unpow274.4%
unpow274.4%
hypot-def94.4%
Simplified94.4%
Taylor expanded in C around 0 73.2%
mul-1-neg73.2%
+-commutative73.2%
unpow273.2%
unpow273.2%
hypot-def90.0%
Simplified90.0%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(if (<= A -2.25e+80)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))) PI))
(if (<= A 1.8e-89)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(/ (* 180.0 (atan (/ (- (- A) (hypot A B)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.25e+80) {
tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / ((double) M_PI));
} else if (A <= 1.8e-89) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} 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 <= -2.25e+80) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / Math.PI);
} else if (A <= 1.8e-89) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} 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 <= -2.25e+80: tmp = 180.0 * (math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / math.pi) elif A <= 1.8e-89: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) 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 <= -2.25e+80) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A))))) / pi)); elseif (A <= 1.8e-89) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 * 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 <= -2.25e+80) tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / pi); elseif (A <= 1.8e-89) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 * atan(((-A - hypot(A, B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.25e+80], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.8e-89], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.25 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{-89}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.25000000000000003e80Initial program 22.0%
associate-*l/22.0%
*-lft-identity22.0%
+-commutative22.0%
unpow222.0%
unpow222.0%
hypot-def51.8%
Simplified51.8%
Taylor expanded in A around -inf 76.6%
distribute-lft-out76.6%
*-commutative76.6%
unpow276.6%
times-frac80.8%
Simplified80.8%
if -2.25000000000000003e80 < A < 1.80000000000000003e-89Initial program 51.1%
associate-*r/51.1%
associate-*l/51.1%
associate-*l/51.1%
*-lft-identity51.1%
sub-neg51.1%
associate-+l-50.1%
sub-neg50.1%
remove-double-neg50.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-def77.0%
Simplified77.0%
Taylor expanded in A around 0 49.6%
unpow249.6%
unpow249.6%
hypot-def76.7%
Simplified76.7%
if 1.80000000000000003e-89 < A Initial program 74.4%
associate-*r/74.4%
unpow274.4%
Simplified74.4%
Taylor expanded in C around 0 73.1%
+-commutative73.1%
unpow273.1%
unpow273.1%
hypot-def90.8%
Simplified90.8%
Taylor expanded in C around 0 73.2%
associate-*r/73.2%
mul-1-neg73.2%
+-commutative73.2%
+-commutative73.2%
unpow273.2%
unpow273.2%
hypot-def90.0%
+-commutative90.0%
distribute-neg-in90.0%
sub-neg90.0%
Simplified90.0%
Final simplification81.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.1e+80)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))) PI))
(if (<= A 310000000000.0)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e+80) {
tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / ((double) M_PI));
} else if (A <= 310000000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.1e+80) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / Math.PI);
} else if (A <= 310000000000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.1e+80: tmp = 180.0 * (math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / math.pi) elif A <= 310000000000.0: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.1e+80) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A))))) / pi)); elseif (A <= 310000000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.1e+80) tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / pi); elseif (A <= 310000000000.0) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.1e+80], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 310000000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.1 \cdot 10^{+80}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)}{\pi}\\
\mathbf{elif}\;A \leq 310000000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.09999999999999988e80Initial program 22.0%
associate-*l/22.0%
*-lft-identity22.0%
+-commutative22.0%
unpow222.0%
unpow222.0%
hypot-def51.8%
Simplified51.8%
Taylor expanded in A around -inf 76.6%
distribute-lft-out76.6%
*-commutative76.6%
unpow276.6%
times-frac80.8%
Simplified80.8%
if -3.09999999999999988e80 < A < 3.1e11Initial program 51.7%
associate-*r/51.7%
associate-*l/51.7%
associate-*l/51.7%
*-lft-identity51.7%
sub-neg51.7%
associate-+l-50.8%
sub-neg50.8%
remove-double-neg50.8%
+-commutative50.8%
unpow250.8%
unpow250.8%
hypot-def78.5%
Simplified78.5%
Taylor expanded in A around 0 49.0%
unpow249.0%
unpow249.0%
hypot-def76.8%
Simplified76.8%
if 3.1e11 < A Initial program 79.1%
associate-*r/79.1%
unpow279.1%
Simplified79.1%
Taylor expanded in C around 0 77.7%
+-commutative77.7%
unpow277.7%
unpow277.7%
hypot-def91.4%
Simplified91.4%
Taylor expanded in C around 0 77.7%
mul-1-neg77.7%
+-commutative77.7%
+-commutative77.7%
unpow277.7%
unpow277.7%
hypot-def91.6%
+-commutative91.6%
distribute-neg-in91.6%
sub-neg91.6%
Simplified91.6%
Taylor expanded in B around inf 84.1%
Final simplification79.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C (- A B)) B))))
(t_1 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= A -3.4)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -5.7e-185)
t_0
(if (<= A -8e-230)
t_1
(if (<= A 1.4e-287)
t_0
(if (<= A 3e-209)
(* 180.0 (/ (atan (/ -0.5 (/ C B))) PI))
(if (<= A 3.8e-174)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= A 2.15e-156)
t_1
(* (/ 180.0 PI) (atan (/ (- C (+ A B)) B))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
double t_1 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (A <= -3.4) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -5.7e-185) {
tmp = t_0;
} else if (A <= -8e-230) {
tmp = t_1;
} else if (A <= 1.4e-287) {
tmp = t_0;
} else if (A <= 3e-209) {
tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
} else if (A <= 3.8e-174) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (A <= 2.15e-156) {
tmp = t_1;
} 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 t_0 = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
double t_1 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (A <= -3.4) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -5.7e-185) {
tmp = t_0;
} else if (A <= -8e-230) {
tmp = t_1;
} else if (A <= 1.4e-287) {
tmp = t_0;
} else if (A <= 3e-209) {
tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
} else if (A <= 3.8e-174) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (A <= 2.15e-156) {
tmp = t_1;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + B)) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C - (A - B)) / B)) t_1 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if A <= -3.4: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -5.7e-185: tmp = t_0 elif A <= -8e-230: tmp = t_1 elif A <= 1.4e-287: tmp = t_0 elif A <= 3e-209: tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi) elif A <= 3.8e-174: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif A <= 2.15e-156: tmp = t_1 else: tmp = (180.0 / math.pi) * math.atan(((C - (A + B)) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B))) t_1 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (A <= -3.4) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -5.7e-185) tmp = t_0; elseif (A <= -8e-230) tmp = t_1; elseif (A <= 1.4e-287) tmp = t_0; elseif (A <= 3e-209) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi)); elseif (A <= 3.8e-174) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (A <= 2.15e-156) tmp = t_1; 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) t_0 = (180.0 / pi) * atan(((C - (A - B)) / B)); t_1 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (A <= -3.4) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -5.7e-185) tmp = t_0; elseif (A <= -8e-230) tmp = t_1; elseif (A <= 1.4e-287) tmp = t_0; elseif (A <= 3e-209) tmp = 180.0 * (atan((-0.5 / (C / B))) / pi); elseif (A <= 3.8e-174) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (A <= 2.15e-156) tmp = t_1; else tmp = (180.0 / pi) * atan(((C - (A + B)) / 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 - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.4], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -5.7e-185], t$95$0, If[LessEqual[A, -8e-230], t$95$1, If[LessEqual[A, 1.4e-287], t$95$0, If[LessEqual[A, 3e-209], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-174], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.15e-156], t$95$1, 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}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;A \leq -3.4:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5.7 \cdot 10^{-185}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -8 \cdot 10^{-230}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.4 \cdot 10^{-287}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-209}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-174}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.15 \cdot 10^{-156}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\
\end{array}
\end{array}
if A < -3.39999999999999991Initial program 28.2%
associate-*r/28.3%
unpow228.3%
Simplified28.3%
Taylor expanded in C around 0 26.6%
+-commutative26.6%
unpow226.6%
unpow226.6%
hypot-def51.5%
Simplified51.5%
Taylor expanded in C around 0 25.4%
mul-1-neg25.4%
+-commutative25.4%
+-commutative25.4%
unpow225.4%
unpow225.4%
hypot-def47.6%
+-commutative47.6%
distribute-neg-in47.6%
sub-neg47.6%
Simplified47.6%
Taylor expanded in A around -inf 71.2%
if -3.39999999999999991 < A < -5.69999999999999986e-185 or -8.00000000000000037e-230 < A < 1.4000000000000001e-287Initial program 54.3%
associate-*r/54.2%
associate-*l/54.3%
associate-*l/54.3%
*-lft-identity54.3%
sub-neg54.3%
associate-+l-54.1%
sub-neg54.1%
remove-double-neg54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-def86.9%
Simplified86.9%
Taylor expanded in B around -inf 60.5%
neg-mul-160.5%
unsub-neg60.5%
Simplified60.5%
if -5.69999999999999986e-185 < A < -8.00000000000000037e-230 or 3.80000000000000021e-174 < A < 2.14999999999999989e-156Initial program 18.8%
associate-*l/18.8%
*-lft-identity18.8%
+-commutative18.8%
unpow218.8%
unpow218.8%
hypot-def31.2%
Simplified31.2%
Taylor expanded in C around inf 39.4%
fma-def39.4%
associate--l+39.4%
unpow239.4%
fma-def39.4%
unpow239.4%
unpow239.4%
difference-of-squares39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
mul-1-neg39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
metadata-eval39.4%
Simplified39.4%
Taylor expanded in B around 0 70.8%
if 1.4000000000000001e-287 < A < 2.9999999999999999e-209Initial program 32.6%
associate-*l/32.6%
*-lft-identity32.6%
+-commutative32.6%
unpow232.6%
unpow232.6%
hypot-def73.8%
Simplified73.8%
Taylor expanded in C around inf 49.3%
fma-def49.3%
associate--l+49.3%
unpow249.3%
fma-def49.3%
unpow249.3%
unpow249.3%
difference-of-squares49.3%
distribute-rgt1-in49.3%
metadata-eval49.3%
mul0-lft49.3%
mul-1-neg49.3%
distribute-rgt1-in49.3%
metadata-eval49.3%
mul0-lft49.3%
metadata-eval49.3%
Simplified49.3%
Taylor expanded in B around 0 58.1%
associate-*r/58.1%
associate-/l*58.2%
Simplified58.2%
if 2.9999999999999999e-209 < A < 3.80000000000000021e-174Initial program 57.1%
associate-*r/57.1%
unpow257.1%
Simplified57.1%
Taylor expanded in C around 0 52.3%
+-commutative52.3%
unpow252.3%
unpow252.3%
hypot-def82.9%
Simplified82.9%
Taylor expanded in A around 0 70.6%
if 2.14999999999999989e-156 < A Initial program 75.4%
associate-*r/75.4%
associate-*l/75.4%
associate-*l/75.4%
*-lft-identity75.4%
sub-neg75.4%
associate-+l-75.4%
sub-neg75.4%
remove-double-neg75.4%
+-commutative75.4%
unpow275.4%
unpow275.4%
hypot-def94.3%
Simplified94.3%
Taylor expanded in B around inf 80.7%
Final simplification71.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C (- A B)) B))))
(t_1 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= A -110.0)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -5.5e-185)
t_0
(if (<= A -1.25e-224)
t_1
(if (<= A 5.8e-288)
t_0
(if (<= A 9.5e-212)
(* 180.0 (/ (atan (/ -0.5 (/ C B))) PI))
(if (<= A 2e-172)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= A 2.3e-156)
t_1
(/ (* 180.0 (atan (+ -1.0 (/ (- C A) B)))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
double t_1 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (A <= -110.0) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -5.5e-185) {
tmp = t_0;
} else if (A <= -1.25e-224) {
tmp = t_1;
} else if (A <= 5.8e-288) {
tmp = t_0;
} else if (A <= 9.5e-212) {
tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
} else if (A <= 2e-172) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (A <= 2.3e-156) {
tmp = t_1;
} else {
tmp = (180.0 * atan((-1.0 + ((C - A) / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
double t_1 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (A <= -110.0) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -5.5e-185) {
tmp = t_0;
} else if (A <= -1.25e-224) {
tmp = t_1;
} else if (A <= 5.8e-288) {
tmp = t_0;
} else if (A <= 9.5e-212) {
tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
} else if (A <= 2e-172) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (A <= 2.3e-156) {
tmp = t_1;
} else {
tmp = (180.0 * Math.atan((-1.0 + ((C - A) / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C - (A - B)) / B)) t_1 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if A <= -110.0: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -5.5e-185: tmp = t_0 elif A <= -1.25e-224: tmp = t_1 elif A <= 5.8e-288: tmp = t_0 elif A <= 9.5e-212: tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi) elif A <= 2e-172: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif A <= 2.3e-156: tmp = t_1 else: tmp = (180.0 * math.atan((-1.0 + ((C - A) / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B))) t_1 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (A <= -110.0) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -5.5e-185) tmp = t_0; elseif (A <= -1.25e-224) tmp = t_1; elseif (A <= 5.8e-288) tmp = t_0; elseif (A <= 9.5e-212) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi)); elseif (A <= 2e-172) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (A <= 2.3e-156) tmp = t_1; else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(Float64(C - A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C - (A - B)) / B)); t_1 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (A <= -110.0) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -5.5e-185) tmp = t_0; elseif (A <= -1.25e-224) tmp = t_1; elseif (A <= 5.8e-288) tmp = t_0; elseif (A <= 9.5e-212) tmp = 180.0 * (atan((-0.5 / (C / B))) / pi); elseif (A <= 2e-172) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (A <= 2.3e-156) tmp = t_1; else tmp = (180.0 * atan((-1.0 + ((C - A) / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -110.0], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -5.5e-185], t$95$0, If[LessEqual[A, -1.25e-224], t$95$1, If[LessEqual[A, 5.8e-288], t$95$0, If[LessEqual[A, 9.5e-212], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e-172], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.3e-156], t$95$1, N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;A \leq -110:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5.5 \cdot 10^{-185}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.25 \cdot 10^{-224}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 5.8 \cdot 10^{-288}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 9.5 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-172}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{-156}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -110Initial program 28.2%
associate-*r/28.3%
unpow228.3%
Simplified28.3%
Taylor expanded in C around 0 26.6%
+-commutative26.6%
unpow226.6%
unpow226.6%
hypot-def51.5%
Simplified51.5%
Taylor expanded in C around 0 25.4%
mul-1-neg25.4%
+-commutative25.4%
+-commutative25.4%
unpow225.4%
unpow225.4%
hypot-def47.6%
+-commutative47.6%
distribute-neg-in47.6%
sub-neg47.6%
Simplified47.6%
Taylor expanded in A around -inf 71.2%
if -110 < A < -5.4999999999999998e-185 or -1.25e-224 < A < 5.8000000000000003e-288Initial program 54.3%
associate-*r/54.2%
associate-*l/54.3%
associate-*l/54.3%
*-lft-identity54.3%
sub-neg54.3%
associate-+l-54.1%
sub-neg54.1%
remove-double-neg54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-def86.9%
Simplified86.9%
Taylor expanded in B around -inf 60.5%
neg-mul-160.5%
unsub-neg60.5%
Simplified60.5%
if -5.4999999999999998e-185 < A < -1.25e-224 or 2.0000000000000001e-172 < A < 2.3e-156Initial program 18.8%
associate-*l/18.8%
*-lft-identity18.8%
+-commutative18.8%
unpow218.8%
unpow218.8%
hypot-def31.2%
Simplified31.2%
Taylor expanded in C around inf 39.4%
fma-def39.4%
associate--l+39.4%
unpow239.4%
fma-def39.4%
unpow239.4%
unpow239.4%
difference-of-squares39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
mul-1-neg39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
metadata-eval39.4%
Simplified39.4%
Taylor expanded in B around 0 70.8%
if 5.8000000000000003e-288 < A < 9.50000000000000029e-212Initial program 32.6%
associate-*l/32.6%
*-lft-identity32.6%
+-commutative32.6%
unpow232.6%
unpow232.6%
hypot-def73.8%
Simplified73.8%
Taylor expanded in C around inf 49.3%
fma-def49.3%
associate--l+49.3%
unpow249.3%
fma-def49.3%
unpow249.3%
unpow249.3%
difference-of-squares49.3%
distribute-rgt1-in49.3%
metadata-eval49.3%
mul0-lft49.3%
mul-1-neg49.3%
distribute-rgt1-in49.3%
metadata-eval49.3%
mul0-lft49.3%
metadata-eval49.3%
Simplified49.3%
Taylor expanded in B around 0 58.1%
associate-*r/58.1%
associate-/l*58.2%
Simplified58.2%
if 9.50000000000000029e-212 < A < 2.0000000000000001e-172Initial program 57.1%
associate-*r/57.1%
unpow257.1%
Simplified57.1%
Taylor expanded in C around 0 52.3%
+-commutative52.3%
unpow252.3%
unpow252.3%
hypot-def82.9%
Simplified82.9%
Taylor expanded in A around 0 70.6%
if 2.3e-156 < A Initial program 75.4%
associate-*r/75.4%
unpow275.4%
Simplified75.4%
Taylor expanded in C around 0 73.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-def90.3%
Simplified90.3%
Taylor expanded in B around inf 78.6%
+-commutative78.6%
associate--r+78.6%
sub-neg78.6%
mul-1-neg78.6%
sub-neg78.6%
metadata-eval78.6%
+-commutative78.6%
mul-1-neg78.6%
sub-neg78.6%
div-sub80.7%
Simplified80.7%
Final simplification71.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))
(t_1 (* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))))
(if (<= A -0.155)
(* 180.0 (/ (atan (* 0.5 (+ (/ B A) (* (/ B A) (/ C A))))) PI))
(if (<= A -3.4e-182)
t_1
(if (<= A -9.5e-230)
t_0
(if (<= A 1.5e-287)
t_1
(if (<= A 9.1e-212)
(* 180.0 (/ (atan (/ -0.5 (/ C B))) PI))
(if (<= A 6e-174)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= A 1.05e-156)
t_0
(/ (* 180.0 (atan (+ -1.0 (/ (- C A) B)))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double t_1 = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
double tmp;
if (A <= -0.155) {
tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / ((double) M_PI));
} else if (A <= -3.4e-182) {
tmp = t_1;
} else if (A <= -9.5e-230) {
tmp = t_0;
} else if (A <= 1.5e-287) {
tmp = t_1;
} else if (A <= 9.1e-212) {
tmp = 180.0 * (atan((-0.5 / (C / B))) / ((double) M_PI));
} else if (A <= 6e-174) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (A <= 1.05e-156) {
tmp = t_0;
} else {
tmp = (180.0 * atan((-1.0 + ((C - A) / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double t_1 = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
double tmp;
if (A <= -0.155) {
tmp = 180.0 * (Math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / Math.PI);
} else if (A <= -3.4e-182) {
tmp = t_1;
} else if (A <= -9.5e-230) {
tmp = t_0;
} else if (A <= 1.5e-287) {
tmp = t_1;
} else if (A <= 9.1e-212) {
tmp = 180.0 * (Math.atan((-0.5 / (C / B))) / Math.PI);
} else if (A <= 6e-174) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (A <= 1.05e-156) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((-1.0 + ((C - A) / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) t_1 = (180.0 / math.pi) * math.atan(((C - (A - B)) / B)) tmp = 0 if A <= -0.155: tmp = 180.0 * (math.atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / math.pi) elif A <= -3.4e-182: tmp = t_1 elif A <= -9.5e-230: tmp = t_0 elif A <= 1.5e-287: tmp = t_1 elif A <= 9.1e-212: tmp = 180.0 * (math.atan((-0.5 / (C / B))) / math.pi) elif A <= 6e-174: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif A <= 1.05e-156: tmp = t_0 else: tmp = (180.0 * math.atan((-1.0 + ((C - A) / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B))) tmp = 0.0 if (A <= -0.155) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(Float64(B / A) + Float64(Float64(B / A) * Float64(C / A))))) / pi)); elseif (A <= -3.4e-182) tmp = t_1; elseif (A <= -9.5e-230) tmp = t_0; elseif (A <= 1.5e-287) tmp = t_1; elseif (A <= 9.1e-212) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 / Float64(C / B))) / pi)); elseif (A <= 6e-174) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (A <= 1.05e-156) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 + Float64(Float64(C - A) / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi); t_1 = (180.0 / pi) * atan(((C - (A - B)) / B)); tmp = 0.0; if (A <= -0.155) tmp = 180.0 * (atan((0.5 * ((B / A) + ((B / A) * (C / A))))) / pi); elseif (A <= -3.4e-182) tmp = t_1; elseif (A <= -9.5e-230) tmp = t_0; elseif (A <= 1.5e-287) tmp = t_1; elseif (A <= 9.1e-212) tmp = 180.0 * (atan((-0.5 / (C / B))) / pi); elseif (A <= 6e-174) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (A <= 1.05e-156) tmp = t_0; else tmp = (180.0 * atan((-1.0 + ((C - A) / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -0.155], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(N[(B / A), $MachinePrecision] * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.4e-182], t$95$1, If[LessEqual[A, -9.5e-230], t$95$0, If[LessEqual[A, 1.5e-287], t$95$1, If[LessEqual[A, 9.1e-212], N[(180.0 * N[(N[ArcTan[N[(-0.5 / N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6e-174], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.05e-156], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
\mathbf{if}\;A \leq -0.155:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{A} \cdot \frac{C}{A}\right)\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.4 \cdot 10^{-182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -9.5 \cdot 10^{-230}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{-287}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 9.1 \cdot 10^{-212}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5}{\frac{C}{B}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6 \cdot 10^{-174}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.05 \cdot 10^{-156}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -0.154999999999999999Initial program 28.2%
associate-*l/28.2%
*-lft-identity28.2%
+-commutative28.2%
unpow228.2%
unpow228.2%
hypot-def54.9%
Simplified54.9%
Taylor expanded in A around -inf 68.3%
distribute-lft-out68.3%
*-commutative68.3%
unpow268.3%
times-frac71.4%
Simplified71.4%
if -0.154999999999999999 < A < -3.39999999999999989e-182 or -9.5000000000000004e-230 < A < 1.49999999999999996e-287Initial program 54.3%
associate-*r/54.2%
associate-*l/54.3%
associate-*l/54.3%
*-lft-identity54.3%
sub-neg54.3%
associate-+l-54.1%
sub-neg54.1%
remove-double-neg54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-def86.9%
Simplified86.9%
Taylor expanded in B around -inf 60.5%
neg-mul-160.5%
unsub-neg60.5%
Simplified60.5%
if -3.39999999999999989e-182 < A < -9.5000000000000004e-230 or 6.00000000000000042e-174 < A < 1.05000000000000006e-156Initial program 18.8%
associate-*l/18.8%
*-lft-identity18.8%
+-commutative18.8%
unpow218.8%
unpow218.8%
hypot-def31.2%
Simplified31.2%
Taylor expanded in C around inf 39.4%
fma-def39.4%
associate--l+39.4%
unpow239.4%
fma-def39.4%
unpow239.4%
unpow239.4%
difference-of-squares39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
mul-1-neg39.4%
distribute-rgt1-in39.4%
metadata-eval39.4%
mul0-lft39.4%
metadata-eval39.4%
Simplified39.4%
Taylor expanded in B around 0 70.8%
if 1.49999999999999996e-287 < A < 9.1e-212Initial program 32.6%
associate-*l/32.6%
*-lft-identity32.6%
+-commutative32.6%
unpow232.6%
unpow232.6%
hypot-def73.8%
Simplified73.8%
Taylor expanded in C around inf 49.3%
fma-def49.3%
associate--l+49.3%
unpow249.3%
fma-def49.3%
unpow249.3%
unpow249.3%
difference-of-squares49.3%
distribute-rgt1-in49.3%
metadata-eval49.3%
mul0-lft49.3%
mul-1-neg49.3%
distribute-rgt1-in49.3%
metadata-eval49.3%
mul0-lft49.3%
metadata-eval49.3%
Simplified49.3%
Taylor expanded in B around 0 58.1%
associate-*r/58.1%
associate-/l*58.2%
Simplified58.2%
if 9.1e-212 < A < 6.00000000000000042e-174Initial program 57.1%
associate-*r/57.1%
unpow257.1%
Simplified57.1%
Taylor expanded in C around 0 52.3%
+-commutative52.3%
unpow252.3%
unpow252.3%
hypot-def82.9%
Simplified82.9%
Taylor expanded in A around 0 70.6%
if 1.05000000000000006e-156 < A Initial program 75.4%
associate-*r/75.4%
unpow275.4%
Simplified75.4%
Taylor expanded in C around 0 73.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-def90.3%
Simplified90.3%
Taylor expanded in B around inf 78.6%
+-commutative78.6%
associate--r+78.6%
sub-neg78.6%
mul-1-neg78.6%
sub-neg78.6%
metadata-eval78.6%
+-commutative78.6%
mul-1-neg78.6%
sub-neg78.6%
div-sub80.7%
Simplified80.7%
Final simplification71.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ C B)))))
(if (<= C -1.05e+28)
t_0
(if (<= C -1.32e-56)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= C -4.9e-164)
t_0
(if (<= C 2.45e-247)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((C / B));
double tmp;
if (C <= -1.05e+28) {
tmp = t_0;
} else if (C <= -1.32e-56) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (C <= -4.9e-164) {
tmp = t_0;
} else if (C <= 2.45e-247) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((C / B));
double tmp;
if (C <= -1.05e+28) {
tmp = t_0;
} else if (C <= -1.32e-56) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (C <= -4.9e-164) {
tmp = t_0;
} else if (C <= 2.45e-247) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((C / B)) tmp = 0 if C <= -1.05e+28: tmp = t_0 elif C <= -1.32e-56: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif C <= -4.9e-164: tmp = t_0 elif C <= 2.45e-247: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(C / B))) tmp = 0.0 if (C <= -1.05e+28) tmp = t_0; elseif (C <= -1.32e-56) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (C <= -4.9e-164) tmp = t_0; elseif (C <= 2.45e-247) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((C / B)); tmp = 0.0; if (C <= -1.05e+28) tmp = t_0; elseif (C <= -1.32e-56) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (C <= -4.9e-164) tmp = t_0; elseif (C <= 2.45e-247) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.05e+28], t$95$0, If[LessEqual[C, -1.32e-56], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.9e-164], t$95$0, If[LessEqual[C, 2.45e-247], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;C \leq -1.05 \cdot 10^{+28}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq -1.32 \cdot 10^{-56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq -4.9 \cdot 10^{-164}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 2.45 \cdot 10^{-247}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.04999999999999995e28 or -1.3199999999999999e-56 < C < -4.8999999999999996e-164Initial program 80.5%
associate-*r/80.4%
associate-*l/80.5%
associate-*l/80.5%
*-lft-identity80.5%
sub-neg80.5%
associate-+l-80.3%
sub-neg80.3%
remove-double-neg80.3%
+-commutative80.3%
unpow280.3%
unpow280.3%
hypot-def88.8%
Simplified88.8%
Taylor expanded in A around inf 63.8%
*-commutative63.8%
Simplified63.8%
Taylor expanded in C around inf 61.6%
if -1.04999999999999995e28 < C < -1.3199999999999999e-56Initial program 45.9%
associate-*l/45.9%
*-lft-identity45.9%
+-commutative45.9%
unpow245.9%
unpow245.9%
hypot-def62.6%
Simplified62.6%
Taylor expanded in A around -inf 56.7%
if -4.8999999999999996e-164 < C < 2.45e-247Initial program 67.0%
associate-*l/67.0%
*-lft-identity67.0%
+-commutative67.0%
unpow267.0%
unpow267.0%
hypot-def93.7%
Simplified93.7%
Taylor expanded in B around -inf 39.7%
if 2.45e-247 < C Initial program 34.6%
associate-*l/34.6%
*-lft-identity34.6%
+-commutative34.6%
unpow234.6%
unpow234.6%
hypot-def67.8%
Simplified67.8%
Taylor expanded in C around inf 27.7%
fma-def27.7%
associate--l+34.1%
unpow234.1%
fma-def34.1%
unpow234.1%
unpow234.1%
difference-of-squares46.9%
distribute-rgt1-in46.9%
metadata-eval46.9%
mul0-lft46.9%
mul-1-neg46.9%
distribute-rgt1-in46.9%
metadata-eval46.9%
mul0-lft46.9%
metadata-eval46.9%
Simplified46.9%
Taylor expanded in B around 0 52.6%
Final simplification53.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* C 2.0) B)) PI))))
(if (<= C -7e+29)
t_0
(if (<= C -1.46e-56)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= C -3.8e-164)
t_0
(if (<= C 2.9e-246)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
double tmp;
if (C <= -7e+29) {
tmp = t_0;
} else if (C <= -1.46e-56) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (C <= -3.8e-164) {
tmp = t_0;
} else if (C <= 2.9e-246) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
double tmp;
if (C <= -7e+29) {
tmp = t_0;
} else if (C <= -1.46e-56) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (C <= -3.8e-164) {
tmp = t_0;
} else if (C <= 2.9e-246) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) tmp = 0 if C <= -7e+29: tmp = t_0 elif C <= -1.46e-56: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif C <= -3.8e-164: tmp = t_0 elif C <= 2.9e-246: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)) tmp = 0.0 if (C <= -7e+29) tmp = t_0; elseif (C <= -1.46e-56) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (C <= -3.8e-164) tmp = t_0; elseif (C <= 2.9e-246) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C * 2.0) / B)) / pi); tmp = 0.0; if (C <= -7e+29) tmp = t_0; elseif (C <= -1.46e-56) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (C <= -3.8e-164) tmp = t_0; elseif (C <= 2.9e-246) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -7e+29], t$95$0, If[LessEqual[C, -1.46e-56], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.8e-164], t$95$0, If[LessEqual[C, 2.9e-246], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -7 \cdot 10^{+29}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq -1.46 \cdot 10^{-56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;C \leq -3.8 \cdot 10^{-164}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 2.9 \cdot 10^{-246}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -6.99999999999999958e29 or -1.46000000000000004e-56 < C < -3.79999999999999989e-164Initial program 80.5%
associate-*l/80.5%
*-lft-identity80.5%
+-commutative80.5%
unpow280.5%
unpow280.5%
hypot-def92.6%
Simplified92.6%
Taylor expanded in C around -inf 62.7%
if -6.99999999999999958e29 < C < -1.46000000000000004e-56Initial program 45.9%
associate-*l/45.9%
*-lft-identity45.9%
+-commutative45.9%
unpow245.9%
unpow245.9%
hypot-def62.6%
Simplified62.6%
Taylor expanded in A around -inf 56.7%
if -3.79999999999999989e-164 < C < 2.9e-246Initial program 67.0%
associate-*l/67.0%
*-lft-identity67.0%
+-commutative67.0%
unpow267.0%
unpow267.0%
hypot-def93.7%
Simplified93.7%
Taylor expanded in B around -inf 39.7%
if 2.9e-246 < C Initial program 34.6%
associate-*l/34.6%
*-lft-identity34.6%
+-commutative34.6%
unpow234.6%
unpow234.6%
hypot-def67.8%
Simplified67.8%
Taylor expanded in C around inf 27.7%
fma-def27.7%
associate--l+34.1%
unpow234.1%
fma-def34.1%
unpow234.1%
unpow234.1%
difference-of-squares46.9%
distribute-rgt1-in46.9%
metadata-eval46.9%
mul0-lft46.9%
mul-1-neg46.9%
distribute-rgt1-in46.9%
metadata-eval46.9%
mul0-lft46.9%
metadata-eval46.9%
Simplified46.9%
Taylor expanded in B around 0 52.6%
Final simplification54.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI)))
(if (<= A -0.0118)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -8.5e-164)
t_0
(if (<= A 1.65e-249)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 6.6e-20) t_0 (/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
double tmp;
if (A <= -0.0118) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -8.5e-164) {
tmp = t_0;
} else if (A <= 1.65e-249) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 6.6e-20) {
tmp = t_0;
} else {
tmp = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
double tmp;
if (A <= -0.0118) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -8.5e-164) {
tmp = t_0;
} else if (A <= 1.65e-249) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 6.6e-20) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi tmp = 0 if A <= -0.0118: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -8.5e-164: tmp = t_0 elif A <= 1.65e-249: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 6.6e-20: tmp = t_0 else: tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi) tmp = 0.0 if (A <= -0.0118) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -8.5e-164) tmp = t_0; elseif (A <= 1.65e-249) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 6.6e-20) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((C - B) / B))) / pi; tmp = 0.0; if (A <= -0.0118) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -8.5e-164) tmp = t_0; elseif (A <= 1.65e-249) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 6.6e-20) tmp = t_0; else tmp = (180.0 * atan((1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -0.0118], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -8.5e-164], t$95$0, If[LessEqual[A, 1.65e-249], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.6e-20], t$95$0, N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -0.0118:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8.5 \cdot 10^{-164}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.65 \cdot 10^{-249}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.6 \cdot 10^{-20}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -0.0117999999999999997Initial program 28.1%
associate-*r/28.1%
unpow228.1%
Simplified28.1%
Taylor expanded in C around 0 26.5%
+-commutative26.5%
unpow226.5%
unpow226.5%
hypot-def52.3%
Simplified52.3%
Taylor expanded in C around 0 25.3%
mul-1-neg25.3%
+-commutative25.3%
+-commutative25.3%
unpow225.3%
unpow225.3%
hypot-def48.4%
+-commutative48.4%
distribute-neg-in48.4%
sub-neg48.4%
Simplified48.4%
Taylor expanded in A around -inf 70.4%
if -0.0117999999999999997 < A < -8.50000000000000035e-164 or 1.65e-249 < A < 6.6e-20Initial program 59.2%
associate-*r/59.1%
unpow259.1%
Simplified59.1%
Taylor expanded in C around 0 56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-def75.8%
Simplified75.8%
Taylor expanded in A around 0 55.8%
if -8.50000000000000035e-164 < A < 1.65e-249Initial program 38.4%
associate-*l/38.4%
*-lft-identity38.4%
+-commutative38.4%
unpow238.4%
unpow238.4%
hypot-def72.5%
Simplified72.5%
Taylor expanded in C around inf 35.8%
fma-def35.8%
associate--l+35.8%
unpow235.8%
fma-def35.8%
unpow235.8%
unpow235.8%
difference-of-squares35.8%
distribute-rgt1-in35.8%
metadata-eval35.8%
mul0-lft35.8%
mul-1-neg35.8%
distribute-rgt1-in35.8%
metadata-eval35.8%
mul0-lft35.8%
metadata-eval35.8%
Simplified35.8%
Taylor expanded in B around 0 47.9%
if 6.6e-20 < A Initial program 77.1%
associate-*r/77.1%
unpow277.1%
Simplified77.1%
Taylor expanded in C around 0 75.6%
+-commutative75.6%
unpow275.6%
unpow275.6%
hypot-def90.7%
Simplified90.7%
Taylor expanded in C around 0 75.7%
mul-1-neg75.7%
+-commutative75.7%
+-commutative75.7%
unpow275.7%
unpow275.7%
hypot-def89.7%
+-commutative89.7%
distribute-neg-in89.7%
sub-neg89.7%
Simplified89.7%
Taylor expanded in B around -inf 75.4%
mul-1-neg75.4%
unsub-neg75.4%
Simplified75.4%
Final simplification63.9%
(FPCore (A B C)
:precision binary64
(if (<= A -0.0115)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -1.2e-161)
(/ (* 180.0 (atan (/ (- C B) B))) PI)
(if (<= A 1.2e-250)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* (/ 180.0 PI) (atan (/ (- C (+ A B)) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -0.0115) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -1.2e-161) {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
} else if (A <= 1.2e-250) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} 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 <= -0.0115) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -1.2e-161) {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
} else if (A <= 1.2e-250) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + B)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -0.0115: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -1.2e-161: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi elif A <= 1.2e-250: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C - (A + B)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -0.0115) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -1.2e-161) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); elseif (A <= 1.2e-250) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); 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 <= -0.0115) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -1.2e-161) tmp = (180.0 * atan(((C - B) / B))) / pi; elseif (A <= 1.2e-250) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = (180.0 / pi) * atan(((C - (A + B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -0.0115], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1.2e-161], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 1.2e-250], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $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 -0.0115:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.2 \cdot 10^{-161}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{-250}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)\\
\end{array}
\end{array}
if A < -0.0115Initial program 28.1%
associate-*r/28.1%
unpow228.1%
Simplified28.1%
Taylor expanded in C around 0 26.5%
+-commutative26.5%
unpow226.5%
unpow226.5%
hypot-def52.3%
Simplified52.3%
Taylor expanded in C around 0 25.3%
mul-1-neg25.3%
+-commutative25.3%
+-commutative25.3%
unpow225.3%
unpow225.3%
hypot-def48.4%
+-commutative48.4%
distribute-neg-in48.4%
sub-neg48.4%
Simplified48.4%
Taylor expanded in A around -inf 70.4%
if -0.0115 < A < -1.19999999999999999e-161Initial program 59.9%
associate-*r/59.9%
unpow259.9%
Simplified59.9%
Taylor expanded in C around 0 57.9%
+-commutative57.9%
unpow257.9%
unpow257.9%
hypot-def72.9%
Simplified72.9%
Taylor expanded in A around 0 49.3%
if -1.19999999999999999e-161 < A < 1.1999999999999999e-250Initial program 38.4%
associate-*l/38.4%
*-lft-identity38.4%
+-commutative38.4%
unpow238.4%
unpow238.4%
hypot-def72.5%
Simplified72.5%
Taylor expanded in C around inf 35.8%
fma-def35.8%
associate--l+35.8%
unpow235.8%
fma-def35.8%
unpow235.8%
unpow235.8%
difference-of-squares35.8%
distribute-rgt1-in35.8%
metadata-eval35.8%
mul0-lft35.8%
mul-1-neg35.8%
distribute-rgt1-in35.8%
metadata-eval35.8%
mul0-lft35.8%
metadata-eval35.8%
Simplified35.8%
Taylor expanded in B around 0 47.9%
if 1.1999999999999999e-250 < A Initial program 70.3%
associate-*r/70.3%
associate-*l/70.3%
associate-*l/70.3%
*-lft-identity70.3%
sub-neg70.3%
associate-+l-70.3%
sub-neg70.3%
remove-double-neg70.3%
+-commutative70.3%
unpow270.3%
unpow270.3%
hypot-def90.9%
Simplified90.9%
Taylor expanded in B around inf 76.2%
Final simplification66.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ C B)))))
(if (<= B -10000000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -7e-154)
t_0
(if (<= B 3.2e-155)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 7e-12) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((C / B));
double tmp;
if (B <= -10000000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -7e-154) {
tmp = t_0;
} else if (B <= 3.2e-155) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 7e-12) {
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.PI) * Math.atan((C / B));
double tmp;
if (B <= -10000000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -7e-154) {
tmp = t_0;
} else if (B <= 3.2e-155) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 7e-12) {
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.pi) * math.atan((C / B)) tmp = 0 if B <= -10000000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -7e-154: tmp = t_0 elif B <= 3.2e-155: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 7e-12: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(C / B))) tmp = 0.0 if (B <= -10000000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -7e-154) tmp = t_0; elseif (B <= 3.2e-155) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 7e-12) 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 / pi) * atan((C / B)); tmp = 0.0; if (B <= -10000000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -7e-154) tmp = t_0; elseif (B <= 3.2e-155) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 7e-12) 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[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -10000000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7e-154], t$95$0, If[LessEqual[B, 3.2e-155], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-12], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{if}\;B \leq -10000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -7 \cdot 10^{-154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-155}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-12}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1e7Initial program 51.1%
associate-*l/51.1%
*-lft-identity51.1%
+-commutative51.1%
unpow251.1%
unpow251.1%
hypot-def80.2%
Simplified80.2%
Taylor expanded in B around -inf 63.1%
if -1e7 < B < -7.0000000000000001e-154 or 3.20000000000000013e-155 < B < 7.0000000000000001e-12Initial program 58.9%
associate-*r/58.9%
associate-*l/58.9%
associate-*l/58.9%
*-lft-identity58.9%
sub-neg58.9%
associate-+l-58.8%
sub-neg58.8%
remove-double-neg58.8%
+-commutative58.8%
unpow258.8%
unpow258.8%
hypot-def64.1%
Simplified64.1%
Taylor expanded in A around inf 54.6%
*-commutative54.6%
Simplified54.6%
Taylor expanded in C around inf 37.9%
if -7.0000000000000001e-154 < B < 3.20000000000000013e-155Initial program 52.8%
associate-*l/52.8%
*-lft-identity52.8%
+-commutative52.8%
unpow252.8%
unpow252.8%
hypot-def79.7%
Simplified79.7%
Taylor expanded in C around inf 39.5%
distribute-rgt1-in39.5%
metadata-eval39.5%
mul0-lft39.5%
metadata-eval39.5%
Simplified39.5%
if 7.0000000000000001e-12 < B Initial program 50.3%
associate-*l/50.3%
*-lft-identity50.3%
+-commutative50.3%
unpow250.3%
unpow250.3%
hypot-def84.6%
Simplified84.6%
Taylor expanded in B around inf 62.3%
Final simplification50.2%
(FPCore (A B C)
:precision binary64
(if (<= C -7.9e-165)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= C 2.05e-247)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -7.9e-165) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (C <= 2.05e-247) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -7.9e-165) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (C <= 2.05e-247) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -7.9e-165: tmp = (180.0 / math.pi) * math.atan((C / B)) elif C <= 2.05e-247: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -7.9e-165) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (C <= 2.05e-247) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -7.9e-165) tmp = (180.0 / pi) * atan((C / B)); elseif (C <= 2.05e-247) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -7.9e-165], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.05e-247], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -7.9 \cdot 10^{-165}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;C \leq 2.05 \cdot 10^{-247}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.89999999999999991e-165Initial program 75.1%
associate-*r/75.1%
associate-*l/75.1%
associate-*l/75.1%
*-lft-identity75.1%
sub-neg75.1%
associate-+l-75.0%
sub-neg75.0%
remove-double-neg75.0%
+-commutative75.0%
unpow275.0%
unpow275.0%
hypot-def83.9%
Simplified83.9%
Taylor expanded in A around inf 58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in C around inf 56.1%
if -7.89999999999999991e-165 < C < 2.0499999999999999e-247Initial program 67.0%
associate-*l/67.0%
*-lft-identity67.0%
+-commutative67.0%
unpow267.0%
unpow267.0%
hypot-def93.7%
Simplified93.7%
Taylor expanded in B around -inf 39.7%
if 2.0499999999999999e-247 < C Initial program 34.6%
associate-*l/34.6%
*-lft-identity34.6%
+-commutative34.6%
unpow234.6%
unpow234.6%
hypot-def67.8%
Simplified67.8%
Taylor expanded in C around inf 27.7%
fma-def27.7%
associate--l+34.1%
unpow234.1%
fma-def34.1%
unpow234.1%
unpow234.1%
difference-of-squares46.9%
distribute-rgt1-in46.9%
metadata-eval46.9%
mul0-lft46.9%
mul-1-neg46.9%
distribute-rgt1-in46.9%
metadata-eval46.9%
mul0-lft46.9%
metadata-eval46.9%
Simplified46.9%
Taylor expanded in B around 0 52.6%
Final simplification52.2%
(FPCore (A B C)
:precision binary64
(if (<= A -3.6e-119)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 2.15e-154)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.6e-119) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 2.15e-154) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.6e-119) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 2.15e-154) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.6e-119: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 2.15e-154: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.6e-119) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 2.15e-154) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.6e-119) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 2.15e-154) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.6e-119], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.15e-154], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.6 \cdot 10^{-119}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.15 \cdot 10^{-154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.6e-119Initial program 37.0%
associate-*l/37.0%
*-lft-identity37.0%
+-commutative37.0%
unpow237.0%
unpow237.0%
hypot-def63.5%
Simplified63.5%
Taylor expanded in A around -inf 60.1%
if -3.6e-119 < A < 2.14999999999999996e-154Initial program 42.9%
associate-*l/42.9%
*-lft-identity42.9%
+-commutative42.9%
unpow242.9%
unpow242.9%
hypot-def75.8%
Simplified75.8%
Taylor expanded in C around inf 32.7%
fma-def32.7%
associate--l+32.7%
unpow232.7%
fma-def32.7%
unpow232.7%
unpow232.7%
difference-of-squares32.7%
distribute-rgt1-in32.7%
metadata-eval32.7%
mul0-lft32.7%
mul-1-neg32.7%
distribute-rgt1-in32.7%
metadata-eval32.7%
mul0-lft32.7%
metadata-eval32.7%
Simplified32.7%
Taylor expanded in B around 0 42.8%
if 2.14999999999999996e-154 < A Initial program 75.4%
associate-*l/75.4%
*-lft-identity75.4%
+-commutative75.4%
unpow275.4%
unpow275.4%
hypot-def94.2%
Simplified94.2%
Taylor expanded in A around inf 59.8%
*-commutative59.8%
Simplified59.8%
Final simplification55.7%
(FPCore (A B C)
:precision binary64
(if (<= A -1.2e-118)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 5e-168)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(/ (* 180.0 (atan (- 1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.2e-118) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 5e-168) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.2e-118) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 5e-168) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.2e-118: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 5e-168: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = (180.0 * math.atan((1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.2e-118) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 5e-168) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.2e-118) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 5e-168) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = (180.0 * atan((1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.2e-118], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5e-168], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.2 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-168}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.2000000000000001e-118Initial program 37.0%
associate-*l/37.0%
*-lft-identity37.0%
+-commutative37.0%
unpow237.0%
unpow237.0%
hypot-def63.5%
Simplified63.5%
Taylor expanded in A around -inf 60.1%
if -1.2000000000000001e-118 < A < 5.00000000000000001e-168Initial program 43.9%
associate-*l/43.9%
*-lft-identity43.9%
+-commutative43.9%
unpow243.9%
unpow243.9%
hypot-def76.6%
Simplified76.6%
Taylor expanded in C around inf 33.7%
fma-def33.7%
associate--l+33.7%
unpow233.7%
fma-def33.7%
unpow233.7%
unpow233.7%
difference-of-squares33.7%
distribute-rgt1-in33.7%
metadata-eval33.7%
mul0-lft33.7%
mul-1-neg33.7%
distribute-rgt1-in33.7%
metadata-eval33.7%
mul0-lft33.7%
metadata-eval33.7%
Simplified33.7%
Taylor expanded in B around 0 42.6%
if 5.00000000000000001e-168 < A Initial program 74.2%
associate-*r/74.1%
unpow274.1%
Simplified74.1%
Taylor expanded in C around 0 72.2%
+-commutative72.2%
unpow272.2%
unpow272.2%
hypot-def89.5%
Simplified89.5%
Taylor expanded in C around 0 69.5%
mul-1-neg69.5%
+-commutative69.5%
+-commutative69.5%
unpow269.5%
unpow269.5%
hypot-def85.7%
+-commutative85.7%
distribute-neg-in85.7%
sub-neg85.7%
Simplified85.7%
Taylor expanded in B around -inf 66.4%
mul-1-neg66.4%
unsub-neg66.4%
Simplified66.4%
Final simplification58.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.02e-70)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 3.5e-70)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.02e-70) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 3.5e-70) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.02e-70) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 3.5e-70) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.02e-70: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 3.5e-70: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.02e-70) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 3.5e-70) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.02e-70) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 3.5e-70) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.02e-70], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e-70], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.02 \cdot 10^{-70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.0200000000000001e-70Initial program 54.7%
associate-*l/54.7%
*-lft-identity54.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-def78.8%
Simplified78.8%
Taylor expanded in B around -inf 55.2%
if -1.0200000000000001e-70 < B < 3.49999999999999974e-70Initial program 53.9%
associate-*l/53.9%
*-lft-identity53.9%
+-commutative53.9%
unpow253.9%
unpow253.9%
hypot-def76.2%
Simplified76.2%
Taylor expanded in C around inf 31.9%
distribute-rgt1-in31.9%
metadata-eval31.9%
mul0-lft31.9%
metadata-eval31.9%
Simplified31.9%
if 3.49999999999999974e-70 < B Initial program 51.2%
associate-*l/51.2%
*-lft-identity51.2%
+-commutative51.2%
unpow251.2%
unpow251.2%
hypot-def81.1%
Simplified81.1%
Taylor expanded in B around inf 55.2%
Final simplification45.4%
(FPCore (A B C) :precision binary64 (if (<= B -2e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2e-310) {
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 <= -2e-310) {
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 <= -2e-310: 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 <= -2e-310) 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 <= -2e-310) 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, -2e-310], 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 -2 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.999999999999994e-310Initial program 53.8%
associate-*l/53.8%
*-lft-identity53.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def78.0%
Simplified78.0%
Taylor expanded in B around -inf 36.4%
if -1.999999999999994e-310 < B Initial program 52.9%
associate-*l/52.9%
*-lft-identity52.9%
+-commutative52.9%
unpow252.9%
unpow252.9%
hypot-def78.8%
Simplified78.8%
Taylor expanded in B around inf 37.2%
Final simplification36.8%
(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 53.3%
associate-*l/53.3%
*-lft-identity53.3%
+-commutative53.3%
unpow253.3%
unpow253.3%
hypot-def78.4%
Simplified78.4%
Taylor expanded in B around inf 20.7%
Final simplification20.7%
herbie shell --seed 2023176
(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)))