
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
(* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI))
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))))
double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
}
return tmp;
}
def code(A, B, C): t_0 = (1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))) tmp = 0 if (t_0 <= -0.5) or not (t_0 <= 0.0): tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) return tmp
function code(A, B, C) t_0 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if ((t_0 <= -0.5) || !(t_0 <= 0.0)) tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))); tmp = 0.0; if ((t_0 <= -0.5) || ~((t_0 <= 0.0))) tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); else tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5 or -0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 56.6%
associate-*r/56.6%
associate-*l/56.6%
*-commutative56.6%
Simplified85.6%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.0Initial program 19.9%
associate-*r/19.9%
associate-*l/19.9%
*-commutative19.9%
Simplified19.9%
Taylor expanded in B around 0 99.5%
associate-*r/99.5%
Simplified99.5%
Final simplification87.8%
(FPCore (A B C)
:precision binary64
(if (<= A -2.3e-161)
(/ (* 180.0 (atan (/ (* B 0.5) (- A C)))) PI)
(if (<= A 8e+57)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e-161) {
tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / ((double) M_PI);
} else if (A <= 8e+57) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e-161) {
tmp = (180.0 * Math.atan(((B * 0.5) / (A - C)))) / Math.PI;
} else if (A <= 8e+57) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.3e-161: tmp = (180.0 * math.atan(((B * 0.5) / (A - C)))) / math.pi elif A <= 8e+57: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.3e-161) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / Float64(A - C)))) / pi); elseif (A <= 8e+57) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.3e-161) tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / pi; elseif (A <= 8e+57) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan((1.0 + ((C - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.3e-161], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 8e+57], 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[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.3 \cdot 10^{-161}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 8 \cdot 10^{+57}:\\
\;\;\;\;\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(1 + \frac{C - A}{B}\right)\\
\end{array}
\end{array}
if A < -2.3e-161Initial program 30.2%
associate-*r/30.2%
associate-*l/30.2%
*-commutative30.2%
Simplified57.0%
Taylor expanded in B around 0 46.4%
unpow246.4%
Simplified46.4%
Taylor expanded in C around -inf 68.4%
mul-1-neg68.4%
sub-neg68.4%
Simplified68.4%
associate-*r/68.6%
associate-*r/68.6%
Applied egg-rr68.6%
if -2.3e-161 < A < 8.00000000000000039e57Initial program 52.1%
associate-*r/52.1%
associate-*l/52.1%
associate-*l/52.1%
*-lft-identity52.1%
sub-neg52.1%
associate-+l-52.1%
sub-neg52.1%
remove-double-neg52.1%
+-commutative52.1%
unpow252.1%
unpow252.1%
hypot-def81.3%
Simplified81.3%
Taylor expanded in A around 0 46.9%
unpow246.9%
unpow246.9%
hypot-def76.1%
Simplified76.1%
if 8.00000000000000039e57 < A Initial program 83.3%
associate-*r/83.3%
associate-*l/83.3%
*-commutative83.3%
Simplified94.9%
Taylor expanded in B around -inf 85.9%
associate--l+85.9%
div-sub91.2%
Simplified91.2%
Final simplification76.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))
(t_1 (* (/ 180.0 PI) (atan (* 0.5 (/ B A)))))
(t_2 (* (/ 180.0 PI) (atan (/ (+ B C) B)))))
(if (<= A -1.05e-41)
t_1
(if (<= A -2.9e-173)
t_0
(if (<= A -8.6e-174)
t_1
(if (<= A 3.15e-289)
t_2
(if (<= A 1.25e-160)
t_0
(if (<= A 2.3e-139)
t_2
(if (<= A 2.1e-79)
t_0
(if (<= A 1.08e+130)
t_2
(* (/ 180.0 PI) (atan (/ (* A -2.0) B)))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
double t_1 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double t_2 = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
double tmp;
if (A <= -1.05e-41) {
tmp = t_1;
} else if (A <= -2.9e-173) {
tmp = t_0;
} else if (A <= -8.6e-174) {
tmp = t_1;
} else if (A <= 3.15e-289) {
tmp = t_2;
} else if (A <= 1.25e-160) {
tmp = t_0;
} else if (A <= 2.3e-139) {
tmp = t_2;
} else if (A <= 2.1e-79) {
tmp = t_0;
} else if (A <= 1.08e+130) {
tmp = t_2;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
double t_1 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double t_2 = (180.0 / Math.PI) * Math.atan(((B + C) / B));
double tmp;
if (A <= -1.05e-41) {
tmp = t_1;
} else if (A <= -2.9e-173) {
tmp = t_0;
} else if (A <= -8.6e-174) {
tmp = t_1;
} else if (A <= 3.15e-289) {
tmp = t_2;
} else if (A <= 1.25e-160) {
tmp = t_0;
} else if (A <= 2.3e-139) {
tmp = t_2;
} else if (A <= 2.1e-79) {
tmp = t_0;
} else if (A <= 1.08e+130) {
tmp = t_2;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) t_1 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) t_2 = (180.0 / math.pi) * math.atan(((B + C) / B)) tmp = 0 if A <= -1.05e-41: tmp = t_1 elif A <= -2.9e-173: tmp = t_0 elif A <= -8.6e-174: tmp = t_1 elif A <= 3.15e-289: tmp = t_2 elif A <= 1.25e-160: tmp = t_0 elif A <= 2.3e-139: tmp = t_2 elif A <= 2.1e-79: tmp = t_0 elif A <= 1.08e+130: tmp = t_2 else: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) t_2 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))) tmp = 0.0 if (A <= -1.05e-41) tmp = t_1; elseif (A <= -2.9e-173) tmp = t_0; elseif (A <= -8.6e-174) tmp = t_1; elseif (A <= 3.15e-289) tmp = t_2; elseif (A <= 1.25e-160) tmp = t_0; elseif (A <= 2.3e-139) tmp = t_2; elseif (A <= 2.1e-79) tmp = t_0; elseif (A <= 1.08e+130) tmp = t_2; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-0.5 * (B / C))); t_1 = (180.0 / pi) * atan((0.5 * (B / A))); t_2 = (180.0 / pi) * atan(((B + C) / B)); tmp = 0.0; if (A <= -1.05e-41) tmp = t_1; elseif (A <= -2.9e-173) tmp = t_0; elseif (A <= -8.6e-174) tmp = t_1; elseif (A <= 3.15e-289) tmp = t_2; elseif (A <= 1.25e-160) tmp = t_0; elseif (A <= 2.3e-139) tmp = t_2; elseif (A <= 2.1e-79) tmp = t_0; elseif (A <= 1.08e+130) tmp = t_2; else tmp = (180.0 / pi) * atan(((A * -2.0) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.05e-41], t$95$1, If[LessEqual[A, -2.9e-173], t$95$0, If[LessEqual[A, -8.6e-174], t$95$1, If[LessEqual[A, 3.15e-289], t$95$2, If[LessEqual[A, 1.25e-160], t$95$0, If[LessEqual[A, 2.3e-139], t$95$2, If[LessEqual[A, 2.1e-79], t$95$0, If[LessEqual[A, 1.08e+130], t$95$2, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
t_2 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{if}\;A \leq -1.05 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -2.9 \cdot 10^{-173}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -8.6 \cdot 10^{-174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 3.15 \cdot 10^{-289}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{-160}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{-139}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;A \leq 2.1 \cdot 10^{-79}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.08 \cdot 10^{+130}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -1.05000000000000006e-41 or -2.8999999999999998e-173 < A < -8.6000000000000006e-174Initial program 29.1%
associate-*r/29.1%
associate-*l/29.1%
*-commutative29.1%
Simplified59.5%
Taylor expanded in A around -inf 63.7%
if -1.05000000000000006e-41 < A < -2.8999999999999998e-173 or 3.1500000000000001e-289 < A < 1.24999999999999999e-160 or 2.30000000000000012e-139 < A < 2.0999999999999999e-79Initial program 37.1%
associate-*r/37.0%
associate-*l/37.1%
*-commutative37.1%
Simplified61.0%
Taylor expanded in B around 0 32.6%
unpow232.6%
Simplified32.6%
Taylor expanded in C around inf 47.7%
if -8.6000000000000006e-174 < A < 3.1500000000000001e-289 or 1.24999999999999999e-160 < A < 2.30000000000000012e-139 or 2.0999999999999999e-79 < A < 1.08e130Initial program 62.5%
associate-*r/62.5%
associate-*l/62.5%
associate-*l/62.5%
*-lft-identity62.5%
sub-neg62.5%
associate-+l-62.5%
sub-neg62.5%
remove-double-neg62.5%
+-commutative62.5%
unpow262.5%
unpow262.5%
hypot-def89.8%
Simplified89.8%
Taylor expanded in A around 0 55.0%
unpow255.0%
unpow255.0%
hypot-def82.2%
Simplified82.2%
Taylor expanded in B around -inf 62.3%
if 1.08e130 < A Initial program 89.2%
associate-*r/89.2%
associate-*l/89.2%
*-commutative89.2%
Simplified97.5%
Taylor expanded in A around inf 88.0%
*-commutative88.0%
Simplified88.0%
Final simplification63.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (+ B C) B))))
(t_1 (* 180.0 (/ (atan (* 0.5 (/ B (- A C)))) PI))))
(if (<= A -7e-176)
t_1
(if (<= A 1.45e-281)
t_0
(if (<= A 8.2e-200)
t_1
(if (<= A 2.45e-139)
t_0
(if (<= A 1.5e-78)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= A 5.2e-53)
t_0
(/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
double t_1 = 180.0 * (atan((0.5 * (B / (A - C)))) / ((double) M_PI));
double tmp;
if (A <= -7e-176) {
tmp = t_1;
} else if (A <= 1.45e-281) {
tmp = t_0;
} else if (A <= 8.2e-200) {
tmp = t_1;
} else if (A <= 2.45e-139) {
tmp = t_0;
} else if (A <= 1.5e-78) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (A <= 5.2e-53) {
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.PI) * Math.atan(((B + C) / B));
double t_1 = 180.0 * (Math.atan((0.5 * (B / (A - C)))) / Math.PI);
double tmp;
if (A <= -7e-176) {
tmp = t_1;
} else if (A <= 1.45e-281) {
tmp = t_0;
} else if (A <= 8.2e-200) {
tmp = t_1;
} else if (A <= 2.45e-139) {
tmp = t_0;
} else if (A <= 1.5e-78) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (A <= 5.2e-53) {
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.pi) * math.atan(((B + C) / B)) t_1 = 180.0 * (math.atan((0.5 * (B / (A - C)))) / math.pi) tmp = 0 if A <= -7e-176: tmp = t_1 elif A <= 1.45e-281: tmp = t_0 elif A <= 8.2e-200: tmp = t_1 elif A <= 2.45e-139: tmp = t_0 elif A <= 1.5e-78: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif A <= 5.2e-53: 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 / pi) * atan(Float64(Float64(B + C) / B))) t_1 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / Float64(A - C)))) / pi)) tmp = 0.0 if (A <= -7e-176) tmp = t_1; elseif (A <= 1.45e-281) tmp = t_0; elseif (A <= 8.2e-200) tmp = t_1; elseif (A <= 2.45e-139) tmp = t_0; elseif (A <= 1.5e-78) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (A <= 5.2e-53) 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 / pi) * atan(((B + C) / B)); t_1 = 180.0 * (atan((0.5 * (B / (A - C)))) / pi); tmp = 0.0; if (A <= -7e-176) tmp = t_1; elseif (A <= 1.45e-281) tmp = t_0; elseif (A <= 8.2e-200) tmp = t_1; elseif (A <= 2.45e-139) tmp = t_0; elseif (A <= 1.5e-78) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (A <= 5.2e-53) 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 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7e-176], t$95$1, If[LessEqual[A, 1.45e-281], t$95$0, If[LessEqual[A, 8.2e-200], t$95$1, If[LessEqual[A, 2.45e-139], t$95$0, If[LessEqual[A, 1.5e-78], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.2e-53], 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}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\
\mathbf{if}\;A \leq -7 \cdot 10^{-176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{-281}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 8.2 \cdot 10^{-200}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 2.45 \cdot 10^{-139}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.5 \cdot 10^{-78}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;A \leq 5.2 \cdot 10^{-53}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7e-176 or 1.44999999999999995e-281 < A < 8.19999999999999974e-200Initial program 30.6%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified58.5%
Taylor expanded in B around 0 43.9%
unpow243.9%
Simplified43.9%
Taylor expanded in C around -inf 65.3%
mul-1-neg65.3%
sub-neg65.3%
Simplified65.3%
if -7e-176 < A < 1.44999999999999995e-281 or 8.19999999999999974e-200 < A < 2.45000000000000016e-139 or 1.49999999999999994e-78 < A < 5.19999999999999993e-53Initial program 59.3%
associate-*r/59.3%
associate-*l/59.3%
associate-*l/59.3%
*-lft-identity59.3%
sub-neg59.3%
associate-+l-59.3%
sub-neg59.3%
remove-double-neg59.3%
+-commutative59.3%
unpow259.3%
unpow259.3%
hypot-def87.5%
Simplified87.5%
Taylor expanded in A around 0 57.4%
unpow257.4%
unpow257.4%
hypot-def85.6%
Simplified85.6%
Taylor expanded in B around -inf 61.5%
if 2.45000000000000016e-139 < A < 1.49999999999999994e-78Initial program 43.5%
associate-*r/43.5%
associate-*l/43.5%
*-commutative43.5%
Simplified65.7%
Taylor expanded in B around 0 41.2%
unpow241.2%
Simplified41.2%
Taylor expanded in C around inf 52.8%
if 5.19999999999999993e-53 < A Initial program 77.7%
associate-*r/77.7%
associate-*l/77.7%
*-commutative77.7%
Simplified94.8%
Taylor expanded in B around -inf 80.6%
associate--l+80.6%
div-sub84.5%
Simplified84.5%
Taylor expanded in C around 0 83.5%
neg-mul-183.5%
distribute-neg-frac83.5%
Simplified83.5%
Taylor expanded in A around 0 83.5%
associate-*r/83.5%
mul-1-neg83.5%
sub-neg83.5%
Simplified83.5%
Final simplification69.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))
(if (<= C -4.8e-29)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= C 9.5e-188)
t_0
(if (<= C 2.5e-112)
(* (/ 180.0 PI) (atan -1.0))
(if (<= C 4.7e+156)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= C 1.05e+185)
t_0
(* 180.0 (/ (atan (* 0.5 (* B (/ -1.0 C)))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
double tmp;
if (C <= -4.8e-29) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (C <= 9.5e-188) {
tmp = t_0;
} else if (C <= 2.5e-112) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if (C <= 4.7e+156) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (C <= 1.05e+185) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((0.5 * (B * (-1.0 / C)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
double tmp;
if (C <= -4.8e-29) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (C <= 9.5e-188) {
tmp = t_0;
} else if (C <= 2.5e-112) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if (C <= 4.7e+156) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (C <= 1.05e+185) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((0.5 * (B * (-1.0 / C)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((1.0 - (A / B)))) / math.pi tmp = 0 if C <= -4.8e-29: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif C <= 9.5e-188: tmp = t_0 elif C <= 2.5e-112: tmp = (180.0 / math.pi) * math.atan(-1.0) elif C <= 4.7e+156: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif C <= 1.05e+185: tmp = t_0 else: tmp = 180.0 * (math.atan((0.5 * (B * (-1.0 / C)))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi) tmp = 0.0 if (C <= -4.8e-29) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (C <= 9.5e-188) tmp = t_0; elseif (C <= 2.5e-112) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif (C <= 4.7e+156) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (C <= 1.05e+185) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B * Float64(-1.0 / C)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((1.0 - (A / B)))) / pi; tmp = 0.0; if (C <= -4.8e-29) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (C <= 9.5e-188) tmp = t_0; elseif (C <= 2.5e-112) tmp = (180.0 / pi) * atan(-1.0); elseif (C <= 4.7e+156) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (C <= 1.05e+185) tmp = t_0; else tmp = 180.0 * (atan((0.5 * (B * (-1.0 / C)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[C, -4.8e-29], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.5e-188], t$95$0, If[LessEqual[C, 2.5e-112], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.7e+156], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.05e+185], t$95$0, N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B * N[(-1.0 / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -4.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;C \leq 9.5 \cdot 10^{-188}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 2.5 \cdot 10^{-112}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 4.7 \cdot 10^{+156}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;C \leq 1.05 \cdot 10^{+185}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{-1}{C}\right)\right)}{\pi}\\
\end{array}
\end{array}
if C < -4.79999999999999984e-29Initial program 72.0%
associate-*r/72.0%
associate-*l/72.0%
associate-*l/72.0%
*-lft-identity72.0%
sub-neg72.0%
associate-+l-70.5%
sub-neg70.5%
remove-double-neg70.5%
+-commutative70.5%
unpow270.5%
unpow270.5%
hypot-def84.7%
Simplified84.7%
Taylor expanded in A around 0 69.6%
unpow269.6%
unpow269.6%
hypot-def82.6%
Simplified82.6%
Taylor expanded in B around -inf 73.9%
if -4.79999999999999984e-29 < C < 9.50000000000000063e-188 or 4.7e156 < C < 1.05e185Initial program 52.1%
associate-*r/52.1%
associate-*l/52.1%
*-commutative52.1%
Simplified76.9%
Taylor expanded in B around -inf 51.8%
associate--l+51.8%
div-sub52.9%
Simplified52.9%
Taylor expanded in C around 0 52.2%
neg-mul-152.2%
distribute-neg-frac52.2%
Simplified52.2%
Taylor expanded in A around 0 52.2%
associate-*r/52.2%
mul-1-neg52.2%
sub-neg52.2%
Simplified52.2%
if 9.50000000000000063e-188 < C < 2.50000000000000022e-112Initial program 25.5%
associate-*r/25.5%
associate-*l/25.5%
*-commutative25.5%
Simplified87.3%
Taylor expanded in B around inf 54.8%
if 2.50000000000000022e-112 < C < 4.7e156Initial program 49.6%
associate-*r/49.6%
associate-*l/49.6%
*-commutative49.6%
Simplified65.2%
Taylor expanded in B around 0 32.4%
unpow232.4%
Simplified32.4%
Taylor expanded in C around inf 55.1%
if 1.05e185 < C Initial program 9.5%
associate-*r/9.5%
associate-*l/9.5%
*-commutative9.5%
Simplified42.4%
Taylor expanded in B around 0 65.0%
unpow265.0%
Simplified65.0%
Taylor expanded in C around -inf 86.2%
mul-1-neg86.2%
sub-neg86.2%
Simplified86.2%
div-inv86.3%
Applied egg-rr86.3%
Taylor expanded in A around 0 85.6%
Final simplification62.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (- 1.0 (/ A B)))) PI)))
(if (<= C -1.45e-28)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= C 9.5e-188)
t_0
(if (<= C 1.62e-112)
(* (/ 180.0 PI) (atan -1.0))
(if (or (<= C 4.7e+156) (not (<= C 1.05e+185)))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
t_0))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((1.0 - (A / B)))) / ((double) M_PI);
double tmp;
if (C <= -1.45e-28) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (C <= 9.5e-188) {
tmp = t_0;
} else if (C <= 1.62e-112) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if ((C <= 4.7e+156) || !(C <= 1.05e+185)) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((1.0 - (A / B)))) / Math.PI;
double tmp;
if (C <= -1.45e-28) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (C <= 9.5e-188) {
tmp = t_0;
} else if (C <= 1.62e-112) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if ((C <= 4.7e+156) || !(C <= 1.05e+185)) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((1.0 - (A / B)))) / math.pi tmp = 0 if C <= -1.45e-28: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif C <= 9.5e-188: tmp = t_0 elif C <= 1.62e-112: tmp = (180.0 / math.pi) * math.atan(-1.0) elif (C <= 4.7e+156) or not (C <= 1.05e+185): tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(1.0 - Float64(A / B)))) / pi) tmp = 0.0 if (C <= -1.45e-28) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (C <= 9.5e-188) tmp = t_0; elseif (C <= 1.62e-112) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif ((C <= 4.7e+156) || !(C <= 1.05e+185)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((1.0 - (A / B)))) / pi; tmp = 0.0; if (C <= -1.45e-28) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (C <= 9.5e-188) tmp = t_0; elseif (C <= 1.62e-112) tmp = (180.0 / pi) * atan(-1.0); elseif ((C <= 4.7e+156) || ~((C <= 1.05e+185))) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); else tmp = t_0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[C, -1.45e-28], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.5e-188], t$95$0, If[LessEqual[C, 1.62e-112], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 4.7e+156], N[Not[LessEqual[C, 1.05e+185]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.45 \cdot 10^{-28}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;C \leq 9.5 \cdot 10^{-188}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 1.62 \cdot 10^{-112}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 4.7 \cdot 10^{+156} \lor \neg \left(C \leq 1.05 \cdot 10^{+185}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if C < -1.45000000000000006e-28Initial program 72.0%
associate-*r/72.0%
associate-*l/72.0%
associate-*l/72.0%
*-lft-identity72.0%
sub-neg72.0%
associate-+l-70.5%
sub-neg70.5%
remove-double-neg70.5%
+-commutative70.5%
unpow270.5%
unpow270.5%
hypot-def84.7%
Simplified84.7%
Taylor expanded in A around 0 69.6%
unpow269.6%
unpow269.6%
hypot-def82.6%
Simplified82.6%
Taylor expanded in B around -inf 73.9%
if -1.45000000000000006e-28 < C < 9.50000000000000063e-188 or 4.7e156 < C < 1.05e185Initial program 52.1%
associate-*r/52.1%
associate-*l/52.1%
*-commutative52.1%
Simplified76.9%
Taylor expanded in B around -inf 51.8%
associate--l+51.8%
div-sub52.9%
Simplified52.9%
Taylor expanded in C around 0 52.2%
neg-mul-152.2%
distribute-neg-frac52.2%
Simplified52.2%
Taylor expanded in A around 0 52.2%
associate-*r/52.2%
mul-1-neg52.2%
sub-neg52.2%
Simplified52.2%
if 9.50000000000000063e-188 < C < 1.62000000000000009e-112Initial program 25.5%
associate-*r/25.5%
associate-*l/25.5%
*-commutative25.5%
Simplified87.3%
Taylor expanded in B around inf 54.8%
if 1.62000000000000009e-112 < C < 4.7e156 or 1.05e185 < C Initial program 36.2%
associate-*r/36.2%
associate-*l/36.2%
*-commutative36.2%
Simplified57.6%
Taylor expanded in B around 0 43.3%
unpow243.3%
Simplified43.3%
Taylor expanded in C around inf 65.2%
Final simplification62.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (* -0.5 (/ B C)))))
(if (<= C -2.05e-54)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= C 6.7e-217)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= C 2.4e-189)
(* 180.0 (/ t_0 PI))
(if (<= C 7e-156)
(* (/ 180.0 PI) (atan -1.0))
(if (<= C 4.7e-132)
(* (/ 180.0 PI) (atan 1.0))
(* (/ 180.0 PI) t_0))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / C)));
double tmp;
if (C <= -2.05e-54) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (C <= 6.7e-217) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (C <= 2.4e-189) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (C <= 7e-156) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if (C <= 4.7e-132) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * t_0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((-0.5 * (B / C)));
double tmp;
if (C <= -2.05e-54) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (C <= 6.7e-217) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (C <= 2.4e-189) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (C <= 7e-156) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if (C <= 4.7e-132) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * t_0;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / C))) tmp = 0 if C <= -2.05e-54: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif C <= 6.7e-217: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif C <= 2.4e-189: tmp = 180.0 * (t_0 / math.pi) elif C <= 7e-156: tmp = (180.0 / math.pi) * math.atan(-1.0) elif C <= 4.7e-132: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * t_0 return tmp
function code(A, B, C) t_0 = atan(Float64(-0.5 * Float64(B / C))) tmp = 0.0 if (C <= -2.05e-54) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (C <= 6.7e-217) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (C <= 2.4e-189) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (C <= 7e-156) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif (C <= 4.7e-132) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * t_0); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((-0.5 * (B / C))); tmp = 0.0; if (C <= -2.05e-54) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (C <= 6.7e-217) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (C <= 2.4e-189) tmp = 180.0 * (t_0 / pi); elseif (C <= 7e-156) tmp = (180.0 / pi) * atan(-1.0); elseif (C <= 4.7e-132) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * t_0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[C, -2.05e-54], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.7e-217], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.4e-189], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7e-156], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.7e-132], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{if}\;C \leq -2.05 \cdot 10^{-54}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;C \leq 6.7 \cdot 10^{-217}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;C \leq 2.4 \cdot 10^{-189}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{elif}\;C \leq 7 \cdot 10^{-156}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;C \leq 4.7 \cdot 10^{-132}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot t_0\\
\end{array}
\end{array}
if C < -2.05e-54Initial program 70.7%
associate-*r/70.7%
associate-*l/70.7%
*-commutative70.7%
Simplified92.2%
Taylor expanded in C around -inf 62.4%
if -2.05e-54 < C < 6.7000000000000001e-217Initial program 47.9%
associate-*r/47.9%
associate-*l/47.9%
*-commutative47.9%
Simplified73.7%
Taylor expanded in A around -inf 38.8%
if 6.7000000000000001e-217 < C < 2.3999999999999998e-189Initial program 66.4%
associate-*r/66.4%
associate-*l/66.4%
*-commutative66.4%
Simplified74.1%
Taylor expanded in B around 0 7.5%
unpow27.5%
Simplified7.5%
Taylor expanded in C around -inf 33.0%
mul-1-neg33.0%
sub-neg33.0%
Simplified33.0%
Taylor expanded in A around 0 50.0%
if 2.3999999999999998e-189 < C < 6.9999999999999999e-156Initial program 43.2%
associate-*r/43.2%
associate-*l/43.2%
*-commutative43.2%
Simplified87.9%
Taylor expanded in B around inf 54.1%
if 6.9999999999999999e-156 < C < 4.7000000000000002e-132Initial program 18.8%
associate-*r/18.8%
associate-*l/18.8%
*-commutative18.8%
Simplified100.0%
Taylor expanded in B around -inf 60.6%
if 4.7000000000000002e-132 < C Initial program 37.3%
associate-*r/37.3%
associate-*l/37.3%
*-commutative37.3%
Simplified60.5%
Taylor expanded in B around 0 40.4%
unpow240.4%
Simplified40.4%
Taylor expanded in C around inf 60.0%
Final simplification54.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))))
(if (<= B -3.1e+61)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 1.3e-256)
t_0
(if (<= B 1.65e-61)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(if (<= B 2.6e+21) t_0 (* (/ 180.0 PI) (atan -1.0))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double tmp;
if (B <= -3.1e+61) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 1.3e-256) {
tmp = t_0;
} else if (B <= 1.65e-61) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else if (B <= 2.6e+21) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double tmp;
if (B <= -3.1e+61) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 1.3e-256) {
tmp = t_0;
} else if (B <= 1.65e-61) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else if (B <= 2.6e+21) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) tmp = 0 if B <= -3.1e+61: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 1.3e-256: tmp = t_0 elif B <= 1.65e-61: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) elif B <= 2.6e+21: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) tmp = 0.0 if (B <= -3.1e+61) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 1.3e-256) tmp = t_0; elseif (B <= 1.65e-61) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); elseif (B <= 2.6e+21) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((0.5 * (B / A))); tmp = 0.0; if (B <= -3.1e+61) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 1.3e-256) tmp = t_0; elseif (B <= 1.65e-61) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); elseif (B <= 2.6e+21) tmp = t_0; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.1e+61], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-256], t$95$0, If[LessEqual[B, 1.65e-61], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.6e+21], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;B \leq -3.1 \cdot 10^{+61}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-256}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{-61}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{+21}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -3.0999999999999999e61Initial program 49.8%
associate-*r/49.8%
associate-*l/49.8%
*-commutative49.8%
Simplified86.4%
Taylor expanded in B around -inf 64.2%
if -3.0999999999999999e61 < B < 1.3e-256 or 1.64999999999999998e-61 < B < 2.6e21Initial program 57.2%
associate-*r/57.2%
associate-*l/57.2%
*-commutative57.2%
Simplified69.2%
Taylor expanded in A around -inf 38.8%
if 1.3e-256 < B < 1.64999999999999998e-61Initial program 43.8%
associate-*r/43.8%
associate-*l/43.8%
*-commutative43.8%
Simplified59.7%
Taylor expanded in B around 0 41.9%
unpow241.9%
Simplified41.9%
Taylor expanded in C around inf 50.6%
if 2.6e21 < B Initial program 46.0%
associate-*r/46.0%
associate-*l/46.0%
*-commutative46.0%
Simplified85.5%
Taylor expanded in B around inf 69.1%
Final simplification53.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (* -0.5 (/ B C))))))
(if (<= A -2.8e-41)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -9.6e-244)
t_0
(if (<= A 3.5e-301)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= A 6e-47) t_0 (* (/ 180.0 PI) (atan (/ (* A -2.0) B)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
double tmp;
if (A <= -2.8e-41) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -9.6e-244) {
tmp = t_0;
} else if (A <= 3.5e-301) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (A <= 6e-47) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
double tmp;
if (A <= -2.8e-41) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -9.6e-244) {
tmp = t_0;
} else if (A <= 3.5e-301) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (A <= 6e-47) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) tmp = 0 if A <= -2.8e-41: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -9.6e-244: tmp = t_0 elif A <= 3.5e-301: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif A <= 6e-47: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))) tmp = 0.0 if (A <= -2.8e-41) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -9.6e-244) tmp = t_0; elseif (A <= 3.5e-301) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (A <= 6e-47) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-0.5 * (B / C))); tmp = 0.0; if (A <= -2.8e-41) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -9.6e-244) tmp = t_0; elseif (A <= 3.5e-301) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (A <= 6e-47) tmp = t_0; else tmp = (180.0 / pi) * atan(((A * -2.0) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.8e-41], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.6e-244], t$95$0, If[LessEqual[A, 3.5e-301], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6e-47], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{if}\;A \leq -2.8 \cdot 10^{-41}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -9.6 \cdot 10^{-244}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-301}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;A \leq 6 \cdot 10^{-47}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -2.8000000000000002e-41Initial program 29.4%
associate-*r/29.4%
associate-*l/29.4%
*-commutative29.4%
Simplified60.2%
Taylor expanded in A around -inf 63.2%
if -2.8000000000000002e-41 < A < -9.60000000000000063e-244 or 3.49999999999999992e-301 < A < 6.00000000000000033e-47Initial program 40.0%
associate-*r/40.0%
associate-*l/40.0%
*-commutative40.0%
Simplified67.5%
Taylor expanded in B around 0 27.6%
unpow227.6%
Simplified27.6%
Taylor expanded in C around inf 40.4%
if -9.60000000000000063e-244 < A < 3.49999999999999992e-301Initial program 73.4%
associate-*r/73.4%
associate-*l/73.4%
*-commutative73.4%
Simplified94.9%
Taylor expanded in C around -inf 43.9%
if 6.00000000000000033e-47 < A Initial program 79.3%
associate-*r/79.3%
associate-*l/79.3%
*-commutative79.3%
Simplified94.7%
Taylor expanded in A around inf 72.0%
*-commutative72.0%
Simplified72.0%
Final simplification56.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 0.5 (/ B (- A C)))) PI))))
(if (<= A -8.2e-174)
t_0
(if (<= A 2.1e-282)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= A 5.9e-199)
t_0
(* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.5 * (B / (A - C)))) / ((double) M_PI));
double tmp;
if (A <= -8.2e-174) {
tmp = t_0;
} else if (A <= 2.1e-282) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (A <= 5.9e-199) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((0.5 * (B / (A - C)))) / Math.PI);
double tmp;
if (A <= -8.2e-174) {
tmp = t_0;
} else if (A <= 2.1e-282) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (A <= 5.9e-199) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.5 * (B / (A - C)))) / math.pi) tmp = 0 if A <= -8.2e-174: tmp = t_0 elif A <= 2.1e-282: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif A <= 5.9e-199: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / Float64(A - C)))) / pi)) tmp = 0.0 if (A <= -8.2e-174) tmp = t_0; elseif (A <= 2.1e-282) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (A <= 5.9e-199) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((0.5 * (B / (A - C)))) / pi); tmp = 0.0; if (A <= -8.2e-174) tmp = t_0; elseif (A <= 2.1e-282) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (A <= 5.9e-199) tmp = t_0; else tmp = (180.0 / pi) * atan((1.0 + ((C - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -8.2e-174], t$95$0, If[LessEqual[A, 2.1e-282], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.9e-199], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\
\mathbf{if}\;A \leq -8.2 \cdot 10^{-174}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 2.1 \cdot 10^{-282}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;A \leq 5.9 \cdot 10^{-199}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\end{array}
\end{array}
if A < -8.2000000000000002e-174 or 2.10000000000000012e-282 < A < 5.9000000000000003e-199Initial program 30.6%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified58.5%
Taylor expanded in B around 0 43.9%
unpow243.9%
Simplified43.9%
Taylor expanded in C around -inf 65.3%
mul-1-neg65.3%
sub-neg65.3%
Simplified65.3%
if -8.2000000000000002e-174 < A < 2.10000000000000012e-282Initial program 63.8%
associate-*r/63.8%
associate-*l/63.8%
associate-*l/63.8%
*-lft-identity63.8%
sub-neg63.8%
associate-+l-63.8%
sub-neg63.8%
remove-double-neg63.8%
+-commutative63.8%
unpow263.8%
unpow263.8%
hypot-def84.0%
Simplified84.0%
Taylor expanded in A around 0 63.8%
unpow263.8%
unpow263.8%
hypot-def84.0%
Simplified84.0%
Taylor expanded in B around -inf 62.5%
if 5.9000000000000003e-199 < A Initial program 69.6%
associate-*r/69.6%
associate-*l/69.6%
*-commutative69.6%
Simplified91.7%
Taylor expanded in B around -inf 71.7%
associate--l+71.7%
div-sub74.5%
Simplified74.5%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
(if (<= A -7.5e-175)
t_0
(if (<= A 5e-283)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= A 3.7e-201)
t_0
(* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -7.5e-175) {
tmp = t_0;
} else if (A <= 5e-283) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (A <= 3.7e-201) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -7.5e-175) {
tmp = t_0;
} else if (A <= 5e-283) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (A <= 3.7e-201) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) tmp = 0 if A <= -7.5e-175: tmp = t_0 elif A <= 5e-283: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif A <= 3.7e-201: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) tmp = 0.0 if (A <= -7.5e-175) tmp = t_0; elseif (A <= 5e-283) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (A <= 3.7e-201) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); tmp = 0.0; if (A <= -7.5e-175) tmp = t_0; elseif (A <= 5e-283) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (A <= 3.7e-201) tmp = t_0; else tmp = (180.0 / pi) * atan((1.0 + ((C - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7.5e-175], t$95$0, If[LessEqual[A, 5e-283], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.7e-201], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{if}\;A \leq -7.5 \cdot 10^{-175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5 \cdot 10^{-283}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;A \leq 3.7 \cdot 10^{-201}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\end{array}
\end{array}
if A < -7.50000000000000053e-175 or 5.0000000000000001e-283 < A < 3.6999999999999998e-201Initial program 30.6%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified58.5%
Taylor expanded in B around 0 65.5%
associate-*r/65.5%
Simplified65.5%
if -7.50000000000000053e-175 < A < 5.0000000000000001e-283Initial program 63.8%
associate-*r/63.8%
associate-*l/63.8%
associate-*l/63.8%
*-lft-identity63.8%
sub-neg63.8%
associate-+l-63.8%
sub-neg63.8%
remove-double-neg63.8%
+-commutative63.8%
unpow263.8%
unpow263.8%
hypot-def84.0%
Simplified84.0%
Taylor expanded in A around 0 63.8%
unpow263.8%
unpow263.8%
hypot-def84.0%
Simplified84.0%
Taylor expanded in B around -inf 62.5%
if 3.6999999999999998e-201 < A Initial program 69.6%
associate-*r/69.6%
associate-*l/69.6%
*-commutative69.6%
Simplified91.7%
Taylor expanded in B around -inf 71.7%
associate--l+71.7%
div-sub74.5%
Simplified74.5%
Final simplification68.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (* 0.5 (/ B (- A C))))) PI)))
(if (<= A -3.4e-174)
t_0
(if (<= A 1.8e-289)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= A 2.65e-201)
t_0
(* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan((0.5 * (B / (A - C))))) / ((double) M_PI);
double tmp;
if (A <= -3.4e-174) {
tmp = t_0;
} else if (A <= 1.8e-289) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (A <= 2.65e-201) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan((0.5 * (B / (A - C))))) / Math.PI;
double tmp;
if (A <= -3.4e-174) {
tmp = t_0;
} else if (A <= 1.8e-289) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (A <= 2.65e-201) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan((0.5 * (B / (A - C))))) / math.pi tmp = 0 if A <= -3.4e-174: tmp = t_0 elif A <= 1.8e-289: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif A <= 2.65e-201: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / Float64(A - C))))) / pi) tmp = 0.0 if (A <= -3.4e-174) tmp = t_0; elseif (A <= 1.8e-289) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (A <= 2.65e-201) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan((0.5 * (B / (A - C))))) / pi; tmp = 0.0; if (A <= -3.4e-174) tmp = t_0; elseif (A <= 1.8e-289) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (A <= 2.65e-201) tmp = t_0; else tmp = (180.0 / pi) * atan((1.0 + ((C - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -3.4e-174], t$95$0, If[LessEqual[A, 1.8e-289], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.65e-201], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\
\mathbf{if}\;A \leq -3.4 \cdot 10^{-174}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{-289}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;A \leq 2.65 \cdot 10^{-201}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\end{array}
\end{array}
if A < -3.4000000000000002e-174 or 1.8e-289 < A < 2.64999999999999994e-201Initial program 30.6%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified58.5%
Taylor expanded in B around 0 43.9%
unpow243.9%
Simplified43.9%
Taylor expanded in C around -inf 65.3%
associate-*r/65.5%
mul-1-neg65.5%
sub-neg65.5%
Simplified65.5%
if -3.4000000000000002e-174 < A < 1.8e-289Initial program 63.8%
associate-*r/63.8%
associate-*l/63.8%
associate-*l/63.8%
*-lft-identity63.8%
sub-neg63.8%
associate-+l-63.8%
sub-neg63.8%
remove-double-neg63.8%
+-commutative63.8%
unpow263.8%
unpow263.8%
hypot-def84.0%
Simplified84.0%
Taylor expanded in A around 0 63.8%
unpow263.8%
unpow263.8%
hypot-def84.0%
Simplified84.0%
Taylor expanded in B around -inf 62.5%
if 2.64999999999999994e-201 < A Initial program 69.6%
associate-*r/69.6%
associate-*l/69.6%
*-commutative69.6%
Simplified91.7%
Taylor expanded in B around -inf 71.7%
associate--l+71.7%
div-sub74.5%
Simplified74.5%
Final simplification68.8%
(FPCore (A B C)
:precision binary64
(if (<= A -4.9e-175)
(/ (* 180.0 (atan (/ (* B 0.5) (- A C)))) PI)
(if (<= A 2.3e-284)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= A 7.5e-201)
(/ (* 180.0 (atan (* 0.5 (/ B (- A C))))) PI)
(* (/ 180.0 PI) (atan (+ 1.0 (/ (- C A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.9e-175) {
tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / ((double) M_PI);
} else if (A <= 2.3e-284) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (A <= 7.5e-201) {
tmp = (180.0 * atan((0.5 * (B / (A - C))))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + ((C - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.9e-175) {
tmp = (180.0 * Math.atan(((B * 0.5) / (A - C)))) / Math.PI;
} else if (A <= 2.3e-284) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (A <= 7.5e-201) {
tmp = (180.0 * Math.atan((0.5 * (B / (A - C))))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + ((C - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.9e-175: tmp = (180.0 * math.atan(((B * 0.5) / (A - C)))) / math.pi elif A <= 2.3e-284: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif A <= 7.5e-201: tmp = (180.0 * math.atan((0.5 * (B / (A - C))))) / math.pi else: tmp = (180.0 / math.pi) * math.atan((1.0 + ((C - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.9e-175) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / Float64(A - C)))) / pi); elseif (A <= 2.3e-284) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (A <= 7.5e-201) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / Float64(A - C))))) / pi); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(Float64(C - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.9e-175) tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / pi; elseif (A <= 2.3e-284) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (A <= 7.5e-201) tmp = (180.0 * atan((0.5 * (B / (A - C))))) / pi; else tmp = (180.0 / pi) * atan((1.0 + ((C - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.9e-175], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.3e-284], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.5e-201], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.9 \cdot 10^{-175}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{-284}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;A \leq 7.5 \cdot 10^{-201}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A - C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C - A}{B}\right)\\
\end{array}
\end{array}
if A < -4.89999999999999998e-175Initial program 29.9%
associate-*r/29.9%
associate-*l/29.9%
*-commutative29.9%
Simplified57.2%
Taylor expanded in B around 0 46.1%
unpow246.1%
Simplified46.1%
Taylor expanded in C around -inf 68.0%
mul-1-neg68.0%
sub-neg68.0%
Simplified68.0%
associate-*r/68.2%
associate-*r/68.2%
Applied egg-rr68.2%
if -4.89999999999999998e-175 < A < 2.3e-284Initial program 63.8%
associate-*r/63.8%
associate-*l/63.8%
associate-*l/63.8%
*-lft-identity63.8%
sub-neg63.8%
associate-+l-63.8%
sub-neg63.8%
remove-double-neg63.8%
+-commutative63.8%
unpow263.8%
unpow263.8%
hypot-def84.0%
Simplified84.0%
Taylor expanded in A around 0 63.8%
unpow263.8%
unpow263.8%
hypot-def84.0%
Simplified84.0%
Taylor expanded in B around -inf 62.5%
if 2.3e-284 < A < 7.49999999999999987e-201Initial program 34.3%
associate-*r/34.3%
associate-*l/34.3%
*-commutative34.3%
Simplified65.0%
Taylor expanded in B around 0 32.0%
unpow232.0%
Simplified32.0%
Taylor expanded in C around -inf 51.5%
associate-*r/51.7%
mul-1-neg51.7%
sub-neg51.7%
Simplified51.7%
if 7.49999999999999987e-201 < A Initial program 69.6%
associate-*r/69.6%
associate-*l/69.6%
*-commutative69.6%
Simplified91.7%
Taylor expanded in B around -inf 71.7%
associate--l+71.7%
div-sub74.5%
Simplified74.5%
Final simplification68.8%
(FPCore (A B C)
:precision binary64
(if (<= B -1.95e+65)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 2.7e-61)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e+65) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 2.7e-61) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e+65) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 2.7e-61) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.95e+65: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 2.7e-61: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.95e+65) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 2.7e-61) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.95e+65) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 2.7e-61) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.95e+65], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-61], 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[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.95 \cdot 10^{+65}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-61}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.9499999999999999e65Initial program 49.7%
associate-*r/49.7%
associate-*l/49.7%
*-commutative49.7%
Simplified87.5%
Taylor expanded in B around -inf 64.9%
if -1.9499999999999999e65 < B < 2.69999999999999993e-61Initial program 53.4%
associate-*r/53.4%
associate-*l/53.4%
*-commutative53.4%
Simplified67.3%
Taylor expanded in B around 0 35.8%
unpow235.8%
Simplified35.8%
Taylor expanded in C around -inf 54.9%
mul-1-neg54.9%
sub-neg54.9%
Simplified54.9%
Taylor expanded in A around 0 34.0%
if 2.69999999999999993e-61 < B Initial program 47.4%
associate-*r/47.4%
associate-*l/47.4%
*-commutative47.4%
Simplified79.0%
Taylor expanded in B around inf 56.9%
Final simplification47.6%
(FPCore (A B C)
:precision binary64
(if (<= B -1.85e+65)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 3.2e-61)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.85e+65) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 3.2e-61) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.85e+65) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 3.2e-61) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.85e+65: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 3.2e-61: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.85e+65) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 3.2e-61) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.85e+65) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 3.2e-61) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.85e+65], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.2e-61], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.85 \cdot 10^{+65}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -1.84999999999999997e65Initial program 49.7%
associate-*r/49.7%
associate-*l/49.7%
*-commutative49.7%
Simplified87.5%
Taylor expanded in B around -inf 64.9%
if -1.84999999999999997e65 < B < 3.2000000000000001e-61Initial program 53.4%
associate-*r/53.4%
associate-*l/53.4%
*-commutative53.4%
Simplified67.3%
Taylor expanded in B around 0 35.8%
unpow235.8%
Simplified35.8%
Taylor expanded in C around inf 34.0%
if 3.2000000000000001e-61 < B Initial program 47.4%
associate-*r/47.4%
associate-*l/47.4%
*-commutative47.4%
Simplified79.0%
Taylor expanded in B around inf 56.9%
Final simplification47.6%
(FPCore (A B C)
:precision binary64
(if (<= B -4.8e-112)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 2.6e-61)
(* (/ 180.0 PI) (atan 0.0))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.8e-112) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 2.6e-61) {
tmp = (180.0 / ((double) M_PI)) * atan(0.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -4.8e-112) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 2.6e-61) {
tmp = (180.0 / Math.PI) * Math.atan(0.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.8e-112: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 2.6e-61: tmp = (180.0 / math.pi) * math.atan(0.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -4.8e-112) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 2.6e-61) tmp = Float64(Float64(180.0 / pi) * atan(0.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -4.8e-112) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 2.6e-61) tmp = (180.0 / pi) * atan(0.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.8e-112], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.6e-61], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -4.8 \cdot 10^{-112}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{-61}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -4.8000000000000001e-112Initial program 52.1%
associate-*r/52.0%
associate-*l/52.1%
*-commutative52.1%
Simplified79.0%
Taylor expanded in B around -inf 49.7%
if -4.8000000000000001e-112 < B < 2.6000000000000001e-61Initial program 52.3%
associate-*r/52.3%
associate-*l/52.3%
associate-*l/52.3%
*-lft-identity52.3%
sub-neg52.3%
associate-+l-49.9%
sub-neg49.9%
remove-double-neg49.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-def56.8%
Simplified56.8%
div-sub42.5%
Applied egg-rr42.5%
Taylor expanded in C around inf 12.7%
distribute-rgt1-in12.7%
metadata-eval12.7%
mul0-lft26.8%
metadata-eval26.8%
Simplified26.8%
if 2.6000000000000001e-61 < B Initial program 47.4%
associate-*r/47.4%
associate-*l/47.4%
*-commutative47.4%
Simplified79.0%
Taylor expanded in B around inf 56.9%
Final simplification43.1%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 54.3%
associate-*r/54.3%
associate-*l/54.3%
*-commutative54.3%
Simplified77.9%
Taylor expanded in B around -inf 37.7%
if -4.999999999999985e-310 < B Initial program 47.2%
associate-*r/47.2%
associate-*l/47.2%
*-commutative47.2%
Simplified72.6%
Taylor expanded in B around inf 37.4%
Final simplification37.6%
(FPCore (A B C) :precision binary64 (* (/ 180.0 PI) (atan -1.0)))
double code(double A, double B, double C) {
return (180.0 / ((double) M_PI)) * atan(-1.0);
}
public static double code(double A, double B, double C) {
return (180.0 / Math.PI) * Math.atan(-1.0);
}
def code(A, B, C): return (180.0 / math.pi) * math.atan(-1.0)
function code(A, B, C) return Float64(Float64(180.0 / pi) * atan(-1.0)) end
function tmp = code(A, B, C) tmp = (180.0 / pi) * atan(-1.0); end
code[A_, B_, C_] := N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{180}{\pi} \cdot \tan^{-1} -1
\end{array}
Initial program 50.9%
associate-*r/50.9%
associate-*l/50.9%
*-commutative50.9%
Simplified75.3%
Taylor expanded in B around inf 18.9%
Final simplification18.9%
herbie shell --seed 2023172
(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)))