
(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 20 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 (atan (/ (- (- C A) (hypot B (- C A))) B))))
(if (<= t_0 -5e-118)
(/ (* t_1 180.0) PI)
(if (<= t_0 0.0)
(* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))
(* t_1 (/ 180.0 PI))))))
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 = atan((((C - A) - hypot(B, (C - A))) / B));
double tmp;
if (t_0 <= -5e-118) {
tmp = (t_1 * 180.0) / ((double) M_PI);
} else if (t_0 <= 0.0) {
tmp = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
} else {
tmp = t_1 * (180.0 / ((double) M_PI));
}
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 = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B));
double tmp;
if (t_0 <= -5e-118) {
tmp = (t_1 * 180.0) / Math.PI;
} else if (t_0 <= 0.0) {
tmp = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
} else {
tmp = t_1 * (180.0 / Math.PI);
}
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 = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) tmp = 0 if t_0 <= -5e-118: tmp = (t_1 * 180.0) / math.pi elif t_0 <= 0.0: tmp = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi) else: tmp = t_1 * (180.0 / math.pi) 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 = atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) tmp = 0.0 if (t_0 <= -5e-118) tmp = Float64(Float64(t_1 * 180.0) / pi); elseif (t_0 <= 0.0) tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi)); else tmp = Float64(t_1 * Float64(180.0 / pi)); 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 = atan((((C - A) - hypot(B, (C - A))) / B)); tmp = 0.0; if (t_0 <= -5e-118) tmp = (t_1 * 180.0) / pi; elseif (t_0 <= 0.0) tmp = atan(((B * -0.5) / (C - A))) * (180.0 / pi); else tmp = t_1 * (180.0 / pi); 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[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -5e-118], N[(N[(t$95$1 * 180.0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[t$95$0, 0.0], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(180.0 / Pi), $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 := \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right)\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{-118}:\\
\;\;\;\;\frac{t_1 \cdot 180}{\pi}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \frac{180}{\pi}\\
\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))))) < -5.00000000000000015e-118Initial program 59.0%
associate-*r/59.0%
associate-*l/59.0%
*-commutative59.0%
Simplified90.2%
associate-*r/90.2%
Applied egg-rr90.2%
if -5.00000000000000015e-118 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 21.8%
associate-*r/21.8%
associate-*l/21.8%
*-commutative21.8%
Simplified21.8%
Taylor expanded in B around 0 99.2%
associate-*r/99.3%
Simplified99.3%
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 61.3%
associate-*r/61.3%
associate-*l/61.3%
*-commutative61.3%
Simplified89.8%
Final simplification91.3%
(FPCore (A B C) :precision binary64 (if (<= C 1.9e+121) (* (atan (/ (- (- C A) (hypot B (- C A))) B)) (/ 180.0 PI)) (* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 1.9e+121) {
tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 1.9e+121) {
tmp = Math.atan((((C - A) - Math.hypot(B, (C - A))) / B)) * (180.0 / Math.PI);
} else {
tmp = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 1.9e+121: tmp = math.atan((((C - A) - math.hypot(B, (C - A))) / B)) * (180.0 / math.pi) else: tmp = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 1.9e+121) tmp = Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(C - A))) / B)) * Float64(180.0 / pi)); else tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 1.9e+121) tmp = atan((((C - A) - hypot(B, (C - A))) / B)) * (180.0 / pi); else tmp = atan(((B * -0.5) / (C - A))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 1.9e+121], 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[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.9 \cdot 10^{+121}:\\
\;\;\;\;\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, C - A\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < 1.9e121Initial program 59.5%
associate-*r/59.5%
associate-*l/59.5%
*-commutative59.5%
Simplified83.6%
if 1.9e121 < C Initial program 12.7%
associate-*r/12.7%
associate-*l/12.7%
*-commutative12.7%
Simplified52.0%
Taylor expanded in B around 0 93.4%
associate-*r/93.4%
Simplified93.4%
Final simplification84.6%
(FPCore (A B C)
:precision binary64
(if (<= A -2.75e+104)
(* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))
(if (<= A 2e-19)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(* (/ 180.0 PI) (atan (/ (- C (- A B)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.75e+104) {
tmp = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
} else if (A <= 2e-19) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.75e+104) {
tmp = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
} else if (A <= 2e-19) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.75e+104: tmp = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi) elif A <= 2e-19: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.75e+104) tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi)); elseif (A <= 2e-19) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.75e+104) tmp = atan(((B * -0.5) / (C - A))) * (180.0 / pi); elseif (A <= 2e-19) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); else tmp = (180.0 / pi) * atan(((C - (A - B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.75e+104], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e-19], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.75 \cdot 10^{+104}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-19}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
\end{array}
\end{array}
if A < -2.75000000000000008e104Initial program 19.4%
associate-*r/19.4%
associate-*l/19.4%
*-commutative19.4%
Simplified60.2%
Taylor expanded in B around 0 75.7%
associate-*r/75.7%
Simplified75.7%
if -2.75000000000000008e104 < A < 2e-19Initial program 55.0%
associate-*r/55.0%
associate-*l/55.0%
associate-*l/55.0%
*-lft-identity55.0%
sub-neg55.0%
associate-+l-54.3%
sub-neg54.3%
remove-double-neg54.3%
+-commutative54.3%
unpow254.3%
unpow254.3%
hypot-def79.7%
Simplified79.7%
Taylor expanded in A around 0 53.4%
unpow253.4%
unpow253.4%
hypot-def78.9%
Simplified78.9%
if 2e-19 < A Initial program 83.6%
associate-*r/83.6%
associate-*l/83.6%
associate-*l/83.6%
*-lft-identity83.6%
sub-neg83.6%
associate-+l-83.6%
sub-neg83.6%
remove-double-neg83.6%
+-commutative83.6%
unpow283.6%
unpow283.6%
hypot-def97.0%
Simplified97.0%
Taylor expanded in B around -inf 87.8%
neg-mul-187.8%
unsub-neg87.8%
Simplified87.8%
Final simplification80.5%
(FPCore (A B C)
:precision binary64
(if (<= C -1.06e-7)
(* (/ 180.0 PI) (atan (/ (- C (hypot B C)) B)))
(if (<= C 1.8e+120)
(/ (* (atan (/ (+ A (hypot A B)) B)) -180.0) PI)
(* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.06e-7) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(B, C)) / B));
} else if (C <= 1.8e+120) {
tmp = (atan(((A + hypot(A, B)) / B)) * -180.0) / ((double) M_PI);
} else {
tmp = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.06e-7) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(B, C)) / B));
} else if (C <= 1.8e+120) {
tmp = (Math.atan(((A + Math.hypot(A, B)) / B)) * -180.0) / Math.PI;
} else {
tmp = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.06e-7: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(B, C)) / B)) elif C <= 1.8e+120: tmp = (math.atan(((A + math.hypot(A, B)) / B)) * -180.0) / math.pi else: tmp = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.06e-7) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(B, C)) / B))); elseif (C <= 1.8e+120) tmp = Float64(Float64(atan(Float64(Float64(A + hypot(A, B)) / B)) * -180.0) / pi); else tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.06e-7) tmp = (180.0 / pi) * atan(((C - hypot(B, C)) / B)); elseif (C <= 1.8e+120) tmp = (atan(((A + hypot(A, B)) / B)) * -180.0) / pi; else tmp = atan(((B * -0.5) / (C - A))) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.06e-7], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.8e+120], N[(N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * -180.0), $MachinePrecision] / Pi), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.06 \cdot 10^{-7}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)\\
\mathbf{elif}\;C \leq 1.8 \cdot 10^{+120}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{B}\right) \cdot -180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -1.06e-7Initial program 70.2%
associate-*r/70.2%
associate-*l/70.2%
associate-*l/70.2%
*-lft-identity70.2%
sub-neg70.2%
associate-+l-70.2%
sub-neg70.2%
remove-double-neg70.2%
+-commutative70.2%
unpow270.2%
unpow270.2%
hypot-def86.1%
Simplified86.1%
Taylor expanded in A around 0 70.2%
unpow270.2%
unpow270.2%
hypot-def85.2%
Simplified85.2%
if -1.06e-7 < C < 1.80000000000000008e120Initial program 55.0%
associate-*r/55.0%
associate-*l/55.0%
*-commutative55.0%
Simplified79.5%
associate-*r/79.5%
Applied egg-rr79.5%
Taylor expanded in C around 0 53.8%
mul-1-neg53.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def78.6%
Simplified78.6%
expm1-log1p-u44.9%
expm1-udef44.9%
distribute-frac-neg44.9%
atan-neg44.9%
Applied egg-rr44.9%
expm1-def44.9%
expm1-log1p78.6%
distribute-lft-neg-out78.6%
distribute-rgt-neg-in78.6%
metadata-eval78.6%
Simplified78.6%
if 1.80000000000000008e120 < C Initial program 12.7%
associate-*r/12.7%
associate-*l/12.7%
*-commutative12.7%
Simplified52.0%
Taylor expanded in B around 0 93.4%
associate-*r/93.4%
Simplified93.4%
Final simplification81.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- C (+ B A)) B))))
(t_1 (* (/ 180.0 PI) (atan (/ (- B A) B))))
(t_2 (* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))))
(if (<= B -2.6e-62)
t_1
(if (<= B -3e-180)
t_0
(if (<= B -3.8e-188)
t_1
(if (<= B -3.7e-295)
t_2
(if (<= B 1.75e-279)
(* (/ 180.0 PI) (atan (/ (* (- C A) 2.0) B)))
(if (or (<= B 4.6e-215)
(and (not (<= B 1.28e-107)) (<= B 3.8e-69)))
t_2
t_0))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
double t_1 = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
double t_2 = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
double tmp;
if (B <= -2.6e-62) {
tmp = t_1;
} else if (B <= -3e-180) {
tmp = t_0;
} else if (B <= -3.8e-188) {
tmp = t_1;
} else if (B <= -3.7e-295) {
tmp = t_2;
} else if (B <= 1.75e-279) {
tmp = (180.0 / ((double) M_PI)) * atan((((C - A) * 2.0) / B));
} else if ((B <= 4.6e-215) || (!(B <= 1.28e-107) && (B <= 3.8e-69))) {
tmp = t_2;
} 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(((C - (B + A)) / B));
double t_1 = (180.0 / Math.PI) * Math.atan(((B - A) / B));
double t_2 = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
double tmp;
if (B <= -2.6e-62) {
tmp = t_1;
} else if (B <= -3e-180) {
tmp = t_0;
} else if (B <= -3.8e-188) {
tmp = t_1;
} else if (B <= -3.7e-295) {
tmp = t_2;
} else if (B <= 1.75e-279) {
tmp = (180.0 / Math.PI) * Math.atan((((C - A) * 2.0) / B));
} else if ((B <= 4.6e-215) || (!(B <= 1.28e-107) && (B <= 3.8e-69))) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) t_1 = (180.0 / math.pi) * math.atan(((B - A) / B)) t_2 = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi) tmp = 0 if B <= -2.6e-62: tmp = t_1 elif B <= -3e-180: tmp = t_0 elif B <= -3.8e-188: tmp = t_1 elif B <= -3.7e-295: tmp = t_2 elif B <= 1.75e-279: tmp = (180.0 / math.pi) * math.atan((((C - A) * 2.0) / B)) elif (B <= 4.6e-215) or (not (B <= 1.28e-107) and (B <= 3.8e-69)): tmp = t_2 else: tmp = t_0 return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))) t_2 = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi)) tmp = 0.0 if (B <= -2.6e-62) tmp = t_1; elseif (B <= -3e-180) tmp = t_0; elseif (B <= -3.8e-188) tmp = t_1; elseif (B <= -3.7e-295) tmp = t_2; elseif (B <= 1.75e-279) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(C - A) * 2.0) / B))); elseif ((B <= 4.6e-215) || (!(B <= 1.28e-107) && (B <= 3.8e-69))) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((C - (B + A)) / B)); t_1 = (180.0 / pi) * atan(((B - A) / B)); t_2 = atan(((B * -0.5) / (C - A))) * (180.0 / pi); tmp = 0.0; if (B <= -2.6e-62) tmp = t_1; elseif (B <= -3e-180) tmp = t_0; elseif (B <= -3.8e-188) tmp = t_1; elseif (B <= -3.7e-295) tmp = t_2; elseif (B <= 1.75e-279) tmp = (180.0 / pi) * atan((((C - A) * 2.0) / B)); elseif ((B <= 4.6e-215) || (~((B <= 1.28e-107)) && (B <= 3.8e-69))) tmp = t_2; 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[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.6e-62], t$95$1, If[LessEqual[B, -3e-180], t$95$0, If[LessEqual[B, -3.8e-188], t$95$1, If[LessEqual[B, -3.7e-295], t$95$2, If[LessEqual[B, 1.75e-279], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 4.6e-215], And[N[Not[LessEqual[B, 1.28e-107]], $MachinePrecision], LessEqual[B, 3.8e-69]]], t$95$2, t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
t_2 := \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{if}\;B \leq -2.6 \cdot 10^{-62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -3 \cdot 10^{-180}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.8 \cdot 10^{-188}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -3.7 \cdot 10^{-295}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 1.75 \cdot 10^{-279}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)\\
\mathbf{elif}\;B \leq 4.6 \cdot 10^{-215} \lor \neg \left(B \leq 1.28 \cdot 10^{-107}\right) \land B \leq 3.8 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if B < -2.5999999999999999e-62 or -3.0000000000000001e-180 < B < -3.8e-188Initial program 55.1%
associate-*r/55.0%
associate-*l/55.1%
associate-*l/55.1%
*-lft-identity55.1%
sub-neg55.1%
associate-+l-55.3%
sub-neg55.3%
remove-double-neg55.3%
+-commutative55.3%
unpow255.3%
unpow255.3%
hypot-def79.9%
Simplified79.9%
Taylor expanded in B around -inf 78.3%
neg-mul-178.3%
unsub-neg78.3%
Simplified78.3%
Taylor expanded in C around 0 72.1%
if -2.5999999999999999e-62 < B < -3.0000000000000001e-180 or 4.5999999999999998e-215 < B < 1.28e-107 or 3.7999999999999998e-69 < B Initial program 57.3%
associate-*r/57.3%
associate-*l/57.3%
associate-*l/57.3%
*-lft-identity57.3%
sub-neg57.3%
associate-+l-57.3%
sub-neg57.3%
remove-double-neg57.3%
+-commutative57.3%
unpow257.3%
unpow257.3%
hypot-def79.1%
Simplified79.1%
Taylor expanded in B around inf 74.8%
if -3.8e-188 < B < -3.6999999999999999e-295 or 1.75000000000000005e-279 < B < 4.5999999999999998e-215 or 1.28e-107 < B < 3.7999999999999998e-69Initial program 43.1%
associate-*r/43.1%
associate-*l/43.1%
*-commutative43.1%
Simplified67.4%
Taylor expanded in B around 0 71.7%
associate-*r/71.8%
Simplified71.8%
if -3.6999999999999999e-295 < B < 1.75000000000000005e-279Initial program 75.8%
associate-*r/75.8%
associate-*l/75.8%
*-commutative75.8%
Simplified100.0%
Taylor expanded in C around -inf 75.8%
+-commutative75.8%
metadata-eval75.8%
cancel-sign-sub-inv75.8%
distribute-lft-out--75.8%
Simplified75.8%
Final simplification73.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- B A) B)))))
(if (<= C -7e+41)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(if (<= C -1e-142)
t_0
(if (<= C -1.8e-243)
(* (/ 180.0 PI) (atan (- -1.0 (/ A B))))
(if (or (<= C 1.7e-166) (and (not (<= C 6.3e-72)) (<= C 8.6e+85)))
t_0
(* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
double tmp;
if (C <= -7e+41) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else if (C <= -1e-142) {
tmp = t_0;
} else if (C <= -1.8e-243) {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
} else if ((C <= 1.7e-166) || (!(C <= 6.3e-72) && (C <= 8.6e+85))) {
tmp = t_0;
} else {
tmp = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((B - A) / B));
double tmp;
if (C <= -7e+41) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else if (C <= -1e-142) {
tmp = t_0;
} else if (C <= -1.8e-243) {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
} else if ((C <= 1.7e-166) || (!(C <= 6.3e-72) && (C <= 8.6e+85))) {
tmp = t_0;
} else {
tmp = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B - A) / B)) tmp = 0 if C <= -7e+41: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) elif C <= -1e-142: tmp = t_0 elif C <= -1.8e-243: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) elif (C <= 1.7e-166) or (not (C <= 6.3e-72) and (C <= 8.6e+85)): tmp = t_0 else: tmp = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))) tmp = 0.0 if (C <= -7e+41) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); elseif (C <= -1e-142) tmp = t_0; elseif (C <= -1.8e-243) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); elseif ((C <= 1.7e-166) || (!(C <= 6.3e-72) && (C <= 8.6e+85))) tmp = t_0; else tmp = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B - A) / B)); tmp = 0.0; if (C <= -7e+41) tmp = (180.0 / pi) * atan(((C - B) / B)); elseif (C <= -1e-142) tmp = t_0; elseif (C <= -1.8e-243) tmp = (180.0 / pi) * atan((-1.0 - (A / B))); elseif ((C <= 1.7e-166) || (~((C <= 6.3e-72)) && (C <= 8.6e+85))) tmp = t_0; else tmp = atan(((B * -0.5) / (C - A))) * (180.0 / 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 - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -7e+41], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1e-142], t$95$0, If[LessEqual[C, -1.8e-243], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[C, 1.7e-166], And[N[Not[LessEqual[C, 6.3e-72]], $MachinePrecision], LessEqual[C, 8.6e+85]]], t$95$0, N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\mathbf{if}\;C \leq -7 \cdot 10^{+41}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{elif}\;C \leq -1 \cdot 10^{-142}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq -1.8 \cdot 10^{-243}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\mathbf{elif}\;C \leq 1.7 \cdot 10^{-166} \lor \neg \left(C \leq 6.3 \cdot 10^{-72}\right) \land C \leq 8.6 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -6.9999999999999998e41Initial program 70.7%
associate-*r/70.7%
associate-*l/70.7%
associate-*l/70.7%
*-lft-identity70.7%
sub-neg70.7%
associate-+l-70.7%
sub-neg70.7%
remove-double-neg70.7%
+-commutative70.7%
unpow270.7%
unpow270.7%
hypot-def87.4%
Simplified87.4%
Taylor expanded in B around inf 77.4%
Taylor expanded in A around 0 77.7%
if -6.9999999999999998e41 < C < -1e-142 or -1.8000000000000001e-243 < C < 1.6999999999999999e-166 or 6.3000000000000003e-72 < C < 8.5999999999999998e85Initial program 55.1%
associate-*r/55.1%
associate-*l/55.1%
associate-*l/55.1%
*-lft-identity55.1%
sub-neg55.1%
associate-+l-53.6%
sub-neg53.6%
remove-double-neg53.6%
+-commutative53.6%
unpow253.6%
unpow253.6%
hypot-def75.3%
Simplified75.3%
Taylor expanded in B around -inf 60.7%
neg-mul-160.7%
unsub-neg60.7%
Simplified60.7%
Taylor expanded in C around 0 58.7%
if -1e-142 < C < -1.8000000000000001e-243Initial program 66.5%
associate-*r/66.5%
associate-*l/66.5%
associate-*l/66.5%
*-lft-identity66.5%
sub-neg66.5%
associate-+l-66.4%
sub-neg66.4%
remove-double-neg66.4%
+-commutative66.4%
unpow266.4%
unpow266.4%
hypot-def82.4%
Simplified82.4%
Taylor expanded in B around inf 65.3%
Taylor expanded in C around 0 64.6%
mul-1-neg64.6%
distribute-frac-neg64.6%
distribute-neg-in64.6%
sub-neg64.6%
div-sub64.6%
mul-1-neg64.6%
associate-*r/64.6%
*-inverses64.6%
sub-neg64.6%
metadata-eval64.6%
+-commutative64.6%
mul-1-neg64.6%
unsub-neg64.6%
Simplified64.6%
if 1.6999999999999999e-166 < C < 6.3000000000000003e-72 or 8.5999999999999998e85 < C Initial program 27.1%
associate-*r/27.1%
associate-*l/27.1%
*-commutative27.1%
Simplified59.1%
Taylor expanded in B around 0 78.3%
associate-*r/78.4%
Simplified78.4%
Final simplification67.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (/ (* B -0.5) (- C A))) (/ 180.0 PI))))
(if (<= B -4.3e-188)
(* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))
(if (<= B -1.95e-294)
t_0
(if (<= B 1.65e-279)
(* (/ 180.0 PI) (atan (/ (* (- C A) 2.0) B)))
(if (or (<= B 1.2e-213) (and (not (<= B 8.2e-107)) (<= B 4.6e-71)))
t_0
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))))))))
double code(double A, double B, double C) {
double t_0 = atan(((B * -0.5) / (C - A))) * (180.0 / ((double) M_PI));
double tmp;
if (B <= -4.3e-188) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
} else if (B <= -1.95e-294) {
tmp = t_0;
} else if (B <= 1.65e-279) {
tmp = (180.0 / ((double) M_PI)) * atan((((C - A) * 2.0) / B));
} else if ((B <= 1.2e-213) || (!(B <= 8.2e-107) && (B <= 4.6e-71))) {
tmp = t_0;
} 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 t_0 = Math.atan(((B * -0.5) / (C - A))) * (180.0 / Math.PI);
double tmp;
if (B <= -4.3e-188) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
} else if (B <= -1.95e-294) {
tmp = t_0;
} else if (B <= 1.65e-279) {
tmp = (180.0 / Math.PI) * Math.atan((((C - A) * 2.0) / B));
} else if ((B <= 1.2e-213) || (!(B <= 8.2e-107) && (B <= 4.6e-71))) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((B * -0.5) / (C - A))) * (180.0 / math.pi) tmp = 0 if B <= -4.3e-188: tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B)) elif B <= -1.95e-294: tmp = t_0 elif B <= 1.65e-279: tmp = (180.0 / math.pi) * math.atan((((C - A) * 2.0) / B)) elif (B <= 1.2e-213) or (not (B <= 8.2e-107) and (B <= 4.6e-71)): tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) * Float64(180.0 / pi)) tmp = 0.0 if (B <= -4.3e-188) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B))); elseif (B <= -1.95e-294) tmp = t_0; elseif (B <= 1.65e-279) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(C - A) * 2.0) / B))); elseif ((B <= 1.2e-213) || (!(B <= 8.2e-107) && (B <= 4.6e-71))) tmp = t_0; 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) t_0 = atan(((B * -0.5) / (C - A))) * (180.0 / pi); tmp = 0.0; if (B <= -4.3e-188) tmp = (180.0 / pi) * atan(((C - (A - B)) / B)); elseif (B <= -1.95e-294) tmp = t_0; elseif (B <= 1.65e-279) tmp = (180.0 / pi) * atan((((C - A) * 2.0) / B)); elseif ((B <= 1.2e-213) || (~((B <= 8.2e-107)) && (B <= 4.6e-71))) tmp = t_0; else tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.3e-188], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.95e-294], t$95$0, If[LessEqual[B, 1.65e-279], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[B, 1.2e-213], And[N[Not[LessEqual[B, 8.2e-107]], $MachinePrecision], LessEqual[B, 4.6e-71]]], t$95$0, 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}
t_0 := \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{if}\;B \leq -4.3 \cdot 10^{-188}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
\mathbf{elif}\;B \leq -1.95 \cdot 10^{-294}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{-279}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-213} \lor \neg \left(B \leq 8.2 \cdot 10^{-107}\right) \land B \leq 4.6 \cdot 10^{-71}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\end{array}
\end{array}
if B < -4.29999999999999988e-188Initial program 58.4%
associate-*r/58.4%
associate-*l/58.4%
associate-*l/58.4%
*-lft-identity58.4%
sub-neg58.4%
associate-+l-58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
unpow258.6%
unpow258.6%
hypot-def78.1%
Simplified78.1%
Taylor expanded in B around -inf 76.1%
neg-mul-176.1%
unsub-neg76.1%
Simplified76.1%
if -4.29999999999999988e-188 < B < -1.9500000000000001e-294 or 1.65e-279 < B < 1.19999999999999998e-213 or 8.1999999999999998e-107 < B < 4.5999999999999997e-71Initial program 43.1%
associate-*r/43.1%
associate-*l/43.1%
*-commutative43.1%
Simplified67.4%
Taylor expanded in B around 0 71.7%
associate-*r/71.8%
Simplified71.8%
if -1.9500000000000001e-294 < B < 1.65e-279Initial program 75.8%
associate-*r/75.8%
associate-*l/75.8%
*-commutative75.8%
Simplified100.0%
Taylor expanded in C around -inf 75.8%
+-commutative75.8%
metadata-eval75.8%
cancel-sign-sub-inv75.8%
distribute-lft-out--75.8%
Simplified75.8%
if 1.19999999999999998e-213 < B < 8.1999999999999998e-107 or 4.5999999999999997e-71 < B Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
associate-*l/54.0%
*-lft-identity54.0%
sub-neg54.0%
associate-+l-54.0%
sub-neg54.0%
remove-double-neg54.0%
+-commutative54.0%
unpow254.0%
unpow254.0%
hypot-def81.0%
Simplified81.0%
Taylor expanded in B around inf 76.4%
Final simplification75.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (* B -0.5) (- C A)))) (t_1 (* t_0 (/ 180.0 PI))))
(if (<= B -2.6e-188)
(* (/ 180.0 PI) (atan (/ (- C (- A B)) B)))
(if (<= B -1.1e-292)
t_1
(if (<= B 1.5e-279)
(* (/ 180.0 PI) (atan (/ (* (- C A) 2.0) B)))
(if (<= B 5.8e-214)
(/ (* 180.0 t_0) PI)
(if (or (<= B 4.4e-104) (not (<= B 1.9e-65)))
(* (/ 180.0 PI) (atan (/ (- C (+ B A)) B)))
t_1)))))))
double code(double A, double B, double C) {
double t_0 = atan(((B * -0.5) / (C - A)));
double t_1 = t_0 * (180.0 / ((double) M_PI));
double tmp;
if (B <= -2.6e-188) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A - B)) / B));
} else if (B <= -1.1e-292) {
tmp = t_1;
} else if (B <= 1.5e-279) {
tmp = (180.0 / ((double) M_PI)) * atan((((C - A) * 2.0) / B));
} else if (B <= 5.8e-214) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else if ((B <= 4.4e-104) || !(B <= 1.9e-65)) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (B + A)) / B));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((B * -0.5) / (C - A)));
double t_1 = t_0 * (180.0 / Math.PI);
double tmp;
if (B <= -2.6e-188) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A - B)) / B));
} else if (B <= -1.1e-292) {
tmp = t_1;
} else if (B <= 1.5e-279) {
tmp = (180.0 / Math.PI) * Math.atan((((C - A) * 2.0) / B));
} else if (B <= 5.8e-214) {
tmp = (180.0 * t_0) / Math.PI;
} else if ((B <= 4.4e-104) || !(B <= 1.9e-65)) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (B + A)) / B));
} else {
tmp = t_1;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((B * -0.5) / (C - A))) t_1 = t_0 * (180.0 / math.pi) tmp = 0 if B <= -2.6e-188: tmp = (180.0 / math.pi) * math.atan(((C - (A - B)) / B)) elif B <= -1.1e-292: tmp = t_1 elif B <= 1.5e-279: tmp = (180.0 / math.pi) * math.atan((((C - A) * 2.0) / B)) elif B <= 5.8e-214: tmp = (180.0 * t_0) / math.pi elif (B <= 4.4e-104) or not (B <= 1.9e-65): tmp = (180.0 / math.pi) * math.atan(((C - (B + A)) / B)) else: tmp = t_1 return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(B * -0.5) / Float64(C - A))) t_1 = Float64(t_0 * Float64(180.0 / pi)) tmp = 0.0 if (B <= -2.6e-188) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A - B)) / B))); elseif (B <= -1.1e-292) tmp = t_1; elseif (B <= 1.5e-279) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(C - A) * 2.0) / B))); elseif (B <= 5.8e-214) tmp = Float64(Float64(180.0 * t_0) / pi); elseif ((B <= 4.4e-104) || !(B <= 1.9e-65)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(B + A)) / B))); else tmp = t_1; end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((B * -0.5) / (C - A))); t_1 = t_0 * (180.0 / pi); tmp = 0.0; if (B <= -2.6e-188) tmp = (180.0 / pi) * atan(((C - (A - B)) / B)); elseif (B <= -1.1e-292) tmp = t_1; elseif (B <= 1.5e-279) tmp = (180.0 / pi) * atan((((C - A) * 2.0) / B)); elseif (B <= 5.8e-214) tmp = (180.0 * t_0) / pi; elseif ((B <= 4.4e-104) || ~((B <= 1.9e-65))) tmp = (180.0 / pi) * atan(((C - (B + A)) / B)); else tmp = t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.6e-188], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A - B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.1e-292], t$95$1, If[LessEqual[B, 1.5e-279], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.8e-214], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[Or[LessEqual[B, 4.4e-104], N[Not[LessEqual[B, 1.9e-65]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
t_1 := t_0 \cdot \frac{180}{\pi}\\
\mathbf{if}\;B \leq -2.6 \cdot 10^{-188}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A - B\right)}{B}\right)\\
\mathbf{elif}\;B \leq -1.1 \cdot 10^{-292}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-279}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(C - A\right) \cdot 2}{B}\right)\\
\mathbf{elif}\;B \leq 5.8 \cdot 10^{-214}:\\
\;\;\;\;\frac{180 \cdot t_0}{\pi}\\
\mathbf{elif}\;B \leq 4.4 \cdot 10^{-104} \lor \neg \left(B \leq 1.9 \cdot 10^{-65}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if B < -2.6000000000000001e-188Initial program 58.4%
associate-*r/58.4%
associate-*l/58.4%
associate-*l/58.4%
*-lft-identity58.4%
sub-neg58.4%
associate-+l-58.6%
sub-neg58.6%
remove-double-neg58.6%
+-commutative58.6%
unpow258.6%
unpow258.6%
hypot-def78.1%
Simplified78.1%
Taylor expanded in B around -inf 76.1%
neg-mul-176.1%
unsub-neg76.1%
Simplified76.1%
if -2.6000000000000001e-188 < B < -1.10000000000000006e-292 or 4.40000000000000023e-104 < B < 1.9000000000000001e-65Initial program 34.3%
associate-*r/34.3%
associate-*l/34.3%
*-commutative34.3%
Simplified63.5%
Taylor expanded in B around 0 71.0%
associate-*r/71.1%
Simplified71.1%
if -1.10000000000000006e-292 < B < 1.5e-279Initial program 75.8%
associate-*r/75.8%
associate-*l/75.8%
*-commutative75.8%
Simplified100.0%
Taylor expanded in C around -inf 75.8%
+-commutative75.8%
metadata-eval75.8%
cancel-sign-sub-inv75.8%
distribute-lft-out--75.8%
Simplified75.8%
if 1.5e-279 < B < 5.7999999999999997e-214Initial program 57.7%
associate-*r/57.7%
associate-*l/57.7%
*-commutative57.7%
Simplified73.9%
associate-*r/73.9%
Applied egg-rr73.9%
Taylor expanded in B around 0 73.0%
associate-*r/72.9%
Simplified73.0%
if 5.7999999999999997e-214 < B < 4.40000000000000023e-104 or 1.9000000000000001e-65 < B Initial program 54.0%
associate-*r/54.0%
associate-*l/54.0%
associate-*l/54.0%
*-lft-identity54.0%
sub-neg54.0%
associate-+l-54.0%
sub-neg54.0%
remove-double-neg54.0%
+-commutative54.0%
unpow254.0%
unpow254.0%
hypot-def81.0%
Simplified81.0%
Taylor expanded in B around inf 76.4%
Final simplification75.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan -1.0))))
(if (<= A -7e-26)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -3.65e-233)
t_0
(if (<= A 3.4e-220)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 4e-77)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= A 3.8e-22)
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(-1.0);
double tmp;
if (A <= -7e-26) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -3.65e-233) {
tmp = t_0;
} else if (A <= 3.4e-220) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 4e-77) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (A <= 3.8e-22) {
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(-1.0);
double tmp;
if (A <= -7e-26) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -3.65e-233) {
tmp = t_0;
} else if (A <= 3.4e-220) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 4e-77) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (A <= 3.8e-22) {
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(-1.0) tmp = 0 if A <= -7e-26: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -3.65e-233: tmp = t_0 elif A <= 3.4e-220: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 4e-77: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif A <= 3.8e-22: 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(-1.0)) tmp = 0.0 if (A <= -7e-26) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -3.65e-233) tmp = t_0; elseif (A <= 3.4e-220) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 4e-77) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (A <= 3.8e-22) 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(-1.0); tmp = 0.0; if (A <= -7e-26) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -3.65e-233) tmp = t_0; elseif (A <= 3.4e-220) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 4e-77) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (A <= 3.8e-22) 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[-1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7e-26], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.65e-233], t$95$0, If[LessEqual[A, 3.4e-220], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4e-77], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-22], 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} -1\\
\mathbf{if}\;A \leq -7 \cdot 10^{-26}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -3.65 \cdot 10^{-233}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.4 \cdot 10^{-220}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 4 \cdot 10^{-77}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-22}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A \cdot -2}{B}\right)\\
\end{array}
\end{array}
if A < -6.9999999999999997e-26Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified63.1%
Taylor expanded in A around -inf 63.6%
if -6.9999999999999997e-26 < A < -3.6500000000000002e-233 or 3.9999999999999997e-77 < A < 3.80000000000000023e-22Initial program 51.2%
associate-*r/51.2%
associate-*l/51.2%
*-commutative51.2%
Simplified81.4%
Taylor expanded in B around inf 41.6%
if -3.6500000000000002e-233 < A < 3.39999999999999993e-220Initial program 63.9%
associate-*r/63.9%
associate-*l/63.9%
*-commutative63.9%
Simplified95.0%
Taylor expanded in B around -inf 49.1%
if 3.39999999999999993e-220 < A < 3.9999999999999997e-77Initial program 69.0%
associate-*r/69.0%
associate-*l/69.0%
*-commutative69.0%
Simplified73.4%
Taylor expanded in C around -inf 39.9%
if 3.80000000000000023e-22 < A Initial program 83.6%
associate-*r/83.6%
associate-*l/83.6%
*-commutative83.6%
Simplified97.0%
Taylor expanded in A around inf 79.3%
*-commutative79.3%
Simplified79.3%
Final simplification59.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan -1.0))))
(if (<= A -8e-26)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -8e-229)
t_0
(if (<= A 2.9e-220)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 2.15e-76)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= A 1.45e-22) t_0 (* (/ 180.0 PI) (atan (/ (- A) B))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(-1.0);
double tmp;
if (A <= -8e-26) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -8e-229) {
tmp = t_0;
} else if (A <= 2.9e-220) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 2.15e-76) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (A <= 1.45e-22) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(-1.0);
double tmp;
if (A <= -8e-26) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -8e-229) {
tmp = t_0;
} else if (A <= 2.9e-220) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 2.15e-76) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (A <= 1.45e-22) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(-1.0) tmp = 0 if A <= -8e-26: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -8e-229: tmp = t_0 elif A <= 2.9e-220: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 2.15e-76: tmp = (180.0 / math.pi) * math.atan((C / B)) elif A <= 1.45e-22: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(-1.0)) tmp = 0.0 if (A <= -8e-26) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -8e-229) tmp = t_0; elseif (A <= 2.9e-220) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 2.15e-76) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (A <= 1.45e-22) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(-1.0); tmp = 0.0; if (A <= -8e-26) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -8e-229) tmp = t_0; elseif (A <= 2.9e-220) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 2.15e-76) tmp = (180.0 / pi) * atan((C / B)); elseif (A <= 1.45e-22) tmp = t_0; else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -8e-26], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8e-229], t$95$0, If[LessEqual[A, 2.9e-220], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.15e-76], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.45e-22], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{if}\;A \leq -8 \cdot 10^{-26}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -8 \cdot 10^{-229}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 2.9 \cdot 10^{-220}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 2.15 \cdot 10^{-76}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{-22}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if A < -8.0000000000000003e-26Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified63.1%
Taylor expanded in A around -inf 63.6%
Taylor expanded in B around 0 63.6%
if -8.0000000000000003e-26 < A < -8.00000000000000055e-229 or 2.15e-76 < A < 1.4500000000000001e-22Initial program 51.2%
associate-*r/51.2%
associate-*l/51.2%
*-commutative51.2%
Simplified81.4%
Taylor expanded in B around inf 41.6%
if -8.00000000000000055e-229 < A < 2.8999999999999998e-220Initial program 63.9%
associate-*r/63.9%
associate-*l/63.9%
*-commutative63.9%
Simplified95.0%
Taylor expanded in B around -inf 49.1%
if 2.8999999999999998e-220 < A < 2.15e-76Initial program 69.0%
associate-*r/69.0%
associate-*l/69.0%
associate-*l/69.0%
*-lft-identity69.0%
sub-neg69.0%
associate-+l-69.0%
sub-neg69.0%
remove-double-neg69.0%
+-commutative69.0%
unpow269.0%
unpow269.0%
hypot-def73.4%
Simplified73.4%
Taylor expanded in B around inf 58.1%
Taylor expanded in C around inf 39.9%
if 1.4500000000000001e-22 < A Initial program 83.6%
associate-*r/83.6%
associate-*l/83.6%
associate-*l/83.6%
*-lft-identity83.6%
sub-neg83.6%
associate-+l-83.6%
sub-neg83.6%
remove-double-neg83.6%
+-commutative83.6%
unpow283.6%
unpow283.6%
hypot-def97.0%
Simplified97.0%
Taylor expanded in B around inf 84.7%
Taylor expanded in A around inf 78.9%
associate-*r/78.9%
mul-1-neg78.9%
Simplified78.9%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan -1.0))))
(if (<= A -7e-25)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -2.65e-232)
t_0
(if (<= A 3e-220)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 1.55e-76)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= A 2.1e-22) t_0 (* (/ 180.0 PI) (atan (/ (- A) B))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(-1.0);
double tmp;
if (A <= -7e-25) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -2.65e-232) {
tmp = t_0;
} else if (A <= 3e-220) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 1.55e-76) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (A <= 2.1e-22) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(-1.0);
double tmp;
if (A <= -7e-25) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -2.65e-232) {
tmp = t_0;
} else if (A <= 3e-220) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 1.55e-76) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (A <= 2.1e-22) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(-1.0) tmp = 0 if A <= -7e-25: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -2.65e-232: tmp = t_0 elif A <= 3e-220: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 1.55e-76: tmp = (180.0 / math.pi) * math.atan((C / B)) elif A <= 2.1e-22: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(-1.0)) tmp = 0.0 if (A <= -7e-25) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -2.65e-232) tmp = t_0; elseif (A <= 3e-220) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 1.55e-76) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (A <= 2.1e-22) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(-1.0); tmp = 0.0; if (A <= -7e-25) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -2.65e-232) tmp = t_0; elseif (A <= 3e-220) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 1.55e-76) tmp = (180.0 / pi) * atan((C / B)); elseif (A <= 2.1e-22) tmp = t_0; else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7e-25], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.65e-232], t$95$0, If[LessEqual[A, 3e-220], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.55e-76], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.1e-22], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{if}\;A \leq -7 \cdot 10^{-25}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -2.65 \cdot 10^{-232}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-220}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{-76}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;A \leq 2.1 \cdot 10^{-22}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if A < -7.0000000000000004e-25Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified63.1%
Taylor expanded in A around -inf 63.6%
if -7.0000000000000004e-25 < A < -2.6500000000000001e-232 or 1.54999999999999985e-76 < A < 2.10000000000000008e-22Initial program 51.2%
associate-*r/51.2%
associate-*l/51.2%
*-commutative51.2%
Simplified81.4%
Taylor expanded in B around inf 41.6%
if -2.6500000000000001e-232 < A < 3.00000000000000017e-220Initial program 63.9%
associate-*r/63.9%
associate-*l/63.9%
*-commutative63.9%
Simplified95.0%
Taylor expanded in B around -inf 49.1%
if 3.00000000000000017e-220 < A < 1.54999999999999985e-76Initial program 69.0%
associate-*r/69.0%
associate-*l/69.0%
associate-*l/69.0%
*-lft-identity69.0%
sub-neg69.0%
associate-+l-69.0%
sub-neg69.0%
remove-double-neg69.0%
+-commutative69.0%
unpow269.0%
unpow269.0%
hypot-def73.4%
Simplified73.4%
Taylor expanded in B around inf 58.1%
Taylor expanded in C around inf 39.9%
if 2.10000000000000008e-22 < A Initial program 83.6%
associate-*r/83.6%
associate-*l/83.6%
associate-*l/83.6%
*-lft-identity83.6%
sub-neg83.6%
associate-+l-83.6%
sub-neg83.6%
remove-double-neg83.6%
+-commutative83.6%
unpow283.6%
unpow283.6%
hypot-def97.0%
Simplified97.0%
Taylor expanded in B around inf 84.7%
Taylor expanded in A around inf 78.9%
associate-*r/78.9%
mul-1-neg78.9%
Simplified78.9%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan -1.0))))
(if (<= A -6.2e-26)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -1.05e-230)
t_0
(if (<= A 3.2e-220)
(* (/ 180.0 PI) (atan 1.0))
(if (<= A 7.2e-77)
(* (/ 180.0 PI) (atan (/ (* C 2.0) B)))
(if (<= A 1.8e-21) t_0 (* (/ 180.0 PI) (atan (/ (- A) B))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(-1.0);
double tmp;
if (A <= -6.2e-26) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -1.05e-230) {
tmp = t_0;
} else if (A <= 3.2e-220) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (A <= 7.2e-77) {
tmp = (180.0 / ((double) M_PI)) * atan(((C * 2.0) / B));
} else if (A <= 1.8e-21) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(-1.0);
double tmp;
if (A <= -6.2e-26) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -1.05e-230) {
tmp = t_0;
} else if (A <= 3.2e-220) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (A <= 7.2e-77) {
tmp = (180.0 / Math.PI) * Math.atan(((C * 2.0) / B));
} else if (A <= 1.8e-21) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(-1.0) tmp = 0 if A <= -6.2e-26: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -1.05e-230: tmp = t_0 elif A <= 3.2e-220: tmp = (180.0 / math.pi) * math.atan(1.0) elif A <= 7.2e-77: tmp = (180.0 / math.pi) * math.atan(((C * 2.0) / B)) elif A <= 1.8e-21: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((-A / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(-1.0)) tmp = 0.0 if (A <= -6.2e-26) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -1.05e-230) tmp = t_0; elseif (A <= 3.2e-220) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (A <= 7.2e-77) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C * 2.0) / B))); elseif (A <= 1.8e-21) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(-1.0); tmp = 0.0; if (A <= -6.2e-26) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -1.05e-230) tmp = t_0; elseif (A <= 3.2e-220) tmp = (180.0 / pi) * atan(1.0); elseif (A <= 7.2e-77) tmp = (180.0 / pi) * atan(((C * 2.0) / B)); elseif (A <= 1.8e-21) tmp = t_0; else tmp = (180.0 / pi) * atan((-A / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -6.2e-26], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.05e-230], t$95$0, If[LessEqual[A, 3.2e-220], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.2e-77], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.8e-21], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{if}\;A \leq -6.2 \cdot 10^{-26}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -1.05 \cdot 10^{-230}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-220}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;A \leq 7.2 \cdot 10^{-77}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C \cdot 2}{B}\right)\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{-21}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\end{array}
\end{array}
if A < -6.19999999999999966e-26Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified63.1%
Taylor expanded in A around -inf 63.6%
if -6.19999999999999966e-26 < A < -1.0499999999999999e-230 or 7.2e-77 < A < 1.79999999999999995e-21Initial program 51.2%
associate-*r/51.2%
associate-*l/51.2%
*-commutative51.2%
Simplified81.4%
Taylor expanded in B around inf 41.6%
if -1.0499999999999999e-230 < A < 3.20000000000000005e-220Initial program 63.9%
associate-*r/63.9%
associate-*l/63.9%
*-commutative63.9%
Simplified95.0%
Taylor expanded in B around -inf 49.1%
if 3.20000000000000005e-220 < A < 7.2e-77Initial program 69.0%
associate-*r/69.0%
associate-*l/69.0%
*-commutative69.0%
Simplified73.4%
Taylor expanded in C around -inf 39.9%
if 1.79999999999999995e-21 < A Initial program 83.6%
associate-*r/83.6%
associate-*l/83.6%
associate-*l/83.6%
*-lft-identity83.6%
sub-neg83.6%
associate-+l-83.6%
sub-neg83.6%
remove-double-neg83.6%
+-commutative83.6%
unpow283.6%
unpow283.6%
hypot-def97.0%
Simplified97.0%
Taylor expanded in B around inf 84.7%
Taylor expanded in A around inf 78.9%
associate-*r/78.9%
mul-1-neg78.9%
Simplified78.9%
Final simplification59.5%
(FPCore (A B C)
:precision binary64
(if (<= A -6.2e-26)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -1.12e-231)
(* (/ 180.0 PI) (atan -1.0))
(if (<= A 5.5e-203)
(* (/ 180.0 PI) (atan 1.0))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e-26) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -1.12e-231) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} else if (A <= 5.5e-203) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e-26) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -1.12e-231) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else if (A <= 5.5e-203) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.2e-26: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -1.12e-231: tmp = (180.0 / math.pi) * math.atan(-1.0) elif A <= 5.5e-203: tmp = (180.0 / math.pi) * math.atan(1.0) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.2e-26) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -1.12e-231) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); elseif (A <= 5.5e-203) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.2e-26) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -1.12e-231) tmp = (180.0 / pi) * atan(-1.0); elseif (A <= 5.5e-203) tmp = (180.0 / pi) * atan(1.0); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.2e-26], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.12e-231], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.5e-203], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.2 \cdot 10^{-26}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -1.12 \cdot 10^{-231}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{elif}\;A \leq 5.5 \cdot 10^{-203}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -6.19999999999999966e-26Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified63.1%
Taylor expanded in A around -inf 63.6%
if -6.19999999999999966e-26 < A < -1.11999999999999997e-231Initial program 50.5%
associate-*r/50.5%
associate-*l/50.5%
*-commutative50.5%
Simplified82.8%
Taylor expanded in B around inf 38.4%
if -1.11999999999999997e-231 < A < 5.5000000000000002e-203Initial program 62.0%
associate-*r/62.0%
associate-*l/62.0%
*-commutative62.0%
Simplified90.8%
Taylor expanded in B around -inf 46.3%
if 5.5000000000000002e-203 < A Initial program 77.7%
associate-*r/77.7%
associate-*l/77.7%
associate-*l/77.7%
*-lft-identity77.7%
sub-neg77.7%
associate-+l-77.7%
sub-neg77.7%
remove-double-neg77.7%
+-commutative77.7%
unpow277.7%
unpow277.7%
hypot-def91.1%
Simplified91.1%
Taylor expanded in B around inf 76.3%
Taylor expanded in C around 0 69.3%
mul-1-neg69.3%
distribute-frac-neg69.3%
distribute-neg-in69.3%
sub-neg69.3%
div-sub69.3%
mul-1-neg69.3%
associate-*r/69.3%
*-inverses69.3%
sub-neg69.3%
metadata-eval69.3%
+-commutative69.3%
mul-1-neg69.3%
unsub-neg69.3%
Simplified69.3%
Final simplification59.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan 1.0))))
(if (<= B -3e-62)
t_0
(if (<= B -9.4e-179)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= B -9.5e-198)
t_0
(if (<= B 1.22e-201)
(/ (* 180.0 (atan 0.0)) PI)
(* (/ 180.0 PI) (atan -1.0))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(1.0);
double tmp;
if (B <= -3e-62) {
tmp = t_0;
} else if (B <= -9.4e-179) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (B <= -9.5e-198) {
tmp = t_0;
} else if (B <= 1.22e-201) {
tmp = (180.0 * atan(0.0)) / ((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 t_0 = (180.0 / Math.PI) * Math.atan(1.0);
double tmp;
if (B <= -3e-62) {
tmp = t_0;
} else if (B <= -9.4e-179) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (B <= -9.5e-198) {
tmp = t_0;
} else if (B <= 1.22e-201) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} 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(1.0) tmp = 0 if B <= -3e-62: tmp = t_0 elif B <= -9.4e-179: tmp = (180.0 / math.pi) * math.atan((C / B)) elif B <= -9.5e-198: tmp = t_0 elif B <= 1.22e-201: tmp = (180.0 * math.atan(0.0)) / math.pi 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(1.0)) tmp = 0.0 if (B <= -3e-62) tmp = t_0; elseif (B <= -9.4e-179) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (B <= -9.5e-198) tmp = t_0; elseif (B <= 1.22e-201) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); 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(1.0); tmp = 0.0; if (B <= -3e-62) tmp = t_0; elseif (B <= -9.4e-179) tmp = (180.0 / pi) * atan((C / B)); elseif (B <= -9.5e-198) tmp = t_0; elseif (B <= 1.22e-201) tmp = (180.0 * atan(0.0)) / pi; 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[1.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3e-62], t$95$0, If[LessEqual[B, -9.4e-179], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.5e-198], t$95$0, If[LessEqual[B, 1.22e-201], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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} 1\\
\mathbf{if}\;B \leq -3 \cdot 10^{-62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -9.4 \cdot 10^{-179}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;B \leq -9.5 \cdot 10^{-198}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.22 \cdot 10^{-201}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -3.0000000000000001e-62 or -9.4000000000000005e-179 < B < -9.4999999999999997e-198Initial program 53.3%
associate-*r/53.3%
associate-*l/53.3%
*-commutative53.3%
Simplified78.8%
Taylor expanded in B around -inf 59.1%
if -3.0000000000000001e-62 < B < -9.4000000000000005e-179Initial program 69.2%
associate-*r/69.2%
associate-*l/69.2%
associate-*l/69.2%
*-lft-identity69.2%
sub-neg69.2%
associate-+l-69.1%
sub-neg69.1%
remove-double-neg69.1%
+-commutative69.1%
unpow269.1%
unpow269.1%
hypot-def72.3%
Simplified72.3%
Taylor expanded in B around inf 68.9%
Taylor expanded in C around inf 42.3%
if -9.4999999999999997e-198 < B < 1.22000000000000009e-201Initial program 57.8%
associate-*r/57.8%
associate-*l/57.8%
*-commutative57.8%
Simplified84.6%
associate-*r/84.6%
Applied egg-rr84.6%
div-sub43.4%
Applied egg-rr43.4%
Taylor expanded in C around inf 14.9%
distribute-rgt1-in14.9%
metadata-eval14.9%
mul0-lft43.4%
metadata-eval43.4%
Simplified43.4%
if 1.22000000000000009e-201 < B Initial program 51.0%
associate-*r/51.0%
associate-*l/51.0%
*-commutative51.0%
Simplified77.8%
Taylor expanded in B around inf 46.4%
Final simplification49.7%
(FPCore (A B C)
:precision binary64
(if (<= A -1.6e-25)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A -3.8e-242)
(* (/ 180.0 PI) (atan -1.0))
(* (/ 180.0 PI) (atan (/ (- B A) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e-25) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= -3.8e-242) {
tmp = (180.0 / ((double) M_PI)) * atan(-1.0);
} 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 <= -1.6e-25) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= -3.8e-242) {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.6e-25: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= -3.8e-242: tmp = (180.0 / math.pi) * math.atan(-1.0) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.6e-25) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= -3.8e-242) tmp = Float64(Float64(180.0 / pi) * atan(-1.0)); 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 <= -1.6e-25) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= -3.8e-242) tmp = (180.0 / pi) * atan(-1.0); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.6e-25], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.8e-242], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $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 -1.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq -3.8 \cdot 10^{-242}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -1.6000000000000001e-25Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified63.1%
Taylor expanded in A around -inf 63.6%
if -1.6000000000000001e-25 < A < -3.8000000000000002e-242Initial program 47.2%
associate-*r/47.2%
associate-*l/47.2%
*-commutative47.2%
Simplified84.3%
Taylor expanded in B around inf 38.1%
if -3.8000000000000002e-242 < A Initial program 74.2%
associate-*r/74.2%
associate-*l/74.2%
associate-*l/74.2%
*-lft-identity74.2%
sub-neg74.2%
associate-+l-74.2%
sub-neg74.2%
remove-double-neg74.2%
+-commutative74.2%
unpow274.2%
unpow274.2%
hypot-def90.8%
Simplified90.8%
Taylor expanded in B around -inf 73.7%
neg-mul-173.7%
unsub-neg73.7%
Simplified73.7%
Taylor expanded in C around 0 63.2%
Final simplification60.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.95e-24)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 7e-36)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(* (/ 180.0 PI) (atan (/ (- B A) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.95e-24) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 7e-36) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / 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 <= -1.95e-24) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 7e-36) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.95e-24: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 7e-36: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.95e-24) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 7e-36) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / 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 <= -1.95e-24) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 7e-36) tmp = (180.0 / pi) * atan(((C - B) / B)); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.95e-24], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7e-36], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $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 -1.95 \cdot 10^{-24}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 7 \cdot 10^{-36}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -1.95e-24Initial program 28.2%
associate-*r/28.2%
associate-*l/28.2%
*-commutative28.2%
Simplified63.1%
Taylor expanded in A around -inf 63.6%
if -1.95e-24 < A < 6.9999999999999999e-36Initial 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-def85.4%
Simplified85.4%
Taylor expanded in B around inf 50.3%
Taylor expanded in A around 0 48.3%
if 6.9999999999999999e-36 < A Initial program 82.9%
associate-*r/82.9%
associate-*l/82.9%
associate-*l/82.9%
*-lft-identity82.9%
sub-neg82.9%
associate-+l-82.9%
sub-neg82.9%
remove-double-neg82.9%
+-commutative82.9%
unpow282.9%
unpow282.9%
hypot-def95.7%
Simplified95.7%
Taylor expanded in B around -inf 85.4%
neg-mul-185.4%
unsub-neg85.4%
Simplified85.4%
Taylor expanded in C around 0 84.1%
Final simplification63.0%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-62)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B -1.5e-198)
(* (/ 180.0 PI) (atan (/ (- A) B)))
(if (<= B 6.5e-199)
(/ (* 180.0 (atan 0.0)) PI)
(* (/ 180.0 PI) (atan -1.0))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-62) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= -1.5e-198) {
tmp = (180.0 / ((double) M_PI)) * atan((-A / B));
} else if (B <= 6.5e-199) {
tmp = (180.0 * atan(0.0)) / ((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 <= -2.6e-62) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= -1.5e-198) {
tmp = (180.0 / Math.PI) * Math.atan((-A / B));
} else if (B <= 6.5e-199) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.6e-62: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= -1.5e-198: tmp = (180.0 / math.pi) * math.atan((-A / B)) elif B <= 6.5e-199: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.6e-62) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= -1.5e-198) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-A) / B))); elseif (B <= 6.5e-199) tmp = Float64(Float64(180.0 * atan(0.0)) / 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 <= -2.6e-62) tmp = (180.0 / pi) * atan(1.0); elseif (B <= -1.5e-198) tmp = (180.0 / pi) * atan((-A / B)); elseif (B <= 6.5e-199) tmp = (180.0 * atan(0.0)) / pi; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-62], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.5e-198], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.5e-199], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.6 \cdot 10^{-62}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq -1.5 \cdot 10^{-198}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-A}{B}\right)\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-199}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -2.5999999999999999e-62Initial program 56.5%
associate-*r/56.5%
associate-*l/56.5%
*-commutative56.5%
Simplified81.3%
Taylor expanded in B around -inf 61.5%
if -2.5999999999999999e-62 < B < -1.5000000000000001e-198Initial program 57.8%
associate-*r/57.8%
associate-*l/57.8%
associate-*l/57.8%
*-lft-identity57.8%
sub-neg57.8%
associate-+l-57.6%
sub-neg57.6%
remove-double-neg57.6%
+-commutative57.6%
unpow257.6%
unpow257.6%
hypot-def68.4%
Simplified68.4%
Taylor expanded in B around inf 57.0%
Taylor expanded in A around inf 42.1%
associate-*r/42.1%
mul-1-neg42.1%
Simplified42.1%
if -1.5000000000000001e-198 < B < 6.50000000000000017e-199Initial program 57.8%
associate-*r/57.8%
associate-*l/57.8%
*-commutative57.8%
Simplified84.6%
associate-*r/84.6%
Applied egg-rr84.6%
div-sub43.4%
Applied egg-rr43.4%
Taylor expanded in C around inf 14.9%
distribute-rgt1-in14.9%
metadata-eval14.9%
mul0-lft43.4%
metadata-eval43.4%
Simplified43.4%
if 6.50000000000000017e-199 < B Initial program 51.0%
associate-*r/51.0%
associate-*l/51.0%
*-commutative51.0%
Simplified77.8%
Taylor expanded in B around inf 46.4%
Final simplification49.8%
(FPCore (A B C)
:precision binary64
(if (<= B -8e-199)
(* (/ 180.0 PI) (atan 1.0))
(if (<= B 2.9e-199)
(/ (* 180.0 (atan 0.0)) PI)
(* (/ 180.0 PI) (atan -1.0)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8e-199) {
tmp = (180.0 / ((double) M_PI)) * atan(1.0);
} else if (B <= 2.9e-199) {
tmp = (180.0 * atan(0.0)) / ((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 <= -8e-199) {
tmp = (180.0 / Math.PI) * Math.atan(1.0);
} else if (B <= 2.9e-199) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(-1.0);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8e-199: tmp = (180.0 / math.pi) * math.atan(1.0) elif B <= 2.9e-199: tmp = (180.0 * math.atan(0.0)) / math.pi else: tmp = (180.0 / math.pi) * math.atan(-1.0) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8e-199) tmp = Float64(Float64(180.0 / pi) * atan(1.0)); elseif (B <= 2.9e-199) tmp = Float64(Float64(180.0 * atan(0.0)) / 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 <= -8e-199) tmp = (180.0 / pi) * atan(1.0); elseif (B <= 2.9e-199) tmp = (180.0 * atan(0.0)) / pi; else tmp = (180.0 / pi) * atan(-1.0); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8e-199], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.9e-199], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[-1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8 \cdot 10^{-199}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{elif}\;B \leq 2.9 \cdot 10^{-199}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -7.99999999999999986e-199Initial program 56.9%
associate-*r/56.9%
associate-*l/56.9%
*-commutative56.9%
Simplified80.9%
Taylor expanded in B around -inf 48.8%
if -7.99999999999999986e-199 < B < 2.9e-199Initial program 57.8%
associate-*r/57.8%
associate-*l/57.8%
*-commutative57.8%
Simplified84.6%
associate-*r/84.6%
Applied egg-rr84.6%
div-sub43.4%
Applied egg-rr43.4%
Taylor expanded in C around inf 14.9%
distribute-rgt1-in14.9%
metadata-eval14.9%
mul0-lft43.4%
metadata-eval43.4%
Simplified43.4%
if 2.9e-199 < B Initial program 51.0%
associate-*r/51.0%
associate-*l/51.0%
*-commutative51.0%
Simplified77.8%
Taylor expanded in B around inf 46.4%
Final simplification46.9%
(FPCore (A B C) :precision binary64 (if (<= B -5e-311) (* (/ 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-311) {
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-311) {
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-311: 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-311) 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-311) 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-311], 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^{-311}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} 1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} -1\\
\end{array}
\end{array}
if B < -5.00000000000023e-311Initial program 55.7%
associate-*r/55.7%
associate-*l/55.7%
*-commutative55.7%
Simplified81.6%
Taylor expanded in B around -inf 43.3%
if -5.00000000000023e-311 < B Initial program 53.9%
associate-*r/53.9%
associate-*l/53.9%
*-commutative53.9%
Simplified79.2%
Taylor expanded in B around inf 38.2%
Final simplification40.8%
(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 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-commutative54.8%
Simplified80.4%
Taylor expanded in B around inf 20.1%
Final simplification20.1%
herbie shell --seed 2023242
(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)))