
(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 30 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 (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- C A)))) B))))
(t_1
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_1 -0.5)
t_0
(if (<= t_1 5e-7)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(cbrt (* t_0 (pow t_0 2.0)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (C - A)))) / B));
double t_1 = (1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))));
double tmp;
if (t_1 <= -0.5) {
tmp = t_0;
} else if (t_1 <= 5e-7) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = cbrt((t_0 * pow(t_0, 2.0)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B));
double t_1 = (1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))));
double tmp;
if (t_1 <= -0.5) {
tmp = t_0;
} else if (t_1 <= 5e-7) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = Math.cbrt((t_0 * Math.pow(t_0, 2.0)));
}
return tmp;
}
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B))) t_1 = Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))) tmp = 0.0 if (t_1 <= -0.5) tmp = t_0; elseif (t_1 <= 5e-7) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = cbrt(Float64(t_0 * (t_0 ^ 2.0))); end return tmp end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -0.5], t$95$0, If[LessEqual[t$95$1, 5e-7], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$0 * N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)\\
t_1 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_1 \leq -0.5:\\
\;\;\;\;t_0\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_0 \cdot {t_0}^{2}}\\
\end{array}
\end{array}
if (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < -0.5Initial program 58.7%
Simplified82.4%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 4.99999999999999977e-7Initial program 21.6%
Simplified12.9%
Taylor expanded in B around 0 99.2%
associate-*r/99.2%
Simplified99.2%
if 4.99999999999999977e-7 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 59.1%
Simplified85.5%
add-cbrt-cube86.2%
pow286.2%
Applied egg-rr86.2%
Final simplification86.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_0 -0.5)
(* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- C A)))) B)))
(if (<= t_0 5e-7)
(* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))
(/ (* 180.0 (atan (/ (- C (+ A (hypot (- A C) B))) B))) 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 tmp;
if (t_0 <= -0.5) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (C - A)))) / B));
} else if (t_0 <= 5e-7) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * atan(((C - (A + hypot((A - C), B))) / B))) / ((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 tmp;
if (t_0 <= -0.5) {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B));
} else if (t_0 <= 5e-7) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
} else {
tmp = (180.0 * Math.atan(((C - (A + Math.hypot((A - C), B))) / B))) / 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)))) tmp = 0 if t_0 <= -0.5: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) elif t_0 <= 5e-7: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) else: tmp = (180.0 * math.atan(((C - (A + math.hypot((A - C), B))) / B))) / 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))))) tmp = 0.0 if (t_0 <= -0.5) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B))); elseif (t_0 <= 5e-7) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - Float64(A + hypot(Float64(A - C), B))) / B))) / 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)))); tmp = 0.0; if (t_0 <= -0.5) tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (C - A)))) / B)); elseif (t_0 <= 5e-7) tmp = (180.0 / pi) * atan(((B * -0.5) / (C - A))); else tmp = (180.0 * atan(((C - (A + hypot((A - C), B))) / B))) / 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]}, If[LessEqual[t$95$0, -0.5], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e-7], 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 * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\\
\mathbf{if}\;t_0 \leq -0.5:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(A - C, B\right)\right)}{B}\right)}{\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))))) < -0.5Initial program 58.7%
Simplified82.4%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 4.99999999999999977e-7Initial program 21.6%
Simplified12.9%
Taylor expanded in B around 0 99.2%
associate-*r/99.2%
Simplified99.2%
if 4.99999999999999977e-7 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 59.1%
associate-*r/59.1%
associate-*l/59.1%
*-un-lft-identity59.1%
associate--l-59.1%
unpow259.1%
pow259.1%
hypot-def85.5%
Applied egg-rr85.5%
Final simplification86.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
(t_1 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
(if (<= A -5.4e+101)
t_1
(if (<= A -3.9e+67)
t_0
(if (<= A -3.2e+46)
t_1
(if (<= A 2.4e-78)
t_0
(if (<= A 5.9e-52)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(if (<= A 29000000000.0)
t_0
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
double t_1 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -5.4e+101) {
tmp = t_1;
} else if (A <= -3.9e+67) {
tmp = t_0;
} else if (A <= -3.2e+46) {
tmp = t_1;
} else if (A <= 2.4e-78) {
tmp = t_0;
} else if (A <= 5.9e-52) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else if (A <= 29000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
double t_1 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -5.4e+101) {
tmp = t_1;
} else if (A <= -3.9e+67) {
tmp = t_0;
} else if (A <= -3.2e+46) {
tmp = t_1;
} else if (A <= 2.4e-78) {
tmp = t_0;
} else if (A <= 5.9e-52) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else if (A <= 29000000000.0) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) t_1 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) tmp = 0 if A <= -5.4e+101: tmp = t_1 elif A <= -3.9e+67: tmp = t_0 elif A <= -3.2e+46: tmp = t_1 elif A <= 2.4e-78: tmp = t_0 elif A <= 5.9e-52: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) elif A <= 29000000000.0: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) tmp = 0.0 if (A <= -5.4e+101) tmp = t_1; elseif (A <= -3.9e+67) tmp = t_0; elseif (A <= -3.2e+46) tmp = t_1; elseif (A <= 2.4e-78) tmp = t_0; elseif (A <= 5.9e-52) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); elseif (A <= 29000000000.0) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); t_1 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); tmp = 0.0; if (A <= -5.4e+101) tmp = t_1; elseif (A <= -3.9e+67) tmp = t_0; elseif (A <= -3.2e+46) tmp = t_1; elseif (A <= 2.4e-78) tmp = t_0; elseif (A <= 5.9e-52) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); elseif (A <= 29000000000.0) tmp = t_0; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.4e+101], t$95$1, If[LessEqual[A, -3.9e+67], t$95$0, If[LessEqual[A, -3.2e+46], t$95$1, If[LessEqual[A, 2.4e-78], t$95$0, If[LessEqual[A, 5.9e-52], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 29000000000.0], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{if}\;A \leq -5.4 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -3.9 \cdot 10^{+67}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3.2 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 2.4 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5.9 \cdot 10^{-52}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{elif}\;A \leq 29000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.40000000000000012e101 or -3.90000000000000007e67 < A < -3.1999999999999998e46Initial program 14.3%
Simplified22.9%
Taylor expanded in B around 0 84.9%
associate-*r/84.9%
Simplified84.9%
if -5.40000000000000012e101 < A < -3.90000000000000007e67 or -3.1999999999999998e46 < A < 2.4e-78 or 5.90000000000000019e-52 < A < 2.9e10Initial program 54.0%
Simplified52.5%
Taylor expanded in A around 0 50.8%
unpow250.8%
unpow250.8%
hypot-def81.1%
Simplified81.1%
if 2.4e-78 < A < 5.90000000000000019e-52Initial program 38.5%
Simplified38.4%
Taylor expanded in B around 0 48.1%
unpow248.1%
Simplified48.1%
Taylor expanded in C around inf 79.8%
associate-*r/79.8%
Simplified79.8%
if 2.9e10 < A Initial program 86.5%
Simplified86.5%
Taylor expanded in B around -inf 90.9%
associate--l+90.9%
div-sub90.9%
Simplified90.9%
Final simplification84.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI))
(t_1 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
(if (<= A -3.4e+102)
t_1
(if (<= A -1.7e+68)
t_0
(if (<= A -2.3e+48)
t_1
(if (<= A 2.4e-78)
t_0
(if (<= A 5.9e-52)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(if (<= A 270000000000.0)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
double t_1 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -3.4e+102) {
tmp = t_1;
} else if (A <= -1.7e+68) {
tmp = t_0;
} else if (A <= -2.3e+48) {
tmp = t_1;
} else if (A <= 2.4e-78) {
tmp = t_0;
} else if (A <= 5.9e-52) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} else if (A <= 270000000000.0) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
double t_1 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -3.4e+102) {
tmp = t_1;
} else if (A <= -1.7e+68) {
tmp = t_0;
} else if (A <= -2.3e+48) {
tmp = t_1;
} else if (A <= 2.4e-78) {
tmp = t_0;
} else if (A <= 5.9e-52) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else if (A <= 270000000000.0) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi t_1 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) tmp = 0 if A <= -3.4e+102: tmp = t_1 elif A <= -1.7e+68: tmp = t_0 elif A <= -2.3e+48: tmp = t_1 elif A <= 2.4e-78: tmp = t_0 elif A <= 5.9e-52: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) elif A <= 270000000000.0: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) tmp = 0.0 if (A <= -3.4e+102) tmp = t_1; elseif (A <= -1.7e+68) tmp = t_0; elseif (A <= -2.3e+48) tmp = t_1; elseif (A <= 2.4e-78) tmp = t_0; elseif (A <= 5.9e-52) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); elseif (A <= 270000000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; t_1 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); tmp = 0.0; if (A <= -3.4e+102) tmp = t_1; elseif (A <= -1.7e+68) tmp = t_0; elseif (A <= -2.3e+48) tmp = t_1; elseif (A <= 2.4e-78) tmp = t_0; elseif (A <= 5.9e-52) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); elseif (A <= 270000000000.0) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = 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.4e+102], t$95$1, If[LessEqual[A, -1.7e+68], t$95$0, If[LessEqual[A, -2.3e+48], t$95$1, If[LessEqual[A, 2.4e-78], t$95$0, If[LessEqual[A, 5.9e-52], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 270000000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{if}\;A \leq -3.4 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1.7 \cdot 10^{+68}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.3 \cdot 10^{+48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 2.4 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5.9 \cdot 10^{-52}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{elif}\;A \leq 270000000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.4e102 or -1.70000000000000008e68 < A < -2.3e48Initial program 14.3%
Simplified22.9%
Taylor expanded in B around 0 84.9%
associate-*r/84.9%
Simplified84.9%
if -3.4e102 < A < -1.70000000000000008e68 or -2.3e48 < A < 2.4e-78Initial program 53.4%
associate-*r/53.4%
associate-*l/53.4%
*-un-lft-identity53.4%
associate--l-51.9%
unpow251.9%
pow251.9%
hypot-def81.2%
Applied egg-rr81.2%
Taylor expanded in A around 0 50.1%
+-commutative50.1%
unpow250.1%
unpow250.1%
hypot-def80.1%
Simplified80.1%
if 2.4e-78 < A < 5.90000000000000019e-52Initial program 38.5%
Simplified38.4%
Taylor expanded in B around 0 48.1%
unpow248.1%
Simplified48.1%
Taylor expanded in C around inf 79.8%
associate-*r/79.8%
Simplified79.8%
if 5.90000000000000019e-52 < A < 2.7e11Initial program 65.2%
Simplified65.2%
Taylor expanded in A around 0 65.2%
unpow265.2%
unpow265.2%
hypot-def100.0%
Simplified100.0%
if 2.7e11 < A Initial program 86.5%
Simplified86.5%
Taylor expanded in B around -inf 90.9%
associate--l+90.9%
div-sub90.9%
Simplified90.9%
Final simplification84.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
(if (<= A -5.2e+101)
t_0
(if (<= A -2.8e+67)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(if (<= A -5.8e+34)
t_0
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI)))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -5.2e+101) {
tmp = t_0;
} else if (A <= -2.8e+67) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else if (A <= -5.8e+34) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -5.2e+101) {
tmp = t_0;
} else if (A <= -2.8e+67) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else if (A <= -5.8e+34) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) tmp = 0 if A <= -5.2e+101: tmp = t_0 elif A <= -2.8e+67: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi elif A <= -5.8e+34: tmp = t_0 else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) tmp = 0.0 if (A <= -5.2e+101) tmp = t_0; elseif (A <= -2.8e+67) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); elseif (A <= -5.8e+34) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); tmp = 0.0; if (A <= -5.2e+101) tmp = t_0; elseif (A <= -2.8e+67) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; elseif (A <= -5.8e+34) tmp = t_0; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.2e+101], t$95$0, If[LessEqual[A, -2.8e+67], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -5.8e+34], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{if}\;A \leq -5.2 \cdot 10^{+101}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -5.8 \cdot 10^{+34}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.2e101 or -2.7999999999999998e67 < A < -5.8000000000000003e34Initial program 14.3%
Simplified22.9%
Taylor expanded in B around 0 84.9%
associate-*r/84.9%
Simplified84.9%
if -5.2e101 < A < -2.7999999999999998e67Initial program 52.6%
associate-*r/52.7%
associate-*l/52.7%
*-un-lft-identity52.7%
associate--l-38.8%
unpow238.8%
pow238.8%
hypot-def79.3%
Applied egg-rr79.3%
Taylor expanded in A around 0 38.8%
+-commutative38.8%
unpow238.8%
unpow238.8%
hypot-def86.2%
Simplified86.2%
if -5.8000000000000003e34 < A Initial program 63.4%
Simplified85.5%
Final simplification85.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
(if (<= A -7e+101)
t_0
(if (<= A -2.25e+67)
(/ (* 180.0 (atan (/ (- C (hypot C B)) B))) PI)
(if (<= A -7.5e+42)
t_0
(* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- C A)))) B))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -7e+101) {
tmp = t_0;
} else if (A <= -2.25e+67) {
tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / ((double) M_PI);
} else if (A <= -7.5e+42) {
tmp = t_0;
} 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 t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double tmp;
if (A <= -7e+101) {
tmp = t_0;
} else if (A <= -2.25e+67) {
tmp = (180.0 * Math.atan(((C - Math.hypot(C, B)) / B))) / Math.PI;
} else if (A <= -7.5e+42) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) tmp = 0 if A <= -7e+101: tmp = t_0 elif A <= -2.25e+67: tmp = (180.0 * math.atan(((C - math.hypot(C, B)) / B))) / math.pi elif A <= -7.5e+42: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) tmp = 0.0 if (A <= -7e+101) tmp = t_0; elseif (A <= -2.25e+67) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(C, B)) / B))) / pi); elseif (A <= -7.5e+42) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(C - A)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); tmp = 0.0; if (A <= -7e+101) tmp = t_0; elseif (A <= -2.25e+67) tmp = (180.0 * atan(((C - hypot(C, B)) / B))) / pi; elseif (A <= -7.5e+42) tmp = t_0; else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (C - A)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7e+101], t$95$0, If[LessEqual[A, -2.25e+67], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -7.5e+42], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(C - A), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{if}\;A \leq -7 \cdot 10^{+101}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.25 \cdot 10^{+67}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7.5 \cdot 10^{+42}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, C - A\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -7.00000000000000046e101 or -2.2499999999999999e67 < A < -7.50000000000000041e42Initial program 14.3%
Simplified22.9%
Taylor expanded in B around 0 84.9%
associate-*r/84.9%
Simplified84.9%
if -7.00000000000000046e101 < A < -2.2499999999999999e67Initial program 52.6%
associate-*r/52.7%
associate-*l/52.7%
*-un-lft-identity52.7%
associate--l-38.8%
unpow238.8%
pow238.8%
hypot-def79.3%
Applied egg-rr79.3%
Taylor expanded in A around 0 38.8%
+-commutative38.8%
unpow238.8%
unpow238.8%
hypot-def86.2%
Simplified86.2%
if -7.50000000000000041e42 < A Initial program 63.4%
Simplified85.6%
Final simplification85.5%
(FPCore (A B C)
:precision binary64
(if (<= C -8e-45)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 2.1e+100)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(/ (* 180.0 (atan (/ (* B 0.5) (- A C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8e-45) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 2.1e+100) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -8e-45) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 2.1e+100) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((B * 0.5) / (A - C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -8e-45: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 2.1e+100: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) else: tmp = (180.0 * math.atan(((B * 0.5) / (A - C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -8e-45) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 2.1e+100) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / Float64(A - C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8e-45) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 2.1e+100) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8e-45], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.1e+100], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8 \cdot 10^{-45}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 2.1 \cdot 10^{+100}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.99999999999999987e-45Initial program 80.9%
Simplified79.3%
Taylor expanded in A around 0 79.3%
unpow279.3%
unpow279.3%
hypot-def87.5%
Simplified87.5%
if -7.99999999999999987e-45 < C < 2.0999999999999999e100Initial program 52.1%
Simplified50.5%
Taylor expanded in C around 0 49.9%
associate-*r/49.9%
mul-1-neg49.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-def75.4%
Simplified75.4%
if 2.0999999999999999e100 < C Initial program 21.0%
Simplified56.8%
Taylor expanded in B around 0 63.4%
unpow263.4%
Simplified63.4%
Taylor expanded in C around -inf 71.3%
*-commutative71.3%
associate-*l/71.5%
associate-*r/71.5%
mul-1-neg71.5%
sub-neg71.5%
Simplified71.5%
Final simplification77.5%
(FPCore (A B C)
:precision binary64
(if (<= C -1.9e-45)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 8.5e+99)
(* (/ 180.0 PI) (atan (/ (- (- A) (hypot B A)) B)))
(/ (* 180.0 (atan (/ (* B 0.5) (- A C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.9e-45) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 8.5e+99) {
tmp = (180.0 / ((double) M_PI)) * atan(((-A - hypot(B, A)) / B));
} else {
tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.9e-45) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 8.5e+99) {
tmp = (180.0 / Math.PI) * Math.atan(((-A - Math.hypot(B, A)) / B));
} else {
tmp = (180.0 * Math.atan(((B * 0.5) / (A - C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.9e-45: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 8.5e+99: tmp = (180.0 / math.pi) * math.atan(((-A - math.hypot(B, A)) / B)) else: tmp = (180.0 * math.atan(((B * 0.5) / (A - C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.9e-45) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 8.5e+99) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B))); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / Float64(A - C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.9e-45) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 8.5e+99) tmp = (180.0 / pi) * atan(((-A - hypot(B, A)) / B)); else tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.9e-45], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.5e+99], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.9 \cdot 10^{-45}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8.5 \cdot 10^{+99}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.89999999999999999e-45Initial program 80.9%
Simplified79.3%
Taylor expanded in A around 0 79.3%
unpow279.3%
unpow279.3%
hypot-def87.5%
Simplified87.5%
if -1.89999999999999999e-45 < C < 8.49999999999999984e99Initial program 52.1%
Simplified50.5%
Taylor expanded in C around 0 49.9%
mul-1-neg49.9%
+-commutative49.9%
unpow249.9%
unpow249.9%
hypot-def75.4%
Simplified75.4%
Taylor expanded in B around 0 75.4%
associate-*r/75.4%
mul-1-neg75.4%
distribute-frac-neg75.4%
associate-/l*75.4%
associate-/r/75.4%
neg-sub075.4%
associate--r+75.4%
neg-sub075.4%
Simplified75.4%
if 8.49999999999999984e99 < C Initial program 21.0%
Simplified56.8%
Taylor expanded in B around 0 63.4%
unpow263.4%
Simplified63.4%
Taylor expanded in C around -inf 71.3%
*-commutative71.3%
associate-*l/71.5%
associate-*r/71.5%
mul-1-neg71.5%
sub-neg71.5%
Simplified71.5%
Final simplification77.5%
(FPCore (A B C)
:precision binary64
(if (<= C -1.85e-41)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 8e+99)
(/ (* 180.0 (atan (/ (- (- A) (hypot A B)) B))) PI)
(/ (* 180.0 (atan (/ (* B 0.5) (- A C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.85e-41) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 8e+99) {
tmp = (180.0 * atan(((-A - hypot(A, B)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.85e-41) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 8e+99) {
tmp = (180.0 * Math.atan(((-A - Math.hypot(A, B)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((B * 0.5) / (A - C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.85e-41: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 8e+99: tmp = (180.0 * math.atan(((-A - math.hypot(A, B)) / B))) / math.pi else: tmp = (180.0 * math.atan(((B * 0.5) / (A - C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.85e-41) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 8e+99) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * 0.5) / Float64(A - C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.85e-41) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 8e+99) tmp = (180.0 * atan(((-A - hypot(A, B)) / B))) / pi; else tmp = (180.0 * atan(((B * 0.5) / (A - C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.85e-41], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8e+99], N[(N[(180.0 * N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.85 \cdot 10^{-41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 8 \cdot 10^{+99}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot 0.5}{A - C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.8500000000000001e-41Initial program 80.9%
Simplified79.3%
Taylor expanded in A around 0 79.3%
unpow279.3%
unpow279.3%
hypot-def87.5%
Simplified87.5%
if -1.8500000000000001e-41 < C < 7.9999999999999997e99Initial program 52.1%
associate-*r/52.2%
associate-*l/52.1%
*-un-lft-identity52.1%
associate--l-50.5%
unpow250.5%
pow250.5%
hypot-def70.8%
Applied egg-rr70.8%
Taylor expanded in C around 0 49.9%
mul-1-neg49.9%
unpow249.9%
unpow249.9%
hypot-def75.4%
Simplified75.4%
if 7.9999999999999997e99 < C Initial program 21.0%
Simplified56.8%
Taylor expanded in B around 0 63.4%
unpow263.4%
Simplified63.4%
Taylor expanded in C around -inf 71.3%
*-commutative71.3%
associate-*l/71.5%
associate-*r/71.5%
mul-1-neg71.5%
sub-neg71.5%
Simplified71.5%
Final simplification77.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI)))
(t_1 (/ (- C A) B))
(t_2 (* 180.0 (/ (atan (+ 1.0 t_1)) PI))))
(if (<= B -5.5e-39)
t_2
(if (<= B -4.1e-132)
t_0
(if (<= B -2.06e-162)
t_2
(if (<= B -4.5e-201)
t_0
(if (<= B 2.85e-272)
t_2
(if (<= B 1.3e-251)
t_0
(* 180.0 (/ (atan (+ t_1 -1.0)) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
double t_1 = (C - A) / B;
double t_2 = 180.0 * (atan((1.0 + t_1)) / ((double) M_PI));
double tmp;
if (B <= -5.5e-39) {
tmp = t_2;
} else if (B <= -4.1e-132) {
tmp = t_0;
} else if (B <= -2.06e-162) {
tmp = t_2;
} else if (B <= -4.5e-201) {
tmp = t_0;
} else if (B <= 2.85e-272) {
tmp = t_2;
} else if (B <= 1.3e-251) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((t_1 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
double t_1 = (C - A) / B;
double t_2 = 180.0 * (Math.atan((1.0 + t_1)) / Math.PI);
double tmp;
if (B <= -5.5e-39) {
tmp = t_2;
} else if (B <= -4.1e-132) {
tmp = t_0;
} else if (B <= -2.06e-162) {
tmp = t_2;
} else if (B <= -4.5e-201) {
tmp = t_0;
} else if (B <= 2.85e-272) {
tmp = t_2;
} else if (B <= 1.3e-251) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((t_1 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) t_1 = (C - A) / B t_2 = 180.0 * (math.atan((1.0 + t_1)) / math.pi) tmp = 0 if B <= -5.5e-39: tmp = t_2 elif B <= -4.1e-132: tmp = t_0 elif B <= -2.06e-162: tmp = t_2 elif B <= -4.5e-201: tmp = t_0 elif B <= 2.85e-272: tmp = t_2 elif B <= 1.3e-251: tmp = t_0 else: tmp = 180.0 * (math.atan((t_1 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)) t_1 = Float64(Float64(C - A) / B) t_2 = Float64(180.0 * Float64(atan(Float64(1.0 + t_1)) / pi)) tmp = 0.0 if (B <= -5.5e-39) tmp = t_2; elseif (B <= -4.1e-132) tmp = t_0; elseif (B <= -2.06e-162) tmp = t_2; elseif (B <= -4.5e-201) tmp = t_0; elseif (B <= 2.85e-272) tmp = t_2; elseif (B <= 1.3e-251) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(t_1 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); t_1 = (C - A) / B; t_2 = 180.0 * (atan((1.0 + t_1)) / pi); tmp = 0.0; if (B <= -5.5e-39) tmp = t_2; elseif (B <= -4.1e-132) tmp = t_0; elseif (B <= -2.06e-162) tmp = t_2; elseif (B <= -4.5e-201) tmp = t_0; elseif (B <= 2.85e-272) tmp = t_2; elseif (B <= 1.3e-251) tmp = t_0; else tmp = 180.0 * (atan((t_1 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.5e-39], t$95$2, If[LessEqual[B, -4.1e-132], t$95$0, If[LessEqual[B, -2.06e-162], t$95$2, If[LessEqual[B, -4.5e-201], t$95$0, If[LessEqual[B, 2.85e-272], t$95$2, If[LessEqual[B, 1.3e-251], t$95$0, N[(180.0 * N[(N[ArcTan[N[(t$95$1 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
t_1 := \frac{C - A}{B}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + t_1\right)}{\pi}\\
\mathbf{if}\;B \leq -5.5 \cdot 10^{-39}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -4.1 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -2.06 \cdot 10^{-162}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -4.5 \cdot 10^{-201}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.85 \cdot 10^{-272}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-251}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_1 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.50000000000000018e-39 or -4.10000000000000007e-132 < B < -2.06e-162 or -4.5000000000000002e-201 < B < 2.8499999999999999e-272Initial program 58.7%
Simplified56.8%
Taylor expanded in B around -inf 76.1%
associate--l+76.1%
div-sub77.1%
Simplified77.1%
if -5.50000000000000018e-39 < B < -4.10000000000000007e-132 or -2.06e-162 < B < -4.5000000000000002e-201 or 2.8499999999999999e-272 < B < 1.3e-251Initial program 26.4%
Simplified31.7%
Taylor expanded in B around 0 50.0%
unpow250.0%
Simplified50.0%
Taylor expanded in C around -inf 84.6%
*-commutative84.6%
associate-*l/84.5%
associate-*r/84.5%
mul-1-neg84.5%
sub-neg84.5%
Simplified84.5%
Taylor expanded in B around 0 84.6%
associate-*r/84.6%
associate-*l/84.5%
*-commutative84.5%
Simplified84.5%
if 1.3e-251 < B Initial program 55.3%
Simplified54.3%
Taylor expanded in B around inf 71.6%
+-commutative71.6%
associate--r+71.6%
div-sub71.7%
Simplified71.7%
Final simplification75.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI)))
(t_1 (/ (- C A) B))
(t_2 (* 180.0 (/ (atan (+ 1.0 t_1)) PI))))
(if (<= B -5.7e-39)
t_2
(if (<= B -2.8e-132)
t_0
(if (<= B -1.25e-160)
t_2
(if (<= B -1.65e-198)
t_0
(if (<= B 9e-271)
t_2
(if (<= B 3.5e-251)
(* 180.0 (/ (atan (/ (* B -0.5) (- C A))) PI))
(* 180.0 (/ (atan (+ t_1 -1.0)) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
double t_1 = (C - A) / B;
double t_2 = 180.0 * (atan((1.0 + t_1)) / ((double) M_PI));
double tmp;
if (B <= -5.7e-39) {
tmp = t_2;
} else if (B <= -2.8e-132) {
tmp = t_0;
} else if (B <= -1.25e-160) {
tmp = t_2;
} else if (B <= -1.65e-198) {
tmp = t_0;
} else if (B <= 9e-271) {
tmp = t_2;
} else if (B <= 3.5e-251) {
tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((t_1 + -1.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
double t_1 = (C - A) / B;
double t_2 = 180.0 * (Math.atan((1.0 + t_1)) / Math.PI);
double tmp;
if (B <= -5.7e-39) {
tmp = t_2;
} else if (B <= -2.8e-132) {
tmp = t_0;
} else if (B <= -1.25e-160) {
tmp = t_2;
} else if (B <= -1.65e-198) {
tmp = t_0;
} else if (B <= 9e-271) {
tmp = t_2;
} else if (B <= 3.5e-251) {
tmp = 180.0 * (Math.atan(((B * -0.5) / (C - A))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((t_1 + -1.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) t_1 = (C - A) / B t_2 = 180.0 * (math.atan((1.0 + t_1)) / math.pi) tmp = 0 if B <= -5.7e-39: tmp = t_2 elif B <= -2.8e-132: tmp = t_0 elif B <= -1.25e-160: tmp = t_2 elif B <= -1.65e-198: tmp = t_0 elif B <= 9e-271: tmp = t_2 elif B <= 3.5e-251: tmp = 180.0 * (math.atan(((B * -0.5) / (C - A))) / math.pi) else: tmp = 180.0 * (math.atan((t_1 + -1.0)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)) t_1 = Float64(Float64(C - A) / B) t_2 = Float64(180.0 * Float64(atan(Float64(1.0 + t_1)) / pi)) tmp = 0.0 if (B <= -5.7e-39) tmp = t_2; elseif (B <= -2.8e-132) tmp = t_0; elseif (B <= -1.25e-160) tmp = t_2; elseif (B <= -1.65e-198) tmp = t_0; elseif (B <= 9e-271) tmp = t_2; elseif (B <= 3.5e-251) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(t_1 + -1.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); t_1 = (C - A) / B; t_2 = 180.0 * (atan((1.0 + t_1)) / pi); tmp = 0.0; if (B <= -5.7e-39) tmp = t_2; elseif (B <= -2.8e-132) tmp = t_0; elseif (B <= -1.25e-160) tmp = t_2; elseif (B <= -1.65e-198) tmp = t_0; elseif (B <= 9e-271) tmp = t_2; elseif (B <= 3.5e-251) tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / pi); else tmp = 180.0 * (atan((t_1 + -1.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -5.7e-39], t$95$2, If[LessEqual[B, -2.8e-132], t$95$0, If[LessEqual[B, -1.25e-160], t$95$2, If[LessEqual[B, -1.65e-198], t$95$0, If[LessEqual[B, 9e-271], t$95$2, If[LessEqual[B, 3.5e-251], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$1 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
t_1 := \frac{C - A}{B}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + t_1\right)}{\pi}\\
\mathbf{if}\;B \leq -5.7 \cdot 10^{-39}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -2.8 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.25 \cdot 10^{-160}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -1.65 \cdot 10^{-198}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 9 \cdot 10^{-271}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-251}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t_1 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.6999999999999997e-39 or -2.80000000000000002e-132 < B < -1.24999999999999999e-160 or -1.65e-198 < B < 8.9999999999999995e-271Initial program 58.7%
Simplified56.8%
Taylor expanded in B around -inf 76.1%
associate--l+76.1%
div-sub77.1%
Simplified77.1%
if -5.6999999999999997e-39 < B < -2.80000000000000002e-132 or -1.24999999999999999e-160 < B < -1.65e-198Initial program 23.8%
Simplified31.3%
Taylor expanded in B around 0 58.0%
unpow258.0%
Simplified58.0%
Taylor expanded in C around -inf 84.3%
*-commutative84.3%
associate-*l/84.2%
associate-*r/84.2%
mul-1-neg84.2%
sub-neg84.2%
Simplified84.2%
Taylor expanded in B around 0 84.3%
associate-*r/84.3%
associate-*l/84.3%
*-commutative84.3%
Simplified84.3%
if 8.9999999999999995e-271 < B < 3.50000000000000034e-251Initial program 35.5%
Simplified33.0%
Taylor expanded in B around 0 21.6%
unpow221.6%
Simplified21.6%
Taylor expanded in B around 0 85.9%
sub-neg85.9%
mul-1-neg85.9%
associate-*r/85.9%
mul-1-neg85.9%
sub-neg85.9%
Simplified85.9%
if 3.50000000000000034e-251 < B Initial program 55.3%
Simplified54.3%
Taylor expanded in B around inf 71.6%
+-commutative71.6%
associate--r+71.6%
div-sub71.7%
Simplified71.7%
Final simplification75.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI)))
(t_1 (/ (- C A) B))
(t_2 (* 180.0 (/ (atan (+ 1.0 t_1)) PI))))
(if (<= B -6.8e-39)
t_2
(if (<= B -3.6e-132)
t_0
(if (<= B -1.8e-160)
t_2
(if (<= B -8.5e-199)
t_0
(if (<= B 3.8e-273)
t_2
(if (<= B 1.5e-250)
(* 180.0 (/ (atan (/ (* B -0.5) (- C A))) PI))
(* (/ 180.0 PI) (atan (+ t_1 -1.0)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
double t_1 = (C - A) / B;
double t_2 = 180.0 * (atan((1.0 + t_1)) / ((double) M_PI));
double tmp;
if (B <= -6.8e-39) {
tmp = t_2;
} else if (B <= -3.6e-132) {
tmp = t_0;
} else if (B <= -1.8e-160) {
tmp = t_2;
} else if (B <= -8.5e-199) {
tmp = t_0;
} else if (B <= 3.8e-273) {
tmp = t_2;
} else if (B <= 1.5e-250) {
tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_1 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
double t_1 = (C - A) / B;
double t_2 = 180.0 * (Math.atan((1.0 + t_1)) / Math.PI);
double tmp;
if (B <= -6.8e-39) {
tmp = t_2;
} else if (B <= -3.6e-132) {
tmp = t_0;
} else if (B <= -1.8e-160) {
tmp = t_2;
} else if (B <= -8.5e-199) {
tmp = t_0;
} else if (B <= 3.8e-273) {
tmp = t_2;
} else if (B <= 1.5e-250) {
tmp = 180.0 * (Math.atan(((B * -0.5) / (C - A))) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_1 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) t_1 = (C - A) / B t_2 = 180.0 * (math.atan((1.0 + t_1)) / math.pi) tmp = 0 if B <= -6.8e-39: tmp = t_2 elif B <= -3.6e-132: tmp = t_0 elif B <= -1.8e-160: tmp = t_2 elif B <= -8.5e-199: tmp = t_0 elif B <= 3.8e-273: tmp = t_2 elif B <= 1.5e-250: tmp = 180.0 * (math.atan(((B * -0.5) / (C - A))) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((t_1 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)) t_1 = Float64(Float64(C - A) / B) t_2 = Float64(180.0 * Float64(atan(Float64(1.0 + t_1)) / pi)) tmp = 0.0 if (B <= -6.8e-39) tmp = t_2; elseif (B <= -3.6e-132) tmp = t_0; elseif (B <= -1.8e-160) tmp = t_2; elseif (B <= -8.5e-199) tmp = t_0; elseif (B <= 3.8e-273) tmp = t_2; elseif (B <= 1.5e-250) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / Float64(C - A))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_1 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); t_1 = (C - A) / B; t_2 = 180.0 * (atan((1.0 + t_1)) / pi); tmp = 0.0; if (B <= -6.8e-39) tmp = t_2; elseif (B <= -3.6e-132) tmp = t_0; elseif (B <= -1.8e-160) tmp = t_2; elseif (B <= -8.5e-199) tmp = t_0; elseif (B <= 3.8e-273) tmp = t_2; elseif (B <= 1.5e-250) tmp = 180.0 * (atan(((B * -0.5) / (C - A))) / pi); else tmp = (180.0 / pi) * atan((t_1 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.8e-39], t$95$2, If[LessEqual[B, -3.6e-132], t$95$0, If[LessEqual[B, -1.8e-160], t$95$2, If[LessEqual[B, -8.5e-199], t$95$0, If[LessEqual[B, 3.8e-273], t$95$2, If[LessEqual[B, 1.5e-250], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$1 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
t_1 := \frac{C - A}{B}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + t_1\right)}{\pi}\\
\mathbf{if}\;B \leq -6.8 \cdot 10^{-39}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -3.6 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.8 \cdot 10^{-160}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -8.5 \cdot 10^{-199}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-273}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-250}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t_1 + -1\right)\\
\end{array}
\end{array}
if B < -6.7999999999999998e-39 or -3.60000000000000007e-132 < B < -1.7999999999999999e-160 or -8.4999999999999994e-199 < B < 3.8000000000000004e-273Initial program 58.7%
Simplified56.8%
Taylor expanded in B around -inf 76.1%
associate--l+76.1%
div-sub77.1%
Simplified77.1%
if -6.7999999999999998e-39 < B < -3.60000000000000007e-132 or -1.7999999999999999e-160 < B < -8.4999999999999994e-199Initial program 23.8%
Simplified31.3%
Taylor expanded in B around 0 58.0%
unpow258.0%
Simplified58.0%
Taylor expanded in C around -inf 84.3%
*-commutative84.3%
associate-*l/84.2%
associate-*r/84.2%
mul-1-neg84.2%
sub-neg84.2%
Simplified84.2%
Taylor expanded in B around 0 84.3%
associate-*r/84.3%
associate-*l/84.3%
*-commutative84.3%
Simplified84.3%
if 3.8000000000000004e-273 < B < 1.50000000000000008e-250Initial program 35.5%
Simplified33.0%
Taylor expanded in B around 0 21.6%
unpow221.6%
Simplified21.6%
Taylor expanded in B around 0 85.9%
sub-neg85.9%
mul-1-neg85.9%
associate-*r/85.9%
mul-1-neg85.9%
sub-neg85.9%
Simplified85.9%
if 1.50000000000000008e-250 < B Initial program 55.3%
associate-*r/55.3%
associate-*l/55.3%
*-un-lft-identity55.3%
associate--l-54.3%
unpow254.3%
pow254.3%
hypot-def77.0%
Applied egg-rr77.0%
Taylor expanded in B around inf 71.7%
mul-1-neg71.7%
unsub-neg71.7%
Simplified71.7%
Taylor expanded in C around 0 71.7%
Simplified71.7%
Final simplification75.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))
(t_1 (/ (- C A) B))
(t_2 (* 180.0 (/ (atan (+ 1.0 t_1)) PI))))
(if (<= B -1.15e-38)
t_2
(if (<= B -4e-132)
t_0
(if (<= B -6.2e-161)
t_2
(if (<= B -4.8e-201)
t_0
(if (<= B 1.66e-273)
t_2
(if (<= B 2.2e-251)
t_0
(* (/ 180.0 PI) (atan (+ t_1 -1.0)))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double t_1 = (C - A) / B;
double t_2 = 180.0 * (atan((1.0 + t_1)) / ((double) M_PI));
double tmp;
if (B <= -1.15e-38) {
tmp = t_2;
} else if (B <= -4e-132) {
tmp = t_0;
} else if (B <= -6.2e-161) {
tmp = t_2;
} else if (B <= -4.8e-201) {
tmp = t_0;
} else if (B <= 1.66e-273) {
tmp = t_2;
} else if (B <= 2.2e-251) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_1 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double t_1 = (C - A) / B;
double t_2 = 180.0 * (Math.atan((1.0 + t_1)) / Math.PI);
double tmp;
if (B <= -1.15e-38) {
tmp = t_2;
} else if (B <= -4e-132) {
tmp = t_0;
} else if (B <= -6.2e-161) {
tmp = t_2;
} else if (B <= -4.8e-201) {
tmp = t_0;
} else if (B <= 1.66e-273) {
tmp = t_2;
} else if (B <= 2.2e-251) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_1 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) t_1 = (C - A) / B t_2 = 180.0 * (math.atan((1.0 + t_1)) / math.pi) tmp = 0 if B <= -1.15e-38: tmp = t_2 elif B <= -4e-132: tmp = t_0 elif B <= -6.2e-161: tmp = t_2 elif B <= -4.8e-201: tmp = t_0 elif B <= 1.66e-273: tmp = t_2 elif B <= 2.2e-251: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((t_1 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) t_1 = Float64(Float64(C - A) / B) t_2 = Float64(180.0 * Float64(atan(Float64(1.0 + t_1)) / pi)) tmp = 0.0 if (B <= -1.15e-38) tmp = t_2; elseif (B <= -4e-132) tmp = t_0; elseif (B <= -6.2e-161) tmp = t_2; elseif (B <= -4.8e-201) tmp = t_0; elseif (B <= 1.66e-273) tmp = t_2; elseif (B <= 2.2e-251) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_1 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); t_1 = (C - A) / B; t_2 = 180.0 * (atan((1.0 + t_1)) / pi); tmp = 0.0; if (B <= -1.15e-38) tmp = t_2; elseif (B <= -4e-132) tmp = t_0; elseif (B <= -6.2e-161) tmp = t_2; elseif (B <= -4.8e-201) tmp = t_0; elseif (B <= 1.66e-273) tmp = t_2; elseif (B <= 2.2e-251) tmp = t_0; else tmp = (180.0 / pi) * atan((t_1 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.15e-38], t$95$2, If[LessEqual[B, -4e-132], t$95$0, If[LessEqual[B, -6.2e-161], t$95$2, If[LessEqual[B, -4.8e-201], t$95$0, If[LessEqual[B, 1.66e-273], t$95$2, If[LessEqual[B, 2.2e-251], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$1 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
t_1 := \frac{C - A}{B}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + t_1\right)}{\pi}\\
\mathbf{if}\;B \leq -1.15 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -4 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-161}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -4.8 \cdot 10^{-201}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.66 \cdot 10^{-273}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-251}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t_1 + -1\right)\\
\end{array}
\end{array}
if B < -1.15000000000000001e-38 or -3.9999999999999999e-132 < B < -6.1999999999999997e-161 or -4.80000000000000018e-201 < B < 1.65999999999999995e-273Initial program 58.7%
Simplified56.8%
Taylor expanded in B around -inf 76.1%
associate--l+76.1%
div-sub77.1%
Simplified77.1%
if -1.15000000000000001e-38 < B < -3.9999999999999999e-132 or -6.1999999999999997e-161 < B < -4.80000000000000018e-201 or 1.65999999999999995e-273 < B < 2.2e-251Initial program 26.4%
Simplified31.7%
Taylor expanded in B around 0 84.8%
associate-*r/84.8%
Simplified84.8%
if 2.2e-251 < B Initial program 55.3%
associate-*r/55.3%
associate-*l/55.3%
*-un-lft-identity55.3%
associate--l-54.3%
unpow254.3%
pow254.3%
hypot-def77.0%
Applied egg-rr77.0%
Taylor expanded in B around inf 71.7%
mul-1-neg71.7%
unsub-neg71.7%
Simplified71.7%
Taylor expanded in C around 0 71.7%
Simplified71.7%
Final simplification75.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B))
(t_1 (* 180.0 (/ (atan (+ 1.0 t_0)) PI)))
(t_2 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
(if (<= B -1.05e-38)
(* 180.0 (/ (atan (* (/ 1.0 B) (- (+ B C) A))) PI))
(if (<= B -3.3e-132)
t_2
(if (<= B -1.02e-161)
t_1
(if (<= B -2e-200)
t_2
(if (<= B 3.2e-271)
t_1
(if (<= B 1.75e-251)
t_2
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
double t_2 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double tmp;
if (B <= -1.05e-38) {
tmp = 180.0 * (atan(((1.0 / B) * ((B + C) - A))) / ((double) M_PI));
} else if (B <= -3.3e-132) {
tmp = t_2;
} else if (B <= -1.02e-161) {
tmp = t_1;
} else if (B <= -2e-200) {
tmp = t_2;
} else if (B <= 3.2e-271) {
tmp = t_1;
} else if (B <= 1.75e-251) {
tmp = t_2;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
double t_2 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double tmp;
if (B <= -1.05e-38) {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((B + C) - A))) / Math.PI);
} else if (B <= -3.3e-132) {
tmp = t_2;
} else if (B <= -1.02e-161) {
tmp = t_1;
} else if (B <= -2e-200) {
tmp = t_2;
} else if (B <= 3.2e-271) {
tmp = t_1;
} else if (B <= 1.75e-251) {
tmp = t_2;
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B t_1 = 180.0 * (math.atan((1.0 + t_0)) / math.pi) t_2 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) tmp = 0 if B <= -1.05e-38: tmp = 180.0 * (math.atan(((1.0 / B) * ((B + C) - A))) / math.pi) elif B <= -3.3e-132: tmp = t_2 elif B <= -1.02e-161: tmp = t_1 elif B <= -2e-200: tmp = t_2 elif B <= 3.2e-271: tmp = t_1 elif B <= 1.75e-251: tmp = t_2 else: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)) t_2 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) tmp = 0.0 if (B <= -1.05e-38) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(B + C) - A))) / pi)); elseif (B <= -3.3e-132) tmp = t_2; elseif (B <= -1.02e-161) tmp = t_1; elseif (B <= -2e-200) tmp = t_2; elseif (B <= 3.2e-271) tmp = t_1; elseif (B <= 1.75e-251) tmp = t_2; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; t_1 = 180.0 * (atan((1.0 + t_0)) / pi); t_2 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); tmp = 0.0; if (B <= -1.05e-38) tmp = 180.0 * (atan(((1.0 / B) * ((B + C) - A))) / pi); elseif (B <= -3.3e-132) tmp = t_2; elseif (B <= -1.02e-161) tmp = t_1; elseif (B <= -2e-200) tmp = t_2; elseif (B <= 3.2e-271) tmp = t_1; elseif (B <= 1.75e-251) tmp = t_2; else tmp = (180.0 / pi) * atan((t_0 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.05e-38], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.3e-132], t$95$2, If[LessEqual[B, -1.02e-161], t$95$1, If[LessEqual[B, -2e-200], t$95$2, If[LessEqual[B, 3.2e-271], t$95$1, If[LessEqual[B, 1.75e-251], t$95$2, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
t_2 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{if}\;B \leq -1.05 \cdot 10^{-38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(B + C\right) - A\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq -3.3 \cdot 10^{-132}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -1.02 \cdot 10^{-161}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-200}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 3.2 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.75 \cdot 10^{-251}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t_0 + -1\right)\\
\end{array}
\end{array}
if B < -1.05000000000000006e-38Initial program 49.8%
Simplified49.8%
Taylor expanded in B around -inf 78.0%
if -1.05000000000000006e-38 < B < -3.2999999999999997e-132 or -1.0199999999999999e-161 < B < -2e-200 or 3.19999999999999978e-271 < B < 1.75000000000000017e-251Initial program 26.4%
Simplified31.7%
Taylor expanded in B around 0 84.8%
associate-*r/84.8%
Simplified84.8%
if -3.2999999999999997e-132 < B < -1.0199999999999999e-161 or -2e-200 < B < 3.19999999999999978e-271Initial program 85.0%
Simplified77.5%
Taylor expanded in B around -inf 70.4%
associate--l+70.4%
div-sub74.4%
Simplified74.4%
if 1.75000000000000017e-251 < B Initial program 55.3%
associate-*r/55.3%
associate-*l/55.3%
*-un-lft-identity55.3%
associate--l-54.3%
unpow254.3%
pow254.3%
hypot-def77.0%
Applied egg-rr77.0%
Taylor expanded in B around inf 71.7%
mul-1-neg71.7%
unsub-neg71.7%
Simplified71.7%
Taylor expanded in C around 0 71.7%
Simplified71.7%
Final simplification75.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B))
(t_1 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A))))))
(if (<= B -6.8e-39)
(* 180.0 (/ (atan (* (/ 1.0 B) (- (+ B C) A))) PI))
(if (<= B -2.8e-132)
t_1
(if (<= B -4.3e-160)
(* 180.0 (/ (atan (/ (+ (+ B C) (* 0.5 (/ (* C C) B))) B)) PI))
(if (<= B -3.4e-202)
t_1
(if (<= B 3.6e-270)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 1.1e-250)
t_1
(* (/ 180.0 PI) (atan (+ t_0 -1.0)))))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double tmp;
if (B <= -6.8e-39) {
tmp = 180.0 * (atan(((1.0 / B) * ((B + C) - A))) / ((double) M_PI));
} else if (B <= -2.8e-132) {
tmp = t_1;
} else if (B <= -4.3e-160) {
tmp = 180.0 * (atan((((B + C) + (0.5 * ((C * C) / B))) / B)) / ((double) M_PI));
} else if (B <= -3.4e-202) {
tmp = t_1;
} else if (B <= 3.6e-270) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 1.1e-250) {
tmp = t_1;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((t_0 + -1.0));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double tmp;
if (B <= -6.8e-39) {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((B + C) - A))) / Math.PI);
} else if (B <= -2.8e-132) {
tmp = t_1;
} else if (B <= -4.3e-160) {
tmp = 180.0 * (Math.atan((((B + C) + (0.5 * ((C * C) / B))) / B)) / Math.PI);
} else if (B <= -3.4e-202) {
tmp = t_1;
} else if (B <= 3.6e-270) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 1.1e-250) {
tmp = t_1;
} else {
tmp = (180.0 / Math.PI) * Math.atan((t_0 + -1.0));
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B t_1 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) tmp = 0 if B <= -6.8e-39: tmp = 180.0 * (math.atan(((1.0 / B) * ((B + C) - A))) / math.pi) elif B <= -2.8e-132: tmp = t_1 elif B <= -4.3e-160: tmp = 180.0 * (math.atan((((B + C) + (0.5 * ((C * C) / B))) / B)) / math.pi) elif B <= -3.4e-202: tmp = t_1 elif B <= 3.6e-270: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 1.1e-250: tmp = t_1 else: tmp = (180.0 / math.pi) * math.atan((t_0 + -1.0)) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) tmp = 0.0 if (B <= -6.8e-39) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(B + C) - A))) / pi)); elseif (B <= -2.8e-132) tmp = t_1; elseif (B <= -4.3e-160) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) + Float64(0.5 * Float64(Float64(C * C) / B))) / B)) / pi)); elseif (B <= -3.4e-202) tmp = t_1; elseif (B <= 3.6e-270) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 1.1e-250) tmp = t_1; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(t_0 + -1.0))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; t_1 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); tmp = 0.0; if (B <= -6.8e-39) tmp = 180.0 * (atan(((1.0 / B) * ((B + C) - A))) / pi); elseif (B <= -2.8e-132) tmp = t_1; elseif (B <= -4.3e-160) tmp = 180.0 * (atan((((B + C) + (0.5 * ((C * C) / B))) / B)) / pi); elseif (B <= -3.4e-202) tmp = t_1; elseif (B <= 3.6e-270) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 1.1e-250) tmp = t_1; else tmp = (180.0 / pi) * atan((t_0 + -1.0)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -6.8e-39], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.8e-132], t$95$1, If[LessEqual[B, -4.3e-160], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] + N[(0.5 * N[(N[(C * C), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.4e-202], t$95$1, If[LessEqual[B, 3.6e-270], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.1e-250], t$95$1, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
\mathbf{if}\;B \leq -6.8 \cdot 10^{-39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(B + C\right) - A\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.8 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -4.3 \cdot 10^{-160}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) + 0.5 \cdot \frac{C \cdot C}{B}}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -3.4 \cdot 10^{-202}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-270}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-250}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(t_0 + -1\right)\\
\end{array}
\end{array}
if B < -6.7999999999999998e-39Initial program 49.8%
Simplified49.8%
Taylor expanded in B around -inf 78.0%
if -6.7999999999999998e-39 < B < -2.80000000000000002e-132 or -4.30000000000000014e-160 < B < -3.40000000000000012e-202 or 3.5999999999999998e-270 < B < 1.1e-250Initial program 26.4%
Simplified31.7%
Taylor expanded in B around 0 84.8%
associate-*r/84.8%
Simplified84.8%
if -2.80000000000000002e-132 < B < -4.30000000000000014e-160Initial program 99.6%
Simplified99.6%
Taylor expanded in A around 0 77.5%
unpow277.5%
unpow277.5%
hypot-def77.5%
Simplified77.5%
Taylor expanded in B around -inf 89.7%
associate-+r+89.7%
unpow289.7%
Simplified89.7%
if -3.40000000000000012e-202 < B < 3.5999999999999998e-270Initial program 78.5%
Simplified67.7%
Taylor expanded in B around -inf 67.5%
associate--l+67.5%
div-sub67.7%
Simplified67.7%
if 1.1e-250 < B Initial program 55.3%
associate-*r/55.3%
associate-*l/55.3%
*-un-lft-identity55.3%
associate--l-54.3%
unpow254.3%
pow254.3%
hypot-def77.0%
Applied egg-rr77.0%
Taylor expanded in B around inf 71.7%
mul-1-neg71.7%
unsub-neg71.7%
Simplified71.7%
Taylor expanded in C around 0 71.7%
Simplified71.7%
Final simplification75.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI))
(t_1 (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))))
(if (<= A -5.5e+102)
t_1
(if (<= A -1.72e+68)
t_0
(if (<= A -490000000.0)
t_1
(if (<= A 1e-236)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 2.15e-78)
t_0
(if (<= A 3e-53)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
double t_1 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double tmp;
if (A <= -5.5e+102) {
tmp = t_1;
} else if (A <= -1.72e+68) {
tmp = t_0;
} else if (A <= -490000000.0) {
tmp = t_1;
} else if (A <= 1e-236) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 2.15e-78) {
tmp = t_0;
} else if (A <= 3e-53) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} 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 t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
double t_1 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -5.5e+102) {
tmp = t_1;
} else if (A <= -1.72e+68) {
tmp = t_0;
} else if (A <= -490000000.0) {
tmp = t_1;
} else if (A <= 1e-236) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 2.15e-78) {
tmp = t_0;
} else if (A <= 3e-53) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi t_1 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) tmp = 0 if A <= -5.5e+102: tmp = t_1 elif A <= -1.72e+68: tmp = t_0 elif A <= -490000000.0: tmp = t_1 elif A <= 1e-236: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 2.15e-78: tmp = t_0 elif A <= 3e-53: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) tmp = 0.0 if (A <= -5.5e+102) tmp = t_1; elseif (A <= -1.72e+68) tmp = t_0; elseif (A <= -490000000.0) tmp = t_1; elseif (A <= 1e-236) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 2.15e-78) tmp = t_0; elseif (A <= 3e-53) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); 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) t_0 = (180.0 * atan(((C - B) / B))) / pi; t_1 = (180.0 / pi) * atan((0.5 * (B / A))); tmp = 0.0; if (A <= -5.5e+102) tmp = t_1; elseif (A <= -1.72e+68) tmp = t_0; elseif (A <= -490000000.0) tmp = t_1; elseif (A <= 1e-236) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 2.15e-78) tmp = t_0; elseif (A <= 3e-53) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.5e+102], t$95$1, If[LessEqual[A, -1.72e+68], t$95$0, If[LessEqual[A, -490000000.0], t$95$1, If[LessEqual[A, 1e-236], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.15e-78], t$95$0, If[LessEqual[A, 3e-53], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $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}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1.72 \cdot 10^{+68}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -490000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 10^{-236}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.15 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-53}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -5.49999999999999981e102 or -1.72e68 < A < -4.9e8Initial program 15.8%
Simplified26.4%
Taylor expanded in B around 0 64.0%
unpow264.0%
Simplified64.0%
Taylor expanded in C around 0 75.2%
if -5.49999999999999981e102 < A < -1.72e68 or 1e-236 < A < 2.14999999999999997e-78Initial program 63.0%
associate-*r/63.0%
associate-*l/63.0%
*-un-lft-identity63.0%
associate--l-59.0%
unpow259.0%
pow259.0%
hypot-def88.0%
Applied egg-rr88.0%
Taylor expanded in B around inf 65.2%
if -4.9e8 < A < 1e-236Initial program 48.9%
Simplified48.9%
Taylor expanded in A around 0 47.9%
unpow247.9%
unpow247.9%
hypot-def77.2%
Simplified77.2%
Taylor expanded in B around -inf 51.3%
if 2.14999999999999997e-78 < A < 3.0000000000000002e-53Initial program 30.8%
Simplified30.7%
Taylor expanded in B around 0 53.9%
unpow253.9%
Simplified53.9%
Taylor expanded in C around inf 77.3%
associate-*r/77.3%
Simplified77.3%
if 3.0000000000000002e-53 < A Initial program 84.5%
associate-*r/84.5%
associate-*l/84.5%
*-un-lft-identity84.5%
associate--l-84.5%
unpow284.5%
pow284.5%
hypot-def99.4%
Applied egg-rr99.4%
Taylor expanded in B around inf 85.7%
mul-1-neg85.7%
unsub-neg85.7%
Simplified85.7%
Taylor expanded in C around 0 83.6%
associate-*r/83.6%
neg-mul-183.6%
distribute-neg-in83.6%
sub-neg83.6%
div-sub83.6%
mul-1-neg83.6%
associate-*r/83.6%
*-inverses83.6%
sub-neg83.6%
metadata-eval83.6%
+-commutative83.6%
mul-1-neg83.6%
unsub-neg83.6%
Simplified83.6%
Taylor expanded in A around 0 83.6%
distribute-neg-in83.6%
metadata-eval83.6%
sub-neg83.6%
associate-*r/83.6%
associate-*l/83.6%
*-commutative83.6%
Simplified83.6%
Final simplification68.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI))
(t_1 (* (/ 180.0 PI) (atan (* 0.5 (/ B A))))))
(if (<= A -7e+101)
t_1
(if (<= A -8e+67)
t_0
(if (<= A -1800000000.0)
t_1
(if (<= A 3e-235)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(if (<= A 2.4e-78)
t_0
(if (<= A 1.04e-53)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
double t_1 = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
double tmp;
if (A <= -7e+101) {
tmp = t_1;
} else if (A <= -8e+67) {
tmp = t_0;
} else if (A <= -1800000000.0) {
tmp = t_1;
} else if (A <= 3e-235) {
tmp = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
} else if (A <= 2.4e-78) {
tmp = t_0;
} else if (A <= 1.04e-53) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} 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 t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
double t_1 = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -7e+101) {
tmp = t_1;
} else if (A <= -8e+67) {
tmp = t_0;
} else if (A <= -1800000000.0) {
tmp = t_1;
} else if (A <= 3e-235) {
tmp = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
} else if (A <= 2.4e-78) {
tmp = t_0;
} else if (A <= 1.04e-53) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi t_1 = (180.0 / math.pi) * math.atan((0.5 * (B / A))) tmp = 0 if A <= -7e+101: tmp = t_1 elif A <= -8e+67: tmp = t_0 elif A <= -1800000000.0: tmp = t_1 elif A <= 3e-235: tmp = (180.0 * math.atan(((B + C) / B))) / math.pi elif A <= 2.4e-78: tmp = t_0 elif A <= 1.04e-53: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi) t_1 = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))) tmp = 0.0 if (A <= -7e+101) tmp = t_1; elseif (A <= -8e+67) tmp = t_0; elseif (A <= -1800000000.0) tmp = t_1; elseif (A <= 3e-235) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); elseif (A <= 2.4e-78) tmp = t_0; elseif (A <= 1.04e-53) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); 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) t_0 = (180.0 * atan(((C - B) / B))) / pi; t_1 = (180.0 / pi) * atan((0.5 * (B / A))); tmp = 0.0; if (A <= -7e+101) tmp = t_1; elseif (A <= -8e+67) tmp = t_0; elseif (A <= -1800000000.0) tmp = t_1; elseif (A <= 3e-235) tmp = (180.0 * atan(((B + C) / B))) / pi; elseif (A <= 2.4e-78) tmp = t_0; elseif (A <= 1.04e-53) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7e+101], t$95$1, If[LessEqual[A, -8e+67], t$95$0, If[LessEqual[A, -1800000000.0], t$95$1, If[LessEqual[A, 3e-235], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.4e-78], t$95$0, If[LessEqual[A, 1.04e-53], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $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}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := \frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -7 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -8 \cdot 10^{+67}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1800000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-235}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.4 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.04 \cdot 10^{-53}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -7.00000000000000046e101 or -7.99999999999999986e67 < A < -1.8e9Initial program 15.8%
Simplified26.4%
Taylor expanded in B around 0 64.0%
unpow264.0%
Simplified64.0%
Taylor expanded in C around 0 75.2%
if -7.00000000000000046e101 < A < -7.99999999999999986e67 or 2.9999999999999999e-235 < A < 2.4e-78Initial program 63.0%
associate-*r/63.0%
associate-*l/63.0%
*-un-lft-identity63.0%
associate--l-59.0%
unpow259.0%
pow259.0%
hypot-def88.0%
Applied egg-rr88.0%
Taylor expanded in B around inf 65.2%
if -1.8e9 < A < 2.9999999999999999e-235Initial program 48.9%
associate-*r/49.0%
associate-*l/49.0%
*-un-lft-identity49.0%
associate--l-49.0%
unpow249.0%
pow249.0%
hypot-def78.2%
Applied egg-rr78.2%
Taylor expanded in B around -inf 51.4%
mul-1-neg51.4%
Simplified51.4%
if 2.4e-78 < A < 1.04000000000000001e-53Initial program 30.8%
Simplified30.7%
Taylor expanded in B around 0 53.9%
unpow253.9%
Simplified53.9%
Taylor expanded in C around inf 77.3%
associate-*r/77.3%
Simplified77.3%
if 1.04000000000000001e-53 < A Initial program 84.5%
associate-*r/84.5%
associate-*l/84.5%
*-un-lft-identity84.5%
associate--l-84.5%
unpow284.5%
pow284.5%
hypot-def99.4%
Applied egg-rr99.4%
Taylor expanded in B around inf 85.7%
mul-1-neg85.7%
unsub-neg85.7%
Simplified85.7%
Taylor expanded in C around 0 83.6%
associate-*r/83.6%
neg-mul-183.6%
distribute-neg-in83.6%
sub-neg83.6%
div-sub83.6%
mul-1-neg83.6%
associate-*r/83.6%
*-inverses83.6%
sub-neg83.6%
metadata-eval83.6%
+-commutative83.6%
mul-1-neg83.6%
unsub-neg83.6%
Simplified83.6%
Taylor expanded in A around 0 83.6%
distribute-neg-in83.6%
metadata-eval83.6%
sub-neg83.6%
associate-*r/83.6%
associate-*l/83.6%
*-commutative83.6%
Simplified83.6%
Final simplification68.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI))
(t_1 (* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI))))
(if (<= A -5e+101)
t_1
(if (<= A -2.4e+68)
t_0
(if (<= A -7e-90)
t_1
(if (<= A 1e-236)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(if (<= A 2.1e-78)
t_0
(if (<= A 9.2e-53)
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B))))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
double t_1 = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
double tmp;
if (A <= -5e+101) {
tmp = t_1;
} else if (A <= -2.4e+68) {
tmp = t_0;
} else if (A <= -7e-90) {
tmp = t_1;
} else if (A <= 1e-236) {
tmp = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
} else if (A <= 2.1e-78) {
tmp = t_0;
} else if (A <= 9.2e-53) {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
} 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 t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
double t_1 = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
double tmp;
if (A <= -5e+101) {
tmp = t_1;
} else if (A <= -2.4e+68) {
tmp = t_0;
} else if (A <= -7e-90) {
tmp = t_1;
} else if (A <= 1e-236) {
tmp = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
} else if (A <= 2.1e-78) {
tmp = t_0;
} else if (A <= 9.2e-53) {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi t_1 = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) tmp = 0 if A <= -5e+101: tmp = t_1 elif A <= -2.4e+68: tmp = t_0 elif A <= -7e-90: tmp = t_1 elif A <= 1e-236: tmp = (180.0 * math.atan(((B + C) / B))) / math.pi elif A <= 2.1e-78: tmp = t_0 elif A <= 9.2e-53: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi) t_1 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)) tmp = 0.0 if (A <= -5e+101) tmp = t_1; elseif (A <= -2.4e+68) tmp = t_0; elseif (A <= -7e-90) tmp = t_1; elseif (A <= 1e-236) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); elseif (A <= 2.1e-78) tmp = t_0; elseif (A <= 9.2e-53) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); 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) t_0 = (180.0 * atan(((C - B) / B))) / pi; t_1 = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); tmp = 0.0; if (A <= -5e+101) tmp = t_1; elseif (A <= -2.4e+68) tmp = t_0; elseif (A <= -7e-90) tmp = t_1; elseif (A <= 1e-236) tmp = (180.0 * atan(((B + C) / B))) / pi; elseif (A <= 2.1e-78) tmp = t_0; elseif (A <= 9.2e-53) tmp = (180.0 / pi) * atan(((B * -0.5) / C)); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5e+101], t$95$1, If[LessEqual[A, -2.4e+68], t$95$0, If[LessEqual[A, -7e-90], t$95$1, If[LessEqual[A, 1e-236], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.1e-78], t$95$0, If[LessEqual[A, 9.2e-53], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $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}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
\mathbf{if}\;A \leq -5 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -2.4 \cdot 10^{+68}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 10^{-236}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.1 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 9.2 \cdot 10^{-53}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -4.99999999999999989e101 or -2.40000000000000008e68 < A < -6.9999999999999997e-90Initial program 20.4%
Simplified35.7%
Taylor expanded in B around 0 59.7%
unpow259.7%
Simplified59.7%
Taylor expanded in C around -inf 75.8%
*-commutative75.8%
associate-*l/75.9%
associate-*r/75.9%
mul-1-neg75.9%
sub-neg75.9%
Simplified75.9%
Taylor expanded in B around 0 75.8%
associate-*r/75.8%
associate-*l/75.7%
*-commutative75.7%
Simplified75.7%
if -4.99999999999999989e101 < A < -2.40000000000000008e68 or 1e-236 < A < 2.1000000000000001e-78Initial program 63.0%
associate-*r/63.0%
associate-*l/63.0%
*-un-lft-identity63.0%
associate--l-59.0%
unpow259.0%
pow259.0%
hypot-def88.0%
Applied egg-rr88.0%
Taylor expanded in B around inf 65.2%
if -6.9999999999999997e-90 < A < 1e-236Initial program 52.6%
associate-*r/52.6%
associate-*l/52.6%
*-un-lft-identity52.6%
associate--l-52.6%
unpow252.6%
pow252.6%
hypot-def81.5%
Applied egg-rr81.5%
Taylor expanded in B around -inf 56.2%
mul-1-neg56.2%
Simplified56.2%
if 2.1000000000000001e-78 < A < 9.2000000000000005e-53Initial program 30.8%
Simplified30.7%
Taylor expanded in B around 0 53.9%
unpow253.9%
Simplified53.9%
Taylor expanded in C around inf 77.3%
associate-*r/77.3%
Simplified77.3%
if 9.2000000000000005e-53 < A Initial program 84.5%
associate-*r/84.5%
associate-*l/84.5%
*-un-lft-identity84.5%
associate--l-84.5%
unpow284.5%
pow284.5%
hypot-def99.4%
Applied egg-rr99.4%
Taylor expanded in B around inf 85.7%
mul-1-neg85.7%
unsub-neg85.7%
Simplified85.7%
Taylor expanded in C around 0 83.6%
associate-*r/83.6%
neg-mul-183.6%
distribute-neg-in83.6%
sub-neg83.6%
div-sub83.6%
mul-1-neg83.6%
associate-*r/83.6%
*-inverses83.6%
sub-neg83.6%
metadata-eval83.6%
+-commutative83.6%
mul-1-neg83.6%
unsub-neg83.6%
Simplified83.6%
Taylor expanded in A around 0 83.6%
distribute-neg-in83.6%
metadata-eval83.6%
sub-neg83.6%
associate-*r/83.6%
associate-*l/83.6%
*-commutative83.6%
Simplified83.6%
Final simplification71.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (- C B) B))) PI))
(t_1 (* 180.0 (/ (atan (* B (/ 0.5 (- A C)))) PI))))
(if (<= A -5e+101)
t_1
(if (<= A -2.4e+68)
t_0
(if (<= A -5e-95)
t_1
(if (<= A 1e-236)
(/ (* 180.0 (atan (/ (+ B C) B))) PI)
(if (<= A 9.6e-129)
t_0
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
double t_1 = 180.0 * (atan((B * (0.5 / (A - C)))) / ((double) M_PI));
double tmp;
if (A <= -5e+101) {
tmp = t_1;
} else if (A <= -2.4e+68) {
tmp = t_0;
} else if (A <= -5e-95) {
tmp = t_1;
} else if (A <= 1e-236) {
tmp = (180.0 * atan(((B + C) / B))) / ((double) M_PI);
} else if (A <= 9.6e-129) {
tmp = t_0;
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
double t_1 = 180.0 * (Math.atan((B * (0.5 / (A - C)))) / Math.PI);
double tmp;
if (A <= -5e+101) {
tmp = t_1;
} else if (A <= -2.4e+68) {
tmp = t_0;
} else if (A <= -5e-95) {
tmp = t_1;
} else if (A <= 1e-236) {
tmp = (180.0 * Math.atan(((B + C) / B))) / Math.PI;
} else if (A <= 9.6e-129) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((C - B) / B))) / math.pi t_1 = 180.0 * (math.atan((B * (0.5 / (A - C)))) / math.pi) tmp = 0 if A <= -5e+101: tmp = t_1 elif A <= -2.4e+68: tmp = t_0 elif A <= -5e-95: tmp = t_1 elif A <= 1e-236: tmp = (180.0 * math.atan(((B + C) / B))) / math.pi elif A <= 9.6e-129: tmp = t_0 else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi) t_1 = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / Float64(A - C)))) / pi)) tmp = 0.0 if (A <= -5e+101) tmp = t_1; elseif (A <= -2.4e+68) tmp = t_0; elseif (A <= -5e-95) tmp = t_1; elseif (A <= 1e-236) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B + C) / B))) / pi); elseif (A <= 9.6e-129) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((C - B) / B))) / pi; t_1 = 180.0 * (atan((B * (0.5 / (A - C)))) / pi); tmp = 0.0; if (A <= -5e+101) tmp = t_1; elseif (A <= -2.4e+68) tmp = t_0; elseif (A <= -5e-95) tmp = t_1; elseif (A <= 1e-236) tmp = (180.0 * atan(((B + C) / B))) / pi; elseif (A <= 9.6e-129) tmp = t_0; else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5e+101], t$95$1, If[LessEqual[A, -2.4e+68], t$95$0, If[LessEqual[A, -5e-95], t$95$1, If[LessEqual[A, 1e-236], N[(N[(180.0 * N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 9.6e-129], t$95$0, N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A - C}\right)}{\pi}\\
\mathbf{if}\;A \leq -5 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -2.4 \cdot 10^{+68}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -5 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 10^{-236}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9.6 \cdot 10^{-129}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.99999999999999989e101 or -2.40000000000000008e68 < A < -4.9999999999999998e-95Initial program 20.4%
Simplified35.7%
Taylor expanded in B around 0 59.7%
unpow259.7%
Simplified59.7%
Taylor expanded in C around -inf 75.8%
*-commutative75.8%
associate-*l/75.9%
associate-*r/75.9%
mul-1-neg75.9%
sub-neg75.9%
Simplified75.9%
Taylor expanded in B around 0 75.8%
associate-*r/75.8%
associate-*l/75.7%
*-commutative75.7%
Simplified75.7%
if -4.99999999999999989e101 < A < -2.40000000000000008e68 or 1e-236 < A < 9.59999999999999954e-129Initial program 60.1%
associate-*r/60.1%
associate-*l/60.1%
*-un-lft-identity60.1%
associate--l-55.0%
unpow255.0%
pow255.0%
hypot-def84.8%
Applied egg-rr84.8%
Taylor expanded in B around inf 70.9%
if -4.9999999999999998e-95 < A < 1e-236Initial program 52.6%
associate-*r/52.6%
associate-*l/52.6%
*-un-lft-identity52.6%
associate--l-52.6%
unpow252.6%
pow252.6%
hypot-def81.5%
Applied egg-rr81.5%
Taylor expanded in B around -inf 56.2%
mul-1-neg56.2%
Simplified56.2%
if 9.59999999999999954e-129 < A Initial program 78.2%
Simplified78.2%
Taylor expanded in B around -inf 79.8%
associate--l+79.8%
div-sub79.8%
Simplified79.8%
Final simplification71.8%
(FPCore (A B C)
:precision binary64
(if (<= A -240000000.0)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 3.8e-235)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (or (<= A 2.8e-120) (not (<= A 3.6e-53)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B))))
(* (/ 180.0 PI) (atan (/ (* B -0.5) C)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -240000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 3.8e-235) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if ((A <= 2.8e-120) || !(A <= 3.6e-53)) {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / C));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -240000000.0) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 3.8e-235) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if ((A <= 2.8e-120) || !(A <= 3.6e-53)) {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B * -0.5) / C));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -240000000.0: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 3.8e-235: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif (A <= 2.8e-120) or not (A <= 3.6e-53): tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) else: tmp = (180.0 / math.pi) * math.atan(((B * -0.5) / C)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -240000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 3.8e-235) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif ((A <= 2.8e-120) || !(A <= 3.6e-53)) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / C))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -240000000.0) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 3.8e-235) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif ((A <= 2.8e-120) || ~((A <= 3.6e-53))) tmp = (180.0 / pi) * atan((-1.0 - (A / B))); else tmp = (180.0 / pi) * atan(((B * -0.5) / C)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -240000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-235], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 2.8e-120], N[Not[LessEqual[A, 3.6e-53]], $MachinePrecision]], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -240000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-235}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-120} \lor \neg \left(A \leq 3.6 \cdot 10^{-53}\right):\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)\\
\end{array}
\end{array}
if A < -2.4e8Initial program 23.1%
Simplified36.9%
Taylor expanded in B around 0 57.7%
unpow257.7%
Simplified57.7%
Taylor expanded in C around 0 67.0%
if -2.4e8 < A < 3.80000000000000026e-235Initial program 48.9%
Simplified48.9%
Taylor expanded in A around 0 47.9%
unpow247.9%
unpow247.9%
hypot-def77.2%
Simplified77.2%
Taylor expanded in B around -inf 51.3%
if 3.80000000000000026e-235 < A < 2.79999999999999994e-120 or 3.5999999999999999e-53 < A Initial program 79.7%
associate-*r/79.7%
associate-*l/79.6%
*-un-lft-identity79.6%
associate--l-79.6%
unpow279.6%
pow279.6%
hypot-def96.4%
Applied egg-rr96.4%
Taylor expanded in B around inf 83.0%
mul-1-neg83.0%
unsub-neg83.0%
Simplified83.0%
Taylor expanded in C around 0 76.4%
associate-*r/76.4%
neg-mul-176.4%
distribute-neg-in76.4%
sub-neg76.4%
div-sub76.4%
mul-1-neg76.4%
associate-*r/76.4%
*-inverses76.4%
sub-neg76.4%
metadata-eval76.4%
+-commutative76.4%
mul-1-neg76.4%
unsub-neg76.4%
Simplified76.4%
Taylor expanded in A around 0 76.4%
distribute-neg-in76.4%
metadata-eval76.4%
sub-neg76.4%
associate-*r/76.4%
associate-*l/76.4%
*-commutative76.4%
Simplified76.4%
if 2.79999999999999994e-120 < A < 3.5999999999999999e-53Initial program 49.2%
Simplified65.4%
Taylor expanded in B around 0 41.2%
unpow241.2%
Simplified41.2%
Taylor expanded in C around inf 54.1%
associate-*r/54.1%
Simplified54.1%
Final simplification64.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
(if (<= A -940000000.0)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 7.8e-235)
t_0
(if (<= A 8.6e-130)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 3.85e-62) t_0 (* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
double tmp;
if (A <= -940000000.0) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 7.8e-235) {
tmp = t_0;
} else if (A <= 8.6e-130) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 3.85e-62) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
double tmp;
if (A <= -940000000.0) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 7.8e-235) {
tmp = t_0;
} else if (A <= 8.6e-130) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 3.85e-62) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B + C) / B)) / math.pi) tmp = 0 if A <= -940000000.0: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 7.8e-235: tmp = t_0 elif A <= 8.6e-130: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 3.85e-62: tmp = t_0 else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)) tmp = 0.0 if (A <= -940000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 7.8e-235) tmp = t_0; elseif (A <= 8.6e-130) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 3.85e-62) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B + C) / B)) / pi); tmp = 0.0; if (A <= -940000000.0) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 7.8e-235) tmp = t_0; elseif (A <= 8.6e-130) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 3.85e-62) tmp = t_0; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -940000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.8e-235], t$95$0, If[LessEqual[A, 8.6e-130], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.85e-62], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -940000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.8 \cdot 10^{-235}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 8.6 \cdot 10^{-130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 3.85 \cdot 10^{-62}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -9.4e8Initial program 23.1%
Simplified18.2%
Taylor expanded in A around -inf 66.9%
associate-*r/66.9%
Simplified66.9%
if -9.4e8 < A < 7.79999999999999939e-235 or 8.60000000000000058e-130 < A < 3.84999999999999998e-62Initial program 51.0%
Simplified51.0%
Taylor expanded in A around 0 48.3%
unpow248.3%
unpow248.3%
hypot-def75.9%
Simplified75.9%
Taylor expanded in B around -inf 50.5%
if 7.79999999999999939e-235 < A < 8.60000000000000058e-130Initial program 64.6%
Simplified64.6%
Taylor expanded in B around inf 54.2%
if 3.84999999999999998e-62 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 74.7%
associate-*r/74.7%
*-commutative74.7%
Simplified74.7%
Final simplification62.1%
(FPCore (A B C)
:precision binary64
(if (<= A -6.4e-102)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 9e-236)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 5.6e-128)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e-102) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 9e-236) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 5.6e-128) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e-102) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 9e-236) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 5.6e-128) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.4e-102: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 9e-236: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 5.6e-128: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.4e-102) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 9e-236) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 5.6e-128) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.4e-102) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 9e-236) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 5.6e-128) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.4e-102], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 9e-236], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.6e-128], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.4 \cdot 10^{-102}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{-236}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 5.6 \cdot 10^{-128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.39999999999999973e-102Initial program 26.3%
Simplified22.4%
Taylor expanded in A around -inf 58.7%
associate-*r/58.7%
Simplified58.7%
if -6.39999999999999973e-102 < A < 8.99999999999999997e-236Initial program 53.0%
Simplified53.0%
Taylor expanded in B around -inf 40.3%
if 8.99999999999999997e-236 < A < 5.5999999999999996e-128Initial program 64.6%
Simplified64.6%
Taylor expanded in B around inf 54.2%
if 5.5999999999999996e-128 < A Initial program 78.2%
Simplified78.2%
Taylor expanded in A around inf 66.5%
associate-*r/66.5%
*-commutative66.5%
Simplified66.5%
Final simplification56.8%
(FPCore (A B C)
:precision binary64
(if (<= A -7e-101)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 1e-236)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 5.8e-130)
(* 180.0 (/ (atan -1.0) PI))
(/ (* 180.0 (atan (/ (- A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7e-101) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 1e-236) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 5.8e-130) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7e-101) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 1e-236) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 5.8e-130) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7e-101: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 1e-236: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 5.8e-130: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = (180.0 * math.atan((-A / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7e-101) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 1e-236) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 5.8e-130) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7e-101) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 1e-236) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 5.8e-130) tmp = 180.0 * (atan(-1.0) / pi); else tmp = (180.0 * atan((-A / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7e-101], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1e-236], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.8e-130], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7 \cdot 10^{-101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 10^{-236}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 5.8 \cdot 10^{-130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.99999999999999989e-101Initial program 26.3%
Simplified22.4%
Taylor expanded in A around -inf 58.7%
associate-*r/58.7%
Simplified58.7%
if -6.99999999999999989e-101 < A < 1e-236Initial program 53.0%
Simplified53.0%
Taylor expanded in B around -inf 40.3%
if 1e-236 < A < 5.8e-130Initial program 64.6%
Simplified64.6%
Taylor expanded in B around inf 54.2%
if 5.8e-130 < A Initial program 78.2%
associate-*r/78.2%
associate-*l/78.2%
*-un-lft-identity78.2%
associate--l-78.2%
unpow278.2%
pow278.2%
hypot-def93.0%
Applied egg-rr93.0%
Taylor expanded in B around inf 77.2%
mul-1-neg77.2%
unsub-neg77.2%
Simplified77.2%
Taylor expanded in A around inf 65.9%
associate-*r/65.9%
mul-1-neg65.9%
Simplified65.9%
Final simplification56.6%
(FPCore (A B C)
:precision binary64
(if (<= A -145000000.0)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 2.6e-235)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -145000000.0) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 2.6e-235) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} 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 <= -145000000.0) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 2.6e-235) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -145000000.0: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 2.6e-235: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -145000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 2.6e-235) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); 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 <= -145000000.0) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 2.6e-235) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -145000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.6e-235], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $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 -145000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.6 \cdot 10^{-235}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -1.45e8Initial program 23.1%
Simplified18.2%
Taylor expanded in A around -inf 66.9%
associate-*r/66.9%
Simplified66.9%
if -1.45e8 < A < 2.6e-235Initial program 48.9%
Simplified48.9%
Taylor expanded in A around 0 47.9%
unpow247.9%
unpow247.9%
hypot-def77.2%
Simplified77.2%
Taylor expanded in B around -inf 51.3%
if 2.6e-235 < A Initial program 75.2%
associate-*r/75.2%
associate-*l/75.2%
*-un-lft-identity75.2%
associate--l-75.2%
unpow275.2%
pow275.2%
hypot-def91.9%
Applied egg-rr91.9%
Taylor expanded in B around inf 76.5%
mul-1-neg76.5%
unsub-neg76.5%
Simplified76.5%
Taylor expanded in C around 0 68.7%
associate-*r/68.7%
neg-mul-168.7%
distribute-neg-in68.7%
sub-neg68.7%
div-sub68.7%
mul-1-neg68.7%
associate-*r/68.7%
*-inverses68.7%
sub-neg68.7%
metadata-eval68.7%
+-commutative68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
Taylor expanded in A around 0 68.7%
distribute-neg-in68.7%
metadata-eval68.7%
sub-neg68.7%
associate-*r/68.7%
associate-*l/68.7%
*-commutative68.7%
Simplified68.7%
Final simplification63.0%
(FPCore (A B C)
:precision binary64
(if (<= A -3300000000.0)
(* (/ 180.0 PI) (atan (* 0.5 (/ B A))))
(if (<= A 2.5e-235)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3300000000.0) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 * (B / A)));
} else if (A <= 2.5e-235) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} 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 <= -3300000000.0) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 * (B / A)));
} else if (A <= 2.5e-235) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3300000000.0: tmp = (180.0 / math.pi) * math.atan((0.5 * (B / A))) elif A <= 2.5e-235: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3300000000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 * Float64(B / A)))); elseif (A <= 2.5e-235) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); 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 <= -3300000000.0) tmp = (180.0 / pi) * atan((0.5 * (B / A))); elseif (A <= 2.5e-235) tmp = 180.0 * (atan(((B + C) / B)) / pi); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3300000000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.5e-235], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $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 -3300000000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{elif}\;A \leq 2.5 \cdot 10^{-235}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -3.3e9Initial program 23.1%
Simplified36.9%
Taylor expanded in B around 0 57.7%
unpow257.7%
Simplified57.7%
Taylor expanded in C around 0 67.0%
if -3.3e9 < A < 2.4999999999999999e-235Initial program 48.9%
Simplified48.9%
Taylor expanded in A around 0 47.9%
unpow247.9%
unpow247.9%
hypot-def77.2%
Simplified77.2%
Taylor expanded in B around -inf 51.3%
if 2.4999999999999999e-235 < A Initial program 75.2%
associate-*r/75.2%
associate-*l/75.2%
*-un-lft-identity75.2%
associate--l-75.2%
unpow275.2%
pow275.2%
hypot-def91.9%
Applied egg-rr91.9%
Taylor expanded in B around inf 76.5%
mul-1-neg76.5%
unsub-neg76.5%
Simplified76.5%
Taylor expanded in C around 0 68.7%
associate-*r/68.7%
neg-mul-168.7%
distribute-neg-in68.7%
sub-neg68.7%
div-sub68.7%
mul-1-neg68.7%
associate-*r/68.7%
*-inverses68.7%
sub-neg68.7%
metadata-eval68.7%
+-commutative68.7%
mul-1-neg68.7%
unsub-neg68.7%
Simplified68.7%
Taylor expanded in A around 0 68.7%
distribute-neg-in68.7%
metadata-eval68.7%
sub-neg68.7%
associate-*r/68.7%
associate-*l/68.7%
*-commutative68.7%
Simplified68.7%
Final simplification63.0%
(FPCore (A B C)
:precision binary64
(if (<= B -190000.0)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 5e-70)
(/ (* 180.0 (atan (/ (- A) B))) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -190000.0) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 5e-70) {
tmp = (180.0 * atan((-A / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -190000.0) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 5e-70) {
tmp = (180.0 * Math.atan((-A / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -190000.0: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 5e-70: tmp = (180.0 * math.atan((-A / B))) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -190000.0) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 5e-70) tmp = Float64(Float64(180.0 * atan(Float64(Float64(-A) / B))) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -190000.0) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 5e-70) tmp = (180.0 * atan((-A / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -190000.0], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5e-70], N[(N[(180.0 * N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -190000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-70}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.9e5Initial program 44.6%
Simplified44.6%
Taylor expanded in B around -inf 69.5%
if -1.9e5 < B < 4.9999999999999998e-70Initial program 61.7%
associate-*r/61.8%
associate-*l/61.8%
*-un-lft-identity61.8%
associate--l-58.6%
unpow258.6%
pow258.6%
hypot-def64.0%
Applied egg-rr64.0%
Taylor expanded in B around inf 50.9%
mul-1-neg50.9%
unsub-neg50.9%
Simplified50.9%
Taylor expanded in A around inf 37.2%
associate-*r/37.2%
mul-1-neg37.2%
Simplified37.2%
if 4.9999999999999998e-70 < B Initial program 47.7%
Simplified47.7%
Taylor expanded in B around inf 55.9%
Final simplification51.1%
(FPCore (A B C)
:precision binary64
(if (<= B -6e-39)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7e-70)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6e-39) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7e-70) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6e-39) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7e-70) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6e-39: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7e-70: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6e-39) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7e-70) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6e-39) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7e-70) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6e-39], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7e-70], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6 \cdot 10^{-39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.00000000000000055e-39Initial program 49.8%
Simplified49.8%
Taylor expanded in B around -inf 61.6%
if -6.00000000000000055e-39 < B < 6.99999999999999949e-70Initial program 59.6%
Simplified56.1%
Taylor expanded in C around inf 26.6%
mul-1-neg26.6%
distribute-rgt1-in26.6%
metadata-eval26.6%
mul0-lft26.6%
distribute-frac-neg26.6%
metadata-eval26.6%
Simplified26.6%
if 6.99999999999999949e-70 < B Initial program 48.3%
Simplified48.2%
Taylor expanded in B around inf 56.5%
Final simplification46.6%
(FPCore (A B C)
:precision binary64
(if (<= B -3.9e-33)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.7e-65)
(/ (* 180.0 (atan (/ C B))) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.9e-33) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.7e-65) {
tmp = (180.0 * atan((C / B))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.9e-33) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.7e-65) {
tmp = (180.0 * Math.atan((C / B))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.9e-33: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.7e-65: tmp = (180.0 * math.atan((C / B))) / math.pi else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.9e-33) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.7e-65) tmp = Float64(Float64(180.0 * atan(Float64(C / B))) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.9e-33) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.7e-65) tmp = (180.0 * atan((C / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.9e-33], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.7e-65], N[(N[(180.0 * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.9 \cdot 10^{-33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.7 \cdot 10^{-65}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.89999999999999974e-33Initial program 48.4%
Simplified48.4%
Taylor expanded in B around -inf 62.8%
if -3.89999999999999974e-33 < B < 4.7000000000000001e-65Initial program 60.8%
associate-*r/60.8%
associate-*l/60.8%
*-un-lft-identity60.8%
associate--l-57.4%
unpow257.4%
pow257.4%
hypot-def63.8%
Applied egg-rr63.8%
Taylor expanded in B around inf 50.9%
mul-1-neg50.9%
unsub-neg50.9%
Simplified50.9%
Taylor expanded in C around inf 33.4%
if 4.7000000000000001e-65 < B Initial program 47.6%
Simplified47.6%
Taylor expanded in B around inf 57.0%
Final simplification49.4%
(FPCore (A B C) :precision binary64 (if (<= B -5e-311) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-311) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-311) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-311: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-311) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-311) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-311], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-311}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.00000000000023e-311Initial program 51.1%
Simplified50.2%
Taylor expanded in B around -inf 43.4%
if -5.00000000000023e-311 < B Initial program 54.8%
Simplified53.1%
Taylor expanded in B around inf 39.5%
Final simplification41.3%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 53.1%
Simplified51.7%
Taylor expanded in B around inf 21.7%
Final simplification21.7%
herbie shell --seed 2023272
(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)))