
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= C 6.2e+105) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (* (atan (/ (* B -0.5) C)) (/ 180.0 PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 6.2e+105) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
} else {
tmp = atan(((B * -0.5) / C)) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 6.2e+105) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
} else {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 6.2e+105: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) else: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 6.2e+105) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 6.2e+105) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = atan(((B * -0.5) / C)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 6.2e+105], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 6.2 \cdot 10^{+105}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < 6.20000000000000008e105Initial program 56.1%
associate-*l/56.1%
*-lft-identity56.1%
+-commutative56.1%
unpow256.1%
unpow256.1%
hypot-define79.5%
Simplified79.5%
if 6.20000000000000008e105 < C Initial program 12.1%
Taylor expanded in C around inf 83.5%
Taylor expanded in A around inf 83.5%
Simplified83.3%
associate-*r/83.6%
Applied egg-rr83.6%
(FPCore (A B C)
:precision binary64
(if (<= C -1.1e-28)
(* (/ 180.0 PI) (atan (/ (- C (hypot C B)) B)))
(if (<= C 1.05e+95)
(* 180.0 (/ (atan (/ (+ A (hypot A B)) (- B))) PI))
(* (atan (/ (* B -0.5) C)) (/ 180.0 PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.1e-28) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(C, B)) / B));
} else if (C <= 1.05e+95) {
tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / ((double) M_PI));
} else {
tmp = atan(((B * -0.5) / C)) * (180.0 / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.1e-28) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(C, B)) / B));
} else if (C <= 1.05e+95) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(A, B)) / -B)) / Math.PI);
} else {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.1e-28: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(C, B)) / B)) elif C <= 1.05e+95: tmp = 180.0 * (math.atan(((A + math.hypot(A, B)) / -B)) / math.pi) else: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.1e-28) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(C, B)) / B))); elseif (C <= 1.05e+95) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))) / pi)); else tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.1e-28) tmp = (180.0 / pi) * atan(((C - hypot(C, B)) / B)); elseif (C <= 1.05e+95) tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / pi); else tmp = atan(((B * -0.5) / C)) * (180.0 / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.1e-28], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.05e+95], N[(180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.1 \cdot 10^{-28}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)\\
\mathbf{elif}\;C \leq 1.05 \cdot 10^{+95}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\end{array}
\end{array}
if C < -1.09999999999999998e-28Initial program 68.0%
Taylor expanded in B around 0 68.3%
Simplified86.3%
Taylor expanded in A around 0 68.2%
+-commutative68.2%
unpow268.2%
unpow268.2%
hypot-define86.1%
Simplified86.1%
if -1.09999999999999998e-28 < C < 1.05e95Initial program 50.1%
Taylor expanded in C around 0 47.8%
associate-*r/47.8%
mul-1-neg47.8%
unpow247.8%
unpow247.8%
hypot-define73.6%
Simplified73.6%
if 1.05e95 < C Initial program 16.2%
Taylor expanded in C around inf 82.1%
Taylor expanded in A around inf 82.1%
Simplified81.9%
associate-*r/82.2%
Applied egg-rr82.2%
Final simplification78.3%
(FPCore (A B C)
:precision binary64
(if (<= A -1.4e+49)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI))
(if (<= A 2e+67)
(* (/ 180.0 PI) (atan (/ (- C (hypot C B)) B)))
(* (/ 180.0 PI) (atan (/ (+ C (* B (- -1.0 (/ A B)))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.4e+49) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
} else if (A <= 2e+67) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(C, B)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.4e+49) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
} else if (A <= 2e+67) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(C, B)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.4e+49: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi) elif A <= 2e+67: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(C, B)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((C + (B * (-1.0 - (A / B)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.4e+49) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi)); elseif (A <= 2e+67) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(C, B)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B * Float64(-1.0 - Float64(A / B)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.4e+49) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi); elseif (A <= 2e+67) tmp = (180.0 / pi) * atan(((C - hypot(C, B)) / B)); else tmp = (180.0 / pi) * atan(((C + (B * (-1.0 - (A / B)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.4e+49], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e+67], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B * N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.4 \cdot 10^{+49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2 \cdot 10^{+67}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + B \cdot \left(-1 - \frac{A}{B}\right)}{B}\right)\\
\end{array}
\end{array}
if A < -1.3999999999999999e49Initial program 21.8%
*-commutative21.8%
associate--l-19.3%
+-commutative19.3%
unpow219.3%
unpow219.3%
hypot-undefine33.2%
associate--r+49.0%
div-inv49.0%
div-sub29.8%
Applied egg-rr29.8%
Taylor expanded in A around -inf 64.2%
mul-1-neg64.2%
distribute-neg-frac264.2%
cancel-sign-sub-inv64.2%
metadata-eval64.2%
distribute-lft-out64.2%
associate-/l*67.1%
Simplified67.1%
if -1.3999999999999999e49 < A < 1.99999999999999997e67Initial program 52.0%
Taylor expanded in B around 0 51.9%
Simplified76.9%
Taylor expanded in A around 0 48.1%
+-commutative48.1%
unpow248.1%
unpow248.1%
hypot-define73.1%
Simplified73.1%
if 1.99999999999999997e67 < A Initial program 81.3%
Taylor expanded in B around 0 81.3%
Simplified98.0%
Taylor expanded in B around inf 94.4%
Final simplification75.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.25e+54)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI))
(if (<= A 7.5e+65)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* (/ 180.0 PI) (atan (/ (+ C (* B (- -1.0 (/ A B)))) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.25e+54) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
} else if (A <= 7.5e+65) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.25e+54) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
} else if (A <= 7.5e+65) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B * (-1.0 - (A / B)))) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.25e+54: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi) elif A <= 7.5e+65: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan(((C + (B * (-1.0 - (A / B)))) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.25e+54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi)); elseif (A <= 7.5e+65) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B * Float64(-1.0 - Float64(A / B)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.25e+54) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi); elseif (A <= 7.5e+65) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = (180.0 / pi) * atan(((C + (B * (-1.0 - (A / B)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.25e+54], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.5e+65], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B * N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.25 \cdot 10^{+54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.5 \cdot 10^{+65}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + B \cdot \left(-1 - \frac{A}{B}\right)}{B}\right)\\
\end{array}
\end{array}
if A < -2.24999999999999992e54Initial program 21.8%
*-commutative21.8%
associate--l-19.3%
+-commutative19.3%
unpow219.3%
unpow219.3%
hypot-undefine33.2%
associate--r+49.0%
div-inv49.0%
div-sub29.8%
Applied egg-rr29.8%
Taylor expanded in A around -inf 64.2%
mul-1-neg64.2%
distribute-neg-frac264.2%
cancel-sign-sub-inv64.2%
metadata-eval64.2%
distribute-lft-out64.2%
associate-/l*67.1%
Simplified67.1%
if -2.24999999999999992e54 < A < 7.50000000000000006e65Initial program 52.0%
Taylor expanded in A around 0 48.1%
+-commutative48.1%
unpow248.1%
unpow248.1%
hypot-define73.1%
Simplified73.1%
if 7.50000000000000006e65 < A Initial program 81.3%
Taylor expanded in B around 0 81.3%
Simplified98.0%
Taylor expanded in B around inf 94.4%
Final simplification75.5%
(FPCore (A B C) :precision binary64 (if (<= A -2.8e+66) (* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- 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 <= -2.8e+66) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -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 <= -2.8e+66) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -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 <= -2.8e+66: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -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 <= -2.8e+66) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-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 <= -2.8e+66) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -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, -2.8e+66], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / 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 -2.8 \cdot 10^{+66}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-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 < -2.8000000000000001e66Initial program 20.0%
*-commutative20.0%
associate--l-17.2%
+-commutative17.2%
unpow217.2%
unpow217.2%
hypot-undefine32.3%
associate--r+49.5%
div-inv49.5%
div-sub28.7%
Applied egg-rr28.7%
Taylor expanded in A around -inf 65.8%
mul-1-neg65.8%
distribute-neg-frac265.8%
cancel-sign-sub-inv65.8%
metadata-eval65.8%
distribute-lft-out65.8%
associate-/l*69.0%
Simplified69.0%
if -2.8000000000000001e66 < A Initial program 59.0%
Simplified81.2%
Final simplification78.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -2.3e-118)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B -6e-213)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* B (/ C A)))) (- A))) PI))
(/ (* 180.0 (atan (+ t_0 -1.0))) PI)))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -2.3e-118) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= -6e-213) {
tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / ((double) M_PI));
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= -2.3e-118) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= -6e-213) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / Math.PI);
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= -2.3e-118: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= -6e-213: tmp = 180.0 * (math.atan(((-0.5 * (B + (B * (C / A)))) / -A)) / math.pi) else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= -2.3e-118) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= -6e-213) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(B * Float64(C / A)))) / Float64(-A))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= -2.3e-118) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= -6e-213) tmp = 180.0 * (atan(((-0.5 * (B + (B * (C / A)))) / -A)) / pi); else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, -2.3e-118], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -6e-213], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(B * N[(C / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -2.3 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq -6 \cdot 10^{-213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + B \cdot \frac{C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -2.30000000000000021e-118Initial program 48.7%
Taylor expanded in B around -inf 70.7%
associate--l+70.7%
div-sub70.7%
Simplified70.7%
if -2.30000000000000021e-118 < B < -5.99999999999999973e-213Initial program 40.5%
*-commutative40.5%
associate--l-36.2%
+-commutative36.2%
unpow236.2%
unpow236.2%
hypot-undefine43.1%
associate--r+69.4%
div-inv69.4%
div-sub38.2%
Applied egg-rr38.2%
Taylor expanded in A around -inf 65.1%
mul-1-neg65.1%
distribute-neg-frac265.1%
cancel-sign-sub-inv65.1%
metadata-eval65.1%
distribute-lft-out65.1%
associate-/l*65.1%
Simplified65.1%
if -5.99999999999999973e-213 < B Initial program 51.2%
Taylor expanded in B around 0 50.7%
Simplified71.0%
Taylor expanded in B around inf 62.0%
Taylor expanded in B around inf 64.5%
associate-*r/64.5%
Simplified64.5%
Final simplification66.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.95e-143)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 2.8e-101)
(* (atan (/ (* B -0.5) C)) (/ 180.0 PI))
(if (<= A 4.1e+33)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.95e-143) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 2.8e-101) {
tmp = atan(((B * -0.5) / C)) * (180.0 / ((double) M_PI));
} else if (A <= 4.1e+33) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.95e-143) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 2.8e-101) {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
} else if (A <= 4.1e+33) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.95e-143: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 2.8e-101: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) elif A <= 4.1e+33: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.95e-143) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 2.8e-101) tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); elseif (A <= 4.1e+33) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.95e-143) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 2.8e-101) tmp = atan(((B * -0.5) / C)) * (180.0 / pi); elseif (A <= 4.1e+33) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.95e-143], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.8e-101], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.1e+33], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.95 \cdot 10^{-143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-101}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 4.1 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.95000000000000002e-143Initial program 37.0%
Taylor expanded in A around -inf 55.3%
associate-*r/55.3%
Simplified55.3%
if -1.95000000000000002e-143 < A < 2.79999999999999989e-101Initial program 47.6%
Taylor expanded in C around inf 39.6%
Taylor expanded in A around inf 39.6%
Simplified39.6%
associate-*r/39.7%
Applied egg-rr39.7%
if 2.79999999999999989e-101 < A < 4.09999999999999995e33Initial program 48.4%
Taylor expanded in B around inf 49.7%
if 4.09999999999999995e33 < A Initial program 79.6%
associate-*l/79.6%
*-lft-identity79.6%
+-commutative79.6%
unpow279.6%
unpow279.6%
hypot-define98.1%
Simplified98.1%
Taylor expanded in A around inf 76.5%
*-commutative76.5%
Simplified76.5%
Final simplification54.8%
(FPCore (A B C)
:precision binary64
(if (<= A -2.6e-143)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 1.45e-103)
(* (/ 180.0 PI) (atan (* B (/ -0.5 C))))
(if (<= A 4.2e+33)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e-143) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 1.45e-103) {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / C)));
} else if (A <= 4.2e+33) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.6e-143) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 1.45e-103) {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / C)));
} else if (A <= 4.2e+33) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.6e-143: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 1.45e-103: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / C))) elif A <= 4.2e+33: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.6e-143) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 1.45e-103) tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / C)))); elseif (A <= 4.2e+33) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.6e-143) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 1.45e-103) tmp = (180.0 / pi) * atan((B * (-0.5 / C))); elseif (A <= 4.2e+33) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.6e-143], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.45e-103], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.2e+33], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.6 \cdot 10^{-143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.45 \cdot 10^{-103}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.59999999999999987e-143Initial program 37.0%
Taylor expanded in A around -inf 55.3%
associate-*r/55.3%
Simplified55.3%
if -2.59999999999999987e-143 < A < 1.4499999999999999e-103Initial program 47.6%
Taylor expanded in C around inf 39.6%
Taylor expanded in A around inf 39.6%
Simplified39.6%
if 1.4499999999999999e-103 < A < 4.2000000000000001e33Initial program 48.4%
Taylor expanded in B around inf 49.7%
if 4.2000000000000001e33 < A Initial program 79.6%
associate-*l/79.6%
*-lft-identity79.6%
+-commutative79.6%
unpow279.6%
unpow279.6%
hypot-define98.1%
Simplified98.1%
Taylor expanded in A around inf 76.5%
*-commutative76.5%
Simplified76.5%
Final simplification54.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.42e-143)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 3.9e-101)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 4.1e+33)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.42e-143) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 3.9e-101) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 4.1e+33) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.42e-143) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 3.9e-101) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 4.1e+33) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.42e-143: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 3.9e-101: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 4.1e+33: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.42e-143) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 3.9e-101) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 4.1e+33) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.42e-143) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 3.9e-101) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 4.1e+33) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.42e-143], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.9e-101], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.1e+33], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.42 \cdot 10^{-143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.9 \cdot 10^{-101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4.1 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.42e-143Initial program 37.0%
Taylor expanded in A around -inf 55.3%
associate-*r/55.3%
Simplified55.3%
if -1.42e-143 < A < 3.90000000000000015e-101Initial program 47.6%
Taylor expanded in C around inf 39.6%
Taylor expanded in A around inf 39.6%
if 3.90000000000000015e-101 < A < 4.09999999999999995e33Initial program 48.4%
Taylor expanded in B around inf 49.7%
if 4.09999999999999995e33 < A Initial program 79.6%
associate-*l/79.6%
*-lft-identity79.6%
+-commutative79.6%
unpow279.6%
unpow279.6%
hypot-define98.1%
Simplified98.1%
Taylor expanded in A around inf 76.5%
*-commutative76.5%
Simplified76.5%
Final simplification54.8%
(FPCore (A B C)
:precision binary64
(if (<= A -1.5e-144)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 7.6e-103)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= A 5.2e+33)
(* 180.0 (/ (atan -1.0) PI))
(* (/ 180.0 PI) (atan (/ A (- B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e-144) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 7.6e-103) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (A <= 5.2e+33) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((A / -B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.5e-144) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 7.6e-103) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (A <= 5.2e+33) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((A / -B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.5e-144: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 7.6e-103: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif A <= 5.2e+33: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((A / -B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.5e-144) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 7.6e-103) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (A <= 5.2e+33) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(A / Float64(-B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.5e-144) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 7.6e-103) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (A <= 5.2e+33) tmp = 180.0 * (atan(-1.0) / pi); else tmp = (180.0 / pi) * atan((A / -B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.5e-144], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7.6e-103], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.2e+33], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.5 \cdot 10^{-144}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 7.6 \cdot 10^{-103}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.2 \cdot 10^{+33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{A}{-B}\right)\\
\end{array}
\end{array}
if A < -1.4999999999999999e-144Initial program 37.0%
Taylor expanded in A around -inf 55.3%
associate-*r/55.3%
Simplified55.3%
if -1.4999999999999999e-144 < A < 7.6000000000000001e-103Initial program 47.6%
Taylor expanded in C around inf 39.6%
Taylor expanded in A around inf 39.6%
if 7.6000000000000001e-103 < A < 5.1999999999999995e33Initial program 48.4%
Taylor expanded in B around inf 49.7%
if 5.1999999999999995e33 < A Initial program 79.6%
Taylor expanded in B around 0 79.6%
Simplified98.2%
Taylor expanded in B around inf 91.1%
Taylor expanded in A around inf 75.2%
associate-*r/75.2%
mul-1-neg75.2%
Simplified75.2%
Final simplification54.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 1.9e-268)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 3.5e-238)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(/ (* 180.0 (atan (+ t_0 -1.0))) PI)))))
double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 1.9e-268) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 3.5e-238) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = (180.0 * atan((t_0 + -1.0))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (C - A) / B;
double tmp;
if (B <= 1.9e-268) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 3.5e-238) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = (180.0 * Math.atan((t_0 + -1.0))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = (C - A) / B tmp = 0 if B <= 1.9e-268: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 3.5e-238: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = (180.0 * math.atan((t_0 + -1.0))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(Float64(C - A) / B) tmp = 0.0 if (B <= 1.9e-268) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 3.5e-238) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(t_0 + -1.0))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (C - A) / B; tmp = 0.0; if (B <= 1.9e-268) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 3.5e-238) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = (180.0 * atan((t_0 + -1.0))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 1.9e-268], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.5e-238], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 1.9 \cdot 10^{-268}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.5 \cdot 10^{-238}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.9000000000000001e-268Initial program 53.3%
Taylor expanded in B around -inf 64.1%
associate--l+64.1%
div-sub67.2%
Simplified67.2%
if 1.9000000000000001e-268 < B < 3.49999999999999997e-238Initial program 37.4%
Taylor expanded in C around inf 84.0%
Taylor expanded in A around inf 84.0%
if 3.49999999999999997e-238 < B Initial program 46.2%
Taylor expanded in B around 0 46.4%
Simplified68.9%
Taylor expanded in B around inf 64.0%
Taylor expanded in B around inf 64.7%
associate-*r/64.7%
Simplified64.7%
Final simplification66.4%
(FPCore (A B C)
:precision binary64
(if (<= B 1.65e-140)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= B 2.4e+34)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.65e-140) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (B <= 2.4e+34) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 1.65e-140) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (B <= 2.4e+34) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 1.65e-140: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif B <= 2.4e+34: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 1.65e-140) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (B <= 2.4e+34) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 1.65e-140) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (B <= 2.4e+34) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1.65e-140], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e+34], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.65 \cdot 10^{-140}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{+34}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if B < 1.64999999999999994e-140Initial program 55.1%
Taylor expanded in B around -inf 61.3%
associate--l+61.3%
div-sub64.7%
Simplified64.7%
if 1.64999999999999994e-140 < B < 2.39999999999999987e34Initial program 39.9%
Taylor expanded in A around -inf 47.9%
associate-*r/47.9%
Simplified47.9%
if 2.39999999999999987e34 < B Initial program 42.6%
Taylor expanded in B around 0 42.7%
Simplified83.3%
Taylor expanded in B around inf 80.1%
Taylor expanded in C around 0 73.2%
neg-mul-173.2%
distribute-neg-in73.2%
metadata-eval73.2%
unsub-neg73.2%
Simplified73.2%
Final simplification64.2%
(FPCore (A B C)
:precision binary64
(if (<= A -8.5e+19)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= A 9e-167)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e+19) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 9e-167) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -8.5e+19) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (A <= 9e-167) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -8.5e+19: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif A <= 9e-167: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -8.5e+19) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (A <= 9e-167) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -8.5e+19) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (A <= 9e-167) tmp = (180.0 / pi) * atan(((C - B) / B)); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -8.5e+19], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 9e-167], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -8.5 \cdot 10^{+19}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 9 \cdot 10^{-167}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -8.5e19Initial program 23.1%
associate-*l/23.1%
*-lft-identity23.1%
+-commutative23.1%
unpow223.1%
unpow223.1%
hypot-define51.2%
Simplified51.2%
Taylor expanded in A around -inf 57.5%
associate-*r/57.5%
associate-/l*57.5%
Applied egg-rr57.5%
Taylor expanded in B around 0 65.9%
if -8.5e19 < A < 9.0000000000000002e-167Initial program 53.8%
Taylor expanded in B around 0 53.8%
Simplified73.9%
Taylor expanded in B around inf 43.2%
Taylor expanded in A around 0 43.7%
if 9.0000000000000002e-167 < A Initial program 68.6%
Taylor expanded in B around 0 68.6%
Simplified93.6%
Taylor expanded in B around inf 77.4%
Taylor expanded in C around 0 76.8%
neg-mul-176.8%
distribute-neg-in76.8%
metadata-eval76.8%
unsub-neg76.8%
Simplified76.8%
(FPCore (A B C)
:precision binary64
(if (<= A -6e+19)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 5.4e-165)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6e+19) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 5.4e-165) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6e+19) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 5.4e-165) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6e+19: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 5.4e-165: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6e+19) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 5.4e-165) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6e+19) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 5.4e-165) tmp = (180.0 / pi) * atan(((C - B) / B)); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6e+19], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 5.4e-165], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6 \cdot 10^{+19}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.4 \cdot 10^{-165}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -6e19Initial program 23.1%
Taylor expanded in A around -inf 65.8%
associate-*r/65.8%
Simplified65.8%
if -6e19 < A < 5.3999999999999995e-165Initial program 53.8%
Taylor expanded in B around 0 53.8%
Simplified73.9%
Taylor expanded in B around inf 43.2%
Taylor expanded in A around 0 43.7%
if 5.3999999999999995e-165 < A Initial program 68.6%
Taylor expanded in B around 0 68.6%
Simplified93.6%
Taylor expanded in B around inf 77.4%
Taylor expanded in C around 0 76.8%
neg-mul-176.8%
distribute-neg-in76.8%
metadata-eval76.8%
unsub-neg76.8%
Simplified76.8%
Final simplification60.4%
(FPCore (A B C)
:precision binary64
(if (<= A -1.02e-143)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 1.02e-103)
(* (atan (/ (* B -0.5) C)) (/ 180.0 PI))
(* (/ 180.0 PI) (atan (- -1.0 (/ A B)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e-143) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 1.02e-103) {
tmp = atan(((B * -0.5) / C)) * (180.0 / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-1.0 - (A / B)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.02e-143) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 1.02e-103) {
tmp = Math.atan(((B * -0.5) / C)) * (180.0 / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-1.0 - (A / B)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.02e-143: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 1.02e-103: tmp = math.atan(((B * -0.5) / C)) * (180.0 / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-1.0 - (A / B))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.02e-143) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 1.02e-103) tmp = Float64(atan(Float64(Float64(B * -0.5) / C)) * Float64(180.0 / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-1.0 - Float64(A / B)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.02e-143) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 1.02e-103) tmp = atan(((B * -0.5) / C)) * (180.0 / pi); else tmp = (180.0 / pi) * atan((-1.0 - (A / B))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.02e-143], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.02e-103], N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.02 \cdot 10^{-143}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.02 \cdot 10^{-103}:\\
\;\;\;\;\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)\\
\end{array}
\end{array}
if A < -1.02e-143Initial program 37.0%
Taylor expanded in A around -inf 55.3%
associate-*r/55.3%
Simplified55.3%
if -1.02e-143 < A < 1.01999999999999998e-103Initial program 47.6%
Taylor expanded in C around inf 39.6%
Taylor expanded in A around inf 39.6%
Simplified39.6%
associate-*r/39.7%
Applied egg-rr39.7%
if 1.01999999999999998e-103 < A Initial program 70.6%
Taylor expanded in B around 0 70.6%
Simplified97.4%
Taylor expanded in B around inf 82.0%
Taylor expanded in C around 0 81.0%
neg-mul-181.0%
distribute-neg-in81.0%
metadata-eval81.0%
unsub-neg81.0%
Simplified81.0%
Final simplification58.3%
(FPCore (A B C)
:precision binary64
(if (<= C -6.6e-29)
(* (/ 180.0 PI) (atan (/ C B)))
(if (<= C 1.3e-91)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -6.6e-29) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} else if (C <= 1.3e-91) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -6.6e-29) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else if (C <= 1.3e-91) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -6.6e-29: tmp = (180.0 / math.pi) * math.atan((C / B)) elif C <= 1.3e-91: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -6.6e-29) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); elseif (C <= 1.3e-91) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -6.6e-29) tmp = (180.0 / pi) * atan((C / B)); elseif (C <= 1.3e-91) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -6.6e-29], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.3e-91], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6.6 \cdot 10^{-29}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{elif}\;C \leq 1.3 \cdot 10^{-91}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -6.60000000000000055e-29Initial program 68.0%
Taylor expanded in B around 0 68.3%
Simplified86.3%
Taylor expanded in B around inf 69.4%
Taylor expanded in C around inf 63.5%
if -6.60000000000000055e-29 < C < 1.30000000000000007e-91Initial program 53.0%
Taylor expanded in B around -inf 32.2%
if 1.30000000000000007e-91 < C Initial program 29.8%
Taylor expanded in C around inf 59.9%
Taylor expanded in A around inf 59.9%
(FPCore (A B C)
:precision binary64
(if (<= B -2.55e-87)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.5e-122)
(* (/ 180.0 PI) (atan (/ C B)))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.55e-87) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.5e-122) {
tmp = (180.0 / ((double) M_PI)) * atan((C / B));
} 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 <= -2.55e-87) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.5e-122) {
tmp = (180.0 / Math.PI) * Math.atan((C / B));
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -2.55e-87: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.5e-122: tmp = (180.0 / math.pi) * math.atan((C / B)) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -2.55e-87) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.5e-122) tmp = Float64(Float64(180.0 / pi) * atan(Float64(C / B))); 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 <= -2.55e-87) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.5e-122) tmp = (180.0 / pi) * atan((C / B)); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -2.55e-87], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.5e-122], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -2.55 \cdot 10^{-87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.55000000000000012e-87Initial program 47.2%
Taylor expanded in B around -inf 55.8%
if -2.55000000000000012e-87 < B < 2.4999999999999999e-122Initial program 60.1%
Taylor expanded in B around 0 57.8%
Simplified65.4%
Taylor expanded in B around inf 49.1%
Taylor expanded in C around inf 41.2%
if 2.4999999999999999e-122 < B Initial program 42.5%
Taylor expanded in B around inf 50.0%
(FPCore (A B C)
:precision binary64
(if (<= B -2.5e-79)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 2.4e-206)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.5e-79) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 2.4e-206) {
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 <= -2.5e-79) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 2.4e-206) {
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 <= -2.5e-79: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 2.4e-206: 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 <= -2.5e-79) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 2.4e-206) tmp = Float64(180.0 * Float64(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 <= -2.5e-79) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 2.4e-206) 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, -2.5e-79], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-206], N[(180.0 * N[(N[ArcTan[0.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 -2.5 \cdot 10^{-79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.5e-79Initial program 48.4%
Taylor expanded in B around -inf 57.2%
if -2.5e-79 < B < 2.4e-206Initial program 57.0%
Taylor expanded in C around inf 29.9%
Taylor expanded in B around 0 27.8%
distribute-rgt1-in27.8%
metadata-eval27.8%
mul0-lft27.8%
div027.8%
metadata-eval27.8%
Simplified27.8%
if 2.4e-206 < B Initial program 45.9%
Taylor expanded in B around inf 45.0%
(FPCore (A B C) :precision binary64 (if (<= B 1.9e-206) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1.9e-206) {
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 <= 1.9e-206) {
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 <= 1.9e-206: 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 <= 1.9e-206) tmp = Float64(180.0 * Float64(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 <= 1.9e-206) 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, 1.9e-206], N[(180.0 * N[(N[ArcTan[0.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.9 \cdot 10^{-206}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 1.90000000000000001e-206Initial program 52.6%
Taylor expanded in C around inf 28.1%
Taylor expanded in B around 0 15.4%
distribute-rgt1-in15.4%
metadata-eval15.4%
mul0-lft15.4%
div015.4%
metadata-eval15.4%
Simplified15.4%
if 1.90000000000000001e-206 < B Initial program 45.9%
Taylor expanded in B around inf 45.0%
(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 49.5%
Taylor expanded in B around inf 22.2%
herbie shell --seed 2024165
(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)))