
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(if (<= t_0 -0.5)
(* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))
(if (<= t_0 0.0)
(* (/ 180.0 PI) (atan (/ -0.5 (/ (- C A) B))))
(/ (* 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 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
} else if (t_0 <= 0.0) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 / ((C - A) / B)));
} 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.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
} else if (t_0 <= 0.0) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 / ((C - A) / B)));
} 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.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) elif t_0 <= 0.0: tmp = (180.0 / math.pi) * math.atan((-0.5 / ((C - A) / B))) 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(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); elseif (t_0 <= 0.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 / Float64(Float64(C - A) / B)))); 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 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); elseif (t_0 <= 0.0) tmp = (180.0 / pi) * atan((-0.5 / ((C - A) / B))); 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[(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], If[LessEqual[t$95$0, 0.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 / N[(N[(C - A), $MachinePrecision] / B), $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:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-0.5}{\frac{C - A}{B}}\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 56.3%
Simplified81.2%
if -0.5 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) < 0.0Initial program 29.6%
Simplified15.1%
Taylor expanded in B around 0 98.9%
associate-*r/98.9%
Simplified98.9%
*-un-lft-identity98.9%
associate-/l*99.1%
Applied egg-rr99.1%
if 0.0 < (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))) Initial program 64.4%
associate-*r/64.5%
associate-*l/64.5%
*-un-lft-identity64.5%
associate--l-64.5%
unpow264.5%
pow264.5%
hypot-def86.3%
Applied egg-rr86.3%
Final simplification86.0%
(FPCore (A B C) :precision binary64 (if (<= A -1.45e+18) (/ (* 180.0 (atan (/ (* B -0.5) (- C A)))) PI) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.45e+18) {
tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.45e+18) {
tmp = (180.0 * Math.atan(((B * -0.5) / (C - A)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.45e+18: tmp = (180.0 * math.atan(((B * -0.5) / (C - A)))) / math.pi else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.45e+18) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) / pi); 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) tmp = 0.0; if (A <= -1.45e+18) tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / pi; else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.45e+18], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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}
\mathbf{if}\;A \leq -1.45 \cdot 10^{+18}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\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 < -1.45e18Initial program 28.7%
Simplified29.1%
Taylor expanded in B around 0 78.8%
associate-*r/78.8%
Simplified78.8%
Taylor expanded in B around 0 78.7%
associate-*r/78.9%
*-commutative78.9%
associate-*l/78.9%
Simplified78.9%
if -1.45e18 < A Initial program 63.4%
Simplified86.0%
Final simplification84.4%
(FPCore (A B C) :precision binary64 (if (<= A -1.5e+18) (/ (* 180.0 (atan (/ (* B -0.5) (- C A)))) PI) (* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- C A)))) B)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+18) {
tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / ((double) M_PI);
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (C - A)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e+18) {
tmp = (180.0 * Math.atan(((B * -0.5) / (C - A)))) / Math.PI;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (C - A)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e+18: tmp = (180.0 * math.atan(((B * -0.5) / (C - A)))) / math.pi else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (C - A)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e+18) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) / pi); 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) tmp = 0.0; if (A <= -1.5e+18) tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / pi; else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (C - A)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e+18], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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}
\mathbf{if}\;A \leq -1.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\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 < -1.5e18Initial program 28.7%
Simplified29.1%
Taylor expanded in B around 0 78.8%
associate-*r/78.8%
Simplified78.8%
Taylor expanded in B around 0 78.7%
associate-*r/78.9%
*-commutative78.9%
associate-*l/78.9%
Simplified78.9%
if -1.5e18 < A Initial program 63.4%
Simplified86.0%
Final simplification84.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.35e+17)
(/ (* 180.0 (atan (/ (* B -0.5) (- C A)))) PI)
(if (<= A 6.8e+72)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (/ (- B A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+17) {
tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / ((double) M_PI);
} else if (A <= 6.8e+72) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.35e+17) {
tmp = (180.0 * Math.atan(((B * -0.5) / (C - A)))) / Math.PI;
} else if (A <= 6.8e+72) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.35e+17: tmp = (180.0 * math.atan(((B * -0.5) / (C - A)))) / math.pi elif A <= 6.8e+72: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) else: tmp = (180.0 * math.atan(((B - A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.35e+17) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) / pi); elseif (A <= 6.8e+72) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.35e+17) tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / pi; elseif (A <= 6.8e+72) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan(((B - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.35e+17], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 6.8e+72], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.35 \cdot 10^{+17}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.8 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.35e17Initial program 28.7%
Simplified29.1%
Taylor expanded in B around 0 78.8%
associate-*r/78.8%
Simplified78.8%
Taylor expanded in B around 0 78.7%
associate-*r/78.9%
*-commutative78.9%
associate-*l/78.9%
Simplified78.9%
if -1.35e17 < A < 6.7999999999999997e72Initial program 59.8%
Simplified59.8%
Taylor expanded in A around 0 58.0%
unpow258.0%
unpow258.0%
hypot-def81.8%
Simplified81.8%
if 6.7999999999999997e72 < A Initial program 74.6%
associate-*r/74.6%
associate-*l/74.6%
*-un-lft-identity74.6%
associate--l-74.6%
unpow274.6%
pow274.6%
hypot-def94.0%
Applied egg-rr94.0%
Taylor expanded in B around -inf 81.7%
Taylor expanded in C around 0 81.7%
Final simplification81.2%
(FPCore (A B C)
:precision binary64
(if (<= A -8e+18)
(/ (* 180.0 (atan (/ (* B -0.5) (- C A)))) PI)
(if (<= A 2.7e+71)
(/ (* 180.0 (atan (/ (- C (hypot B C)) B))) PI)
(/ (* 180.0 (atan (/ (- B A) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8e+18) {
tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / ((double) M_PI);
} else if (A <= 2.7e+71) {
tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8e+18) {
tmp = (180.0 * Math.atan(((B * -0.5) / (C - A)))) / Math.PI;
} else if (A <= 2.7e+71) {
tmp = (180.0 * Math.atan(((C - Math.hypot(B, C)) / B))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8e+18: tmp = (180.0 * math.atan(((B * -0.5) / (C - A)))) / math.pi elif A <= 2.7e+71: tmp = (180.0 * math.atan(((C - math.hypot(B, C)) / B))) / math.pi else: tmp = (180.0 * math.atan(((B - A) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8e+18) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) / pi); elseif (A <= 2.7e+71) tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - hypot(B, C)) / B))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8e+18) tmp = (180.0 * atan(((B * -0.5) / (C - A)))) / pi; elseif (A <= 2.7e+71) tmp = (180.0 * atan(((C - hypot(B, C)) / B))) / pi; else tmp = (180.0 * atan(((B - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8e+18], N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 2.7e+71], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8 \cdot 10^{+18}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.7 \cdot 10^{+71}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -8e18Initial program 28.7%
Simplified29.1%
Taylor expanded in B around 0 78.8%
associate-*r/78.8%
Simplified78.8%
Taylor expanded in B around 0 78.7%
associate-*r/78.9%
*-commutative78.9%
associate-*l/78.9%
Simplified78.9%
if -8e18 < A < 2.69999999999999997e71Initial program 59.8%
associate-*r/59.8%
associate-*l/59.8%
*-un-lft-identity59.8%
associate--l-59.8%
unpow259.8%
pow259.8%
hypot-def83.5%
Applied egg-rr83.5%
Taylor expanded in A around 0 58.0%
unpow258.0%
unpow258.0%
hypot-def81.9%
Simplified81.9%
if 2.69999999999999997e71 < A Initial program 74.6%
associate-*r/74.6%
associate-*l/74.6%
*-un-lft-identity74.6%
associate--l-74.6%
unpow274.6%
pow274.6%
hypot-def94.0%
Applied egg-rr94.0%
Taylor expanded in B around -inf 81.7%
Taylor expanded in C around 0 81.7%
Final simplification81.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))
(t_1 (/ (* 180.0 (atan (- (/ A B)))) PI))
(t_2 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))
(if (<= B -4.3e-7)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -7.5e-92)
t_0
(if (<= B -9.5e-120)
t_2
(if (<= B -2.8e-205)
t_1
(if (<= B 1.2e-180)
t_0
(if (<= B 7.1e-130)
t_1
(if (<= B 1.15e-17) t_2 (* 180.0 (/ (atan -1.0) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double t_1 = (180.0 * atan(-(A / B))) / ((double) M_PI);
double t_2 = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
double tmp;
if (B <= -4.3e-7) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -7.5e-92) {
tmp = t_0;
} else if (B <= -9.5e-120) {
tmp = t_2;
} else if (B <= -2.8e-205) {
tmp = t_1;
} else if (B <= 1.2e-180) {
tmp = t_0;
} else if (B <= 7.1e-130) {
tmp = t_1;
} else if (B <= 1.15e-17) {
tmp = t_2;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double t_1 = (180.0 * Math.atan(-(A / B))) / Math.PI;
double t_2 = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
double tmp;
if (B <= -4.3e-7) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -7.5e-92) {
tmp = t_0;
} else if (B <= -9.5e-120) {
tmp = t_2;
} else if (B <= -2.8e-205) {
tmp = t_1;
} else if (B <= 1.2e-180) {
tmp = t_0;
} else if (B <= 7.1e-130) {
tmp = t_1;
} else if (B <= 1.15e-17) {
tmp = t_2;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) t_1 = (180.0 * math.atan(-(A / B))) / math.pi t_2 = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) tmp = 0 if B <= -4.3e-7: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -7.5e-92: tmp = t_0 elif B <= -9.5e-120: tmp = t_2 elif B <= -2.8e-205: tmp = t_1 elif B <= 1.2e-180: tmp = t_0 elif B <= 7.1e-130: tmp = t_1 elif B <= 1.15e-17: tmp = t_2 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) t_1 = Float64(Float64(180.0 * atan(Float64(-Float64(A / B)))) / pi) t_2 = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)) tmp = 0.0 if (B <= -4.3e-7) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -7.5e-92) tmp = t_0; elseif (B <= -9.5e-120) tmp = t_2; elseif (B <= -2.8e-205) tmp = t_1; elseif (B <= 1.2e-180) tmp = t_0; elseif (B <= 7.1e-130) tmp = t_1; elseif (B <= 1.15e-17) tmp = t_2; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi); t_1 = (180.0 * atan(-(A / B))) / pi; t_2 = 180.0 * (atan(((B * -0.5) / C)) / pi); tmp = 0.0; if (B <= -4.3e-7) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -7.5e-92) tmp = t_0; elseif (B <= -9.5e-120) tmp = t_2; elseif (B <= -2.8e-205) tmp = t_1; elseif (B <= 1.2e-180) tmp = t_0; elseif (B <= 7.1e-130) tmp = t_1; elseif (B <= 1.15e-17) tmp = t_2; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.3e-7], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -7.5e-92], t$95$0, If[LessEqual[B, -9.5e-120], t$95$2, If[LessEqual[B, -2.8e-205], t$95$1, If[LessEqual[B, 1.2e-180], t$95$0, If[LessEqual[B, 7.1e-130], t$95$1, If[LessEqual[B, 1.15e-17], t$95$2, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -4.3 \cdot 10^{-7}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -7.5 \cdot 10^{-92}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -9.5 \cdot 10^{-120}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -2.8 \cdot 10^{-205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.2 \cdot 10^{-180}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 7.1 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-17}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.3000000000000001e-7Initial program 59.6%
Simplified59.6%
Taylor expanded in B around -inf 72.0%
if -4.3000000000000001e-7 < B < -7.5000000000000005e-92 or -2.79999999999999991e-205 < B < 1.1999999999999999e-180Initial program 54.0%
Simplified45.3%
Taylor expanded in A around -inf 51.2%
associate-*r/51.2%
Simplified51.2%
if -7.5000000000000005e-92 < B < -9.49999999999999937e-120 or 7.1000000000000001e-130 < B < 1.15000000000000004e-17Initial program 42.3%
Simplified42.5%
Taylor expanded in A around 0 28.3%
unpow228.3%
unpow228.3%
hypot-def38.7%
Simplified38.7%
Taylor expanded in C around inf 45.9%
associate-*r/45.9%
Simplified45.9%
if -9.49999999999999937e-120 < B < -2.79999999999999991e-205 or 1.1999999999999999e-180 < B < 7.1000000000000001e-130Initial program 69.2%
associate-*r/69.2%
associate-*l/69.2%
*-un-lft-identity69.2%
associate--l-69.4%
unpow269.4%
pow269.4%
hypot-def78.7%
Applied egg-rr78.7%
Taylor expanded in B around -inf 71.8%
Taylor expanded in A around inf 53.7%
mul-1-neg53.7%
Simplified53.7%
if 1.15000000000000004e-17 < B Initial program 51.3%
Simplified51.3%
Taylor expanded in B around inf 74.8%
Final simplification61.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B 0.5) A)) PI)))
(t_1 (* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))
(t_2 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))
(if (<= B -3e-13)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2e-92)
t_0
(if (<= B -3.3e-121)
t_2
(if (<= B -4.2e-204)
t_1
(if (<= B 1.8e-180)
t_0
(if (<= B 2.65e-129)
t_1
(if (<= B 1.1e-17) t_2 (* 180.0 (/ (atan -1.0) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
double t_1 = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
double t_2 = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
double tmp;
if (B <= -3e-13) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2e-92) {
tmp = t_0;
} else if (B <= -3.3e-121) {
tmp = t_2;
} else if (B <= -4.2e-204) {
tmp = t_1;
} else if (B <= 1.8e-180) {
tmp = t_0;
} else if (B <= 2.65e-129) {
tmp = t_1;
} else if (B <= 1.1e-17) {
tmp = t_2;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
double t_1 = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
double t_2 = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
double tmp;
if (B <= -3e-13) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2e-92) {
tmp = t_0;
} else if (B <= -3.3e-121) {
tmp = t_2;
} else if (B <= -4.2e-204) {
tmp = t_1;
} else if (B <= 1.8e-180) {
tmp = t_0;
} else if (B <= 2.65e-129) {
tmp = t_1;
} else if (B <= 1.1e-17) {
tmp = t_2;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) t_1 = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) t_2 = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) tmp = 0 if B <= -3e-13: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2e-92: tmp = t_0 elif B <= -3.3e-121: tmp = t_2 elif B <= -4.2e-204: tmp = t_1 elif B <= 1.8e-180: tmp = t_0 elif B <= 2.65e-129: tmp = t_1 elif B <= 1.1e-17: tmp = t_2 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)) t_2 = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)) tmp = 0.0 if (B <= -3e-13) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2e-92) tmp = t_0; elseif (B <= -3.3e-121) tmp = t_2; elseif (B <= -4.2e-204) tmp = t_1; elseif (B <= 1.8e-180) tmp = t_0; elseif (B <= 2.65e-129) tmp = t_1; elseif (B <= 1.1e-17) tmp = t_2; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((B * 0.5) / A)) / pi); t_1 = 180.0 * (atan(((A * -2.0) / B)) / pi); t_2 = 180.0 * (atan(((B * -0.5) / C)) / pi); tmp = 0.0; if (B <= -3e-13) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2e-92) tmp = t_0; elseif (B <= -3.3e-121) tmp = t_2; elseif (B <= -4.2e-204) tmp = t_1; elseif (B <= 1.8e-180) tmp = t_0; elseif (B <= 2.65e-129) tmp = t_1; elseif (B <= 1.1e-17) tmp = t_2; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3e-13], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-92], t$95$0, If[LessEqual[B, -3.3e-121], t$95$2, If[LessEqual[B, -4.2e-204], t$95$1, If[LessEqual[B, 1.8e-180], t$95$0, If[LessEqual[B, 2.65e-129], t$95$1, If[LessEqual[B, 1.1e-17], t$95$2, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -3 \cdot 10^{-13}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-92}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -3.3 \cdot 10^{-121}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -4.2 \cdot 10^{-204}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.8 \cdot 10^{-180}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.65 \cdot 10^{-129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-17}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.99999999999999984e-13Initial program 59.6%
Simplified59.6%
Taylor expanded in B around -inf 72.0%
if -2.99999999999999984e-13 < B < -1.99999999999999998e-92 or -4.20000000000000018e-204 < B < 1.8e-180Initial program 54.0%
Simplified45.3%
Taylor expanded in A around -inf 51.2%
associate-*r/51.2%
Simplified51.2%
if -1.99999999999999998e-92 < B < -3.3000000000000001e-121 or 2.64999999999999987e-129 < B < 1.1e-17Initial program 42.3%
Simplified42.5%
Taylor expanded in A around 0 28.3%
unpow228.3%
unpow228.3%
hypot-def38.7%
Simplified38.7%
Taylor expanded in C around inf 45.9%
associate-*r/45.9%
Simplified45.9%
if -3.3000000000000001e-121 < B < -4.20000000000000018e-204 or 1.8e-180 < B < 2.64999999999999987e-129Initial program 69.2%
Simplified69.4%
Taylor expanded in A around inf 53.7%
associate-*r/53.7%
*-commutative53.7%
Simplified53.7%
if 1.1e-17 < B Initial program 51.3%
Simplified51.3%
Taylor expanded in B around inf 74.8%
Final simplification61.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (* B -0.5) (- C A)))))
(t_1 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -9e-49)
t_1
(if (<= B -4.8e-147)
t_0
(if (<= B -6.5e-195)
t_1
(if (<= B 6e-230)
t_0
(if (<= B 6.5e-136)
t_1
(if (<= B 1.22e-17) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((B * -0.5) / (C - A)));
double t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -9e-49) {
tmp = t_1;
} else if (B <= -4.8e-147) {
tmp = t_0;
} else if (B <= -6.5e-195) {
tmp = t_1;
} else if (B <= 6e-230) {
tmp = t_0;
} else if (B <= 6.5e-136) {
tmp = t_1;
} else if (B <= 1.22e-17) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((B * -0.5) / (C - A)));
double t_1 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -9e-49) {
tmp = t_1;
} else if (B <= -4.8e-147) {
tmp = t_0;
} else if (B <= -6.5e-195) {
tmp = t_1;
} else if (B <= 6e-230) {
tmp = t_0;
} else if (B <= 6.5e-136) {
tmp = t_1;
} else if (B <= 1.22e-17) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((B * -0.5) / (C - A))) t_1 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -9e-49: tmp = t_1 elif B <= -4.8e-147: tmp = t_0 elif B <= -6.5e-195: tmp = t_1 elif B <= 6e-230: tmp = t_0 elif B <= 6.5e-136: tmp = t_1 elif B <= 1.22e-17: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) t_1 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -9e-49) tmp = t_1; elseif (B <= -4.8e-147) tmp = t_0; elseif (B <= -6.5e-195) tmp = t_1; elseif (B <= 6e-230) tmp = t_0; elseif (B <= 6.5e-136) tmp = t_1; elseif (B <= 1.22e-17) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((B * -0.5) / (C - A))); t_1 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -9e-49) tmp = t_1; elseif (B <= -4.8e-147) tmp = t_0; elseif (B <= -6.5e-195) tmp = t_1; elseif (B <= 6e-230) tmp = t_0; elseif (B <= 6.5e-136) tmp = t_1; elseif (B <= 1.22e-17) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9e-49], t$95$1, If[LessEqual[B, -4.8e-147], t$95$0, If[LessEqual[B, -6.5e-195], t$95$1, If[LessEqual[B, 6e-230], t$95$0, If[LessEqual[B, 6.5e-136], t$95$1, If[LessEqual[B, 1.22e-17], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -9 \cdot 10^{-49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -4.8 \cdot 10^{-147}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -6.5 \cdot 10^{-195}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 6 \cdot 10^{-230}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.22 \cdot 10^{-17}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.0000000000000004e-49 or -4.79999999999999997e-147 < B < -6.50000000000000004e-195 or 6e-230 < B < 6.50000000000000011e-136Initial program 62.4%
Simplified62.4%
Taylor expanded in B around -inf 78.2%
associate--l+78.2%
div-sub79.2%
Simplified79.2%
if -9.0000000000000004e-49 < B < -4.79999999999999997e-147 or -6.50000000000000004e-195 < B < 6e-230 or 6.50000000000000011e-136 < B < 1.22e-17Initial program 49.2%
Simplified50.6%
Taylor expanded in B around 0 65.8%
associate-*r/65.8%
Simplified65.8%
if 1.22e-17 < B Initial program 51.3%
Simplified51.3%
Taylor expanded in B around inf 74.8%
Final simplification73.6%
(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.12e-48)
t_2
(if (<= B -1.15e-141)
t_0
(if (<= B -1.14e-197)
t_2
(if (<= B 1.1e-230)
(/ (* 180.0 (atan (/ -0.5 t_1))) PI)
(if (<= B 8.6e-133)
t_2
(if (<= B 1.22e-17) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan(((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.12e-48) {
tmp = t_2;
} else if (B <= -1.15e-141) {
tmp = t_0;
} else if (B <= -1.14e-197) {
tmp = t_2;
} else if (B <= 1.1e-230) {
tmp = (180.0 * atan((-0.5 / t_1))) / ((double) M_PI);
} else if (B <= 8.6e-133) {
tmp = t_2;
} else if (B <= 1.22e-17) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan(((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.12e-48) {
tmp = t_2;
} else if (B <= -1.15e-141) {
tmp = t_0;
} else if (B <= -1.14e-197) {
tmp = t_2;
} else if (B <= 1.1e-230) {
tmp = (180.0 * Math.atan((-0.5 / t_1))) / Math.PI;
} else if (B <= 8.6e-133) {
tmp = t_2;
} else if (B <= 1.22e-17) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan(((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.12e-48: tmp = t_2 elif B <= -1.15e-141: tmp = t_0 elif B <= -1.14e-197: tmp = t_2 elif B <= 1.1e-230: tmp = (180.0 * math.atan((-0.5 / t_1))) / math.pi elif B <= 8.6e-133: tmp = t_2 elif B <= 1.22e-17: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(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.12e-48) tmp = t_2; elseif (B <= -1.15e-141) tmp = t_0; elseif (B <= -1.14e-197) tmp = t_2; elseif (B <= 1.1e-230) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 / t_1))) / pi); elseif (B <= 8.6e-133) tmp = t_2; elseif (B <= 1.22e-17) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan(((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.12e-48) tmp = t_2; elseif (B <= -1.15e-141) tmp = t_0; elseif (B <= -1.14e-197) tmp = t_2; elseif (B <= 1.1e-230) tmp = (180.0 * atan((-0.5 / t_1))) / pi; elseif (B <= 8.6e-133) tmp = t_2; elseif (B <= 1.22e-17) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(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.12e-48], t$95$2, If[LessEqual[B, -1.15e-141], t$95$0, If[LessEqual[B, -1.14e-197], t$95$2, If[LessEqual[B, 1.1e-230], N[(N[(180.0 * N[ArcTan[N[(-0.5 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 8.6e-133], t$95$2, If[LessEqual[B, 1.22e-17], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{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.12 \cdot 10^{-48}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -1.15 \cdot 10^{-141}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.14 \cdot 10^{-197}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-230}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5}{t_1}\right)}{\pi}\\
\mathbf{elif}\;B \leq 8.6 \cdot 10^{-133}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 1.22 \cdot 10^{-17}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.11999999999999999e-48 or -1.14999999999999997e-141 < B < -1.14000000000000006e-197 or 1.0999999999999999e-230 < B < 8.60000000000000032e-133Initial program 62.4%
Simplified62.4%
Taylor expanded in B around -inf 78.2%
associate--l+78.2%
div-sub79.2%
Simplified79.2%
if -1.11999999999999999e-48 < B < -1.14999999999999997e-141 or 8.60000000000000032e-133 < B < 1.22e-17Initial program 40.2%
Simplified47.4%
Taylor expanded in B around 0 64.1%
associate-*r/64.1%
Simplified64.1%
if -1.14000000000000006e-197 < B < 1.0999999999999999e-230Initial program 58.8%
Simplified54.1%
Taylor expanded in B around 0 67.6%
associate-*r/67.6%
Simplified67.6%
associate-*l/67.6%
associate-/l*67.6%
Applied egg-rr67.6%
if 1.22e-17 < B Initial program 51.3%
Simplified51.3%
Taylor expanded in B around inf 74.8%
Final simplification73.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (/ (* B -0.5) (- C A)))) PI))
(t_1 (/ (- C A) B))
(t_2 (* 180.0 (/ (atan (+ 1.0 t_1)) PI))))
(if (<= B -9.4e-49)
t_2
(if (<= B -1.02e-143)
t_0
(if (<= B -1.36e-193)
t_2
(if (<= B 2.45e-228)
(/ (* 180.0 (atan (/ -0.5 t_1))) PI)
(if (<= B 1.5e-133)
t_2
(if (<= B 1.22e-17) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((B * -0.5) / (C - A)))) / ((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 <= -9.4e-49) {
tmp = t_2;
} else if (B <= -1.02e-143) {
tmp = t_0;
} else if (B <= -1.36e-193) {
tmp = t_2;
} else if (B <= 2.45e-228) {
tmp = (180.0 * atan((-0.5 / t_1))) / ((double) M_PI);
} else if (B <= 1.5e-133) {
tmp = t_2;
} else if (B <= 1.22e-17) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((B * -0.5) / (C - A)))) / 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 <= -9.4e-49) {
tmp = t_2;
} else if (B <= -1.02e-143) {
tmp = t_0;
} else if (B <= -1.36e-193) {
tmp = t_2;
} else if (B <= 2.45e-228) {
tmp = (180.0 * Math.atan((-0.5 / t_1))) / Math.PI;
} else if (B <= 1.5e-133) {
tmp = t_2;
} else if (B <= 1.22e-17) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((B * -0.5) / (C - A)))) / math.pi t_1 = (C - A) / B t_2 = 180.0 * (math.atan((1.0 + t_1)) / math.pi) tmp = 0 if B <= -9.4e-49: tmp = t_2 elif B <= -1.02e-143: tmp = t_0 elif B <= -1.36e-193: tmp = t_2 elif B <= 2.45e-228: tmp = (180.0 * math.atan((-0.5 / t_1))) / math.pi elif B <= 1.5e-133: tmp = t_2 elif B <= 1.22e-17: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) / 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 <= -9.4e-49) tmp = t_2; elseif (B <= -1.02e-143) tmp = t_0; elseif (B <= -1.36e-193) tmp = t_2; elseif (B <= 2.45e-228) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 / t_1))) / pi); elseif (B <= 1.5e-133) tmp = t_2; elseif (B <= 1.22e-17) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((B * -0.5) / (C - A)))) / pi; t_1 = (C - A) / B; t_2 = 180.0 * (atan((1.0 + t_1)) / pi); tmp = 0.0; if (B <= -9.4e-49) tmp = t_2; elseif (B <= -1.02e-143) tmp = t_0; elseif (B <= -1.36e-193) tmp = t_2; elseif (B <= 2.45e-228) tmp = (180.0 * atan((-0.5 / t_1))) / pi; elseif (B <= 1.5e-133) tmp = t_2; elseif (B <= 1.22e-17) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $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, -9.4e-49], t$95$2, If[LessEqual[B, -1.02e-143], t$95$0, If[LessEqual[B, -1.36e-193], t$95$2, If[LessEqual[B, 2.45e-228], N[(N[(180.0 * N[ArcTan[N[(-0.5 / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.5e-133], t$95$2, If[LessEqual[B, 1.22e-17], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\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 -9.4 \cdot 10^{-49}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq -1.02 \cdot 10^{-143}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -1.36 \cdot 10^{-193}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 2.45 \cdot 10^{-228}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5}{t_1}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-133}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 1.22 \cdot 10^{-17}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.40000000000000043e-49 or -1.02e-143 < B < -1.36000000000000004e-193 or 2.44999999999999994e-228 < B < 1.5000000000000001e-133Initial program 62.4%
Simplified62.4%
Taylor expanded in B around -inf 78.2%
associate--l+78.2%
div-sub79.2%
Simplified79.2%
if -9.40000000000000043e-49 < B < -1.02e-143 or 1.5000000000000001e-133 < B < 1.22e-17Initial program 40.2%
Simplified47.4%
Taylor expanded in B around 0 64.1%
associate-*r/64.1%
Simplified64.1%
Taylor expanded in B around 0 64.0%
associate-*r/64.2%
*-commutative64.2%
associate-*l/64.2%
Simplified64.2%
if -1.36000000000000004e-193 < B < 2.44999999999999994e-228Initial program 58.8%
Simplified54.1%
Taylor expanded in B around 0 67.6%
associate-*r/67.6%
Simplified67.6%
associate-*l/67.6%
associate-/l*67.6%
Applied egg-rr67.6%
if 1.22e-17 < B Initial program 51.3%
Simplified51.3%
Taylor expanded in B around inf 74.8%
Final simplification73.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B))
(t_1 (/ (* 180.0 (atan (/ (* B -0.5) (- C A)))) PI))
(t_2 (* 180.0 (/ (atan (+ 1.0 t_0)) PI))))
(if (<= B -9.2e-49)
(/ (* 180.0 (atan (/ (- (+ B C) A) B))) PI)
(if (<= B -2.5e-140)
t_1
(if (<= B -3.5e-194)
t_2
(if (<= B 1.5e-228)
(/ (* 180.0 (atan (/ -0.5 t_0))) PI)
(if (<= B 1e-131)
t_2
(if (<= B 1.22e-17) t_1 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = (180.0 * atan(((B * -0.5) / (C - A)))) / ((double) M_PI);
double t_2 = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
double tmp;
if (B <= -9.2e-49) {
tmp = (180.0 * atan((((B + C) - A) / B))) / ((double) M_PI);
} else if (B <= -2.5e-140) {
tmp = t_1;
} else if (B <= -3.5e-194) {
tmp = t_2;
} else if (B <= 1.5e-228) {
tmp = (180.0 * atan((-0.5 / t_0))) / ((double) M_PI);
} else if (B <= 1e-131) {
tmp = t_2;
} else if (B <= 1.22e-17) {
tmp = t_1;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double t_1 = (180.0 * Math.atan(((B * -0.5) / (C - A)))) / Math.PI;
double t_2 = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
double tmp;
if (B <= -9.2e-49) {
tmp = (180.0 * Math.atan((((B + C) - A) / B))) / Math.PI;
} else if (B <= -2.5e-140) {
tmp = t_1;
} else if (B <= -3.5e-194) {
tmp = t_2;
} else if (B <= 1.5e-228) {
tmp = (180.0 * Math.atan((-0.5 / t_0))) / Math.PI;
} else if (B <= 1e-131) {
tmp = t_2;
} else if (B <= 1.22e-17) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B t_1 = (180.0 * math.atan(((B * -0.5) / (C - A)))) / math.pi t_2 = 180.0 * (math.atan((1.0 + t_0)) / math.pi) tmp = 0 if B <= -9.2e-49: tmp = (180.0 * math.atan((((B + C) - A) / B))) / math.pi elif B <= -2.5e-140: tmp = t_1 elif B <= -3.5e-194: tmp = t_2 elif B <= 1.5e-228: tmp = (180.0 * math.atan((-0.5 / t_0))) / math.pi elif B <= 1e-131: tmp = t_2 elif B <= 1.22e-17: tmp = t_1 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) t_1 = Float64(Float64(180.0 * atan(Float64(Float64(B * -0.5) / Float64(C - A)))) / pi) t_2 = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)) tmp = 0.0 if (B <= -9.2e-49) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(B + C) - A) / B))) / pi); elseif (B <= -2.5e-140) tmp = t_1; elseif (B <= -3.5e-194) tmp = t_2; elseif (B <= 1.5e-228) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 / t_0))) / pi); elseif (B <= 1e-131) tmp = t_2; elseif (B <= 1.22e-17) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; t_1 = (180.0 * atan(((B * -0.5) / (C - A)))) / pi; t_2 = 180.0 * (atan((1.0 + t_0)) / pi); tmp = 0.0; if (B <= -9.2e-49) tmp = (180.0 * atan((((B + C) - A) / B))) / pi; elseif (B <= -2.5e-140) tmp = t_1; elseif (B <= -3.5e-194) tmp = t_2; elseif (B <= 1.5e-228) tmp = (180.0 * atan((-0.5 / t_0))) / pi; elseif (B <= 1e-131) tmp = t_2; elseif (B <= 1.22e-17) tmp = t_1; else tmp = 180.0 * (atan(-1.0) / pi); 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 * N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9.2e-49], N[(N[(180.0 * N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -2.5e-140], t$95$1, If[LessEqual[B, -3.5e-194], t$95$2, If[LessEqual[B, 1.5e-228], N[(N[(180.0 * N[ArcTan[N[(-0.5 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1e-131], t$95$2, If[LessEqual[B, 1.22e-17], t$95$1, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(\frac{B \cdot -0.5}{C - A}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(1 + t_0\right)}{\pi}\\
\mathbf{if}\;B \leq -9.2 \cdot 10^{-49}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.5 \cdot 10^{-140}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -3.5 \cdot 10^{-194}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-228}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{-0.5}{t_0}\right)}{\pi}\\
\mathbf{elif}\;B \leq 10^{-131}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 1.22 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.1999999999999996e-49Initial program 59.2%
associate-*r/59.2%
associate-*l/59.2%
*-un-lft-identity59.2%
associate--l-59.3%
unpow259.3%
pow259.3%
hypot-def84.7%
Applied egg-rr84.7%
Taylor expanded in B around -inf 83.2%
if -9.1999999999999996e-49 < B < -2.50000000000000007e-140 or 9.9999999999999999e-132 < B < 1.22e-17Initial program 40.2%
Simplified47.4%
Taylor expanded in B around 0 64.1%
associate-*r/64.1%
Simplified64.1%
Taylor expanded in B around 0 64.0%
associate-*r/64.2%
*-commutative64.2%
associate-*l/64.2%
Simplified64.2%
if -2.50000000000000007e-140 < B < -3.5000000000000003e-194 or 1.5e-228 < B < 9.9999999999999999e-132Initial program 68.9%
Simplified68.8%
Taylor expanded in B around -inf 68.2%
associate--l+68.2%
div-sub71.1%
Simplified71.1%
if -3.5000000000000003e-194 < B < 1.5e-228Initial program 58.8%
Simplified54.1%
Taylor expanded in B around 0 67.6%
associate-*r/67.6%
Simplified67.6%
associate-*l/67.6%
associate-/l*67.6%
Applied egg-rr67.6%
if 1.22e-17 < B Initial program 51.3%
Simplified51.3%
Taylor expanded in B around inf 74.8%
Final simplification73.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))))
(if (<= B -1.45e-205)
t_0
(if (<= B 5e-232)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 6.8e-130)
t_0
(if (<= B 9.5e-75)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(if (<= B 1.45e+28) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
double tmp;
if (B <= -1.45e-205) {
tmp = t_0;
} else if (B <= 5e-232) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 6.8e-130) {
tmp = t_0;
} else if (B <= 9.5e-75) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else if (B <= 1.45e+28) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
double tmp;
if (B <= -1.45e-205) {
tmp = t_0;
} else if (B <= 5e-232) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 6.8e-130) {
tmp = t_0;
} else if (B <= 9.5e-75) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else if (B <= 1.45e+28) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) tmp = 0 if B <= -1.45e-205: tmp = t_0 elif B <= 5e-232: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 6.8e-130: tmp = t_0 elif B <= 9.5e-75: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) elif B <= 1.45e+28: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)) tmp = 0.0 if (B <= -1.45e-205) tmp = t_0; elseif (B <= 5e-232) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 6.8e-130) tmp = t_0; elseif (B <= 9.5e-75) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); elseif (B <= 1.45e+28) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); tmp = 0.0; if (B <= -1.45e-205) tmp = t_0; elseif (B <= 5e-232) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 6.8e-130) tmp = t_0; elseif (B <= 9.5e-75) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); elseif (B <= 1.45e+28) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.45e-205], t$95$0, If[LessEqual[B, 5e-232], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 6.8e-130], t$95$0, If[LessEqual[B, 9.5e-75], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.45e+28], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.45 \cdot 10^{-205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-232}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 6.8 \cdot 10^{-130}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-75}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{+28}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.45000000000000009e-205 or 4.9999999999999999e-232 < B < 6.8000000000000001e-130 or 9.4999999999999991e-75 < B < 1.4500000000000001e28Initial program 59.9%
Simplified59.9%
Taylor expanded in B around -inf 68.4%
associate--l+68.4%
div-sub69.1%
Simplified69.1%
if -1.45000000000000009e-205 < B < 4.9999999999999999e-232Initial program 59.1%
associate-*r/59.1%
associate-*l/59.1%
*-un-lft-identity59.1%
associate--l-44.5%
unpow244.5%
pow244.5%
hypot-def54.2%
Applied egg-rr54.2%
div-sub34.2%
div-inv34.2%
fma-neg34.7%
Applied egg-rr34.7%
fma-udef34.2%
unsub-neg34.2%
Simplified34.2%
Taylor expanded in C around inf 16.2%
distribute-lft1-in16.2%
metadata-eval16.2%
mul0-lft56.7%
metadata-eval56.7%
Simplified56.7%
if 6.8000000000000001e-130 < B < 9.4999999999999991e-75Initial program 27.7%
Simplified28.0%
Taylor expanded in A around 0 14.3%
unpow214.3%
unpow214.3%
hypot-def31.3%
Simplified31.3%
Taylor expanded in C around inf 61.0%
associate-*r/61.0%
Simplified61.0%
if 1.4500000000000001e28 < B Initial program 45.5%
Simplified45.5%
Taylor expanded in B around inf 79.1%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (- (/ A B)))) PI)))
(if (<= B -7e-31)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.2e-204)
t_0
(if (<= B 2.2e-230)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 7.6e-130)
t_0
(if (<= B 5.6e-73)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(if (<= B 3.3e-26)
(/ (* 180.0 (atan (/ C B))) PI)
(* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(-(A / B))) / ((double) M_PI);
double tmp;
if (B <= -7e-31) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.2e-204) {
tmp = t_0;
} else if (B <= 2.2e-230) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 7.6e-130) {
tmp = t_0;
} else if (B <= 5.6e-73) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else if (B <= 3.3e-26) {
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 t_0 = (180.0 * Math.atan(-(A / B))) / Math.PI;
double tmp;
if (B <= -7e-31) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.2e-204) {
tmp = t_0;
} else if (B <= 2.2e-230) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 7.6e-130) {
tmp = t_0;
} else if (B <= 5.6e-73) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else if (B <= 3.3e-26) {
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): t_0 = (180.0 * math.atan(-(A / B))) / math.pi tmp = 0 if B <= -7e-31: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.2e-204: tmp = t_0 elif B <= 2.2e-230: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 7.6e-130: tmp = t_0 elif B <= 5.6e-73: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) elif B <= 3.3e-26: 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) t_0 = Float64(Float64(180.0 * atan(Float64(-Float64(A / B)))) / pi) tmp = 0.0 if (B <= -7e-31) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.2e-204) tmp = t_0; elseif (B <= 2.2e-230) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 7.6e-130) tmp = t_0; elseif (B <= 5.6e-73) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); elseif (B <= 3.3e-26) 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) t_0 = (180.0 * atan(-(A / B))) / pi; tmp = 0.0; if (B <= -7e-31) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.2e-204) tmp = t_0; elseif (B <= 2.2e-230) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 7.6e-130) tmp = t_0; elseif (B <= 5.6e-73) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); elseif (B <= 3.3e-26) tmp = (180.0 * atan((C / B))) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -7e-31], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.2e-204], t$95$0, If[LessEqual[B, 2.2e-230], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 7.6e-130], t$95$0, If[LessEqual[B, 5.6e-73], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.3e-26], 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}
t_0 := \frac{180 \cdot \tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -7 \cdot 10^{-31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.2 \cdot 10^{-204}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.2 \cdot 10^{-230}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 7.6 \cdot 10^{-130}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 5.6 \cdot 10^{-73}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.3 \cdot 10^{-26}:\\
\;\;\;\;\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 < -6.99999999999999971e-31Initial program 58.8%
Simplified58.9%
Taylor expanded in B around -inf 71.1%
if -6.99999999999999971e-31 < B < -2.1999999999999998e-204 or 2.1999999999999998e-230 < B < 7.5999999999999997e-130Initial program 58.3%
associate-*r/58.3%
associate-*l/58.3%
*-un-lft-identity58.3%
associate--l-58.3%
unpow258.3%
pow258.3%
hypot-def64.7%
Applied egg-rr64.7%
Taylor expanded in B around -inf 59.2%
Taylor expanded in A around inf 41.9%
mul-1-neg41.9%
Simplified41.9%
if -2.1999999999999998e-204 < B < 2.1999999999999998e-230Initial program 59.1%
associate-*r/59.1%
associate-*l/59.1%
*-un-lft-identity59.1%
associate--l-44.5%
unpow244.5%
pow244.5%
hypot-def54.2%
Applied egg-rr54.2%
div-sub34.2%
div-inv34.2%
fma-neg34.7%
Applied egg-rr34.7%
fma-udef34.2%
unsub-neg34.2%
Simplified34.2%
Taylor expanded in C around inf 16.2%
distribute-lft1-in16.2%
metadata-eval16.2%
mul0-lft56.7%
metadata-eval56.7%
Simplified56.7%
if 7.5999999999999997e-130 < B < 5.60000000000000023e-73Initial program 27.7%
Simplified28.0%
Taylor expanded in A around 0 14.3%
unpow214.3%
unpow214.3%
hypot-def31.3%
Simplified31.3%
Taylor expanded in C around inf 61.0%
associate-*r/61.0%
Simplified61.0%
if 5.60000000000000023e-73 < B < 3.2999999999999998e-26Initial program 61.5%
associate-*r/61.5%
associate-*l/61.5%
*-un-lft-identity61.5%
associate--l-61.5%
unpow261.5%
pow261.5%
hypot-def62.6%
Applied egg-rr62.6%
Taylor expanded in B around -inf 51.2%
Taylor expanded in C around inf 43.5%
if 3.2999999999999998e-26 < B Initial program 50.6%
Simplified50.6%
Taylor expanded in B around inf 71.5%
Final simplification60.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
(if (<= A -2.45e+72)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -7.5e-223)
t_0
(if (<= A -6.2e-291)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(if (<= A 4.1e+75) 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 <= -2.45e+72) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -7.5e-223) {
tmp = t_0;
} else if (A <= -6.2e-291) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else if (A <= 4.1e+75) {
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 <= -2.45e+72) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -7.5e-223) {
tmp = t_0;
} else if (A <= -6.2e-291) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else if (A <= 4.1e+75) {
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 <= -2.45e+72: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -7.5e-223: tmp = t_0 elif A <= -6.2e-291: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) elif A <= 4.1e+75: 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 <= -2.45e+72) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -7.5e-223) tmp = t_0; elseif (A <= -6.2e-291) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); elseif (A <= 4.1e+75) 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 <= -2.45e+72) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -7.5e-223) tmp = t_0; elseif (A <= -6.2e-291) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); elseif (A <= 4.1e+75) 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, -2.45e+72], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7.5e-223], t$95$0, If[LessEqual[A, -6.2e-291], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.1e+75], 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 -2.45 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7.5 \cdot 10^{-223}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -6.2 \cdot 10^{-291}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.1 \cdot 10^{+75}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.45000000000000003e72Initial program 26.5%
Simplified15.3%
Taylor expanded in A around -inf 81.0%
associate-*r/81.0%
Simplified81.0%
if -2.45000000000000003e72 < A < -7.50000000000000074e-223 or -6.20000000000000023e-291 < A < 4.0999999999999998e75Initial program 60.4%
Simplified60.4%
Taylor expanded in A around 0 58.5%
unpow258.5%
unpow258.5%
hypot-def82.9%
Simplified82.9%
Taylor expanded in B around -inf 54.0%
if -7.50000000000000074e-223 < A < -6.20000000000000023e-291Initial program 44.9%
Simplified44.9%
Taylor expanded in A around 0 44.9%
unpow244.9%
unpow244.9%
hypot-def56.1%
Simplified56.1%
Taylor expanded in C around inf 49.3%
associate-*r/49.3%
Simplified49.3%
if 4.0999999999999998e75 < A Initial program 75.8%
Simplified75.8%
Taylor expanded in A around inf 73.9%
associate-*r/73.9%
*-commutative73.9%
Simplified73.9%
Final simplification62.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (+ B C) B)) PI))))
(if (<= A -5e+69)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -7.5e-223)
t_0
(if (<= A -8.6e-291)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(if (<= A 2.3e+74) 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 <= -5e+69) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -7.5e-223) {
tmp = t_0;
} else if (A <= -8.6e-291) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else if (A <= 2.3e+74) {
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 <= -5e+69) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -7.5e-223) {
tmp = t_0;
} else if (A <= -8.6e-291) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else if (A <= 2.3e+74) {
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 <= -5e+69: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -7.5e-223: tmp = t_0 elif A <= -8.6e-291: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) elif A <= 2.3e+74: 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 <= -5e+69) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -7.5e-223) tmp = t_0; elseif (A <= -8.6e-291) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); elseif (A <= 2.3e+74) 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 <= -5e+69) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -7.5e-223) tmp = t_0; elseif (A <= -8.6e-291) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); elseif (A <= 2.3e+74) 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, -5e+69], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -7.5e-223], t$95$0, If[LessEqual[A, -8.6e-291], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.3e+74], 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 -5 \cdot 10^{+69}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7.5 \cdot 10^{-223}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -8.6 \cdot 10^{-291}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{+74}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.00000000000000036e69Initial program 26.5%
associate-*r/26.5%
associate-*l/26.5%
*-un-lft-identity26.5%
associate--l-15.3%
unpow215.3%
pow215.3%
hypot-def26.8%
Applied egg-rr26.8%
Taylor expanded in A around -inf 81.2%
if -5.00000000000000036e69 < A < -7.50000000000000074e-223 or -8.60000000000000071e-291 < A < 2.2999999999999999e74Initial program 60.4%
Simplified60.4%
Taylor expanded in A around 0 58.5%
unpow258.5%
unpow258.5%
hypot-def82.9%
Simplified82.9%
Taylor expanded in B around -inf 54.0%
if -7.50000000000000074e-223 < A < -8.60000000000000071e-291Initial program 44.9%
Simplified44.9%
Taylor expanded in A around 0 44.9%
unpow244.9%
unpow244.9%
hypot-def56.1%
Simplified56.1%
Taylor expanded in C around inf 49.3%
associate-*r/49.3%
Simplified49.3%
if 2.2999999999999999e74 < A Initial program 75.8%
Simplified75.8%
Taylor expanded in A around inf 73.9%
associate-*r/73.9%
*-commutative73.9%
Simplified73.9%
Final simplification62.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (+ B C) B))))
(if (<= A -2.2e+72)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -1e-221)
(* 180.0 (/ t_0 PI))
(if (<= A -7.4e-292)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(if (<= A 3.8e+74)
(/ (* 180.0 t_0) PI)
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan(((B + C) / B));
double tmp;
if (A <= -2.2e+72) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -1e-221) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -7.4e-292) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else if (A <= 3.8e+74) {
tmp = (180.0 * t_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 t_0 = Math.atan(((B + C) / B));
double tmp;
if (A <= -2.2e+72) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -1e-221) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -7.4e-292) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else if (A <= 3.8e+74) {
tmp = (180.0 * t_0) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((B + C) / B)) tmp = 0 if A <= -2.2e+72: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -1e-221: tmp = 180.0 * (t_0 / math.pi) elif A <= -7.4e-292: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) elif A <= 3.8e+74: tmp = (180.0 * t_0) / math.pi else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(B + C) / B)) tmp = 0.0 if (A <= -2.2e+72) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -1e-221) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -7.4e-292) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); elseif (A <= 3.8e+74) tmp = Float64(Float64(180.0 * t_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) t_0 = atan(((B + C) / B)); tmp = 0.0; if (A <= -2.2e+72) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -1e-221) tmp = 180.0 * (t_0 / pi); elseif (A <= -7.4e-292) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); elseif (A <= 3.8e+74) tmp = (180.0 * t_0) / pi; else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -2.2e+72], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1e-221], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7.4e-292], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e+74], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $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}
t_0 := \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{if}\;A \leq -2.2 \cdot 10^{+72}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1 \cdot 10^{-221}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{elif}\;A \leq -7.4 \cdot 10^{-292}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{+74}:\\
\;\;\;\;\frac{180 \cdot t_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.2e72Initial program 26.5%
associate-*r/26.5%
associate-*l/26.5%
*-un-lft-identity26.5%
associate--l-15.3%
unpow215.3%
pow215.3%
hypot-def26.8%
Applied egg-rr26.8%
Taylor expanded in A around -inf 81.2%
if -2.2e72 < A < -1.00000000000000002e-221Initial program 57.6%
Simplified57.6%
Taylor expanded in A around 0 57.5%
unpow257.5%
unpow257.5%
hypot-def78.0%
Simplified78.0%
Taylor expanded in B around -inf 48.8%
if -1.00000000000000002e-221 < A < -7.39999999999999993e-292Initial program 44.9%
Simplified44.9%
Taylor expanded in A around 0 44.9%
unpow244.9%
unpow244.9%
hypot-def56.1%
Simplified56.1%
Taylor expanded in C around inf 49.3%
associate-*r/49.3%
Simplified49.3%
if -7.39999999999999993e-292 < A < 3.7999999999999998e74Initial program 62.8%
associate-*r/62.8%
associate-*l/62.8%
*-un-lft-identity62.8%
associate--l-62.8%
unpow262.8%
pow262.8%
hypot-def90.2%
Applied egg-rr90.2%
Taylor expanded in B around -inf 61.8%
Taylor expanded in A around 0 58.4%
+-commutative58.4%
Simplified58.4%
if 3.7999999999999998e74 < A Initial program 75.8%
Simplified75.8%
Taylor expanded in A around inf 73.9%
associate-*r/73.9%
*-commutative73.9%
Simplified73.9%
Final simplification62.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (+ B C) B))))
(if (<= A -3.45e+75)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A -2.7e-222)
(* 180.0 (/ t_0 PI))
(if (<= A -8.6e-291)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(if (<= A 0.012)
(/ (* 180.0 t_0) PI)
(/ (* 180.0 (atan (/ (- B A) B))) PI)))))))
double code(double A, double B, double C) {
double t_0 = atan(((B + C) / B));
double tmp;
if (A <= -3.45e+75) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -2.7e-222) {
tmp = 180.0 * (t_0 / ((double) M_PI));
} else if (A <= -8.6e-291) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else if (A <= 0.012) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((B - A) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((B + C) / B));
double tmp;
if (A <= -3.45e+75) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= -2.7e-222) {
tmp = 180.0 * (t_0 / Math.PI);
} else if (A <= -8.6e-291) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else if (A <= 0.012) {
tmp = (180.0 * t_0) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((B - A) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((B + C) / B)) tmp = 0 if A <= -3.45e+75: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= -2.7e-222: tmp = 180.0 * (t_0 / math.pi) elif A <= -8.6e-291: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) elif A <= 0.012: tmp = (180.0 * t_0) / math.pi else: tmp = (180.0 * math.atan(((B - A) / B))) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(B + C) / B)) tmp = 0.0 if (A <= -3.45e+75) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= -2.7e-222) tmp = Float64(180.0 * Float64(t_0 / pi)); elseif (A <= -8.6e-291) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); elseif (A <= 0.012) tmp = Float64(Float64(180.0 * t_0) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(B - A) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((B + C) / B)); tmp = 0.0; if (A <= -3.45e+75) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= -2.7e-222) tmp = 180.0 * (t_0 / pi); elseif (A <= -8.6e-291) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); elseif (A <= 0.012) tmp = (180.0 * t_0) / pi; else tmp = (180.0 * atan(((B - A) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -3.45e+75], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -2.7e-222], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.6e-291], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 0.012], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{B + C}{B}\right)\\
\mathbf{if}\;A \leq -3.45 \cdot 10^{+75}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.7 \cdot 10^{-222}:\\
\;\;\;\;180 \cdot \frac{t_0}{\pi}\\
\mathbf{elif}\;A \leq -8.6 \cdot 10^{-291}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 0.012:\\
\;\;\;\;\frac{180 \cdot t_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.4500000000000002e75Initial program 26.5%
associate-*r/26.5%
associate-*l/26.5%
*-un-lft-identity26.5%
associate--l-15.3%
unpow215.3%
pow215.3%
hypot-def26.8%
Applied egg-rr26.8%
Taylor expanded in A around -inf 81.2%
if -3.4500000000000002e75 < A < -2.7e-222Initial program 57.6%
Simplified57.6%
Taylor expanded in A around 0 57.5%
unpow257.5%
unpow257.5%
hypot-def78.0%
Simplified78.0%
Taylor expanded in B around -inf 48.8%
if -2.7e-222 < A < -8.60000000000000071e-291Initial program 44.9%
Simplified44.9%
Taylor expanded in A around 0 44.9%
unpow244.9%
unpow244.9%
hypot-def56.1%
Simplified56.1%
Taylor expanded in C around inf 49.3%
associate-*r/49.3%
Simplified49.3%
if -8.60000000000000071e-291 < A < 0.012Initial program 61.2%
associate-*r/61.2%
associate-*l/61.2%
*-un-lft-identity61.2%
associate--l-61.2%
unpow261.2%
pow261.2%
hypot-def89.6%
Applied egg-rr89.6%
Taylor expanded in B around -inf 62.7%
Taylor expanded in A around 0 61.1%
+-commutative61.1%
Simplified61.1%
if 0.012 < A Initial program 74.5%
associate-*r/74.5%
associate-*l/74.5%
*-un-lft-identity74.5%
associate--l-74.5%
unpow274.5%
pow274.5%
hypot-def93.7%
Applied egg-rr93.7%
Taylor expanded in B around -inf 75.9%
Taylor expanded in C around 0 74.7%
Final simplification64.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (* 180.0 (atan (- (/ A B)))) PI)))
(if (<= B -5e-30)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.4e-205)
t_0
(if (<= B 1.55e-232)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 2.5e-21) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(-(A / B))) / ((double) M_PI);
double tmp;
if (B <= -5e-30) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.4e-205) {
tmp = t_0;
} else if (B <= 1.55e-232) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 2.5e-21) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(-(A / B))) / Math.PI;
double tmp;
if (B <= -5e-30) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.4e-205) {
tmp = t_0;
} else if (B <= 1.55e-232) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 2.5e-21) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(-(A / B))) / math.pi tmp = 0 if B <= -5e-30: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.4e-205: tmp = t_0 elif B <= 1.55e-232: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 2.5e-21: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(-Float64(A / B)))) / pi) tmp = 0.0 if (B <= -5e-30) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.4e-205) tmp = t_0; elseif (B <= 1.55e-232) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 2.5e-21) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(-(A / B))) / pi; tmp = 0.0; if (B <= -5e-30) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.4e-205) tmp = t_0; elseif (B <= 1.55e-232) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 2.5e-21) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[(-N[(A / B), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -5e-30], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.4e-205], t$95$0, If[LessEqual[B, 1.55e-232], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 2.5e-21], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(-\frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -5 \cdot 10^{-30}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.4 \cdot 10^{-205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.55 \cdot 10^{-232}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-21}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.99999999999999972e-30Initial program 58.8%
Simplified58.9%
Taylor expanded in B around -inf 71.1%
if -4.99999999999999972e-30 < B < -4.40000000000000018e-205 or 1.5499999999999999e-232 < B < 2.49999999999999986e-21Initial program 54.3%
associate-*r/54.3%
associate-*l/54.3%
*-un-lft-identity54.3%
associate--l-54.3%
unpow254.3%
pow254.3%
hypot-def61.4%
Applied egg-rr61.4%
Taylor expanded in B around -inf 52.5%
Taylor expanded in A around inf 37.9%
mul-1-neg37.9%
Simplified37.9%
if -4.40000000000000018e-205 < B < 1.5499999999999999e-232Initial program 59.1%
associate-*r/59.1%
associate-*l/59.1%
*-un-lft-identity59.1%
associate--l-44.5%
unpow244.5%
pow244.5%
hypot-def54.2%
Applied egg-rr54.2%
div-sub34.2%
div-inv34.2%
fma-neg34.7%
Applied egg-rr34.7%
fma-udef34.2%
unsub-neg34.2%
Simplified34.2%
Taylor expanded in C around inf 16.2%
distribute-lft1-in16.2%
metadata-eval16.2%
mul0-lft56.7%
metadata-eval56.7%
Simplified56.7%
if 2.49999999999999986e-21 < B Initial program 50.5%
Simplified50.5%
Taylor expanded in B around inf 73.6%
Final simplification58.2%
(FPCore (A B C)
:precision binary64
(if (<= B -1.25e-203)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.8e-235)
(/ (* 180.0 (atan 0.0)) PI)
(if (<= B 1.05e-26)
(/ (* 180.0 (atan (/ C B))) PI)
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.25e-203) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.8e-235) {
tmp = (180.0 * atan(0.0)) / ((double) M_PI);
} else if (B <= 1.05e-26) {
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 <= -1.25e-203) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.8e-235) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else if (B <= 1.05e-26) {
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 <= -1.25e-203: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.8e-235: tmp = (180.0 * math.atan(0.0)) / math.pi elif B <= 1.05e-26: 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 <= -1.25e-203) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.8e-235) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); elseif (B <= 1.05e-26) 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 <= -1.25e-203) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.8e-235) tmp = (180.0 * atan(0.0)) / pi; elseif (B <= 1.05e-26) 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, -1.25e-203], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-235], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.05e-26], 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 -1.25 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-235}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{elif}\;B \leq 1.05 \cdot 10^{-26}:\\
\;\;\;\;\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 < -1.25e-203Initial program 57.1%
Simplified57.1%
Taylor expanded in B around -inf 54.6%
if -1.25e-203 < B < 4.80000000000000022e-235Initial program 59.1%
associate-*r/59.1%
associate-*l/59.1%
*-un-lft-identity59.1%
associate--l-44.5%
unpow244.5%
pow244.5%
hypot-def54.2%
Applied egg-rr54.2%
div-sub34.2%
div-inv34.2%
fma-neg34.7%
Applied egg-rr34.7%
fma-udef34.2%
unsub-neg34.2%
Simplified34.2%
Taylor expanded in C around inf 16.2%
distribute-lft1-in16.2%
metadata-eval16.2%
mul0-lft56.7%
metadata-eval56.7%
Simplified56.7%
if 4.80000000000000022e-235 < B < 1.05000000000000004e-26Initial program 54.8%
associate-*r/54.8%
associate-*l/54.8%
*-un-lft-identity54.8%
associate--l-54.9%
unpow254.9%
pow254.9%
hypot-def61.3%
Applied egg-rr61.3%
Taylor expanded in B around -inf 50.3%
Taylor expanded in C around inf 35.2%
if 1.05000000000000004e-26 < B Initial program 50.6%
Simplified50.6%
Taylor expanded in B around inf 71.5%
Final simplification55.2%
(FPCore (A B C)
:precision binary64
(if (<= B -4.2e-204)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 6.5e-87)
(/ (* 180.0 (atan 0.0)) PI)
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -4.2e-204) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6.5e-87) {
tmp = (180.0 * atan(0.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 <= -4.2e-204) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6.5e-87) {
tmp = (180.0 * Math.atan(0.0)) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -4.2e-204: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6.5e-87: tmp = (180.0 * math.atan(0.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 <= -4.2e-204) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6.5e-87) tmp = Float64(Float64(180.0 * atan(0.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 <= -4.2e-204) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6.5e-87) tmp = (180.0 * atan(0.0)) / pi; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -4.2e-204], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.5e-87], N[(N[(180.0 * N[ArcTan[0.0], $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 -4.2 \cdot 10^{-204}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-87}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.20000000000000018e-204Initial program 57.1%
Simplified57.1%
Taylor expanded in B around -inf 54.6%
if -4.20000000000000018e-204 < B < 6.5000000000000003e-87Initial program 57.1%
associate-*r/57.1%
associate-*l/57.1%
*-un-lft-identity57.1%
associate--l-49.2%
unpow249.2%
pow249.2%
hypot-def57.2%
Applied egg-rr57.2%
div-sub42.3%
div-inv42.3%
fma-neg43.8%
Applied egg-rr43.8%
fma-udef42.3%
unsub-neg42.3%
Simplified42.3%
Taylor expanded in C around inf 11.3%
distribute-lft1-in11.3%
metadata-eval11.3%
mul0-lft42.0%
metadata-eval42.0%
Simplified42.0%
if 6.5000000000000003e-87 < B Initial program 51.5%
Simplified51.5%
Taylor expanded in B around inf 61.9%
Final simplification53.1%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 58.2%
Simplified55.1%
Taylor expanded in B around -inf 47.0%
if -4.999999999999985e-310 < B Initial program 52.7%
Simplified51.2%
Taylor expanded in B around inf 40.7%
Final simplification43.8%
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan -1.0) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(-1.0) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(-1.0) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(-1.0) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(-1.0) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(-1.0) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} -1}{\pi}
\end{array}
Initial program 55.4%
Simplified53.2%
Taylor expanded in B around inf 21.5%
Final simplification21.5%
herbie shell --seed 2023275
(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)))