
(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))))))
(t_1 (- (- C A) (hypot B (- C A)))))
(if (<= t_0 -2e-64)
(* (atan (/ 1.0 (/ B t_1))) (/ 180.0 PI))
(if (<= t_0 0.0)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(* (/ 180.0 PI) (atan (/ t_1 B)))))))
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 t_1 = (C - A) - hypot(B, (C - A));
double tmp;
if (t_0 <= -2e-64) {
tmp = atan((1.0 / (B / t_1))) * (180.0 / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_1 / B));
}
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 t_1 = (C - A) - Math.hypot(B, (C - A));
double tmp;
if (t_0 <= -2e-64) {
tmp = Math.atan((1.0 / (B / t_1))) * (180.0 / Math.PI);
} else if (t_0 <= 0.0) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_1 / B));
}
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)))) t_1 = (C - A) - math.hypot(B, (C - A)) tmp = 0 if t_0 <= -2e-64: tmp = math.atan((1.0 / (B / t_1))) * (180.0 / math.pi) elif t_0 <= 0.0: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan((t_1 / B)) 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))))) t_1 = Float64(Float64(C - A) - hypot(B, Float64(C - A))) tmp = 0.0 if (t_0 <= -2e-64) tmp = Float64(atan(Float64(1.0 / Float64(B / t_1))) * Float64(180.0 / pi)); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_1 / B))); 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)))); t_1 = (C - A) - hypot(B, (C - A)); tmp = 0.0; if (t_0 <= -2e-64) tmp = atan((1.0 / (B / t_1))) * (180.0 / pi); elseif (t_0 <= 0.0) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan((t_1 / B)); 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]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-64], N[(N[ArcTan[N[(1.0 / N[(B / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$1 / B), $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)\\
t_1 := \left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)\\
\mathbf{if}\;t_0 \leq -2 \cdot 10^{-64}:\\
\;\;\;\;\tan^{-1} \left(\frac{1}{\frac{B}{t_1}}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{t_1}{B}\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))))) < -1.99999999999999993e-64Initial program 61.5%
associate-*r/61.5%
associate-*l/61.5%
*-commutative61.5%
Simplified90.3%
clear-num90.3%
inv-pow90.3%
Applied egg-rr90.3%
unpow-190.3%
Simplified90.3%
if -1.99999999999999993e-64 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 25.5%
associate-*r/25.5%
associate-*l/25.5%
*-commutative25.5%
Simplified25.5%
Taylor expanded in B around 0 99.1%
associate-*r/99.1%
Simplified99.1%
if 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 62.0%
associate-*r/62.0%
associate-*l/62.0%
*-commutative62.0%
Simplified88.1%
Final simplification90.2%
(FPCore (A B C)
:precision binary64
(if (<= A -7e-18)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 1.75e+44)
(* (/ 180.0 PI) (atan (/ 1.0 (/ B (- C (hypot C B))))))
(* (/ 180.0 PI) (atan (/ (- B A) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7e-18) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 1.75e+44) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 / (B / (C - hypot(C, B)))));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7e-18) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 1.75e+44) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 / (B / (C - Math.hypot(C, B)))));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7e-18: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 1.75e+44: tmp = (180.0 / math.pi) * math.atan((1.0 / (B / (C - math.hypot(C, B))))) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7e-18) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 1.75e+44) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 / Float64(B / Float64(C - hypot(C, B)))))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7e-18) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 1.75e+44) tmp = (180.0 / pi) * atan((1.0 / (B / (C - hypot(C, B))))); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7e-18], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.75e+44], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 / N[(B / N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7 \cdot 10^{-18}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 1.75 \cdot 10^{+44}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{1}{\frac{B}{C - \mathsf{hypot}\left(C, B\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -6.9999999999999997e-18Initial program 21.5%
associate-*r/21.5%
associate-*l/21.5%
*-commutative21.5%
Simplified56.6%
Taylor expanded in B around 0 81.9%
associate-*r/81.9%
Simplified81.9%
if -6.9999999999999997e-18 < A < 1.75e44Initial program 65.4%
associate-*r/65.4%
associate-*l/65.4%
*-commutative65.4%
Simplified88.8%
clear-num88.8%
inv-pow88.8%
Applied egg-rr88.8%
unpow-188.8%
Simplified88.8%
Taylor expanded in A around 0 59.8%
+-commutative59.8%
unpow259.8%
unpow259.8%
hypot-def83.0%
Simplified83.0%
if 1.75e44 < A Initial program 76.7%
associate-*r/76.7%
associate-*l/76.7%
associate-*l/76.7%
*-lft-identity76.7%
sub-neg76.7%
associate-+l-76.7%
sub-neg76.7%
remove-double-neg76.7%
+-commutative76.7%
unpow276.7%
unpow276.7%
hypot-def94.6%
Simplified94.6%
Taylor expanded in B around -inf 87.3%
neg-mul-187.3%
unsub-neg87.3%
Simplified87.3%
Taylor expanded in C around 0 87.4%
Final simplification83.7%
(FPCore (A B C) :precision binary64 (if (<= A -6.6e-18) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) (* (/ 180.0 PI) (atan (/ (- (- C A) (hypot B (- C A))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.6e-18) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((((C - A) - hypot(B, (C - A))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.6e-18) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan((((C - A) - Math.hypot(B, (C - A))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.6e-18: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan((((C - A) - math.hypot(B, (C - A))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.6e-18) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.6e-18) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan((((C - A) - hypot(B, (C - A))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.6e-18], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.6 \cdot 10^{-18}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)\\
\end{array}
\end{array}
if A < -6.6000000000000003e-18Initial program 21.5%
associate-*r/21.5%
associate-*l/21.5%
*-commutative21.5%
Simplified56.6%
Taylor expanded in B around 0 81.9%
associate-*r/81.9%
Simplified81.9%
if -6.6000000000000003e-18 < A Initial program 68.5%
associate-*r/68.5%
associate-*l/68.5%
*-commutative68.5%
Simplified90.4%
Final simplification88.5%
(FPCore (A B C)
:precision binary64
(if (<= A -7e-18)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 4.2e+45)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (/ (- B A) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7e-18) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 4.2e+45) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7e-18) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 4.2e+45) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7e-18: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 4.2e+45: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7e-18) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 4.2e+45) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7e-18) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 4.2e+45) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7e-18], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.2e+45], 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[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7 \cdot 10^{-18}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{+45}:\\
\;\;\;\;\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{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -6.9999999999999997e-18Initial program 21.5%
associate-*r/21.5%
associate-*l/21.5%
*-commutative21.5%
Simplified56.6%
Taylor expanded in B around 0 81.9%
associate-*r/81.9%
Simplified81.9%
if -6.9999999999999997e-18 < A < 4.1999999999999999e45Initial program 65.4%
associate-*r/65.4%
associate-*l/65.4%
associate-*l/65.4%
*-lft-identity65.4%
sub-neg65.4%
associate-+l-65.4%
sub-neg65.4%
remove-double-neg65.4%
+-commutative65.4%
unpow265.4%
unpow265.4%
hypot-def88.8%
Simplified88.8%
Taylor expanded in A around 0 59.7%
unpow259.7%
unpow259.7%
hypot-def83.0%
Simplified83.0%
if 4.1999999999999999e45 < A Initial program 76.7%
associate-*r/76.7%
associate-*l/76.7%
associate-*l/76.7%
*-lft-identity76.7%
sub-neg76.7%
associate-+l-76.7%
sub-neg76.7%
remove-double-neg76.7%
+-commutative76.7%
unpow276.7%
unpow276.7%
hypot-def94.6%
Simplified94.6%
Taylor expanded in B around -inf 87.3%
neg-mul-187.3%
unsub-neg87.3%
Simplified87.3%
Taylor expanded in C around 0 87.4%
Final simplification83.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- A) B)))))
(if (<= B -5.2e-142)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -4.4e-174)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B -1.6e-205)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= B -3.4e-247)
t_0
(if (<= B 2e-104)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(if (or (<= B 5.2e+64) (not (<= B 8e+82)))
(* (/ 180.0 PI) (atan -1.0))
t_0))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-A / B));
double tmp;
if (B <= -5.2e-142) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -4.4e-174) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= -1.6e-205) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (B <= -3.4e-247) {
tmp = t_0;
} else if (B <= 2e-104) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else if ((B <= 5.2e+64) || !(B <= 8e+82)) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((-A / B));
double tmp;
if (B <= -5.2e-142) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -4.4e-174) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= -1.6e-205) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (B <= -3.4e-247) {
tmp = t_0;
} else if (B <= 2e-104) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else if ((B <= 5.2e+64) || !(B <= 8e+82)) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-A / B)) tmp = 0 if B <= -5.2e-142: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -4.4e-174: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= -1.6e-205: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif B <= -3.4e-247: tmp = t_0 elif B <= 2e-104: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) elif (B <= 5.2e+64) or not (B <= 8e+82): tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))) tmp = 0.0 if (B <= -5.2e-142) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -4.4e-174) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= -1.6e-205) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (B <= -3.4e-247) tmp = t_0; elseif (B <= 2e-104) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); elseif ((B <= 5.2e+64) || !(B <= 8e+82)) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-A / B)); tmp = 0.0; if (B <= -5.2e-142) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -4.4e-174) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= -1.6e-205) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (B <= -3.4e-247) tmp = t_0; elseif (B <= 2e-104) tmp = (180.0 / pi) * atan((0.0 / B)); elseif ((B <= 5.2e+64) || ~((B <= 8e+82))) tmp = (180.0 / pi) * atan(-1.0); else tmp = t_0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.2e-142], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.4e-174], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-205], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.4e-247], t$95$0, If[LessEqual[B, 2e-104], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 5.2e+64], N[Not[LessEqual[B, 8e+82]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\mathbf{if}\;B \leq -5.2 \cdot 10^{-142}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -4.4 \cdot 10^{-174}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-205}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq -3.4 \cdot 10^{-247}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-104}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{+64} \lor \neg \left(B \leq 8 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if B < -5.1999999999999999e-142Initial program 57.8%
associate-*r/57.7%
associate-*l/57.8%
*-commutative57.8%
Simplified83.2%
Taylor expanded in B around -inf 63.4%
if -5.1999999999999999e-142 < B < -4.40000000000000043e-174Initial program 84.2%
associate-*r/84.2%
associate-*l/84.2%
associate-*l/84.2%
*-lft-identity84.2%
sub-neg84.2%
associate-+l-84.2%
sub-neg84.2%
remove-double-neg84.2%
+-commutative84.2%
unpow284.2%
unpow284.2%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around -inf 83.7%
neg-mul-183.7%
unsub-neg83.7%
Simplified83.7%
Taylor expanded in C around inf 83.7%
if -4.40000000000000043e-174 < B < -1.60000000000000005e-205Initial program 30.6%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified69.4%
clear-num69.4%
inv-pow69.4%
Applied egg-rr69.4%
unpow-169.4%
Simplified69.4%
Taylor expanded in A around -inf 79.3%
associate-*r/79.3%
Simplified79.3%
Taylor expanded in B around 0 78.1%
if -1.60000000000000005e-205 < B < -3.4000000000000001e-247 or 5.19999999999999994e64 < B < 7.9999999999999997e82Initial program 63.5%
associate-*r/63.5%
associate-*l/63.5%
associate-*l/63.5%
*-lft-identity63.5%
sub-neg63.5%
associate-+l-63.2%
sub-neg63.2%
remove-double-neg63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
hypot-def69.6%
Simplified69.6%
Taylor expanded in B around -inf 62.8%
neg-mul-162.8%
unsub-neg62.8%
Simplified62.8%
Taylor expanded in A around inf 62.9%
associate-*r/62.9%
mul-1-neg62.9%
Simplified62.9%
if -3.4000000000000001e-247 < B < 1.99999999999999985e-104Initial program 56.3%
associate-*r/56.3%
associate-*l/56.3%
*-commutative56.3%
Simplified90.2%
Taylor expanded in C around inf 42.6%
distribute-rgt1-in42.6%
metadata-eval42.6%
mul0-lft42.6%
metadata-eval42.6%
Simplified42.6%
if 1.99999999999999985e-104 < B < 5.19999999999999994e64 or 7.9999999999999997e82 < B Initial program 58.6%
associate-*r/58.6%
associate-*l/58.6%
*-commutative58.6%
Simplified80.3%
Taylor expanded in B around inf 61.3%
Final simplification58.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- A) B)))))
(if (<= B -4.6e-142)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -1.22e-173)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B -2.5e-207)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= B -2.2e-246)
t_0
(if (<= B 2.05e-102)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(if (or (<= B 5.2e+64) (not (<= B 8e+82)))
(* (/ 180.0 PI) (atan -1.0))
t_0))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-A / B));
double tmp;
if (B <= -4.6e-142) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -1.22e-173) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= -2.5e-207) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (B <= -2.2e-246) {
tmp = t_0;
} else if (B <= 2.05e-102) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else if ((B <= 5.2e+64) || !(B <= 8e+82)) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((-A / B));
double tmp;
if (B <= -4.6e-142) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -1.22e-173) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= -2.5e-207) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (B <= -2.2e-246) {
tmp = t_0;
} else if (B <= 2.05e-102) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else if ((B <= 5.2e+64) || !(B <= 8e+82)) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-A / B)) tmp = 0 if B <= -4.6e-142: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -1.22e-173: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= -2.5e-207: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif B <= -2.2e-246: tmp = t_0 elif B <= 2.05e-102: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) elif (B <= 5.2e+64) or not (B <= 8e+82): tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))) tmp = 0.0 if (B <= -4.6e-142) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -1.22e-173) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= -2.5e-207) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (B <= -2.2e-246) tmp = t_0; elseif (B <= 2.05e-102) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); elseif ((B <= 5.2e+64) || !(B <= 8e+82)) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-A / B)); tmp = 0.0; if (B <= -4.6e-142) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -1.22e-173) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= -2.5e-207) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (B <= -2.2e-246) tmp = t_0; elseif (B <= 2.05e-102) tmp = (180.0 / pi) * atan((0.0 / B)); elseif ((B <= 5.2e+64) || ~((B <= 8e+82))) tmp = (180.0 / pi) * atan(-1.0); else tmp = t_0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.6e-142], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.22e-173], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.5e-207], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.2e-246], t$95$0, If[LessEqual[B, 2.05e-102], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 5.2e+64], N[Not[LessEqual[B, 8e+82]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\mathbf{if}\;B \leq -4.6 \cdot 10^{-142}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -1.22 \cdot 10^{-173}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq -2.5 \cdot 10^{-207}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;B \leq -2.2 \cdot 10^{-246}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{-102}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{+64} \lor \neg \left(B \leq 8 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if B < -4.60000000000000005e-142Initial program 57.8%
associate-*r/57.7%
associate-*l/57.8%
*-commutative57.8%
Simplified83.2%
Taylor expanded in B around -inf 63.4%
if -4.60000000000000005e-142 < B < -1.21999999999999993e-173Initial program 84.2%
associate-*r/84.2%
associate-*l/84.2%
associate-*l/84.2%
*-lft-identity84.2%
sub-neg84.2%
associate-+l-84.2%
sub-neg84.2%
remove-double-neg84.2%
+-commutative84.2%
unpow284.2%
unpow284.2%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around -inf 83.7%
neg-mul-183.7%
unsub-neg83.7%
Simplified83.7%
Taylor expanded in C around inf 83.7%
if -1.21999999999999993e-173 < B < -2.50000000000000007e-207Initial program 30.6%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified69.4%
Taylor expanded in A around -inf 79.3%
if -2.50000000000000007e-207 < B < -2.19999999999999998e-246 or 5.19999999999999994e64 < B < 7.9999999999999997e82Initial program 63.5%
associate-*r/63.5%
associate-*l/63.5%
associate-*l/63.5%
*-lft-identity63.5%
sub-neg63.5%
associate-+l-63.2%
sub-neg63.2%
remove-double-neg63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
hypot-def69.6%
Simplified69.6%
Taylor expanded in B around -inf 62.8%
neg-mul-162.8%
unsub-neg62.8%
Simplified62.8%
Taylor expanded in A around inf 62.9%
associate-*r/62.9%
mul-1-neg62.9%
Simplified62.9%
if -2.19999999999999998e-246 < B < 2.0500000000000001e-102Initial program 56.3%
associate-*r/56.3%
associate-*l/56.3%
*-commutative56.3%
Simplified90.2%
Taylor expanded in C around inf 42.6%
distribute-rgt1-in42.6%
metadata-eval42.6%
mul0-lft42.6%
metadata-eval42.6%
Simplified42.6%
if 2.0500000000000001e-102 < B < 5.19999999999999994e64 or 7.9999999999999997e82 < B Initial program 58.6%
associate-*r/58.6%
associate-*l/58.6%
*-commutative58.6%
Simplified80.3%
Taylor expanded in B around inf 61.3%
Final simplification58.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- A) B)))))
(if (<= B -5.6e-142)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -1.5e-178)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B -6.2e-205)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= B -3.5e-248)
t_0
(if (<= B 9.5e-105)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(if (or (<= B 5.2e+64) (not (<= B 8e+82)))
(* (/ 180.0 PI) (atan -1.0))
t_0))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-A / B));
double tmp;
if (B <= -5.6e-142) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -1.5e-178) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= -6.2e-205) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (B <= -3.5e-248) {
tmp = t_0;
} else if (B <= 9.5e-105) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else if ((B <= 5.2e+64) || !(B <= 8e+82)) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((-A / B));
double tmp;
if (B <= -5.6e-142) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -1.5e-178) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= -6.2e-205) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (B <= -3.5e-248) {
tmp = t_0;
} else if (B <= 9.5e-105) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else if ((B <= 5.2e+64) || !(B <= 8e+82)) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-A / B)) tmp = 0 if B <= -5.6e-142: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -1.5e-178: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= -6.2e-205: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif B <= -3.5e-248: tmp = t_0 elif B <= 9.5e-105: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) elif (B <= 5.2e+64) or not (B <= 8e+82): tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))) tmp = 0.0 if (B <= -5.6e-142) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -1.5e-178) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= -6.2e-205) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (B <= -3.5e-248) tmp = t_0; elseif (B <= 9.5e-105) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); elseif ((B <= 5.2e+64) || !(B <= 8e+82)) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-A / B)); tmp = 0.0; if (B <= -5.6e-142) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -1.5e-178) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= -6.2e-205) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (B <= -3.5e-248) tmp = t_0; elseif (B <= 9.5e-105) tmp = (180.0 / pi) * atan((0.0 / B)); elseif ((B <= 5.2e+64) || ~((B <= 8e+82))) tmp = (180.0 / pi) * atan(-1.0); else tmp = t_0; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.6e-142], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.5e-178], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6.2e-205], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.5e-248], t$95$0, If[LessEqual[B, 9.5e-105], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 5.2e+64], N[Not[LessEqual[B, 8e+82]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\mathbf{if}\;B \leq -5.6 \cdot 10^{-142}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -1.5 \cdot 10^{-178}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-205}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;B \leq -3.5 \cdot 10^{-248}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-105}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{+64} \lor \neg \left(B \leq 8 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if B < -5.60000000000000009e-142Initial program 57.8%
associate-*r/57.7%
associate-*l/57.8%
*-commutative57.8%
Simplified83.2%
Taylor expanded in B around -inf 63.4%
if -5.60000000000000009e-142 < B < -1.4999999999999999e-178Initial program 84.2%
associate-*r/84.2%
associate-*l/84.2%
associate-*l/84.2%
*-lft-identity84.2%
sub-neg84.2%
associate-+l-84.2%
sub-neg84.2%
remove-double-neg84.2%
+-commutative84.2%
unpow284.2%
unpow284.2%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around -inf 83.7%
neg-mul-183.7%
unsub-neg83.7%
Simplified83.7%
Taylor expanded in C around inf 83.7%
if -1.4999999999999999e-178 < B < -6.19999999999999965e-205Initial program 30.6%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified69.4%
Taylor expanded in B around 0 79.3%
associate-*r/79.3%
Simplified79.3%
Taylor expanded in C around 0 79.3%
associate-*r/79.3%
associate-*l/79.6%
*-commutative79.6%
Simplified79.6%
if -6.19999999999999965e-205 < B < -3.49999999999999983e-248 or 5.19999999999999994e64 < B < 7.9999999999999997e82Initial program 63.5%
associate-*r/63.5%
associate-*l/63.5%
associate-*l/63.5%
*-lft-identity63.5%
sub-neg63.5%
associate-+l-63.2%
sub-neg63.2%
remove-double-neg63.2%
+-commutative63.2%
unpow263.2%
unpow263.2%
hypot-def69.6%
Simplified69.6%
Taylor expanded in B around -inf 62.8%
neg-mul-162.8%
unsub-neg62.8%
Simplified62.8%
Taylor expanded in A around inf 62.9%
associate-*r/62.9%
mul-1-neg62.9%
Simplified62.9%
if -3.49999999999999983e-248 < B < 9.5000000000000002e-105Initial program 56.3%
associate-*r/56.3%
associate-*l/56.3%
*-commutative56.3%
Simplified90.2%
Taylor expanded in C around inf 42.6%
distribute-rgt1-in42.6%
metadata-eval42.6%
mul0-lft42.6%
metadata-eval42.6%
Simplified42.6%
if 9.5000000000000002e-105 < B < 5.19999999999999994e64 or 7.9999999999999997e82 < B Initial program 58.6%
associate-*r/58.6%
associate-*l/58.6%
*-commutative58.6%
Simplified80.3%
Taylor expanded in B around inf 61.3%
Final simplification58.9%
(FPCore (A B C)
:precision binary64
(if (<= B -8.6e-142)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -1.4e-176)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B -1.12e-204)
(* (/ 180.0 PI) (atan (* B (/ 0.5 A))))
(if (<= B -1.55e-247)
(* (/ 180.0 PI) (atan (/ (* A -2.0) B)))
(if (<= B 5.3e-102)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(if (or (<= B 5.2e+64) (not (<= B 8e+82)))
(* (/ 180.0 PI) (atan -1.0))
(* (/ 180.0 PI) (atan (/ (- A) B))))))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.6e-142) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -1.4e-176) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= -1.12e-204) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (0.5 / A)));
} else if (B <= -1.55e-247) {
tmp = (180.0 / ((double) M_PI)) * atan(((A * -2.0) / B));
} else if (B <= 5.3e-102) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} else if ((B <= 5.2e+64) || !(B <= 8e+82)) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8.6e-142) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -1.4e-176) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= -1.12e-204) {
tmp = (180.0 / Math.PI) * Math.atan((B * (0.5 / A)));
} else if (B <= -1.55e-247) {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
} else if (B <= 5.3e-102) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else if ((B <= 5.2e+64) || !(B <= 8e+82)) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8.6e-142: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -1.4e-176: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= -1.12e-204: tmp = (180.0 / math.pi) * math.atan((B * (0.5 / A))) elif B <= -1.55e-247: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) elif B <= 5.3e-102: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) elif (B <= 5.2e+64) or not (B <= 8e+82): tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8.6e-142) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -1.4e-176) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= -1.12e-204) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(0.5 / A)))); elseif (B <= -1.55e-247) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(A * -2.0) / B))); elseif (B <= 5.3e-102) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); elseif ((B <= 5.2e+64) || !(B <= 8e+82)) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8.6e-142) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -1.4e-176) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= -1.12e-204) tmp = (180.0 / pi) * atan((B * (0.5 / A))); elseif (B <= -1.55e-247) tmp = (180.0 / pi) * atan(((A * -2.0) / B)); elseif (B <= 5.3e-102) tmp = (180.0 / pi) * atan((0.0 / B)); elseif ((B <= 5.2e+64) || ~((B <= 8e+82))) tmp = (180.0 / pi) * atan(-1.0); else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8.6e-142], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.4e-176], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.12e-204], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.55e-247], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.3e-102], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 5.2e+64], N[Not[LessEqual[B, 8e+82]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8.6 \cdot 10^{-142}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -1.4 \cdot 10^{-176}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq -1.12 \cdot 10^{-204}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{0.5}{A}\right)\\
\mathbf{elif}\;B \leq -1.55 \cdot 10^{-247}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\mathbf{elif}\;B \leq 5.3 \cdot 10^{-102}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{+64} \lor \neg \left(B \leq 8 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if B < -8.5999999999999995e-142Initial program 57.8%
associate-*r/57.7%
associate-*l/57.8%
*-commutative57.8%
Simplified83.2%
Taylor expanded in B around -inf 63.4%
if -8.5999999999999995e-142 < B < -1.4000000000000001e-176Initial program 84.2%
associate-*r/84.2%
associate-*l/84.2%
associate-*l/84.2%
*-lft-identity84.2%
sub-neg84.2%
associate-+l-84.2%
sub-neg84.2%
remove-double-neg84.2%
+-commutative84.2%
unpow284.2%
unpow284.2%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around -inf 83.7%
neg-mul-183.7%
unsub-neg83.7%
Simplified83.7%
Taylor expanded in C around inf 83.7%
if -1.4000000000000001e-176 < B < -1.11999999999999997e-204Initial program 30.6%
associate-*r/30.6%
associate-*l/30.6%
*-commutative30.6%
Simplified69.4%
Taylor expanded in B around 0 79.3%
associate-*r/79.3%
Simplified79.3%
Taylor expanded in C around 0 79.3%
associate-*r/79.3%
associate-*l/79.6%
*-commutative79.6%
Simplified79.6%
if -1.11999999999999997e-204 < B < -1.55000000000000008e-247Initial program 58.0%
associate-*r/58.0%
associate-*l/58.0%
*-commutative58.0%
Simplified76.4%
Taylor expanded in A around inf 59.5%
*-commutative59.5%
Simplified59.5%
if -1.55000000000000008e-247 < B < 5.3000000000000003e-102Initial program 56.3%
associate-*r/56.3%
associate-*l/56.3%
*-commutative56.3%
Simplified90.2%
Taylor expanded in C around inf 42.6%
distribute-rgt1-in42.6%
metadata-eval42.6%
mul0-lft42.6%
metadata-eval42.6%
Simplified42.6%
if 5.3000000000000003e-102 < B < 5.19999999999999994e64 or 7.9999999999999997e82 < B Initial program 58.6%
associate-*r/58.6%
associate-*l/58.6%
*-commutative58.6%
Simplified80.3%
Taylor expanded in B around inf 61.3%
if 5.19999999999999994e64 < B < 7.9999999999999997e82Initial program 72.8%
associate-*r/72.8%
associate-*l/72.8%
associate-*l/72.8%
*-lft-identity72.8%
sub-neg72.8%
associate-+l-72.8%
sub-neg72.8%
remove-double-neg72.8%
+-commutative72.8%
unpow272.8%
unpow272.8%
hypot-def72.7%
Simplified72.7%
Taylor expanded in B around -inf 72.1%
neg-mul-172.1%
unsub-neg72.1%
Simplified72.1%
Taylor expanded in A around inf 72.2%
associate-*r/72.2%
mul-1-neg72.2%
Simplified72.2%
Final simplification59.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ 0.0 B))))
(t_1 (* (/ 180.0 PI) (atan (/ (- A) B)))))
(if (<= B -8.2e-142)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -8e-175)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B -2.65e-205)
t_0
(if (<= B -5.8e-248)
t_1
(if (<= B 2.5e-142)
t_0
(if (<= B 4e-55) t_1 (* (/ 180.0 PI) (atan -1.0))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((0.0 / B));
double t_1 = (180.0 / ((double) M_PI)) * atan((-A / B));
double tmp;
if (B <= -8.2e-142) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -8e-175) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= -2.65e-205) {
tmp = t_0;
} else if (B <= -5.8e-248) {
tmp = t_1;
} else if (B <= 2.5e-142) {
tmp = t_0;
} else if (B <= 4e-55) {
tmp = t_1;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((0.0 / B));
double t_1 = (180.0 / Math.PI) * Math.atan((-A / B));
double tmp;
if (B <= -8.2e-142) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -8e-175) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= -2.65e-205) {
tmp = t_0;
} else if (B <= -5.8e-248) {
tmp = t_1;
} else if (B <= 2.5e-142) {
tmp = t_0;
} else if (B <= 4e-55) {
tmp = t_1;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((0.0 / B)) t_1 = (180.0 / math.pi) * math.atan((-A / B)) tmp = 0 if B <= -8.2e-142: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -8e-175: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= -2.65e-205: tmp = t_0 elif B <= -5.8e-248: tmp = t_1 elif B <= 2.5e-142: tmp = t_0 elif B <= 4e-55: tmp = t_1 else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))) tmp = 0.0 if (B <= -8.2e-142) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -8e-175) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= -2.65e-205) tmp = t_0; elseif (B <= -5.8e-248) tmp = t_1; elseif (B <= 2.5e-142) tmp = t_0; elseif (B <= 4e-55) tmp = t_1; else tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((0.0 / B)); t_1 = (180.0 / pi) * atan((-A / B)); tmp = 0.0; if (B <= -8.2e-142) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -8e-175) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= -2.65e-205) tmp = t_0; elseif (B <= -5.8e-248) tmp = t_1; elseif (B <= 2.5e-142) tmp = t_0; elseif (B <= 4e-55) tmp = t_1; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8.2e-142], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8e-175], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.65e-205], t$95$0, If[LessEqual[B, -5.8e-248], t$95$1, If[LessEqual[B, 2.5e-142], t$95$0, If[LessEqual[B, 4e-55], t$95$1, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\mathbf{if}\;B \leq -8.2 \cdot 10^{-142}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -8 \cdot 10^{-175}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq -2.65 \cdot 10^{-205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -5.8 \cdot 10^{-248}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-142}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-55}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -8.2e-142Initial program 57.8%
associate-*r/57.7%
associate-*l/57.8%
*-commutative57.8%
Simplified83.2%
Taylor expanded in B around -inf 63.4%
if -8.2e-142 < B < -8e-175Initial program 84.2%
associate-*r/84.2%
associate-*l/84.2%
associate-*l/84.2%
*-lft-identity84.2%
sub-neg84.2%
associate-+l-84.2%
sub-neg84.2%
remove-double-neg84.2%
+-commutative84.2%
unpow284.2%
unpow284.2%
hypot-def84.2%
Simplified84.2%
Taylor expanded in B around -inf 83.7%
neg-mul-183.7%
unsub-neg83.7%
Simplified83.7%
Taylor expanded in C around inf 83.7%
if -8e-175 < B < -2.64999999999999996e-205 or -5.8000000000000002e-248 < B < 2.5000000000000001e-142Initial program 54.1%
associate-*r/54.1%
associate-*l/54.1%
*-commutative54.1%
Simplified88.3%
Taylor expanded in C around inf 45.3%
distribute-rgt1-in45.3%
metadata-eval45.3%
mul0-lft45.3%
metadata-eval45.3%
Simplified45.3%
if -2.64999999999999996e-205 < B < -5.8000000000000002e-248 or 2.5000000000000001e-142 < B < 3.99999999999999998e-55Initial program 58.1%
associate-*r/58.1%
associate-*l/58.1%
associate-*l/58.1%
*-lft-identity58.1%
sub-neg58.1%
associate-+l-58.0%
sub-neg58.0%
remove-double-neg58.0%
+-commutative58.0%
unpow258.0%
unpow258.0%
hypot-def67.1%
Simplified67.1%
Taylor expanded in B around -inf 51.2%
neg-mul-151.2%
unsub-neg51.2%
Simplified51.2%
Taylor expanded in A around inf 48.4%
associate-*r/48.4%
mul-1-neg48.4%
Simplified48.4%
if 3.99999999999999998e-55 < B Initial program 59.1%
associate-*r/59.1%
associate-*l/59.1%
*-commutative59.1%
Simplified80.5%
Taylor expanded in B around inf 59.8%
Final simplification57.5%
(FPCore (A B C)
:precision binary64
(if (<= A -5.4e-145)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 1.2e-203)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(if (<= A 1.3e-34)
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
(* (/ 180.0 PI) (atan (/ (- B A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e-145) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 1.2e-203) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else if (A <= 1.3e-34) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e-145) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 1.2e-203) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else if (A <= 1.3e-34) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.4e-145: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 1.2e-203: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) elif A <= 1.3e-34: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.4e-145) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 1.2e-203) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); elseif (A <= 1.3e-34) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.4e-145) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 1.2e-203) tmp = (180.0 / pi) * atan(((B + C) / B)); elseif (A <= 1.3e-34) tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.4e-145], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.2e-203], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.3e-34], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.4 \cdot 10^{-145}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 1.2 \cdot 10^{-203}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-34}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -5.4000000000000001e-145Initial program 27.3%
associate-*r/27.3%
associate-*l/27.3%
*-commutative27.3%
Simplified59.6%
Taylor expanded in B around 0 75.3%
associate-*r/75.3%
Simplified75.3%
if -5.4000000000000001e-145 < A < 1.1999999999999999e-203Initial program 66.0%
associate-*r/66.0%
associate-*l/66.0%
associate-*l/66.0%
*-lft-identity66.0%
sub-neg66.0%
associate-+l-66.0%
sub-neg66.0%
remove-double-neg66.0%
+-commutative66.0%
unpow266.0%
unpow266.0%
hypot-def89.8%
Simplified89.8%
Taylor expanded in B around -inf 57.8%
neg-mul-157.8%
unsub-neg57.8%
Simplified57.8%
Taylor expanded in A around 0 57.1%
if 1.1999999999999999e-203 < A < 1.3e-34Initial program 69.0%
associate-*r/69.0%
associate-*l/69.1%
associate-*l/69.1%
*-lft-identity69.1%
sub-neg69.1%
associate-+l-69.1%
sub-neg69.1%
remove-double-neg69.1%
+-commutative69.1%
unpow269.1%
unpow269.1%
hypot-def92.2%
Simplified92.2%
Taylor expanded in B around inf 58.1%
if 1.3e-34 < 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.7%
Simplified94.7%
Taylor expanded in B around -inf 81.8%
neg-mul-181.8%
unsub-neg81.8%
Simplified81.8%
Taylor expanded in C around 0 79.4%
Final simplification68.6%
(FPCore (A B C)
:precision binary64
(if (<= A -5.4e-5)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -2.4e-142)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(if (<= A 4.2e+97)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(* (/ 180.0 PI) (atan (/ (* A -2.0) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.4e-5) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -2.4e-142) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else if (A <= 4.2e+97) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} 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 tmp;
if (A <= -5.4e-5) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -2.4e-142) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else if (A <= 4.2e+97) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((A * -2.0) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.4e-5: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -2.4e-142: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) elif A <= 4.2e+97: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) else: tmp = (180.0 / math.pi) * math.atan(((A * -2.0) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.4e-5) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -2.4e-142) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); elseif (A <= 4.2e+97) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); 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) tmp = 0.0; if (A <= -5.4e-5) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -2.4e-142) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); elseif (A <= 4.2e+97) tmp = (180.0 / pi) * atan(((B + C) / B)); else tmp = (180.0 / pi) * atan(((A * -2.0) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.4e-5], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.4e-142], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.2e+97], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -2.4 \cdot 10^{-142}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{+97}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -5.3999999999999998e-5Initial program 22.1%
associate-*r/22.1%
associate-*l/22.1%
*-commutative22.1%
Simplified56.8%
Taylor expanded in A around -inf 76.8%
if -5.3999999999999998e-5 < A < -2.39999999999999988e-142Initial program 42.8%
associate-*r/42.7%
associate-*l/42.8%
*-commutative42.8%
Simplified67.8%
Taylor expanded in C around inf 44.8%
fma-def44.8%
associate--l+44.8%
unpow244.8%
fma-def44.8%
unpow244.8%
mul-1-neg44.8%
unpow244.8%
difference-of-squares44.8%
mul-1-neg44.8%
distribute-rgt1-in44.8%
metadata-eval44.8%
mul0-lft44.8%
*-commutative44.8%
mul-1-neg44.8%
Simplified44.8%
Taylor expanded in B around 0 55.7%
associate-*r/55.7%
Simplified55.7%
if -2.39999999999999988e-142 < A < 4.20000000000000023e97Initial program 67.8%
associate-*r/67.8%
associate-*l/67.8%
associate-*l/67.8%
*-lft-identity67.8%
sub-neg67.8%
associate-+l-67.8%
sub-neg67.8%
remove-double-neg67.8%
+-commutative67.8%
unpow267.8%
unpow267.8%
hypot-def91.9%
Simplified91.9%
Taylor expanded in B around -inf 60.0%
neg-mul-160.0%
unsub-neg60.0%
Simplified60.0%
Taylor expanded in A around 0 53.3%
if 4.20000000000000023e97 < A Initial program 78.4%
associate-*r/78.4%
associate-*l/78.4%
*-commutative78.4%
Simplified93.3%
Taylor expanded in A around inf 76.1%
*-commutative76.1%
Simplified76.1%
Final simplification62.2%
(FPCore (A B C)
:precision binary64
(if (<= A -4.8e-10)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -6e-143)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(if (<= A 3.6e-218)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(* (/ 180.0 PI) (atan (/ (- B A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e-10) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -6e-143) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else if (A <= 3.6e-218) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.8e-10) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -6e-143) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else if (A <= 3.6e-218) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.8e-10: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -6e-143: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) elif A <= 3.6e-218: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.8e-10) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -6e-143) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); elseif (A <= 3.6e-218) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.8e-10) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -6e-143) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); elseif (A <= 3.6e-218) tmp = (180.0 / pi) * atan(((B + C) / B)); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.8e-10], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6e-143], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.6e-218], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.8 \cdot 10^{-10}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -6 \cdot 10^{-143}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{elif}\;A \leq 3.6 \cdot 10^{-218}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -4.8e-10Initial program 22.1%
associate-*r/22.1%
associate-*l/22.1%
*-commutative22.1%
Simplified56.8%
Taylor expanded in A around -inf 76.8%
if -4.8e-10 < A < -5.9999999999999997e-143Initial program 42.8%
associate-*r/42.7%
associate-*l/42.8%
*-commutative42.8%
Simplified67.8%
Taylor expanded in C around inf 44.8%
fma-def44.8%
associate--l+44.8%
unpow244.8%
fma-def44.8%
unpow244.8%
mul-1-neg44.8%
unpow244.8%
difference-of-squares44.8%
mul-1-neg44.8%
distribute-rgt1-in44.8%
metadata-eval44.8%
mul0-lft44.8%
*-commutative44.8%
mul-1-neg44.8%
Simplified44.8%
Taylor expanded in B around 0 55.7%
associate-*r/55.7%
Simplified55.7%
if -5.9999999999999997e-143 < A < 3.60000000000000011e-218Initial program 66.3%
associate-*r/66.3%
associate-*l/66.3%
associate-*l/66.3%
*-lft-identity66.3%
sub-neg66.3%
associate-+l-66.3%
sub-neg66.3%
remove-double-neg66.3%
+-commutative66.3%
unpow266.3%
unpow266.3%
hypot-def90.7%
Simplified90.7%
Taylor expanded in B around -inf 57.8%
neg-mul-157.8%
unsub-neg57.8%
Simplified57.8%
Taylor expanded in A around 0 57.8%
if 3.60000000000000011e-218 < A Initial program 72.9%
associate-*r/72.9%
associate-*l/72.9%
associate-*l/72.9%
*-lft-identity72.9%
sub-neg72.9%
associate-+l-72.9%
sub-neg72.9%
remove-double-neg72.9%
+-commutative72.9%
unpow272.9%
unpow272.9%
hypot-def93.1%
Simplified93.1%
Taylor expanded in B around -inf 70.7%
neg-mul-170.7%
unsub-neg70.7%
Simplified70.7%
Taylor expanded in C around 0 67.3%
Final simplification65.8%
(FPCore (A B C)
:precision binary64
(if (<= A -5e-145)
(* 180.0 (/ (atan (* B (/ -0.5 (- C A)))) PI))
(if (<= A 3.6e-218)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(* (/ 180.0 PI) (atan (/ (- B A) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -5e-145) {
tmp = 180.0 * (atan((B * (-0.5 / (C - A)))) / ((double) M_PI));
} else if (A <= 3.6e-218) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5e-145) {
tmp = 180.0 * (Math.atan((B * (-0.5 / (C - A)))) / Math.PI);
} else if (A <= 3.6e-218) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5e-145: tmp = 180.0 * (math.atan((B * (-0.5 / (C - A)))) / math.pi) elif A <= 3.6e-218: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5e-145) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(-0.5 / Float64(C - A)))) / pi)); elseif (A <= 3.6e-218) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5e-145) tmp = 180.0 * (atan((B * (-0.5 / (C - A)))) / pi); elseif (A <= 3.6e-218) tmp = (180.0 / pi) * atan(((B + C) / B)); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5e-145], N[(180.0 * N[(N[ArcTan[N[(B * N[(-0.5 / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.6e-218], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5 \cdot 10^{-145}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{-0.5}{C - A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.6 \cdot 10^{-218}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -4.9999999999999998e-145Initial program 27.3%
associate-*r/27.3%
associate-*l/27.3%
*-commutative27.3%
Simplified59.6%
Taylor expanded in B around 0 75.3%
associate-*r/75.3%
Simplified75.3%
Taylor expanded in B around 0 75.3%
associate-*r/75.3%
associate-*l/75.2%
*-commutative75.2%
Simplified75.2%
if -4.9999999999999998e-145 < A < 3.60000000000000011e-218Initial program 66.3%
associate-*r/66.3%
associate-*l/66.3%
associate-*l/66.3%
*-lft-identity66.3%
sub-neg66.3%
associate-+l-66.3%
sub-neg66.3%
remove-double-neg66.3%
+-commutative66.3%
unpow266.3%
unpow266.3%
hypot-def90.7%
Simplified90.7%
Taylor expanded in B around -inf 57.8%
neg-mul-157.8%
unsub-neg57.8%
Simplified57.8%
Taylor expanded in A around 0 57.8%
if 3.60000000000000011e-218 < A Initial program 72.9%
associate-*r/72.9%
associate-*l/72.9%
associate-*l/72.9%
*-lft-identity72.9%
sub-neg72.9%
associate-+l-72.9%
sub-neg72.9%
remove-double-neg72.9%
+-commutative72.9%
unpow272.9%
unpow272.9%
hypot-def93.1%
Simplified93.1%
Taylor expanded in B around -inf 70.7%
neg-mul-170.7%
unsub-neg70.7%
Simplified70.7%
Taylor expanded in C around 0 67.3%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(if (<= A -7.5e-143)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(if (<= A 3.6e-218)
(* (/ 180.0 PI) (atan (/ (+ B C) B)))
(* (/ 180.0 PI) (atan (/ (- B A) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7.5e-143) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else if (A <= 3.6e-218) {
tmp = (180.0 / ((double) M_PI)) * atan(((B + C) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7.5e-143) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else if (A <= 3.6e-218) {
tmp = (180.0 / Math.PI) * Math.atan(((B + C) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7.5e-143: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) elif A <= 3.6e-218: tmp = (180.0 / math.pi) * math.atan(((B + C) / B)) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7.5e-143) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); elseif (A <= 3.6e-218) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B + C) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7.5e-143) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); elseif (A <= 3.6e-218) tmp = (180.0 / pi) * atan(((B + C) / B)); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7.5e-143], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.6e-218], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.5 \cdot 10^{-143}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{elif}\;A \leq 3.6 \cdot 10^{-218}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -7.5000000000000003e-143Initial program 27.3%
associate-*r/27.3%
associate-*l/27.3%
*-commutative27.3%
Simplified59.6%
Taylor expanded in B around 0 75.3%
associate-*r/75.3%
Simplified75.3%
if -7.5000000000000003e-143 < A < 3.60000000000000011e-218Initial program 66.3%
associate-*r/66.3%
associate-*l/66.3%
associate-*l/66.3%
*-lft-identity66.3%
sub-neg66.3%
associate-+l-66.3%
sub-neg66.3%
remove-double-neg66.3%
+-commutative66.3%
unpow266.3%
unpow266.3%
hypot-def90.7%
Simplified90.7%
Taylor expanded in B around -inf 57.8%
neg-mul-157.8%
unsub-neg57.8%
Simplified57.8%
Taylor expanded in A around 0 57.8%
if 3.60000000000000011e-218 < A Initial program 72.9%
associate-*r/72.9%
associate-*l/72.9%
associate-*l/72.9%
*-lft-identity72.9%
sub-neg72.9%
associate-+l-72.9%
sub-neg72.9%
remove-double-neg72.9%
+-commutative72.9%
unpow272.9%
unpow272.9%
hypot-def93.1%
Simplified93.1%
Taylor expanded in B around -inf 70.7%
neg-mul-170.7%
unsub-neg70.7%
Simplified70.7%
Taylor expanded in C around 0 67.3%
Final simplification66.9%
(FPCore (A B C) :precision binary64 (if (<= A -1.5e-142) (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))) (* (/ 180.0 PI) (atan (/ (+ C (- B A)) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e-142) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e-142) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e-142: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e-142) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e-142) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 / pi) * atan(((C + (B - A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e-142], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{-142}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\end{array}
\end{array}
if A < -1.5000000000000001e-142Initial program 27.3%
associate-*r/27.3%
associate-*l/27.3%
*-commutative27.3%
Simplified59.6%
Taylor expanded in B around 0 75.3%
associate-*r/75.3%
Simplified75.3%
if -1.5000000000000001e-142 < 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-def92.2%
Simplified92.2%
Taylor expanded in B around -inf 65.6%
neg-mul-165.6%
unsub-neg65.6%
Simplified65.6%
Final simplification68.4%
(FPCore (A B C)
:precision binary64
(if (<= B -3.2e-122)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 1.85e-103)
(* (/ 180.0 PI) (atan (/ 0.0 B)))
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.2e-122) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 1.85e-103) {
tmp = (180.0 / ((double) M_PI)) * atan((0.0 / B));
} 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 <= -3.2e-122) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 1.85e-103) {
tmp = (180.0 / Math.PI) * Math.atan((0.0 / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.2e-122: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 1.85e-103: tmp = (180.0 / math.pi) * math.atan((0.0 / B)) else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.2e-122) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 1.85e-103) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.0 / B))); 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 <= -3.2e-122) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 1.85e-103) tmp = (180.0 / pi) * atan((0.0 / B)); else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.2e-122], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.85e-103], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.0 / B), $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 -3.2 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-103}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -3.2000000000000002e-122Initial program 58.2%
associate-*r/58.2%
associate-*l/58.2%
*-commutative58.2%
Simplified82.0%
Taylor expanded in B around -inf 66.2%
if -3.2000000000000002e-122 < B < 1.85e-103Initial program 56.7%
associate-*r/56.7%
associate-*l/56.7%
*-commutative56.7%
Simplified87.3%
Taylor expanded in C around inf 37.7%
distribute-rgt1-in37.7%
metadata-eval37.7%
mul0-lft37.7%
metadata-eval37.7%
Simplified37.7%
if 1.85e-103 < B Initial program 59.7%
associate-*r/59.7%
associate-*l/59.7%
*-commutative59.7%
Simplified79.7%
Taylor expanded in B around inf 57.5%
Final simplification53.7%
(FPCore (A B C) :precision binary64 (if (<= B -8.5e-305) (* (/ 180.0 PI) (atan 1.0)) (* (/ 180.0 PI) (atan -1.0))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.5e-305) {
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 <= -8.5e-305) {
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 <= -8.5e-305: 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 <= -8.5e-305) 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 <= -8.5e-305) 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, -8.5e-305], 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 -8.5 \cdot 10^{-305}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -8.4999999999999997e-305Initial program 58.4%
associate-*r/58.4%
associate-*l/58.4%
*-commutative58.4%
Simplified82.4%
Taylor expanded in B around -inf 50.3%
if -8.4999999999999997e-305 < B Initial program 58.0%
associate-*r/58.0%
associate-*l/58.0%
*-commutative58.0%
Simplified83.6%
Taylor expanded in B around inf 42.3%
Final simplification46.1%
(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 58.2%
associate-*r/58.2%
associate-*l/58.2%
*-commutative58.2%
Simplified83.0%
Taylor expanded in B around inf 23.0%
Final simplification23.0%
herbie shell --seed 2023224
(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)))