
(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 19 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 (<= A -1.15e+125) (/ (* -180.0 (atan (* -0.5 (/ B A)))) PI) (* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+125) {
tmp = (-180.0 * atan((-0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.15e+125) {
tmp = (-180.0 * Math.atan((-0.5 * (B / A)))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.15e+125: tmp = (-180.0 * math.atan((-0.5 * (B / A)))) / math.pi else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.15e+125) tmp = Float64(Float64(-180.0 * atan(Float64(-0.5 * Float64(B / A)))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.15e+125) tmp = (-180.0 * atan((-0.5 * (B / A)))) / pi; else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.15e+125], N[(N[(-180.0 * N[ArcTan[N[(-0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.15 \cdot 10^{+125}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.15000000000000006e125Initial program 13.1%
Taylor expanded in C around 0 10.7%
associate-*r/10.7%
mul-1-neg10.7%
unpow210.7%
unpow210.7%
hypot-define45.5%
Simplified45.5%
associate-*r/45.5%
distribute-frac-neg45.5%
atan-neg45.5%
Applied egg-rr45.5%
distribute-rgt-neg-out45.5%
distribute-lft-neg-in45.5%
metadata-eval45.5%
Simplified45.5%
Taylor expanded in A around -inf 84.7%
if -1.15000000000000006e125 < A Initial program 58.6%
associate-*l/58.6%
*-lft-identity58.6%
+-commutative58.6%
unpow258.6%
unpow258.6%
hypot-define78.2%
Simplified78.2%
(FPCore (A B C)
:precision binary64
(if (<= A -4.5e+123)
(/ (* -180.0 (atan (* -0.5 (/ B A)))) PI)
(if (<= A 3.2e-37)
(* (/ 180.0 PI) (atan (/ (- C (hypot C B)) B)))
(* (/ 180.0 PI) (atan (/ (- (- A) (hypot A B)) B))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e+123) {
tmp = (-180.0 * atan((-0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 3.2e-37) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(C, B)) / B));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((-A - hypot(A, B)) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e+123) {
tmp = (-180.0 * Math.atan((-0.5 * (B / A)))) / Math.PI;
} else if (A <= 3.2e-37) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(C, B)) / B));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((-A - Math.hypot(A, B)) / B));
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.5e+123: tmp = (-180.0 * math.atan((-0.5 * (B / A)))) / math.pi elif A <= 3.2e-37: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(C, B)) / B)) else: tmp = (180.0 / math.pi) * math.atan(((-A - math.hypot(A, B)) / B)) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.5e+123) tmp = Float64(Float64(-180.0 * atan(Float64(-0.5 * Float64(B / A)))) / pi); elseif (A <= 3.2e-37) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(C, B)) / B))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.5e+123) tmp = (-180.0 * atan((-0.5 * (B / A)))) / pi; elseif (A <= 3.2e-37) tmp = (180.0 / pi) * atan(((C - hypot(C, B)) / B)); else tmp = (180.0 / pi) * atan(((-A - hypot(A, B)) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.5e+123], N[(N[(-180.0 * N[ArcTan[N[(-0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 3.2e-37], 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[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.5 \cdot 10^{+123}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-37}:\\
\;\;\;\;\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{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)\\
\end{array}
\end{array}
if A < -4.49999999999999983e123Initial program 13.1%
Taylor expanded in C around 0 10.7%
associate-*r/10.7%
mul-1-neg10.7%
unpow210.7%
unpow210.7%
hypot-define45.5%
Simplified45.5%
associate-*r/45.5%
distribute-frac-neg45.5%
atan-neg45.5%
Applied egg-rr45.5%
distribute-rgt-neg-out45.5%
distribute-lft-neg-in45.5%
metadata-eval45.5%
Simplified45.5%
Taylor expanded in A around -inf 84.7%
if -4.49999999999999983e123 < A < 3.1999999999999999e-37Initial program 51.9%
Taylor expanded in B around 0 51.1%
Simplified73.3%
Taylor expanded in A around 0 51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-define72.9%
Simplified72.9%
if 3.1999999999999999e-37 < A Initial program 74.2%
Taylor expanded in B around 0 74.2%
Simplified88.0%
Taylor expanded in C around 0 72.7%
distribute-lft-in72.7%
unpow272.7%
unpow272.7%
hypot-undefine84.0%
neg-mul-184.0%
sub-neg84.0%
mul-1-neg84.0%
Simplified84.0%
(FPCore (A B C)
:precision binary64
(if (<= A -1.6e+123)
(/ (* -180.0 (atan (* -0.5 (/ B A)))) PI)
(if (<= A 6.8e-35)
(* (/ 180.0 PI) (atan (/ (- C (hypot C B)) B)))
(* -180.0 (/ (atan (/ (+ A (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+123) {
tmp = (-180.0 * atan((-0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 6.8e-35) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - hypot(C, B)) / B));
} else {
tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.6e+123) {
tmp = (-180.0 * Math.atan((-0.5 * (B / A)))) / Math.PI;
} else if (A <= 6.8e-35) {
tmp = (180.0 / Math.PI) * Math.atan(((C - Math.hypot(C, B)) / B));
} else {
tmp = -180.0 * (Math.atan(((A + Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.6e+123: tmp = (-180.0 * math.atan((-0.5 * (B / A)))) / math.pi elif A <= 6.8e-35: tmp = (180.0 / math.pi) * math.atan(((C - math.hypot(C, B)) / B)) else: tmp = -180.0 * (math.atan(((A + math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.6e+123) tmp = Float64(Float64(-180.0 * atan(Float64(-0.5 * Float64(B / A)))) / pi); elseif (A <= 6.8e-35) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - hypot(C, B)) / B))); else tmp = Float64(-180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.6e+123) tmp = (-180.0 * atan((-0.5 * (B / A)))) / pi; elseif (A <= 6.8e-35) tmp = (180.0 / pi) * atan(((C - hypot(C, B)) / B)); else tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.6e+123], N[(N[(-180.0 * N[ArcTan[N[(-0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 6.8e-35], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(-180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.6 \cdot 10^{+123}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 6.8 \cdot 10^{-35}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.60000000000000002e123Initial program 13.1%
Taylor expanded in C around 0 10.7%
associate-*r/10.7%
mul-1-neg10.7%
unpow210.7%
unpow210.7%
hypot-define45.5%
Simplified45.5%
associate-*r/45.5%
distribute-frac-neg45.5%
atan-neg45.5%
Applied egg-rr45.5%
distribute-rgt-neg-out45.5%
distribute-lft-neg-in45.5%
metadata-eval45.5%
Simplified45.5%
Taylor expanded in A around -inf 84.7%
if -1.60000000000000002e123 < A < 6.8000000000000005e-35Initial program 51.9%
Taylor expanded in B around 0 51.1%
Simplified73.3%
Taylor expanded in A around 0 51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-define72.9%
Simplified72.9%
if 6.8000000000000005e-35 < A Initial program 74.2%
Taylor expanded in C around 0 72.7%
associate-*r/72.7%
mul-1-neg72.7%
unpow272.7%
unpow272.7%
hypot-define83.9%
Simplified83.9%
associate-*r/83.9%
distribute-frac-neg83.9%
atan-neg83.9%
Applied egg-rr83.9%
distribute-rgt-neg-out83.9%
distribute-lft-neg-in83.9%
metadata-eval83.9%
Simplified83.9%
Taylor expanded in A around 0 72.7%
+-commutative72.7%
*-lft-identity72.7%
metadata-eval72.7%
cancel-sign-sub-inv72.7%
Simplified83.9%
(FPCore (A B C)
:precision binary64
(if (<= A -3.2e+123)
(/ (* -180.0 (atan (* -0.5 (/ B A)))) PI)
(if (<= A 5.5e-37)
(* 180.0 (/ (atan (/ (- C (hypot C B)) B)) PI))
(* -180.0 (/ (atan (/ (+ A (hypot B A)) B)) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -3.2e+123) {
tmp = (-180.0 * atan((-0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= 5.5e-37) {
tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / ((double) M_PI));
} else {
tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -3.2e+123) {
tmp = (-180.0 * Math.atan((-0.5 * (B / A)))) / Math.PI;
} else if (A <= 5.5e-37) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(C, B)) / B)) / Math.PI);
} else {
tmp = -180.0 * (Math.atan(((A + Math.hypot(B, A)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -3.2e+123: tmp = (-180.0 * math.atan((-0.5 * (B / A)))) / math.pi elif A <= 5.5e-37: tmp = 180.0 * (math.atan(((C - math.hypot(C, B)) / B)) / math.pi) else: tmp = -180.0 * (math.atan(((A + math.hypot(B, A)) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -3.2e+123) tmp = Float64(Float64(-180.0 * atan(Float64(-0.5 * Float64(B / A)))) / pi); elseif (A <= 5.5e-37) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(C, B)) / B)) / pi)); else tmp = Float64(-180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -3.2e+123) tmp = (-180.0 * atan((-0.5 * (B / A)))) / pi; elseif (A <= 5.5e-37) tmp = 180.0 * (atan(((C - hypot(C, B)) / B)) / pi); else tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -3.2e+123], N[(N[(-180.0 * N[ArcTan[N[(-0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, 5.5e-37], 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[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -3.2 \cdot 10^{+123}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 5.5 \cdot 10^{-37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(C, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.20000000000000005e123Initial program 13.1%
Taylor expanded in C around 0 10.7%
associate-*r/10.7%
mul-1-neg10.7%
unpow210.7%
unpow210.7%
hypot-define45.5%
Simplified45.5%
associate-*r/45.5%
distribute-frac-neg45.5%
atan-neg45.5%
Applied egg-rr45.5%
distribute-rgt-neg-out45.5%
distribute-lft-neg-in45.5%
metadata-eval45.5%
Simplified45.5%
Taylor expanded in A around -inf 84.7%
if -3.20000000000000005e123 < A < 5.4999999999999998e-37Initial program 51.9%
Taylor expanded in A around 0 51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-define72.8%
Simplified72.8%
if 5.4999999999999998e-37 < A Initial program 74.2%
Taylor expanded in C around 0 72.7%
associate-*r/72.7%
mul-1-neg72.7%
unpow272.7%
unpow272.7%
hypot-define83.9%
Simplified83.9%
associate-*r/83.9%
distribute-frac-neg83.9%
atan-neg83.9%
Applied egg-rr83.9%
distribute-rgt-neg-out83.9%
distribute-lft-neg-in83.9%
metadata-eval83.9%
Simplified83.9%
Taylor expanded in A around 0 72.7%
+-commutative72.7%
*-lft-identity72.7%
metadata-eval72.7%
cancel-sign-sub-inv72.7%
Simplified83.9%
(FPCore (A B C)
:precision binary64
(if (<= C -8.8e+83)
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI))
(if (<= C 6.5e+122)
(* -180.0 (/ (atan (/ (+ A (hypot B A)) B)) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -8.8e+83) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else if (C <= 6.5e+122) {
tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / ((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 <= -8.8e+83) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else if (C <= 6.5e+122) {
tmp = -180.0 * (Math.atan(((A + Math.hypot(B, A)) / B)) / 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 <= -8.8e+83: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) elif C <= 6.5e+122: tmp = -180.0 * (math.atan(((A + math.hypot(B, A)) / B)) / 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 <= -8.8e+83) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); elseif (C <= 6.5e+122) tmp = Float64(-180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -8.8e+83) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); elseif (C <= 6.5e+122) tmp = -180.0 * (atan(((A + hypot(B, A)) / B)) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -8.8e+83], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.5e+122], N[(-180.0 * N[(N[ArcTan[N[(N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -8.8 \cdot 10^{+83}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 6.5 \cdot 10^{+122}:\\
\;\;\;\;-180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -8.79999999999999995e83Initial program 82.9%
Taylor expanded in B around -inf 80.2%
associate--l+80.2%
div-sub88.8%
Simplified88.8%
if -8.79999999999999995e83 < C < 6.49999999999999963e122Initial program 52.1%
Taylor expanded in C around 0 49.9%
associate-*r/49.9%
mul-1-neg49.9%
unpow249.9%
unpow249.9%
hypot-define71.7%
Simplified71.7%
associate-*r/71.7%
distribute-frac-neg71.7%
atan-neg71.7%
Applied egg-rr71.7%
distribute-rgt-neg-out71.7%
distribute-lft-neg-in71.7%
metadata-eval71.7%
Simplified71.7%
Taylor expanded in A around 0 49.9%
+-commutative49.9%
*-lft-identity49.9%
metadata-eval49.9%
cancel-sign-sub-inv49.9%
Simplified71.7%
if 6.49999999999999963e122 < C Initial program 17.7%
Taylor expanded in B around 0 17.7%
Simplified44.4%
Taylor expanded in A around 0 15.0%
+-commutative15.0%
unpow215.0%
unpow215.0%
hypot-define36.9%
Simplified36.9%
Taylor expanded in C around inf 79.6%
(FPCore (A B C) :precision binary64 (if (<= A -7e+123) (/ (* -180.0 (atan (* -0.5 (/ B 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 <= -7e+123) {
tmp = (-180.0 * atan((-0.5 * (B / 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 <= -7e+123) {
tmp = (-180.0 * Math.atan((-0.5 * (B / 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 <= -7e+123: tmp = (-180.0 * math.atan((-0.5 * (B / 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 <= -7e+123) tmp = Float64(Float64(-180.0 * atan(Float64(-0.5 * Float64(B / 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 <= -7e+123) tmp = (-180.0 * atan((-0.5 * (B / 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, -7e+123], N[(N[(-180.0 * N[ArcTan[N[(-0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7 \cdot 10^{+123}:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{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 < -6.99999999999999999e123Initial program 13.1%
Taylor expanded in C around 0 10.7%
associate-*r/10.7%
mul-1-neg10.7%
unpow210.7%
unpow210.7%
hypot-define45.5%
Simplified45.5%
associate-*r/45.5%
distribute-frac-neg45.5%
atan-neg45.5%
Applied egg-rr45.5%
distribute-rgt-neg-out45.5%
distribute-lft-neg-in45.5%
metadata-eval45.5%
Simplified45.5%
Taylor expanded in A around -inf 84.7%
if -6.99999999999999999e123 < A Initial program 58.6%
Simplified77.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 5.9e-263)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 2e-170)
(* 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 <= 5.9e-263) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 2e-170) {
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 <= 5.9e-263) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 2e-170) {
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 <= 5.9e-263: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 2e-170: 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 <= 5.9e-263) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 2e-170) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-0.5 * Float64(B + Float64(Float64(B * C) / A))) / Float64(-A))) / pi)); else tmp = Float64(180.0 * Float64(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 <= 5.9e-263) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 2e-170) 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, 5.9e-263], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2e-170], N[(180.0 * N[(N[ArcTan[N[(N[(-0.5 * N[(B + N[(N[(B * C), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-A)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 5.9 \cdot 10^{-263}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{-170}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-0.5 \cdot \left(B + \frac{B \cdot C}{A}\right)}{-A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < 5.89999999999999972e-263Initial program 54.6%
Taylor expanded in B around -inf 64.5%
associate--l+64.5%
div-sub66.7%
Simplified66.7%
if 5.89999999999999972e-263 < B < 1.99999999999999997e-170Initial program 40.9%
Taylor expanded in A around -inf 56.0%
associate-*r/56.0%
mul-1-neg56.0%
distribute-lft-out56.0%
*-commutative56.0%
Simplified56.0%
if 1.99999999999999997e-170 < B Initial program 49.8%
*-commutative49.8%
associate--l-49.8%
+-commutative49.8%
unpow249.8%
unpow249.8%
hypot-undefine68.6%
associate--r+69.7%
div-inv69.7%
div-sub66.5%
Applied egg-rr66.5%
Taylor expanded in B around inf 65.2%
+-commutative65.2%
associate--r+65.2%
div-sub65.2%
Simplified65.2%
Final simplification65.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 7.4e-262)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 3.6e-170)
(/ (* 180.0 (atan (* 0.5 (* B (/ (+ 1.0 (/ 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 <= 7.4e-262) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 3.6e-170) {
tmp = (180.0 * atan((0.5 * (B * ((1.0 + (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 <= 7.4e-262) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 3.6e-170) {
tmp = (180.0 * Math.atan((0.5 * (B * ((1.0 + (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 <= 7.4e-262: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 3.6e-170: tmp = (180.0 * math.atan((0.5 * (B * ((1.0 + (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 <= 7.4e-262) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 3.6e-170) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B * Float64(Float64(1.0 + Float64(C / A)) / A))))) / pi); else tmp = Float64(180.0 * Float64(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 <= 7.4e-262) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 3.6e-170) tmp = (180.0 * atan((0.5 * (B * ((1.0 + (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, 7.4e-262], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.6e-170], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B * N[(N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 7.4 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-170}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{1 + \frac{C}{A}}{A}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < 7.3999999999999999e-262Initial program 54.6%
Taylor expanded in B around -inf 64.5%
associate--l+64.5%
div-sub66.7%
Simplified66.7%
if 7.3999999999999999e-262 < B < 3.6000000000000003e-170Initial program 40.9%
Taylor expanded in A around -inf 56.0%
associate-*r/56.0%
mul-1-neg56.0%
distribute-lft-out56.0%
*-commutative56.0%
Simplified56.0%
Taylor expanded in B around 0 55.3%
associate-/l*55.3%
Simplified55.3%
add-cbrt-cube35.9%
pow335.9%
*-commutative35.9%
associate-*r/35.9%
Applied egg-rr35.9%
rem-cbrt-cube55.3%
associate-*r/55.4%
*-commutative55.4%
associate-/l*55.4%
Applied egg-rr55.4%
if 3.6000000000000003e-170 < B Initial program 49.8%
*-commutative49.8%
associate--l-49.8%
+-commutative49.8%
unpow249.8%
unpow249.8%
hypot-undefine68.6%
associate--r+69.7%
div-inv69.7%
div-sub66.5%
Applied egg-rr66.5%
Taylor expanded in B around inf 65.2%
+-commutative65.2%
associate--r+65.2%
div-sub65.2%
Simplified65.2%
Final simplification65.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B 1.1e-262)
(* 180.0 (/ (atan (+ 1.0 t_0)) PI))
(if (<= B 1.45e-169)
(* 180.0 (/ (atan (* 0.5 (* B (/ (+ 1.0 (/ 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 <= 1.1e-262) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((double) M_PI));
} else if (B <= 1.45e-169) {
tmp = 180.0 * (atan((0.5 * (B * ((1.0 + (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 <= 1.1e-262) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / Math.PI);
} else if (B <= 1.45e-169) {
tmp = 180.0 * (Math.atan((0.5 * (B * ((1.0 + (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 <= 1.1e-262: tmp = 180.0 * (math.atan((1.0 + t_0)) / math.pi) elif B <= 1.45e-169: tmp = 180.0 * (math.atan((0.5 * (B * ((1.0 + (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 <= 1.1e-262) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); elseif (B <= 1.45e-169) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B * Float64(Float64(1.0 + Float64(C / A)) / A)))) / pi)); else tmp = Float64(180.0 * Float64(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.1e-262) tmp = 180.0 * (atan((1.0 + t_0)) / pi); elseif (B <= 1.45e-169) tmp = 180.0 * (atan((0.5 * (B * ((1.0 + (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, 1.1e-262], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.45e-169], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B * N[(N[(1.0 + N[(C / A), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq 1.1 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-169}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \left(B \cdot \frac{1 + \frac{C}{A}}{A}\right)\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < 1.09999999999999994e-262Initial program 54.6%
Taylor expanded in B around -inf 64.5%
associate--l+64.5%
div-sub66.7%
Simplified66.7%
if 1.09999999999999994e-262 < B < 1.4500000000000001e-169Initial program 40.9%
Taylor expanded in A around -inf 56.0%
associate-*r/56.0%
mul-1-neg56.0%
distribute-lft-out56.0%
*-commutative56.0%
Simplified56.0%
Taylor expanded in B around 0 55.3%
associate-/l*55.3%
Simplified55.3%
if 1.4500000000000001e-169 < B Initial program 49.8%
*-commutative49.8%
associate--l-49.8%
+-commutative49.8%
unpow249.8%
unpow249.8%
hypot-undefine68.6%
associate--r+69.7%
div-inv69.7%
div-sub66.5%
Applied egg-rr66.5%
Taylor expanded in B around inf 65.2%
+-commutative65.2%
associate--r+65.2%
div-sub65.2%
Simplified65.2%
Final simplification65.1%
(FPCore (A B C)
:precision binary64
(if (<= A -0.0095)
(/ (* -180.0 (atan (* -0.5 (/ B A)))) PI)
(if (<= A -1.4e-122)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -0.0095) {
tmp = (-180.0 * atan((-0.5 * (B / A)))) / ((double) M_PI);
} else if (A <= -1.4e-122) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -0.0095) {
tmp = (-180.0 * Math.atan((-0.5 * (B / A)))) / Math.PI;
} else if (A <= -1.4e-122) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -0.0095: tmp = (-180.0 * math.atan((-0.5 * (B / A)))) / math.pi elif A <= -1.4e-122: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) else: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -0.0095) tmp = Float64(Float64(-180.0 * atan(Float64(-0.5 * Float64(B / A)))) / pi); elseif (A <= -1.4e-122) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -0.0095) tmp = (-180.0 * atan((-0.5 * (B / A)))) / pi; elseif (A <= -1.4e-122) tmp = (180.0 / pi) * atan(((C - B) / B)); else tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -0.0095], N[(N[(-180.0 * N[ArcTan[N[(-0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1.4e-122], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -0.0095:\\
\;\;\;\;\frac{-180 \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.4 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -0.00949999999999999976Initial program 25.1%
Taylor expanded in C around 0 18.3%
associate-*r/18.3%
mul-1-neg18.3%
unpow218.3%
unpow218.3%
hypot-define44.7%
Simplified44.7%
associate-*r/44.7%
distribute-frac-neg44.7%
atan-neg44.7%
Applied egg-rr44.7%
distribute-rgt-neg-out44.7%
distribute-lft-neg-in44.7%
metadata-eval44.7%
Simplified44.7%
Taylor expanded in A around -inf 68.9%
if -0.00949999999999999976 < A < -1.3999999999999999e-122Initial program 57.9%
Taylor expanded in B around 0 58.0%
Simplified75.2%
Taylor expanded in A around 0 55.5%
+-commutative55.5%
unpow255.5%
unpow255.5%
hypot-define72.6%
Simplified72.6%
Taylor expanded in C around 0 52.4%
if -1.3999999999999999e-122 < A Initial program 61.6%
Taylor expanded in B around -inf 61.7%
associate--l+61.7%
div-sub62.4%
Simplified62.4%
(FPCore (A B C)
:precision binary64
(if (<= C -1700000.0)
(* (/ 180.0 PI) (atan (/ (- C B) B)))
(if (<= C 165.0)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1700000.0) {
tmp = (180.0 / ((double) M_PI)) * atan(((C - B) / B));
} else if (C <= 165.0) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((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 <= -1700000.0) {
tmp = (180.0 / Math.PI) * Math.atan(((C - B) / B));
} else if (C <= 165.0) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / 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 <= -1700000.0: tmp = (180.0 / math.pi) * math.atan(((C - B) / B)) elif C <= 165.0: tmp = 180.0 * (math.atan((1.0 - (A / B))) / 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 <= -1700000.0) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - B) / B))); elseif (C <= 165.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1700000.0) tmp = (180.0 / pi) * atan(((C - B) / B)); elseif (C <= 165.0) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1700000.0], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 165.0], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1700000:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - B}{B}\right)\\
\mathbf{elif}\;C \leq 165:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -1.7e6Initial program 75.9%
Taylor expanded in B around 0 75.9%
Simplified89.7%
Taylor expanded in A around 0 75.9%
+-commutative75.9%
unpow275.9%
unpow275.9%
hypot-define89.7%
Simplified89.7%
Taylor expanded in C around 0 79.6%
if -1.7e6 < C < 165Initial program 57.3%
Taylor expanded in C around 0 56.1%
associate-*r/56.1%
mul-1-neg56.1%
unpow256.1%
unpow256.1%
hypot-define75.6%
Simplified75.6%
Taylor expanded in B around -inf 51.1%
mul-1-neg51.1%
unsub-neg51.1%
Simplified51.1%
if 165 < C Initial program 22.7%
Taylor expanded in B around 0 21.1%
Simplified46.0%
Taylor expanded in A around 0 21.2%
+-commutative21.2%
unpow221.2%
unpow221.2%
hypot-define43.5%
Simplified43.5%
Taylor expanded in C around inf 63.5%
(FPCore (A B C)
:precision binary64
(if (<= C -145000000.0)
(* 180.0 (/ (atan (/ (* C 2.0) B)) PI))
(if (<= C 42000.0)
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -145000000.0) {
tmp = 180.0 * (atan(((C * 2.0) / B)) / ((double) M_PI));
} else if (C <= 42000.0) {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((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 <= -145000000.0) {
tmp = 180.0 * (Math.atan(((C * 2.0) / B)) / Math.PI);
} else if (C <= 42000.0) {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / 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 <= -145000000.0: tmp = 180.0 * (math.atan(((C * 2.0) / B)) / math.pi) elif C <= 42000.0: tmp = 180.0 * (math.atan((1.0 - (A / B))) / 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 <= -145000000.0) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C * 2.0) / B)) / pi)); elseif (C <= 42000.0) tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -145000000.0) tmp = 180.0 * (atan(((C * 2.0) / B)) / pi); elseif (C <= 42000.0) tmp = 180.0 * (atan((1.0 - (A / B))) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -145000000.0], N[(180.0 * N[(N[ArcTan[N[(N[(C * 2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 42000.0], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -145000000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C \cdot 2}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 42000:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -1.45e8Initial program 75.9%
associate-*l/75.9%
*-lft-identity75.9%
+-commutative75.9%
unpow275.9%
unpow275.9%
hypot-define98.0%
Simplified98.0%
Taylor expanded in C around -inf 66.2%
*-commutative66.2%
Simplified66.2%
if -1.45e8 < C < 42000Initial program 57.3%
Taylor expanded in C around 0 56.1%
associate-*r/56.1%
mul-1-neg56.1%
unpow256.1%
unpow256.1%
hypot-define75.6%
Simplified75.6%
Taylor expanded in B around -inf 51.1%
mul-1-neg51.1%
unsub-neg51.1%
Simplified51.1%
if 42000 < C Initial program 22.7%
Taylor expanded in B around 0 21.1%
Simplified46.0%
Taylor expanded in A around 0 21.2%
+-commutative21.2%
unpow221.2%
unpow221.2%
hypot-define43.5%
Simplified43.5%
Taylor expanded in C around inf 63.5%
(FPCore (A B C)
:precision binary64
(if (<= A -2.8e-43)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -4e-134)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e-43) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -4e-134) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -2.8e-43) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -4e-134) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -2.8e-43: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -4e-134: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -2.8e-43) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -4e-134) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -2.8e-43) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -4e-134) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.8e-43], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4e-134], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.8 \cdot 10^{-43}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.7999999999999998e-43Initial program 27.3%
Taylor expanded in A around -inf 65.3%
associate-*r/65.3%
Simplified65.3%
if -2.7999999999999998e-43 < A < -4.00000000000000016e-134Initial program 55.3%
Taylor expanded in B around inf 45.1%
if -4.00000000000000016e-134 < A Initial program 62.4%
Taylor expanded in C around 0 54.3%
associate-*r/54.3%
mul-1-neg54.3%
unpow254.3%
unpow254.3%
hypot-define71.1%
Simplified71.1%
Taylor expanded in B around -inf 54.3%
mul-1-neg54.3%
unsub-neg54.3%
Simplified54.3%
Final simplification56.5%
(FPCore (A B C)
:precision binary64
(if (<= A -1.12e-41)
(* 180.0 (/ (atan (* B (/ 0.5 A))) PI))
(if (<= A -7.6e-134)
(* 180.0 (/ (atan -1.0) PI))
(* 180.0 (/ (atan (- 1.0 (/ A B))) PI)))))
double code(double A, double B, double C) {
double tmp;
if (A <= -1.12e-41) {
tmp = 180.0 * (atan((B * (0.5 / A))) / ((double) M_PI));
} else if (A <= -7.6e-134) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -1.12e-41) {
tmp = 180.0 * (Math.atan((B * (0.5 / A))) / Math.PI);
} else if (A <= -7.6e-134) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -1.12e-41: tmp = 180.0 * (math.atan((B * (0.5 / A))) / math.pi) elif A <= -7.6e-134: tmp = 180.0 * (math.atan(-1.0) / math.pi) else: tmp = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -1.12e-41) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(0.5 / A))) / pi)); elseif (A <= -7.6e-134) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -1.12e-41) tmp = 180.0 * (atan((B * (0.5 / A))) / pi); elseif (A <= -7.6e-134) tmp = 180.0 * (atan(-1.0) / pi); else tmp = 180.0 * (atan((1.0 - (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -1.12e-41], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7.6e-134], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1.12 \cdot 10^{-41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -7.6 \cdot 10^{-134}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.11999999999999999e-41Initial program 27.3%
Taylor expanded in A around -inf 63.5%
associate-*r/63.5%
mul-1-neg63.5%
distribute-lft-out63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in B around 0 65.1%
associate-/l*65.1%
Simplified65.1%
Taylor expanded in C around 0 65.3%
Taylor expanded in B around 0 65.3%
*-commutative65.3%
*-rgt-identity65.3%
associate-/l*65.3%
associate-*l*65.3%
associate-*l/65.3%
metadata-eval65.3%
Simplified65.3%
if -1.11999999999999999e-41 < A < -7.60000000000000006e-134Initial program 55.3%
Taylor expanded in B around inf 45.1%
if -7.60000000000000006e-134 < A Initial program 62.4%
Taylor expanded in C around 0 54.3%
associate-*r/54.3%
mul-1-neg54.3%
unpow254.3%
unpow254.3%
hypot-define71.1%
Simplified71.1%
Taylor expanded in B around -inf 54.3%
mul-1-neg54.3%
unsub-neg54.3%
Simplified54.3%
(FPCore (A B C)
:precision binary64
(if (<= B -3e+56)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.65e-93)
(* 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 <= -3e+56) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.65e-93) {
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 <= -3e+56) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.65e-93) {
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 <= -3e+56: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.65e-93: 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 <= -3e+56) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.65e-93) tmp = Float64(180.0 * Float64(atan(Float64(B * Float64(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 <= -3e+56) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.65e-93) 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, -3e+56], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.65e-93], N[(180.0 * N[(N[ArcTan[N[(B * N[(0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -3 \cdot 10^{+56}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.65 \cdot 10^{-93}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(B \cdot \frac{0.5}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.00000000000000006e56Initial program 45.2%
Taylor expanded in B around -inf 73.7%
if -3.00000000000000006e56 < B < 1.6500000000000001e-93Initial program 54.9%
Taylor expanded in A around -inf 43.8%
associate-*r/43.8%
mul-1-neg43.8%
distribute-lft-out43.8%
*-commutative43.8%
Simplified43.8%
Taylor expanded in B around 0 43.7%
associate-/l*43.7%
Simplified43.7%
Taylor expanded in C around 0 37.3%
Taylor expanded in B around 0 37.3%
*-commutative37.3%
*-rgt-identity37.3%
associate-/l*37.3%
associate-*l*37.3%
associate-*l/37.3%
metadata-eval37.3%
Simplified37.3%
if 1.6500000000000001e-93 < B Initial program 51.2%
Taylor expanded in B around inf 50.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (/ (- C A) B)))
(if (<= B -1e-205)
(* 180.0 (/ (atan (+ 1.0 t_0)) 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 <= -1e-205) {
tmp = 180.0 * (atan((1.0 + t_0)) / ((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 <= -1e-205) {
tmp = 180.0 * (Math.atan((1.0 + t_0)) / 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 <= -1e-205: tmp = 180.0 * (math.atan((1.0 + t_0)) / 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 <= -1e-205) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + t_0)) / pi)); else tmp = Float64(180.0 * Float64(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-205) tmp = 180.0 * (atan((1.0 + t_0)) / 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, -1e-205], N[(180.0 * N[(N[ArcTan[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(t$95$0 + -1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{C - A}{B}\\
\mathbf{if}\;B \leq -1 \cdot 10^{-205}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + t\_0\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(t\_0 + -1\right)}{\pi}\\
\end{array}
\end{array}
if B < -1e-205Initial program 52.0%
Taylor expanded in B around -inf 69.1%
associate--l+69.1%
div-sub69.1%
Simplified69.1%
if -1e-205 < B Initial program 51.1%
*-commutative51.1%
associate--l-48.9%
+-commutative48.9%
unpow248.9%
unpow248.9%
hypot-undefine63.7%
associate--r+70.1%
div-inv70.1%
div-sub60.1%
Applied egg-rr60.1%
Taylor expanded in B around inf 55.9%
+-commutative55.9%
associate--r+55.9%
div-sub58.8%
Simplified58.8%
Final simplification63.4%
(FPCore (A B C)
:precision binary64
(if (<= B -1.5e-118)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.1e-87)
(* 180.0 (/ (atan 0.0) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.5e-118) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.1e-87) {
tmp = 180.0 * (atan(0.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.5e-118) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.1e-87) {
tmp = 180.0 * (Math.atan(0.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.5e-118: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.1e-87: tmp = 180.0 * (math.atan(0.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.5e-118) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.1e-87) 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.5e-118) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.1e-87) tmp = 180.0 * (atan(0.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.5e-118], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.1e-87], 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.5 \cdot 10^{-118}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.1 \cdot 10^{-87}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.50000000000000009e-118Initial program 53.9%
Taylor expanded in B around -inf 55.8%
if -1.50000000000000009e-118 < B < 1.09999999999999994e-87Initial program 48.0%
*-commutative48.0%
associate--l-43.8%
+-commutative43.8%
unpow243.8%
unpow243.8%
hypot-undefine53.3%
associate--r+70.5%
div-inv70.5%
div-sub45.9%
Applied egg-rr45.9%
Taylor expanded in C around inf 8.7%
distribute-lft1-in8.7%
metadata-eval8.7%
mul0-lft27.9%
metadata-eval27.9%
Simplified27.9%
if 1.09999999999999994e-87 < B Initial program 51.7%
Taylor expanded in B around inf 51.0%
(FPCore (A B C) :precision binary64 (if (<= B 5.7e-90) (* 180.0 (/ (atan 0.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 5.7e-90) {
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 <= 5.7e-90) {
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 <= 5.7e-90: 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 <= 5.7e-90) 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 <= 5.7e-90) 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, 5.7e-90], 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 5.7 \cdot 10^{-90}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < 5.7000000000000002e-90Initial program 51.4%
*-commutative51.4%
associate--l-49.5%
+-commutative49.5%
unpow249.5%
unpow249.5%
hypot-undefine66.8%
associate--r+74.4%
div-inv74.4%
div-sub63.1%
Applied egg-rr63.1%
Taylor expanded in C around inf 6.3%
distribute-lft1-in6.3%
metadata-eval6.3%
mul0-lft14.7%
metadata-eval14.7%
Simplified14.7%
if 5.7000000000000002e-90 < B Initial program 51.7%
Taylor expanded in B around inf 51.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 51.5%
Taylor expanded in B around inf 19.8%
herbie shell --seed 2024180
(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)))