
(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 21 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 9.2e+89) (/ 180.0 (/ PI (atan (/ (- (- C A) (hypot B (- A C))) B)))) (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 9.2e+89) {
tmp = 180.0 / (((double) M_PI) / atan((((C - A) - hypot(B, (A - C))) / B)));
} 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 <= 9.2e+89) {
tmp = 180.0 / (Math.PI / Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)));
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 9.2e+89: tmp = 180.0 / (math.pi / math.atan((((C - A) - math.hypot(B, (A - C))) / B))) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 9.2e+89) tmp = Float64(180.0 / Float64(pi / atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)))); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 9.2e+89) tmp = 180.0 / (pi / atan((((C - A) - hypot(B, (A - C))) / B))); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 9.2e+89], N[(180.0 / N[(Pi / N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 9.2 \cdot 10^{+89}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 9.1999999999999996e89Initial program 63.5%
*-commutative63.5%
associate--l-62.9%
+-commutative62.9%
unpow262.9%
unpow262.9%
hypot-undefine80.2%
div-inv80.2%
clear-num80.2%
un-div-inv80.2%
Applied egg-rr84.7%
if 9.1999999999999996e89 < C Initial program 15.1%
associate-*r/15.1%
Applied egg-rr52.8%
Taylor expanded in C around inf 82.5%
distribute-rgt1-in82.5%
metadata-eval82.5%
mul0-lft82.5%
div082.5%
metadata-eval82.5%
*-commutative82.5%
metadata-eval82.5%
associate-+l-82.5%
neg-sub082.5%
*-commutative82.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
neg-sub082.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
Simplified82.5%
(FPCore (A B C)
:precision binary64
(if (<= C -5.9e-34)
(* (atan (/ (- C (hypot C B)) B)) (/ 180.0 PI))
(if (<= C 6.5e+86)
(/ 1.0 (* (/ PI (atan (/ (+ A (hypot A B)) (- B)))) 0.005555555555555556))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -5.9e-34) {
tmp = atan(((C - hypot(C, B)) / B)) * (180.0 / ((double) M_PI));
} else if (C <= 6.5e+86) {
tmp = 1.0 / ((((double) M_PI) / atan(((A + hypot(A, B)) / -B))) * 0.005555555555555556);
} 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 <= -5.9e-34) {
tmp = Math.atan(((C - Math.hypot(C, B)) / B)) * (180.0 / Math.PI);
} else if (C <= 6.5e+86) {
tmp = 1.0 / ((Math.PI / Math.atan(((A + Math.hypot(A, B)) / -B))) * 0.005555555555555556);
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -5.9e-34: tmp = math.atan(((C - math.hypot(C, B)) / B)) * (180.0 / math.pi) elif C <= 6.5e+86: tmp = 1.0 / ((math.pi / math.atan(((A + math.hypot(A, B)) / -B))) * 0.005555555555555556) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= -5.9e-34) tmp = Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) * Float64(180.0 / pi)); elseif (C <= 6.5e+86) tmp = Float64(1.0 / Float64(Float64(pi / atan(Float64(Float64(A + hypot(A, B)) / Float64(-B)))) * 0.005555555555555556)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -5.9e-34) tmp = atan(((C - hypot(C, B)) / B)) * (180.0 / pi); elseif (C <= 6.5e+86) tmp = 1.0 / ((pi / atan(((A + hypot(A, B)) / -B))) * 0.005555555555555556); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -5.9e-34], N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.5e+86], N[(1.0 / N[(N[(Pi / N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.9 \cdot 10^{-34}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;C \leq 6.5 \cdot 10^{+86}:\\
\;\;\;\;\frac{1}{\frac{\pi}{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)} \cdot 0.005555555555555556}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.9000000000000002e-34Initial program 80.1%
associate-*r/80.1%
Applied egg-rr95.7%
Taylor expanded in A around 0 78.5%
+-commutative78.5%
unpow278.5%
unpow278.5%
hypot-define91.2%
Simplified91.2%
Taylor expanded in C around 0 78.5%
associate-*r/78.5%
*-commutative78.5%
div-sub78.5%
+-commutative78.5%
unpow278.5%
unpow278.5%
hypot-undefine91.2%
div-sub91.2%
associate-/l*91.2%
Simplified91.2%
if -5.9000000000000002e-34 < C < 6.49999999999999996e86Initial program 55.9%
associate-*r/55.9%
Applied egg-rr79.7%
clear-num79.6%
inv-pow79.6%
associate--l-75.1%
Applied egg-rr75.1%
unpow-175.1%
*-rgt-identity75.1%
*-commutative75.1%
times-frac75.1%
metadata-eval75.1%
Simplified75.1%
Taylor expanded in C around 0 55.2%
mul-1-neg55.2%
unpow255.2%
unpow255.2%
hypot-define79.0%
Simplified79.0%
if 6.49999999999999996e86 < C Initial program 15.1%
associate-*r/15.1%
Applied egg-rr52.8%
Taylor expanded in C around inf 82.5%
distribute-rgt1-in82.5%
metadata-eval82.5%
mul0-lft82.5%
div082.5%
metadata-eval82.5%
*-commutative82.5%
metadata-eval82.5%
associate-+l-82.5%
neg-sub082.5%
*-commutative82.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
neg-sub082.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
Simplified82.5%
Final simplification82.8%
(FPCore (A B C)
:precision binary64
(if (<= C -3.7e-34)
(* (atan (/ (- C (hypot C B)) B)) (/ 180.0 PI))
(if (<= C 2.7e+87)
(/ (* 180.0 (atan (/ (+ A (hypot A B)) (- B)))) PI)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -3.7e-34) {
tmp = atan(((C - hypot(C, B)) / B)) * (180.0 / ((double) M_PI));
} else if (C <= 2.7e+87) {
tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / ((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 <= -3.7e-34) {
tmp = Math.atan(((C - Math.hypot(C, B)) / B)) * (180.0 / Math.PI);
} else if (C <= 2.7e+87) {
tmp = (180.0 * Math.atan(((A + Math.hypot(A, B)) / -B))) / 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 <= -3.7e-34: tmp = math.atan(((C - math.hypot(C, B)) / B)) * (180.0 / math.pi) elif C <= 2.7e+87: tmp = (180.0 * math.atan(((A + math.hypot(A, B)) / -B))) / 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 <= -3.7e-34) tmp = Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) * Float64(180.0 / pi)); elseif (C <= 2.7e+87) tmp = Float64(Float64(180.0 * atan(Float64(Float64(A + hypot(A, B)) / Float64(-B)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -3.7e-34) tmp = atan(((C - hypot(C, B)) / B)) * (180.0 / pi); elseif (C <= 2.7e+87) tmp = (180.0 * atan(((A + hypot(A, B)) / -B))) / pi; else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -3.7e-34], N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.7e+87], N[(N[(180.0 * N[ArcTan[N[(N[(A + N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / (-B)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -3.7 \cdot 10^{-34}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;C \leq 2.7 \cdot 10^{+87}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -3.69999999999999988e-34Initial program 80.1%
associate-*r/80.1%
Applied egg-rr95.7%
Taylor expanded in A around 0 78.5%
+-commutative78.5%
unpow278.5%
unpow278.5%
hypot-define91.2%
Simplified91.2%
Taylor expanded in C around 0 78.5%
associate-*r/78.5%
*-commutative78.5%
div-sub78.5%
+-commutative78.5%
unpow278.5%
unpow278.5%
hypot-undefine91.2%
div-sub91.2%
associate-/l*91.2%
Simplified91.2%
if -3.69999999999999988e-34 < C < 2.70000000000000007e87Initial program 55.9%
associate-*r/55.9%
Applied egg-rr79.7%
Taylor expanded in C around 0 55.2%
mul-1-neg55.2%
distribute-neg-frac255.2%
unpow255.2%
unpow255.2%
hypot-define78.9%
Simplified78.9%
if 2.70000000000000007e87 < C Initial program 15.1%
associate-*r/15.1%
Applied egg-rr52.8%
Taylor expanded in C around inf 82.5%
distribute-rgt1-in82.5%
metadata-eval82.5%
mul0-lft82.5%
div082.5%
metadata-eval82.5%
*-commutative82.5%
metadata-eval82.5%
associate-+l-82.5%
neg-sub082.5%
*-commutative82.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
neg-sub082.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
Simplified82.5%
(FPCore (A B C)
:precision binary64
(if (<= C -2.25e-35)
(* (atan (/ (- C (hypot C B)) B)) (/ 180.0 PI))
(if (<= C 3.05e+88)
(* 180.0 (/ (atan (/ (+ A (hypot A B)) (- B))) PI))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.25e-35) {
tmp = atan(((C - hypot(C, B)) / B)) * (180.0 / ((double) M_PI));
} else if (C <= 3.05e+88) {
tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / ((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 <= -2.25e-35) {
tmp = Math.atan(((C - Math.hypot(C, B)) / B)) * (180.0 / Math.PI);
} else if (C <= 3.05e+88) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(A, B)) / -B)) / 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 <= -2.25e-35: tmp = math.atan(((C - math.hypot(C, B)) / B)) * (180.0 / math.pi) elif C <= 3.05e+88: tmp = 180.0 * (math.atan(((A + math.hypot(A, B)) / -B)) / 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 <= -2.25e-35) tmp = Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) * Float64(180.0 / pi)); elseif (C <= 3.05e+88) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(A, B)) / Float64(-B))) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.25e-35) tmp = atan(((C - hypot(C, B)) / B)) * (180.0 / pi); elseif (C <= 3.05e+88) tmp = 180.0 * (atan(((A + hypot(A, B)) / -B)) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.25e-35], N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.05e+88], 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[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.25 \cdot 10^{-35}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;C \leq 3.05 \cdot 10^{+88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(A, B\right)}{-B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -2.25000000000000005e-35Initial program 80.1%
associate-*r/80.1%
Applied egg-rr95.7%
Taylor expanded in A around 0 78.5%
+-commutative78.5%
unpow278.5%
unpow278.5%
hypot-define91.2%
Simplified91.2%
Taylor expanded in C around 0 78.5%
associate-*r/78.5%
*-commutative78.5%
div-sub78.5%
+-commutative78.5%
unpow278.5%
unpow278.5%
hypot-undefine91.2%
div-sub91.2%
associate-/l*91.2%
Simplified91.2%
if -2.25000000000000005e-35 < C < 3.0499999999999999e88Initial program 55.9%
Taylor expanded in C around 0 55.2%
associate-*r/55.2%
mul-1-neg55.2%
unpow255.2%
unpow255.2%
hypot-define78.9%
Simplified78.9%
if 3.0499999999999999e88 < C Initial program 15.1%
associate-*r/15.1%
Applied egg-rr52.8%
Taylor expanded in C around inf 82.5%
distribute-rgt1-in82.5%
metadata-eval82.5%
mul0-lft82.5%
div082.5%
metadata-eval82.5%
*-commutative82.5%
metadata-eval82.5%
associate-+l-82.5%
neg-sub082.5%
*-commutative82.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
neg-sub082.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
Simplified82.5%
Final simplification82.7%
(FPCore (A B C)
:precision binary64
(if (<= A -2.3e+94)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* C B) A))) (- A))) PI))
(if (<= A 1.55e-13)
(* (atan (/ (- C (hypot C B)) B)) (/ 180.0 PI))
(/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e+94) {
tmp = 180.0 * (atan(((-0.5 * (B + ((C * B) / A))) / -A)) / ((double) M_PI));
} else if (A <= 1.55e-13) {
tmp = atan(((C - hypot(C, B)) / B)) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.3e+94) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((C * B) / A))) / -A)) / Math.PI);
} else if (A <= 1.55e-13) {
tmp = Math.atan(((C - Math.hypot(C, B)) / B)) * (180.0 / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.3e+94: tmp = 180.0 * (math.atan(((-0.5 * (B + ((C * B) / A))) / -A)) / math.pi) elif A <= 1.55e-13: tmp = math.atan(((C - math.hypot(C, B)) / B)) * (180.0 / math.pi) else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.3e+94) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(C * B) / A))) / Float64(-A))) / pi)); elseif (A <= 1.55e-13) tmp = Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) * Float64(180.0 / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.3e+94) tmp = 180.0 * (atan(((-0.5 * (B + ((C * B) / A))) / -A)) / pi); elseif (A <= 1.55e-13) tmp = atan(((C - hypot(C, B)) / B)) * (180.0 / pi); else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.3e+94], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(C * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.55e-13], N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.3 \cdot 10^{+94}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{C \cdot B}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{-13}:\\
\;\;\;\;\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -2.3e94Initial program 14.8%
Taylor expanded in A around -inf 73.1%
associate-*r/73.1%
mul-1-neg73.1%
distribute-lft-out73.1%
*-commutative73.1%
Simplified73.1%
if -2.3e94 < A < 1.55e-13Initial program 57.6%
associate-*r/57.6%
Applied egg-rr80.5%
Taylor expanded in A around 0 54.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-define77.7%
Simplified77.7%
Taylor expanded in C around 0 54.7%
associate-*r/54.7%
*-commutative54.7%
div-sub51.9%
+-commutative51.9%
unpow251.9%
unpow251.9%
hypot-undefine68.3%
div-sub77.7%
associate-/l*77.7%
Simplified77.7%
if 1.55e-13 < A Initial program 76.3%
*-commutative76.3%
associate--l-76.3%
+-commutative76.3%
unpow276.3%
unpow276.3%
hypot-undefine95.0%
div-inv95.0%
clear-num95.1%
un-div-inv95.1%
Applied egg-rr95.1%
Taylor expanded in B around -inf 85.8%
associate--l+85.8%
div-sub85.9%
Simplified85.9%
Final simplification78.8%
(FPCore (A B C)
:precision binary64
(if (<= A -3.6e+86)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* C B) A))) (- A))) PI))
(if (<= A 3.3e-13)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.6e+86) {
tmp = 180.0 * (atan(((-0.5 * (B + ((C * B) / A))) / -A)) / ((double) M_PI));
} else if (A <= 3.3e-13) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.6e+86) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((C * B) / A))) / -A)) / Math.PI);
} else if (A <= 3.3e-13) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.6e+86: tmp = 180.0 * (math.atan(((-0.5 * (B + ((C * B) / A))) / -A)) / math.pi) elif A <= 3.3e-13: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.6e+86) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(C * B) / A))) / Float64(-A))) / pi)); elseif (A <= 3.3e-13) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.6e+86) tmp = 180.0 * (atan(((-0.5 * (B + ((C * B) / A))) / -A)) / pi); elseif (A <= 3.3e-13) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.6e+86], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(C * B), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.3e-13], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.6 \cdot 10^{+86}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{C \cdot B}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.3 \cdot 10^{-13}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\end{array}
\end{array}
if A < -3.60000000000000005e86Initial program 14.8%
Taylor expanded in A around -inf 73.1%
associate-*r/73.1%
mul-1-neg73.1%
distribute-lft-out73.1%
*-commutative73.1%
Simplified73.1%
if -3.60000000000000005e86 < A < 3.3000000000000001e-13Initial program 57.6%
Taylor expanded in A around 0 54.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-define77.7%
Simplified77.7%
if 3.3000000000000001e-13 < A Initial program 76.3%
*-commutative76.3%
associate--l-76.3%
+-commutative76.3%
unpow276.3%
unpow276.3%
hypot-undefine95.0%
div-inv95.0%
clear-num95.1%
un-div-inv95.1%
Applied egg-rr95.1%
Taylor expanded in B around -inf 85.8%
associate--l+85.8%
div-sub85.9%
Simplified85.9%
Final simplification78.8%
(FPCore (A B C) :precision binary64 (if (<= C 5.1e+88) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI)) (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 5.1e+88) {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((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 <= 5.1e+88) {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / 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 <= 5.1e+88: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / 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 <= 5.1e+88) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 5.1e+88) tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 5.1e+88], 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[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 5.1 \cdot 10^{+88}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 5.0999999999999997e88Initial program 63.5%
associate-*l/63.5%
*-lft-identity63.5%
+-commutative63.5%
unpow263.5%
unpow263.5%
hypot-define84.7%
Simplified84.7%
if 5.0999999999999997e88 < C Initial program 15.1%
associate-*r/15.1%
Applied egg-rr52.8%
Taylor expanded in C around inf 82.5%
distribute-rgt1-in82.5%
metadata-eval82.5%
mul0-lft82.5%
div082.5%
metadata-eval82.5%
*-commutative82.5%
metadata-eval82.5%
associate-+l-82.5%
neg-sub082.5%
*-commutative82.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
neg-sub082.5%
distribute-lft-neg-in82.5%
metadata-eval82.5%
Simplified82.5%
(FPCore (A B C) :precision binary64 (if (<= A -4.5e+96) (* 180.0 (/ (atan (/ (* -0.5 (+ B (/ (* C B) 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 <= -4.5e+96) {
tmp = 180.0 * (atan(((-0.5 * (B + ((C * B) / 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 <= -4.5e+96) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + ((C * B) / 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 <= -4.5e+96: tmp = 180.0 * (math.atan(((-0.5 * (B + ((C * B) / 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 <= -4.5e+96) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(C * B) / 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 <= -4.5e+96) tmp = 180.0 * (atan(((-0.5 * (B + ((C * B) / 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, -4.5e+96], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(C * B), $MachinePrecision] / A), $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 -4.5 \cdot 10^{+96}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{C \cdot B}{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 < -4.49999999999999957e96Initial program 14.8%
Taylor expanded in A around -inf 73.1%
associate-*r/73.1%
mul-1-neg73.1%
distribute-lft-out73.1%
*-commutative73.1%
Simplified73.1%
if -4.49999999999999957e96 < A Initial program 62.6%
Simplified84.3%
Final simplification82.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -3.6e-96)
(/ 180.0 (/ PI (atan (+ 1.0 t_0))))
(if (<= B -2.4e-253)
(* 180.0 (/ (atan (/ (* -0.5 (+ B (* A (/ B C)))) 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 <= -3.6e-96) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + t_0)));
} else if (B <= -2.4e-253) {
tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / 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 <= -3.6e-96) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + t_0)));
} else if (B <= -2.4e-253) {
tmp = 180.0 * (Math.atan(((-0.5 * (B + (A * (B / C)))) / 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 <= -3.6e-96: tmp = 180.0 / (math.pi / math.atan((1.0 + t_0))) elif B <= -2.4e-253: tmp = 180.0 * (math.atan(((-0.5 * (B + (A * (B / C)))) / 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 <= -3.6e-96) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + t_0)))); elseif (B <= -2.4e-253) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(A * Float64(B / C)))) / 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 <= -3.6e-96) tmp = 180.0 / (pi / atan((1.0 + t_0))); elseif (B <= -2.4e-253) tmp = 180.0 * (atan(((-0.5 * (B + (A * (B / C)))) / 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, -3.6e-96], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.4e-253], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(A * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $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 -3.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + t\_0\right)}}\\
\mathbf{elif}\;B \leq -2.4 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + A \cdot \frac{B}{C}\right)}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.60000000000000008e-96Initial program 55.1%
*-commutative55.1%
associate--l-55.1%
+-commutative55.1%
unpow255.1%
unpow255.1%
hypot-undefine81.3%
div-inv81.3%
clear-num81.4%
un-div-inv81.3%
Applied egg-rr81.9%
Taylor expanded in B around -inf 79.1%
associate--l+79.1%
div-sub79.1%
Simplified79.1%
if -3.60000000000000008e-96 < B < -2.40000000000000009e-253Initial program 46.6%
Taylor expanded in C around inf 55.0%
Taylor expanded in C around -inf 55.4%
distribute-rgt1-in55.4%
metadata-eval55.4%
mul0-lft55.4%
associate-*r/55.4%
metadata-eval55.4%
mul0-lft55.4%
metadata-eval55.4%
distribute-rgt1-in55.4%
mul-1-neg55.4%
unsub-neg55.4%
distribute-rgt1-in55.4%
metadata-eval55.4%
mul0-lft55.4%
div055.4%
neg-sub055.4%
mul-1-neg55.4%
associate-*r/55.4%
Simplified55.4%
if -2.40000000000000009e-253 < B Initial program 57.1%
associate-*r/57.1%
Applied egg-rr78.4%
Taylor expanded in B around inf 66.1%
+-commutative66.1%
associate--r+66.1%
div-sub67.6%
Simplified67.6%
Final simplification69.1%
(FPCore (A B C)
:precision binary64
(if (<= B -3.8e-96)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(if (<= B 2.7e-252)
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)
(/ (* 180.0 (atan (/ (- C B) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-96) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
} else if (B <= 2.7e-252) {
tmp = (180.0 * atan((-0.5 * (B / C)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan(((C - B) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e-96) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
} else if (B <= 2.7e-252) {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan(((C - B) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -3.8e-96: tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B))) elif B <= 2.7e-252: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi else: tmp = (180.0 * math.atan(((C - B) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -3.8e-96) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))); elseif (B <= 2.7e-252) tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - B) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -3.8e-96) tmp = (180.0 / pi) * atan((1.0 + (C / B))); elseif (B <= 2.7e-252) tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; else tmp = (180.0 * atan(((C - B) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.8e-96], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.7e-252], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3.8 \cdot 10^{-96}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{elif}\;B \leq 2.7 \cdot 10^{-252}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -3.8000000000000001e-96Initial program 55.1%
associate-*r/55.1%
Applied egg-rr81.9%
Taylor expanded in A around 0 48.2%
+-commutative48.2%
unpow248.2%
unpow248.2%
hypot-define72.4%
Simplified72.4%
Taylor expanded in C around 0 48.2%
associate-*r/48.2%
*-commutative48.2%
div-sub48.2%
+-commutative48.2%
unpow248.2%
unpow248.2%
hypot-undefine72.4%
div-sub72.4%
associate-/l*72.5%
Simplified72.5%
Taylor expanded in B around -inf 70.2%
+-commutative70.2%
Simplified70.2%
if -3.8000000000000001e-96 < B < 2.69999999999999981e-252Initial program 53.9%
associate-*r/54.0%
Applied egg-rr77.7%
Taylor expanded in C around inf 44.0%
distribute-rgt1-in44.0%
metadata-eval44.0%
mul0-lft44.0%
div044.0%
metadata-eval44.0%
*-commutative44.0%
metadata-eval44.0%
associate-+l-44.0%
neg-sub044.0%
*-commutative44.0%
distribute-lft-neg-in44.0%
metadata-eval44.0%
neg-sub044.0%
distribute-lft-neg-in44.0%
metadata-eval44.0%
Simplified44.0%
if 2.69999999999999981e-252 < B Initial program 55.1%
associate-*r/55.1%
Applied egg-rr77.8%
Taylor expanded in A around 0 46.5%
+-commutative46.5%
unpow246.5%
unpow246.5%
hypot-define64.7%
Simplified64.7%
Taylor expanded in C around 0 60.4%
Final simplification59.3%
(FPCore (A B C)
:precision binary64
(if (<= C -8e-278)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(if (<= C 2.5e-213)
(* 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 <= -8e-278) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
} else if (C <= 2.5e-213) {
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 <= -8e-278) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
} else if (C <= 2.5e-213) {
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 <= -8e-278: tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B))) elif C <= 2.5e-213: 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 <= -8e-278) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))); elseif (C <= 2.5e-213) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8e-278) tmp = (180.0 / pi) * atan((1.0 + (C / B))); elseif (C <= 2.5e-213) 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, -8e-278], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 2.5e-213], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8 \cdot 10^{-278}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{elif}\;C \leq 2.5 \cdot 10^{-213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -7.9999999999999995e-278Initial program 70.7%
associate-*r/70.7%
Applied egg-rr90.1%
Taylor expanded in A around 0 63.3%
+-commutative63.3%
unpow263.3%
unpow263.3%
hypot-define78.4%
Simplified78.4%
Taylor expanded in C around 0 63.3%
associate-*r/63.3%
*-commutative63.3%
div-sub63.3%
+-commutative63.3%
unpow263.3%
unpow263.3%
hypot-undefine78.4%
div-sub78.4%
associate-/l*78.5%
Simplified78.5%
Taylor expanded in B around -inf 65.4%
+-commutative65.4%
Simplified65.4%
if -7.9999999999999995e-278 < C < 2.49999999999999989e-213Initial program 50.8%
Taylor expanded in B around inf 51.6%
if 2.49999999999999989e-213 < C Initial program 41.6%
associate-*r/41.6%
Applied egg-rr67.6%
Taylor expanded in C around inf 55.0%
distribute-rgt1-in55.0%
metadata-eval55.0%
mul0-lft55.0%
div055.0%
metadata-eval55.0%
*-commutative55.0%
metadata-eval55.0%
associate-+l-55.0%
neg-sub055.0%
*-commutative55.0%
distribute-lft-neg-in55.0%
metadata-eval55.0%
neg-sub055.0%
distribute-lft-neg-in55.0%
metadata-eval55.0%
Simplified55.0%
Final simplification59.1%
(FPCore (A B C)
:precision binary64
(if (<= C -2.5e-280)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(if (<= C 3.2e-222)
(* 180.0 (/ (atan -1.0) PI))
(/ 180.0 (/ PI (atan (* -0.5 (/ B C))))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -2.5e-280) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
} else if (C <= 3.2e-222) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 / (((double) M_PI) / atan((-0.5 * (B / C))));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -2.5e-280) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
} else if (C <= 3.2e-222) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 / (Math.PI / Math.atan((-0.5 * (B / C))));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -2.5e-280: tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B))) elif C <= 3.2e-222: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 / (math.pi / math.atan((-0.5 * (B / C)))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -2.5e-280) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))); elseif (C <= 3.2e-222) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 / Float64(pi / atan(Float64(-0.5 * Float64(B / C))))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -2.5e-280) tmp = (180.0 / pi) * atan((1.0 + (C / B))); elseif (C <= 3.2e-222) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 / (pi / atan((-0.5 * (B / C)))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -2.5e-280], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.2e-222], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 / N[(Pi / N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.5 \cdot 10^{-280}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{elif}\;C \leq 3.2 \cdot 10^{-222}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}}\\
\end{array}
\end{array}
if C < -2.50000000000000014e-280Initial program 70.7%
associate-*r/70.7%
Applied egg-rr90.1%
Taylor expanded in A around 0 63.3%
+-commutative63.3%
unpow263.3%
unpow263.3%
hypot-define78.4%
Simplified78.4%
Taylor expanded in C around 0 63.3%
associate-*r/63.3%
*-commutative63.3%
div-sub63.3%
+-commutative63.3%
unpow263.3%
unpow263.3%
hypot-undefine78.4%
div-sub78.4%
associate-/l*78.5%
Simplified78.5%
Taylor expanded in B around -inf 65.4%
+-commutative65.4%
Simplified65.4%
if -2.50000000000000014e-280 < C < 3.1999999999999999e-222Initial program 50.8%
Taylor expanded in B around inf 51.6%
if 3.1999999999999999e-222 < C Initial program 41.6%
*-commutative41.6%
associate--l-41.4%
+-commutative41.4%
unpow241.4%
unpow241.4%
hypot-undefine63.0%
div-inv63.0%
clear-num63.1%
un-div-inv63.0%
Applied egg-rr67.6%
Taylor expanded in C around inf 54.4%
distribute-rgt1-in55.0%
metadata-eval55.0%
mul0-lft55.0%
div055.0%
metadata-eval55.0%
*-commutative55.0%
metadata-eval55.0%
associate-+l-55.0%
neg-sub055.0%
*-commutative55.0%
distribute-lft-neg-in55.0%
metadata-eval55.0%
neg-sub055.0%
distribute-lft-neg-in55.0%
metadata-eval55.0%
Simplified54.4%
Final simplification58.8%
(FPCore (A B C)
:precision binary64
(if (<= A -6.2e-51)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 6.9e+75)
(* (/ 180.0 PI) (atan (+ 1.0 (/ C B))))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e-51) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 6.9e+75) {
tmp = (180.0 / ((double) M_PI)) * atan((1.0 + (C / B)));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.2e-51) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 6.9e+75) {
tmp = (180.0 / Math.PI) * Math.atan((1.0 + (C / B)));
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.2e-51: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 6.9e+75: tmp = (180.0 / math.pi) * math.atan((1.0 + (C / B))) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.2e-51) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 6.9e+75) tmp = Float64(Float64(180.0 / pi) * atan(Float64(1.0 + Float64(C / B)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.2e-51) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 6.9e+75) tmp = (180.0 / pi) * atan((1.0 + (C / B))); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.2e-51], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.9e+75], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(1.0 + N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.2 \cdot 10^{-51}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.9 \cdot 10^{+75}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(1 + \frac{C}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.1999999999999995e-51Initial program 28.0%
Taylor expanded in A around -inf 54.3%
associate-*r/54.3%
Simplified54.3%
if -6.1999999999999995e-51 < A < 6.9000000000000004e75Initial program 65.4%
associate-*r/65.4%
Applied egg-rr88.7%
Taylor expanded in A around 0 60.6%
+-commutative60.6%
unpow260.6%
unpow260.6%
hypot-define84.0%
Simplified84.0%
Taylor expanded in C around 0 60.6%
associate-*r/60.6%
*-commutative60.6%
div-sub58.8%
+-commutative58.8%
unpow258.8%
unpow258.8%
hypot-undefine76.6%
div-sub84.0%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in B around -inf 49.9%
+-commutative49.9%
Simplified49.9%
if 6.9000000000000004e75 < A Initial program 74.4%
associate-*l/74.4%
*-lft-identity74.4%
+-commutative74.4%
unpow274.4%
unpow274.4%
hypot-define93.5%
Simplified93.5%
Taylor expanded in A around inf 72.2%
*-commutative72.2%
Simplified72.2%
Final simplification55.2%
(FPCore (A B C)
:precision binary64
(if (<= A -4.1e-97)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A 3e-87)
(* 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 <= -4.1e-97) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= 3e-87) {
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 <= -4.1e-97) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= 3e-87) {
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 <= -4.1e-97: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= 3e-87: 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 <= -4.1e-97) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= 3e-87) 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 <= -4.1e-97) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= 3e-87) 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, -4.1e-97], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3e-87], 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 -4.1 \cdot 10^{-97}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-87}:\\
\;\;\;\;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 < -4.09999999999999993e-97Initial program 33.3%
Taylor expanded in A around -inf 53.4%
associate-*r/53.4%
Simplified53.4%
if -4.09999999999999993e-97 < A < 3.00000000000000016e-87Initial program 61.4%
Taylor expanded in B around inf 36.3%
if 3.00000000000000016e-87 < A Initial program 72.8%
associate-*l/72.8%
*-lft-identity72.8%
+-commutative72.8%
unpow272.8%
unpow272.8%
hypot-define94.9%
Simplified94.9%
Taylor expanded in A around inf 62.6%
*-commutative62.6%
Simplified62.6%
Final simplification50.2%
(FPCore (A B C)
:precision binary64
(if (<= B -7e-134)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7.6e+23)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -7e-134) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7.6e+23) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((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 <= -7e-134) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7.6e+23) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -7e-134: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7.6e+23: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -7e-134) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7.6e+23) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / 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 <= -7e-134) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7.6e+23) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -7e-134], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.6e+23], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $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 -7 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7.6 \cdot 10^{+23}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -6.9999999999999997e-134Initial program 55.1%
Taylor expanded in B around -inf 53.1%
if -6.9999999999999997e-134 < B < 7.5999999999999995e23Initial program 57.0%
Taylor expanded in A around -inf 34.7%
associate-*r/34.7%
Simplified34.7%
if 7.5999999999999995e23 < B Initial program 50.6%
Taylor expanded in B around inf 63.7%
Final simplification48.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1e-153)
(/ 180.0 (/ PI (atan (+ 1.0 t_0))))
(/ (* 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 <= -1e-153) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + t_0)));
} 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 <= -1e-153) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + t_0)));
} 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 <= -1e-153: tmp = 180.0 / (math.pi / math.atan((1.0 + t_0))) 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 <= -1e-153) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + t_0)))); 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 <= -1e-153) tmp = 180.0 / (pi / atan((1.0 + t_0))); 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, -1e-153], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision]), $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 \cdot 10^{-153}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + t\_0\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.00000000000000004e-153Initial program 54.9%
*-commutative54.9%
associate--l-54.9%
+-commutative54.9%
unpow254.9%
unpow254.9%
hypot-undefine80.5%
div-inv80.5%
clear-num80.6%
un-div-inv80.5%
Applied egg-rr82.0%
Taylor expanded in B around -inf 73.0%
associate--l+73.0%
div-sub73.0%
Simplified73.0%
if -1.00000000000000004e-153 < B Initial program 54.8%
associate-*r/54.8%
Applied egg-rr77.1%
Taylor expanded in B around inf 61.2%
+-commutative61.2%
associate--r+61.2%
div-sub63.1%
Simplified63.1%
Final simplification66.8%
(FPCore (A B C) :precision binary64 (if (<= C 5e-34) (/ 180.0 (/ PI (atan (+ 1.0 (/ (- C A) B))))) (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 5e-34) {
tmp = 180.0 / (((double) M_PI) / atan((1.0 + ((C - A) / B))));
} 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 <= 5e-34) {
tmp = 180.0 / (Math.PI / Math.atan((1.0 + ((C - A) / B))));
} else {
tmp = (180.0 * Math.atan((-0.5 * (B / C)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 5e-34: tmp = 180.0 / (math.pi / math.atan((1.0 + ((C - A) / B)))) else: tmp = (180.0 * math.atan((-0.5 * (B / C)))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (C <= 5e-34) tmp = Float64(180.0 / Float64(pi / atan(Float64(1.0 + Float64(Float64(C - A) / B))))); else tmp = Float64(Float64(180.0 * atan(Float64(-0.5 * Float64(B / C)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 5e-34) tmp = 180.0 / (pi / atan((1.0 + ((C - A) / B)))); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 5e-34], N[(180.0 / N[(Pi / N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 5 \cdot 10^{-34}:\\
\;\;\;\;\frac{180}{\frac{\pi}{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 5.0000000000000003e-34Initial program 67.0%
*-commutative67.0%
associate--l-66.4%
+-commutative66.4%
unpow266.4%
unpow266.4%
hypot-undefine84.6%
div-inv84.6%
clear-num84.6%
un-div-inv84.6%
Applied egg-rr89.7%
Taylor expanded in B around -inf 61.9%
associate--l+61.9%
div-sub63.6%
Simplified63.6%
if 5.0000000000000003e-34 < C Initial program 27.4%
associate-*r/27.4%
Applied egg-rr55.0%
Taylor expanded in C around inf 67.0%
distribute-rgt1-in67.0%
metadata-eval67.0%
mul0-lft67.0%
div067.0%
metadata-eval67.0%
*-commutative67.0%
metadata-eval67.0%
associate-+l-67.0%
neg-sub067.0%
*-commutative67.0%
distribute-lft-neg-in67.0%
metadata-eval67.0%
neg-sub067.0%
distribute-lft-neg-in67.0%
metadata-eval67.0%
Simplified67.0%
(FPCore (A B C) :precision binary64 (if (<= C 6.5e-31) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (/ (* 180.0 (atan (* -0.5 (/ B C)))) PI)))
double code(double A, double B, double C) {
double tmp;
if (C <= 6.5e-31) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((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.5e-31) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / 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.5e-31: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / 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.5e-31) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(Float64(180.0 * 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.5e-31) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = (180.0 * atan((-0.5 * (B / C)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 6.5e-31], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 6.5 \cdot 10^{-31}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 6.49999999999999967e-31Initial program 67.0%
Taylor expanded in B around -inf 61.9%
associate--l+61.9%
div-sub63.6%
Simplified63.6%
if 6.49999999999999967e-31 < C Initial program 27.4%
associate-*r/27.4%
Applied egg-rr55.0%
Taylor expanded in C around inf 67.0%
distribute-rgt1-in67.0%
metadata-eval67.0%
mul0-lft67.0%
div067.0%
metadata-eval67.0%
*-commutative67.0%
metadata-eval67.0%
associate-+l-67.0%
neg-sub067.0%
*-commutative67.0%
distribute-lft-neg-in67.0%
metadata-eval67.0%
neg-sub067.0%
distribute-lft-neg-in67.0%
metadata-eval67.0%
Simplified67.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1.52e-133)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 7.8e-118)
(/ (* 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.52e-133) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 7.8e-118) {
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.52e-133) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 7.8e-118) {
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.52e-133: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 7.8e-118: 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.52e-133) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 7.8e-118) tmp = Float64(Float64(180.0 * atan(0.0)) / pi); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.52e-133) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 7.8e-118) 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.52e-133], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.8e-118], N[(N[(180.0 * N[ArcTan[0.0], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.52 \cdot 10^{-133}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 7.8 \cdot 10^{-118}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.52000000000000001e-133Initial program 55.7%
Taylor expanded in B around -inf 53.7%
if -1.52000000000000001e-133 < B < 7.80000000000000002e-118Initial program 51.6%
associate-*r/51.6%
Applied egg-rr77.1%
Taylor expanded in C around inf 34.8%
distribute-rgt1-in34.8%
metadata-eval34.8%
mul0-lft34.8%
div034.8%
metadata-eval34.8%
Simplified34.8%
if 7.80000000000000002e-118 < B Initial program 56.3%
Taylor expanded in B around inf 52.3%
(FPCore (A B C) :precision binary64 (if (<= B -8.8e-302) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8.8e-302) {
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 <= -8.8e-302) {
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 <= -8.8e-302: 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 <= -8.8e-302) 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 <= -8.8e-302) 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, -8.8e-302], 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 -8.8 \cdot 10^{-302}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.8000000000000003e-302Initial program 52.9%
Taylor expanded in B around -inf 41.5%
if -8.8000000000000003e-302 < B Initial program 56.7%
Taylor expanded in B around inf 42.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 54.8%
Taylor expanded in B around inf 22.1%
herbie shell --seed 2024121
(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)))