
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C)
:precision binary64
(let* ((t_0
(atan
(* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))))
(if (or (<= t_0 -0.5) (not (<= t_0 0.0)))
(/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))
(/ (* 180.0 (atan (* 0.5 (+ (/ B A) (/ B (/ (pow A 2.0) C)))))) PI))))
double code(double A, double B, double C) {
double t_0 = atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0))))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
} else {
tmp = (180.0 * atan((0.5 * ((B / A) + (B / (pow(A, 2.0) / C)))))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0))))));
double tmp;
if ((t_0 <= -0.5) || !(t_0 <= 0.0)) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
} else {
tmp = (180.0 * Math.atan((0.5 * ((B / A) + (B / (Math.pow(A, 2.0) / C)))))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) tmp = 0 if (t_0 <= -0.5) or not (t_0 <= 0.0): tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) else: tmp = (180.0 * math.atan((0.5 * ((B / A) + (B / (math.pow(A, 2.0) / C)))))) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) tmp = 0.0 if ((t_0 <= -0.5) || !(t_0 <= 0.0)) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); else tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(Float64(B / A) + Float64(B / Float64((A ^ 2.0) / C)))))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))); tmp = 0.0; if ((t_0 <= -0.5) || ~((t_0 <= 0.0))) tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); else tmp = (180.0 * atan((0.5 * ((B / A) + (B / ((A ^ 2.0) / C)))))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[t$95$0, -0.5], N[Not[LessEqual[t$95$0, 0.0]], $MachinePrecision]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(N[(B / A), $MachinePrecision] + N[(B / N[(N[Power[A, 2.0], $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)\\
\mathbf{if}\;t_0 \leq -0.5 \lor \neg \left(t_0 \leq 0\right):\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(\frac{B}{A} + \frac{B}{\frac{{A}^{2}}{C}}\right)\right)}{\pi}\\
\end{array}
\end{array}
if (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < -0.5 or -0.0 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) Initial program 58.6%
Applied egg-rr89.1%
if -0.5 < (atan.f64 (*.f64 (/.f64 1 B) (-.f64 (-.f64 C A) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2)))))) < -0.0Initial program 25.4%
associate-*r/25.4%
associate-*l/25.4%
*-un-lft-identity25.4%
unpow225.4%
unpow225.4%
hypot-def25.4%
Applied egg-rr25.4%
Taylor expanded in A around -inf 63.9%
distribute-lft-out63.9%
associate-/l*64.8%
Simplified64.8%
Final simplification85.5%
(FPCore (A B C) :precision binary64 (if (<= A -8000000000.0) (* (atan (/ B (/ A 0.5))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8000000000.0) {
tmp = atan((B / (A / 0.5))) * (180.0 / ((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 <= -8000000000.0) {
tmp = Math.atan((B / (A / 0.5))) * (180.0 / 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 <= -8000000000.0: tmp = math.atan((B / (A / 0.5))) * (180.0 / 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 <= -8000000000.0) tmp = Float64(atan(Float64(B / Float64(A / 0.5))) * Float64(180.0 / 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 <= -8000000000.0) tmp = atan((B / (A / 0.5))) * (180.0 / 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, -8000000000.0], N[(N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $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 -8000000000:\\
\;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\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 < -8e9Initial program 25.1%
Taylor expanded in A around -inf 74.4%
associate-*r/74.6%
Applied egg-rr74.6%
Taylor expanded in B around 0 74.4%
associate-*r/74.6%
associate-*r/74.6%
associate-*l/74.7%
*-commutative74.7%
*-commutative74.7%
associate-/l*74.7%
Simplified74.7%
if -8e9 < A Initial program 64.0%
Simplified85.8%
Final simplification82.9%
(FPCore (A B C) :precision binary64 (if (<= A -6.4e+128) (* (atan (/ B (/ A 0.5))) (/ 180.0 PI)) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot (- A C) B)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+128) {
tmp = atan((B / (A / 0.5))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot((A - C), B)) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.4e+128) {
tmp = Math.atan((B / (A / 0.5))) * (180.0 / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot((A - C), B)) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.4e+128: tmp = math.atan((B / (A / 0.5))) * (180.0 / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot((A - C), B)) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.4e+128) tmp = Float64(atan(Float64(B / Float64(A / 0.5))) * Float64(180.0 / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.4e+128) tmp = atan((B / (A / 0.5))) * (180.0 / pi); else tmp = 180.0 / (pi / atan((((C - A) - hypot((A - C), B)) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.4e+128], N[(N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.4 \cdot 10^{+128}:\\
\;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}}\\
\end{array}
\end{array}
if A < -6.39999999999999971e128Initial program 17.9%
Taylor expanded in A around -inf 86.8%
associate-*r/86.9%
Applied egg-rr86.9%
Taylor expanded in B around 0 86.8%
associate-*r/86.9%
associate-*r/86.9%
associate-*l/87.0%
*-commutative87.0%
*-commutative87.0%
associate-/l*87.0%
Simplified87.0%
if -6.39999999999999971e128 < A Initial program 60.1%
Applied egg-rr83.0%
Final simplification83.6%
(FPCore (A B C)
:precision binary64
(if (<= C -7.1e+28)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= C 1.85e+132)
(* 180.0 (/ (atan (/ (- (- A) (hypot B A)) B)) PI))
(/ 180.0 (/ PI (atan (/ (* B -0.5) C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -7.1e+28) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (C <= 1.85e+132) {
tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((B * -0.5) / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -7.1e+28) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (C <= 1.85e+132) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(B, A)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan(((B * -0.5) / C)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -7.1e+28: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif C <= 1.85e+132: tmp = 180.0 * (math.atan(((-A - math.hypot(B, A)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan(((B * -0.5) / C))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -7.1e+28) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (C <= 1.85e+132) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(B, A)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B * -0.5) / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -7.1e+28) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (C <= 1.85e+132) tmp = 180.0 * (atan(((-A - hypot(B, A)) / B)) / pi); else tmp = 180.0 / (pi / atan(((B * -0.5) / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -7.1e+28], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.85e+132], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -7.1 \cdot 10^{+28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.85 \cdot 10^{+132}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}}\\
\end{array}
\end{array}
if C < -7.0999999999999999e28Initial program 82.8%
Simplified95.4%
Taylor expanded in B around -inf 88.2%
neg-mul-188.2%
unsub-neg88.2%
Simplified88.2%
if -7.0999999999999999e28 < C < 1.85000000000000005e132Initial program 51.1%
Taylor expanded in C around 0 48.9%
associate-*r/48.9%
mul-1-neg48.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-def74.2%
Simplified74.2%
if 1.85000000000000005e132 < C Initial program 13.7%
Applied egg-rr63.4%
Taylor expanded in C around inf 59.1%
+-commutative59.1%
associate-*r/59.1%
associate--l+59.1%
unpow259.1%
mul-1-neg59.1%
mul-1-neg59.1%
sqr-neg59.1%
unpow259.1%
distribute-rgt1-in59.1%
metadata-eval59.1%
mul0-lft59.1%
metadata-eval59.1%
Simplified59.1%
Taylor expanded in A around 0 87.9%
*-commutative87.9%
associate-*l/87.9%
Simplified87.9%
Final simplification79.6%
(FPCore (A B C)
:precision binary64
(if (<= C -1.2e+28)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= C 5.5e+130)
(/ 180.0 (/ PI (atan (/ (- (- A) (hypot A B)) B))))
(/ 180.0 (/ PI (atan (/ (* B -0.5) C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.2e+28) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (C <= 5.5e+130) {
tmp = 180.0 / (((double) M_PI) / atan(((-A - hypot(A, B)) / B)));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((B * -0.5) / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.2e+28) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (C <= 5.5e+130) {
tmp = 180.0 / (Math.PI / Math.atan(((-A - Math.hypot(A, B)) / B)));
} else {
tmp = 180.0 / (Math.PI / Math.atan(((B * -0.5) / C)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.2e+28: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif C <= 5.5e+130: tmp = 180.0 / (math.pi / math.atan(((-A - math.hypot(A, B)) / B))) else: tmp = 180.0 / (math.pi / math.atan(((B * -0.5) / C))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.2e+28) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (C <= 5.5e+130) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B * -0.5) / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.2e+28) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (C <= 5.5e+130) tmp = 180.0 / (pi / atan(((-A - hypot(A, B)) / B))); else tmp = 180.0 / (pi / atan(((B * -0.5) / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.2e+28], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.5e+130], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.2 \cdot 10^{+28}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.5 \cdot 10^{+130}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}}\\
\end{array}
\end{array}
if C < -1.19999999999999991e28Initial program 82.8%
Simplified95.4%
Taylor expanded in B around -inf 88.2%
neg-mul-188.2%
unsub-neg88.2%
Simplified88.2%
if -1.19999999999999991e28 < C < 5.4999999999999997e130Initial program 51.1%
Applied egg-rr75.8%
Taylor expanded in C around 0 48.9%
mul-1-neg48.9%
unpow248.9%
unpow248.9%
hypot-def74.2%
Simplified74.2%
if 5.4999999999999997e130 < C Initial program 13.7%
Applied egg-rr63.4%
Taylor expanded in C around inf 59.1%
+-commutative59.1%
associate-*r/59.1%
associate--l+59.1%
unpow259.1%
mul-1-neg59.1%
mul-1-neg59.1%
sqr-neg59.1%
unpow259.1%
distribute-rgt1-in59.1%
metadata-eval59.1%
mul0-lft59.1%
metadata-eval59.1%
Simplified59.1%
Taylor expanded in A around 0 87.9%
*-commutative87.9%
associate-*l/87.9%
Simplified87.9%
Final simplification79.6%
(FPCore (A B C)
:precision binary64
(if (<= A -2.1e-190)
(* (atan (/ B (/ A 0.5))) (/ 180.0 PI))
(if (<= A -6e-245)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A -1.75e-303)
(* 180.0 (/ (atan -1.0) PI))
(if (or (<= A 5.2e-236) (and (not (<= A 1.02e+39)) (<= A 4.7e+67)))
(/ 180.0 (/ PI (atan (/ (* B -0.5) C))))
(/ 180.0 (/ PI (atan (/ (- (- B) A) B)))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e-190) {
tmp = atan((B / (A / 0.5))) * (180.0 / ((double) M_PI));
} else if (A <= -6e-245) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= -1.75e-303) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if ((A <= 5.2e-236) || (!(A <= 1.02e+39) && (A <= 4.7e+67))) {
tmp = 180.0 / (((double) M_PI) / atan(((B * -0.5) / C)));
} else {
tmp = 180.0 / (((double) M_PI) / atan(((-B - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.1e-190) {
tmp = Math.atan((B / (A / 0.5))) * (180.0 / Math.PI);
} else if (A <= -6e-245) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= -1.75e-303) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if ((A <= 5.2e-236) || (!(A <= 1.02e+39) && (A <= 4.7e+67))) {
tmp = 180.0 / (Math.PI / Math.atan(((B * -0.5) / C)));
} else {
tmp = 180.0 / (Math.PI / Math.atan(((-B - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.1e-190: tmp = math.atan((B / (A / 0.5))) * (180.0 / math.pi) elif A <= -6e-245: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= -1.75e-303: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif (A <= 5.2e-236) or (not (A <= 1.02e+39) and (A <= 4.7e+67)): tmp = 180.0 / (math.pi / math.atan(((B * -0.5) / C))) else: tmp = 180.0 / (math.pi / math.atan(((-B - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.1e-190) tmp = Float64(atan(Float64(B / Float64(A / 0.5))) * Float64(180.0 / pi)); elseif (A <= -6e-245) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= -1.75e-303) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif ((A <= 5.2e-236) || (!(A <= 1.02e+39) && (A <= 4.7e+67))) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(B * -0.5) / C)))); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(-B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.1e-190) tmp = atan((B / (A / 0.5))) * (180.0 / pi); elseif (A <= -6e-245) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= -1.75e-303) tmp = 180.0 * (atan(-1.0) / pi); elseif ((A <= 5.2e-236) || (~((A <= 1.02e+39)) && (A <= 4.7e+67))) tmp = 180.0 / (pi / atan(((B * -0.5) / C))); else tmp = 180.0 / (pi / atan(((-B - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.1e-190], N[(N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6e-245], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.75e-303], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[A, 5.2e-236], And[N[Not[LessEqual[A, 1.02e+39]], $MachinePrecision], LessEqual[A, 4.7e+67]]], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[((-B) - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.1 \cdot 10^{-190}:\\
\;\;\;\;\tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq -6 \cdot 10^{-245}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq -1.75 \cdot 10^{-303}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 5.2 \cdot 10^{-236} \lor \neg \left(A \leq 1.02 \cdot 10^{+39}\right) \land A \leq 4.7 \cdot 10^{+67}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(-B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.09999999999999991e-190Initial program 34.6%
Taylor expanded in A around -inf 61.9%
associate-*r/62.0%
Applied egg-rr62.0%
Taylor expanded in B around 0 61.9%
associate-*r/62.0%
associate-*r/62.0%
associate-*l/62.1%
*-commutative62.1%
*-commutative62.1%
associate-/l*62.1%
Simplified62.1%
if -2.09999999999999991e-190 < A < -6.0000000000000004e-245Initial program 42.5%
Taylor expanded in B around -inf 54.8%
if -6.0000000000000004e-245 < A < -1.75e-303Initial program 67.5%
Taylor expanded in B around inf 55.9%
if -1.75e-303 < A < 5.2000000000000001e-236 or 1.02e39 < A < 4.70000000000000017e67Initial program 41.4%
Applied egg-rr72.9%
Taylor expanded in C around inf 37.9%
+-commutative37.9%
associate-*r/37.9%
associate--l+37.9%
unpow237.9%
mul-1-neg37.9%
mul-1-neg37.9%
sqr-neg37.9%
unpow237.9%
distribute-rgt1-in37.9%
metadata-eval37.9%
mul0-lft37.9%
metadata-eval37.9%
Simplified37.9%
Taylor expanded in A around 0 53.2%
*-commutative53.2%
associate-*l/53.2%
Simplified53.2%
if 5.2000000000000001e-236 < A < 1.02e39 or 4.70000000000000017e67 < A Initial program 77.6%
Applied egg-rr92.3%
Taylor expanded in C around 0 74.1%
mul-1-neg74.1%
unpow274.1%
unpow274.1%
hypot-def83.7%
Simplified83.7%
Taylor expanded in A around 0 73.2%
+-commutative73.2%
Simplified73.2%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
(if (<= C -1.15e-12)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -1.95e-250)
t_0
(if (<= C 4.8e-200)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 8.6e-9) t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
double tmp;
if (C <= -1.15e-12) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -1.95e-250) {
tmp = t_0;
} else if (C <= 4.8e-200) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 8.6e-9) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
double tmp;
if (C <= -1.15e-12) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -1.95e-250) {
tmp = t_0;
} else if (C <= 4.8e-200) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 8.6e-9) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) tmp = 0 if C <= -1.15e-12: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -1.95e-250: tmp = t_0 elif C <= 4.8e-200: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 8.6e-9: tmp = t_0 else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) tmp = 0.0 if (C <= -1.15e-12) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -1.95e-250) tmp = t_0; elseif (C <= 4.8e-200) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 8.6e-9) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((0.5 * (B / A))) / pi); tmp = 0.0; if (C <= -1.15e-12) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -1.95e-250) tmp = t_0; elseif (C <= 4.8e-200) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 8.6e-9) tmp = t_0; else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.15e-12], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.95e-250], t$95$0, If[LessEqual[C, 4.8e-200], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.6e-9], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.15 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.95 \cdot 10^{-250}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 4.8 \cdot 10^{-200}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 8.6 \cdot 10^{-9}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.14999999999999995e-12Initial program 83.1%
Taylor expanded in C around -inf 69.8%
if -1.14999999999999995e-12 < C < -1.95000000000000014e-250 or 4.80000000000000003e-200 < C < 8.59999999999999925e-9Initial program 52.1%
Taylor expanded in A around -inf 42.5%
if -1.95000000000000014e-250 < C < 4.80000000000000003e-200Initial program 46.8%
Taylor expanded in B around inf 43.1%
if 8.59999999999999925e-9 < C Initial program 28.3%
Applied egg-rr68.5%
Taylor expanded in C around inf 42.8%
+-commutative42.8%
associate-*r/42.8%
associate--l+42.8%
unpow242.8%
mul-1-neg42.8%
mul-1-neg42.8%
sqr-neg42.8%
unpow242.8%
distribute-rgt1-in42.8%
metadata-eval42.8%
mul0-lft42.8%
metadata-eval42.8%
Simplified42.8%
Taylor expanded in A around 0 60.3%
associate-*r/60.3%
+-rgt-identity60.3%
+-inverses49.3%
sub-neg49.3%
+-commutative49.3%
associate-+l+42.8%
sub-neg42.8%
+-commutative42.8%
unpow242.8%
fma-udef35.2%
associate-*l/35.2%
*-commutative35.2%
Simplified60.2%
Taylor expanded in B around 0 69.9%
*-commutative69.9%
associate-*l/69.9%
Simplified69.9%
Final simplification57.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (/ B (/ A 0.5))) (/ 180.0 PI))))
(if (<= C -1.4e-12)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -2.2e-250)
t_0
(if (<= C 5.6e-197)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 9.2e-9) t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))))))
double code(double A, double B, double C) {
double t_0 = atan((B / (A / 0.5))) * (180.0 / ((double) M_PI));
double tmp;
if (C <= -1.4e-12) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -2.2e-250) {
tmp = t_0;
} else if (C <= 5.6e-197) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 9.2e-9) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = Math.atan((B / (A / 0.5))) * (180.0 / Math.PI);
double tmp;
if (C <= -1.4e-12) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -2.2e-250) {
tmp = t_0;
} else if (C <= 5.6e-197) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 9.2e-9) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((B / (A / 0.5))) * (180.0 / math.pi) tmp = 0 if C <= -1.4e-12: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -2.2e-250: tmp = t_0 elif C <= 5.6e-197: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 9.2e-9: tmp = t_0 else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(B / Float64(A / 0.5))) * Float64(180.0 / pi)) tmp = 0.0 if (C <= -1.4e-12) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -2.2e-250) tmp = t_0; elseif (C <= 5.6e-197) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 9.2e-9) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((B / (A / 0.5))) * (180.0 / pi); tmp = 0.0; if (C <= -1.4e-12) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -2.2e-250) tmp = t_0; elseif (C <= 5.6e-197) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 9.2e-9) tmp = t_0; else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(B / N[(A / 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.4e-12], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.2e-250], t$95$0, If[LessEqual[C, 5.6e-197], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.2e-9], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{B}{\frac{A}{0.5}}\right) \cdot \frac{180}{\pi}\\
\mathbf{if}\;C \leq -1.4 \cdot 10^{-12}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.2 \cdot 10^{-250}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;C \leq 5.6 \cdot 10^{-197}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 9.2 \cdot 10^{-9}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.4000000000000001e-12Initial program 83.1%
Taylor expanded in C around -inf 69.8%
if -1.4000000000000001e-12 < C < -2.2e-250 or 5.6000000000000004e-197 < C < 9.1999999999999997e-9Initial program 52.1%
Taylor expanded in A around -inf 42.5%
associate-*r/42.6%
Applied egg-rr42.6%
Taylor expanded in B around 0 42.5%
associate-*r/42.6%
associate-*r/42.6%
associate-*l/42.6%
*-commutative42.6%
*-commutative42.6%
associate-/l*42.6%
Simplified42.6%
if -2.2e-250 < C < 5.6000000000000004e-197Initial program 46.8%
Taylor expanded in B around inf 43.1%
if 9.1999999999999997e-9 < C Initial program 28.3%
Applied egg-rr68.5%
Taylor expanded in C around inf 42.8%
+-commutative42.8%
associate-*r/42.8%
associate--l+42.8%
unpow242.8%
mul-1-neg42.8%
mul-1-neg42.8%
sqr-neg42.8%
unpow242.8%
distribute-rgt1-in42.8%
metadata-eval42.8%
mul0-lft42.8%
metadata-eval42.8%
Simplified42.8%
Taylor expanded in A around 0 60.3%
associate-*r/60.3%
+-rgt-identity60.3%
+-inverses49.3%
sub-neg49.3%
+-commutative49.3%
associate-+l+42.8%
sub-neg42.8%
+-commutative42.8%
unpow242.8%
fma-udef35.2%
associate-*l/35.2%
*-commutative35.2%
Simplified60.2%
Taylor expanded in B around 0 69.9%
*-commutative69.9%
associate-*l/69.9%
Simplified69.9%
Final simplification57.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1e-207)
(/ 180.0 (/ PI (atan (- 1.0 (/ A B)))))
(if (<= B 6.5e-173)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.5e-38)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-207) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 - (A / B))));
} else if (B <= 6.5e-173) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.5e-38) {
tmp = 180.0 * (atan((2.0 * (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 <= -1e-207) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 - (A / B))));
} else if (B <= 6.5e-173) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.5e-38) {
tmp = 180.0 * (Math.atan((2.0 * (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 <= -1e-207: tmp = 180.0 / (math.pi / math.atan((1.0 - (A / B)))) elif B <= 6.5e-173: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.5e-38: tmp = 180.0 * (math.atan((2.0 * (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 <= -1e-207) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 - Float64(A / B))))); elseif (B <= 6.5e-173) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.5e-38) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * 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 <= -1e-207) tmp = 180.0 / (pi / atan((1.0 - (A / B)))); elseif (B <= 6.5e-173) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.5e-38) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-207], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.5e-173], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.5e-38], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-207}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-38}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.99999999999999925e-208Initial program 50.0%
Applied egg-rr72.5%
Taylor expanded in C around 0 44.9%
mul-1-neg44.9%
unpow244.9%
unpow244.9%
hypot-def64.0%
Simplified64.0%
Taylor expanded in B around -inf 60.7%
mul-1-neg60.7%
unsub-neg60.7%
Simplified60.7%
if -9.99999999999999925e-208 < B < 6.4999999999999995e-173Initial program 52.1%
Taylor expanded in C around inf 55.7%
associate-*r/55.7%
distribute-rgt1-in55.7%
metadata-eval55.7%
mul0-lft55.7%
metadata-eval55.7%
Simplified55.7%
if 6.4999999999999995e-173 < B < 2.50000000000000017e-38Initial program 61.5%
Taylor expanded in C around -inf 46.8%
if 2.50000000000000017e-38 < B Initial program 58.0%
Taylor expanded in B around inf 59.6%
Final simplification58.3%
(FPCore (A B C)
:precision binary64
(if (<= B -1.65e-209)
(/ 180.0 (/ PI (atan (- 1.0 (/ A B)))))
(if (<= B 1.08e-172)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.65e-209) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 - (A / B))));
} else if (B <= 1.08e-172) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.65e-209) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 - (A / B))));
} else if (B <= 1.08e-172) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.65e-209: tmp = 180.0 / (math.pi / math.atan((1.0 - (A / B)))) elif B <= 1.08e-172: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.65e-209) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 - Float64(A / B))))); elseif (B <= 1.08e-172) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.65e-209) tmp = 180.0 / (pi / atan((1.0 - (A / B)))); elseif (B <= 1.08e-172) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.65e-209], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.08e-172], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.65 \cdot 10^{-209}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 - \frac{A}{B}\right)}}\\
\mathbf{elif}\;B \leq 1.08 \cdot 10^{-172}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.64999999999999987e-209Initial program 50.0%
Applied egg-rr72.5%
Taylor expanded in C around 0 44.9%
mul-1-neg44.9%
unpow244.9%
unpow244.9%
hypot-def64.0%
Simplified64.0%
Taylor expanded in B around -inf 60.7%
mul-1-neg60.7%
unsub-neg60.7%
Simplified60.7%
if -1.64999999999999987e-209 < B < 1.08e-172Initial program 52.1%
Taylor expanded in C around inf 55.7%
associate-*r/55.7%
distribute-rgt1-in55.7%
metadata-eval55.7%
mul0-lft55.7%
metadata-eval55.7%
Simplified55.7%
if 1.08e-172 < B Initial program 58.7%
Simplified81.8%
Taylor expanded in B around inf 77.9%
+-commutative77.9%
Simplified77.9%
Final simplification66.0%
(FPCore (A B C)
:precision binary64
(if (<= B -2.6e-237)
(* 180.0 (/ (atan (/ (+ C (- B A)) B)) PI))
(if (<= B 3.5e-173)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-237) {
tmp = 180.0 * (atan(((C + (B - A)) / B)) / ((double) M_PI));
} else if (B <= 3.5e-173) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -2.6e-237) {
tmp = 180.0 * (Math.atan(((C + (B - A)) / B)) / Math.PI);
} else if (B <= 3.5e-173) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.6e-237: tmp = 180.0 * (math.atan(((C + (B - A)) / B)) / math.pi) elif B <= 3.5e-173: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.6e-237) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C + Float64(B - A)) / B)) / pi)); elseif (B <= 3.5e-173) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -2.6e-237) tmp = 180.0 * (atan(((C + (B - A)) / B)) / pi); elseif (B <= 3.5e-173) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.6e-237], N[(180.0 * N[(N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e-173], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.6 \cdot 10^{-237}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-173}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.6000000000000002e-237Initial program 50.1%
Simplified70.6%
Taylor expanded in B around -inf 65.5%
neg-mul-165.5%
unsub-neg65.5%
Simplified65.5%
if -2.6000000000000002e-237 < B < 3.50000000000000014e-173Initial program 52.1%
Taylor expanded in C around inf 58.2%
associate-*r/58.2%
distribute-rgt1-in58.2%
metadata-eval58.2%
mul0-lft58.2%
metadata-eval58.2%
Simplified58.2%
if 3.50000000000000014e-173 < B Initial program 58.7%
Simplified81.8%
Taylor expanded in B around inf 77.9%
+-commutative77.9%
Simplified77.9%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(if (<= B -5.2e-236)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B 3.8e-172)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan (/ (- C (+ B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-236) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= 3.8e-172) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (B + A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.2e-236) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= 3.8e-172) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (B + A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.2e-236: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= 3.8e-172: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - (B + A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.2e-236) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= 3.8e-172) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(B + A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.2e-236) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= 3.8e-172) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(((C - (B + A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.2e-236], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-172], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(B + A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.2 \cdot 10^{-236}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-172}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(B + A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -5.2000000000000001e-236Initial program 50.1%
Applied egg-rr73.2%
Taylor expanded in B around -inf 65.5%
if -5.2000000000000001e-236 < B < 3.79999999999999987e-172Initial program 52.1%
Taylor expanded in C around inf 58.2%
associate-*r/58.2%
distribute-rgt1-in58.2%
metadata-eval58.2%
mul0-lft58.2%
metadata-eval58.2%
Simplified58.2%
if 3.79999999999999987e-172 < B Initial program 58.7%
Simplified81.8%
Taylor expanded in B around inf 77.9%
+-commutative77.9%
Simplified77.9%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(if (<= B -9.5e-237)
(/ 180.0 (/ PI (atan (/ (- (+ B C) A) B))))
(if (<= B 3.8e-172)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ 180.0 (/ PI (atan (/ (- (- C B) A) B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9.5e-237) {
tmp = 180.0 / (((double) M_PI) / atan((((B + C) - A) / B)));
} else if (B <= 3.8e-172) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((((C - B) - A) / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -9.5e-237) {
tmp = 180.0 / (Math.PI / Math.atan((((B + C) - A) / B)));
} else if (B <= 3.8e-172) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((((C - B) - A) / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -9.5e-237: tmp = 180.0 / (math.pi / math.atan((((B + C) - A) / B))) elif B <= 3.8e-172: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((((C - B) - A) / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -9.5e-237) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(B + C) - A) / B)))); elseif (B <= 3.8e-172) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - B) - A) / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -9.5e-237) tmp = 180.0 / (pi / atan((((B + C) - A) / B))); elseif (B <= 3.8e-172) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 / (pi / atan((((C - B) - A) / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -9.5e-237], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.8e-172], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -9.5 \cdot 10^{-237}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}}\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-172}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}}\\
\end{array}
\end{array}
if B < -9.4999999999999998e-237Initial program 50.1%
Applied egg-rr73.2%
Taylor expanded in B around -inf 65.5%
if -9.4999999999999998e-237 < B < 3.79999999999999987e-172Initial program 52.1%
Taylor expanded in C around inf 58.2%
associate-*r/58.2%
distribute-rgt1-in58.2%
metadata-eval58.2%
mul0-lft58.2%
metadata-eval58.2%
Simplified58.2%
if 3.79999999999999987e-172 < B Initial program 58.7%
Applied egg-rr81.9%
Taylor expanded in B around inf 77.9%
mul-1-neg77.9%
unsub-neg77.9%
Simplified77.9%
Final simplification68.7%
(FPCore (A B C)
:precision binary64
(if (<= B -6.8e-70)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.4e-207)
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI))
(if (<= B 5.7e-95)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-70) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.4e-207) {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
} else if (B <= 5.7e-95) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -6.8e-70) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.4e-207) {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
} else if (B <= 5.7e-95) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -6.8e-70: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.4e-207: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) elif B <= 5.7e-95: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -6.8e-70) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.4e-207) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); elseif (B <= 5.7e-95) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -6.8e-70) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.4e-207) tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); elseif (B <= 5.7e-95) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -6.8e-70], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.4e-207], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.7e-95], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -6.8 \cdot 10^{-70}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.4 \cdot 10^{-207}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.79999999999999991e-70Initial program 49.0%
Taylor expanded in B around -inf 55.9%
if -6.79999999999999991e-70 < B < -5.4e-207Initial program 52.4%
Taylor expanded in A around inf 45.2%
if -5.4e-207 < B < 5.7e-95Initial program 55.9%
Taylor expanded in C around inf 51.3%
associate-*r/51.3%
distribute-rgt1-in51.3%
metadata-eval51.3%
mul0-lft51.3%
metadata-eval51.3%
Simplified51.3%
if 5.7e-95 < B Initial program 56.6%
Taylor expanded in B around inf 54.4%
Final simplification53.0%
(FPCore (A B C)
:precision binary64
(if (<= A -7e-213)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 6.5e-139)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (* (/ A B) -2.0)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -7e-213) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 6.5e-139) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A / B) * -2.0)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -7e-213) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 6.5e-139) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A / B) * -2.0)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -7e-213: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 6.5e-139: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan(((A / B) * -2.0)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -7e-213) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 6.5e-139) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A / B) * -2.0)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -7e-213) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 6.5e-139) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan(((A / B) * -2.0)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -7e-213], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-139], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A / B), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7 \cdot 10^{-213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A}{B} \cdot -2\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.00000000000000034e-213Initial program 36.0%
Taylor expanded in A around -inf 60.2%
if -7.00000000000000034e-213 < A < 6.5e-139Initial program 54.9%
Taylor expanded in B around inf 37.6%
if 6.5e-139 < A Initial program 73.9%
Taylor expanded in A around inf 57.6%
Final simplification54.9%
(FPCore (A B C)
:precision binary64
(if (<= B -5.8e-134)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 6.2e-96)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5.8e-134) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6.2e-96) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5.8e-134) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6.2e-96) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5.8e-134: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6.2e-96: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5.8e-134) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6.2e-96) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5.8e-134) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6.2e-96) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5.8e-134], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.2e-96], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5.8 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6.2 \cdot 10^{-96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -5.79999999999999986e-134Initial program 49.3%
Taylor expanded in B around -inf 51.8%
if -5.79999999999999986e-134 < B < 6.1999999999999998e-96Initial program 55.0%
Taylor expanded in C around inf 44.7%
associate-*r/44.7%
distribute-rgt1-in44.7%
metadata-eval44.7%
mul0-lft44.7%
metadata-eval44.7%
Simplified44.7%
if 6.1999999999999998e-96 < B Initial program 56.6%
Taylor expanded in B around inf 54.4%
Final simplification50.3%
(FPCore (A B C) :precision binary64 (if (<= B -1e-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 <= -1e-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 <= -1e-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 <= -1e-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 <= -1e-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 <= -1e-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, -1e-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 -1 \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 < -9.999999999999969e-311Initial program 50.3%
Taylor expanded in B around -inf 36.5%
if -9.999999999999969e-311 < B Initial program 57.3%
Taylor expanded in B around inf 41.3%
Final simplification38.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 53.7%
Taylor expanded in B around inf 20.9%
Final simplification20.9%
herbie shell --seed 2023318
(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)))