
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C) :precision binary64 (* 180.0 (/ (atan (* (/ 1.0 B) (- (- C A) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))) PI)))
double code(double A, double B, double C) {
return 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / ((double) M_PI));
}
public static double code(double A, double B, double C) {
return 180.0 * (Math.atan(((1.0 / B) * ((C - A) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / Math.PI);
}
def code(A, B, C): return 180.0 * (math.atan(((1.0 / B) * ((C - A) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / math.pi)
function code(A, B, C) return Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0)))))) / pi)) end
function tmp = code(A, B, C) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / pi); end
code[A_, B_, C_] := N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)\right)}{\pi}
\end{array}
(FPCore (A B C) :precision binary64 (if (<= C 7.6e+151) (* 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 <= 7.6e+151) {
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 <= 7.6e+151) {
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 <= 7.6e+151: 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 <= 7.6e+151) 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 <= 7.6e+151) 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, 7.6e+151], 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 7.6 \cdot 10^{+151}:\\
\;\;\;\;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 < 7.6000000000000001e151Initial program 60.4%
associate-*l/60.5%
*-lft-identity60.5%
+-commutative60.5%
unpow260.5%
unpow260.5%
hypot-define85.5%
Simplified85.5%
if 7.6000000000000001e151 < C Initial program 7.3%
associate-*r/7.3%
associate-*l/7.3%
*-un-lft-identity7.3%
unpow27.3%
unpow27.3%
hypot-define51.5%
Applied egg-rr51.5%
Taylor expanded in C around inf 92.7%
Taylor expanded in A around inf 92.7%
Final simplification86.4%
(FPCore (A B C)
:precision binary64
(if (<= C -4.6e-20)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 4.6e+148)
(* 180.0 (/ (atan (/ (+ A (hypot B A)) (- B))) PI))
(/ (* 180.0 (atan (* -0.5 (/ B C)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= -4.6e-20) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 4.6e+148) {
tmp = 180.0 * (atan(((A + hypot(B, 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 <= -4.6e-20) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 4.6e+148) {
tmp = 180.0 * (Math.atan(((A + Math.hypot(B, 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 <= -4.6e-20: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 4.6e+148: tmp = 180.0 * (math.atan(((A + math.hypot(B, 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 <= -4.6e-20) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 4.6e+148) tmp = Float64(180.0 * Float64(atan(Float64(Float64(A + hypot(B, A)) / 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 <= -4.6e-20) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 4.6e+148) tmp = 180.0 * (atan(((A + hypot(B, 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, -4.6e-20], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.6e+148], 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 * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.6 \cdot 10^{-20}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 4.6 \cdot 10^{+148}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A + \mathsf{hypot}\left(B, A\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 < -4.5999999999999998e-20Initial program 73.1%
Taylor expanded in A around 0 71.7%
unpow271.7%
unpow271.7%
hypot-define88.8%
Simplified88.8%
if -4.5999999999999998e-20 < C < 4.6000000000000001e148Initial program 54.8%
Taylor expanded in C around 0 52.0%
mul-1-neg52.0%
distribute-neg-frac252.0%
+-commutative52.0%
unpow252.0%
unpow252.0%
hypot-define77.9%
Simplified77.9%
if 4.6000000000000001e148 < C Initial program 7.3%
associate-*r/7.3%
associate-*l/7.3%
*-un-lft-identity7.3%
unpow27.3%
unpow27.3%
hypot-define51.5%
Applied egg-rr51.5%
Taylor expanded in C around inf 92.7%
Taylor expanded in A around inf 92.7%
Final simplification82.6%
(FPCore (A B C)
:precision binary64
(if (<= A -2.9e+98)
(* (atan (* 0.5 (/ B A))) (/ 180.0 PI))
(if (<= A 4.7e+76)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -2.9e+98) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else if (A <= 4.7e+76) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((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.9e+98) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else if (A <= 4.7e+76) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / 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.9e+98: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) elif A <= 4.7e+76: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / 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.9e+98) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); elseif (A <= 4.7e+76) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); else tmp = Float64(Float64(180.0 * 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.9e+98) tmp = atan((0.5 * (B / A))) * (180.0 / pi); elseif (A <= 4.7e+76) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -2.9e+98], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.7e+76], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.9 \cdot 10^{+98}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq 4.7 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -2.9000000000000001e98Initial program 29.0%
Taylor expanded in A around -inf 72.5%
associate-*r/72.5%
Simplified72.5%
Taylor expanded in B around 0 72.5%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.8%
Simplified72.8%
if -2.9000000000000001e98 < A < 4.7000000000000003e76Initial program 57.0%
Taylor expanded in A around 0 51.1%
unpow251.1%
unpow251.1%
hypot-define76.9%
Simplified76.9%
if 4.7000000000000003e76 < A Initial program 68.0%
Taylor expanded in B around inf 78.4%
Taylor expanded in C around 0 78.4%
mul-1-neg78.4%
distribute-neg-frac278.4%
Simplified78.4%
Taylor expanded in A around 0 78.4%
Simplified78.5%
Final simplification76.5%
(FPCore (A B C) :precision binary64 (if (<= A -4.5e+98) (* (atan (* 0.5 (/ B A))) (/ 180.0 PI)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e+98) {
tmp = atan((0.5 * (B / A))) * (180.0 / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.5e+98) {
tmp = Math.atan((0.5 * (B / A))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.5e+98: tmp = math.atan((0.5 * (B / A))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.5e+98) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) * Float64(180.0 / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.5e+98) tmp = atan((0.5 * (B / A))) * (180.0 / pi); else tmp = 180.0 * (atan(((C - (A + hypot(B, (A - C)))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.5e+98], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.5 \cdot 10^{+98}:\\
\;\;\;\;\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.5000000000000002e98Initial program 29.0%
Taylor expanded in A around -inf 72.5%
associate-*r/72.5%
Simplified72.5%
Taylor expanded in B around 0 72.5%
associate-*r/72.7%
*-commutative72.7%
associate-/l*72.8%
Simplified72.8%
if -4.5000000000000002e98 < A Initial program 59.1%
Simplified84.4%
Final simplification82.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI)))
(t_1 (* 180.0 (/ (atan (/ A (- B))) PI)))
(t_2 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -1.25e-67)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3e-138)
t_0
(if (<= B -2.1e-184)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B -8.2e-195)
t_1
(if (<= B -1.98e-289)
t_2
(if (<= B -5e-296)
t_1
(if (<= B 1.7e-247)
t_0
(if (<= B 3.6e-111) t_2 (* 180.0 (/ (atan -1.0) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((A / -B)) / ((double) M_PI));
double t_2 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -1.25e-67) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3e-138) {
tmp = t_0;
} else if (B <= -2.1e-184) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= -8.2e-195) {
tmp = t_1;
} else if (B <= -1.98e-289) {
tmp = t_2;
} else if (B <= -5e-296) {
tmp = t_1;
} else if (B <= 1.7e-247) {
tmp = t_0;
} else if (B <= 3.6e-111) {
tmp = t_2;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((A / -B)) / Math.PI);
double t_2 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -1.25e-67) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3e-138) {
tmp = t_0;
} else if (B <= -2.1e-184) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= -8.2e-195) {
tmp = t_1;
} else if (B <= -1.98e-289) {
tmp = t_2;
} else if (B <= -5e-296) {
tmp = t_1;
} else if (B <= 1.7e-247) {
tmp = t_0;
} else if (B <= 3.6e-111) {
tmp = t_2;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) t_1 = 180.0 * (math.atan((A / -B)) / math.pi) t_2 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -1.25e-67: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3e-138: tmp = t_0 elif B <= -2.1e-184: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= -8.2e-195: tmp = t_1 elif B <= -1.98e-289: tmp = t_2 elif B <= -5e-296: tmp = t_1 elif B <= 1.7e-247: tmp = t_0 elif B <= 3.6e-111: tmp = t_2 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)) t_2 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -1.25e-67) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3e-138) tmp = t_0; elseif (B <= -2.1e-184) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= -8.2e-195) tmp = t_1; elseif (B <= -1.98e-289) tmp = t_2; elseif (B <= -5e-296) tmp = t_1; elseif (B <= 1.7e-247) tmp = t_0; elseif (B <= 3.6e-111) tmp = t_2; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); t_1 = 180.0 * (atan((A / -B)) / pi); t_2 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -1.25e-67) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3e-138) tmp = t_0; elseif (B <= -2.1e-184) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= -8.2e-195) tmp = t_1; elseif (B <= -1.98e-289) tmp = t_2; elseif (B <= -5e-296) tmp = t_1; elseif (B <= 1.7e-247) tmp = t_0; elseif (B <= 3.6e-111) tmp = t_2; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.25e-67], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3e-138], t$95$0, If[LessEqual[B, -2.1e-184], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -8.2e-195], t$95$1, If[LessEqual[B, -1.98e-289], t$95$2, If[LessEqual[B, -5e-296], t$95$1, If[LessEqual[B, 1.7e-247], t$95$0, If[LessEqual[B, 3.6e-111], t$95$2, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
t_2 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.25 \cdot 10^{-67}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3 \cdot 10^{-138}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -2.1 \cdot 10^{-184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq -8.2 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -1.98 \cdot 10^{-289}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;B \leq -5 \cdot 10^{-296}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 1.7 \cdot 10^{-247}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 3.6 \cdot 10^{-111}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.25e-67Initial program 45.1%
Taylor expanded in B around -inf 60.1%
if -1.25e-67 < B < -3.0000000000000001e-138 or -5.0000000000000003e-296 < B < 1.7000000000000001e-247Initial program 82.2%
Taylor expanded in B around inf 74.5%
Taylor expanded in C around inf 65.4%
if -3.0000000000000001e-138 < B < -2.0999999999999999e-184Initial program 42.2%
Taylor expanded in C around inf 60.0%
Taylor expanded in A around inf 60.0%
if -2.0999999999999999e-184 < B < -8.20000000000000024e-195 or -1.98000000000000003e-289 < B < -5.0000000000000003e-296Initial program 85.8%
Taylor expanded in B around inf 83.8%
Taylor expanded in A around inf 83.8%
associate-*r/83.8%
mul-1-neg83.8%
Simplified83.8%
if -8.20000000000000024e-195 < B < -1.98000000000000003e-289 or 1.7000000000000001e-247 < B < 3.6000000000000001e-111Initial program 46.6%
Taylor expanded in C around inf 58.9%
associate-*r/58.9%
distribute-rgt1-in58.9%
metadata-eval58.9%
mul0-lft58.9%
metadata-eval58.9%
Simplified58.9%
if 3.6000000000000001e-111 < B Initial program 51.2%
Taylor expanded in B around inf 60.4%
Final simplification61.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ A (- B))) PI)))
(t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -2.36e-63)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.5e-138)
(* 180.0 (/ (atan (* (/ C B) 2.0)) PI))
(if (<= B -2.05e-184)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B -2.1e-192)
t_0
(if (<= B -5.9e-288)
t_1
(if (<= B -2e-296)
t_0
(if (<= B 4.3e-248)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 1.3e-111) t_1 (* 180.0 (/ (atan -1.0) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((A / -B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -2.36e-63) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.5e-138) {
tmp = 180.0 * (atan(((C / B) * 2.0)) / ((double) M_PI));
} else if (B <= -2.05e-184) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= -2.1e-192) {
tmp = t_0;
} else if (B <= -5.9e-288) {
tmp = t_1;
} else if (B <= -2e-296) {
tmp = t_0;
} else if (B <= 4.3e-248) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 1.3e-111) {
tmp = t_1;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((A / -B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -2.36e-63) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.5e-138) {
tmp = 180.0 * (Math.atan(((C / B) * 2.0)) / Math.PI);
} else if (B <= -2.05e-184) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= -2.1e-192) {
tmp = t_0;
} else if (B <= -5.9e-288) {
tmp = t_1;
} else if (B <= -2e-296) {
tmp = t_0;
} else if (B <= 4.3e-248) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 1.3e-111) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((A / -B)) / math.pi) t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -2.36e-63: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.5e-138: tmp = 180.0 * (math.atan(((C / B) * 2.0)) / math.pi) elif B <= -2.05e-184: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= -2.1e-192: tmp = t_0 elif B <= -5.9e-288: tmp = t_1 elif B <= -2e-296: tmp = t_0 elif B <= 4.3e-248: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 1.3e-111: tmp = t_1 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -2.36e-63) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.5e-138) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) * 2.0)) / pi)); elseif (B <= -2.05e-184) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= -2.1e-192) tmp = t_0; elseif (B <= -5.9e-288) tmp = t_1; elseif (B <= -2e-296) tmp = t_0; elseif (B <= 4.3e-248) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 1.3e-111) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((A / -B)) / pi); t_1 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -2.36e-63) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.5e-138) tmp = 180.0 * (atan(((C / B) * 2.0)) / pi); elseif (B <= -2.05e-184) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= -2.1e-192) tmp = t_0; elseif (B <= -5.9e-288) tmp = t_1; elseif (B <= -2e-296) tmp = t_0; elseif (B <= 4.3e-248) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 1.3e-111) tmp = t_1; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -2.36e-63], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.5e-138], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.05e-184], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.1e-192], t$95$0, If[LessEqual[B, -5.9e-288], t$95$1, If[LessEqual[B, -2e-296], t$95$0, If[LessEqual[B, 4.3e-248], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.3e-111], t$95$1, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -2.36 \cdot 10^{-63}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.5 \cdot 10^{-138}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} \cdot 2\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.1 \cdot 10^{-192}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -5.9 \cdot 10^{-288}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-296}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 4.3 \cdot 10^{-248}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.35999999999999998e-63Initial program 45.1%
Taylor expanded in B around -inf 60.1%
if -2.35999999999999998e-63 < B < -3.4999999999999999e-138Initial program 79.1%
Taylor expanded in C around -inf 62.1%
if -3.4999999999999999e-138 < B < -2.05e-184Initial program 42.2%
Taylor expanded in C around inf 60.0%
Taylor expanded in A around inf 60.0%
if -2.05e-184 < B < -2.09999999999999993e-192 or -5.90000000000000014e-288 < B < -2e-296Initial program 85.8%
Taylor expanded in B around inf 83.8%
Taylor expanded in A around inf 83.8%
associate-*r/83.8%
mul-1-neg83.8%
Simplified83.8%
if -2.09999999999999993e-192 < B < -5.90000000000000014e-288 or 4.3000000000000004e-248 < B < 1.29999999999999991e-111Initial program 46.6%
Taylor expanded in C around inf 58.9%
associate-*r/58.9%
distribute-rgt1-in58.9%
metadata-eval58.9%
mul0-lft58.9%
metadata-eval58.9%
Simplified58.9%
if -2e-296 < B < 4.3000000000000004e-248Initial program 85.8%
Taylor expanded in B around inf 74.5%
Taylor expanded in C around inf 69.3%
if 1.29999999999999991e-111 < B Initial program 51.2%
Taylor expanded in B around inf 60.4%
Final simplification61.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ 0.0 B)) PI)))
(t_1 (* 180.0 (/ (atan (/ A (- B))) PI))))
(if (<= B -1.1e-141)
(* 180.0 (/ (atan (+ (/ C B) 1.0)) PI))
(if (<= B -2.05e-184)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(if (<= B -4.5e-194)
t_1
(if (<= B -8.2e-292)
t_0
(if (<= B -7.5e-296)
t_1
(if (<= B 3.8e-248)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 2.4e-88) t_0 (* 180.0 (/ (atan -1.0) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((A / -B)) / ((double) M_PI));
double tmp;
if (B <= -1.1e-141) {
tmp = 180.0 * (atan(((C / B) + 1.0)) / ((double) M_PI));
} else if (B <= -2.05e-184) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else if (B <= -4.5e-194) {
tmp = t_1;
} else if (B <= -8.2e-292) {
tmp = t_0;
} else if (B <= -7.5e-296) {
tmp = t_1;
} else if (B <= 3.8e-248) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 2.4e-88) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((A / -B)) / Math.PI);
double tmp;
if (B <= -1.1e-141) {
tmp = 180.0 * (Math.atan(((C / B) + 1.0)) / Math.PI);
} else if (B <= -2.05e-184) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else if (B <= -4.5e-194) {
tmp = t_1;
} else if (B <= -8.2e-292) {
tmp = t_0;
} else if (B <= -7.5e-296) {
tmp = t_1;
} else if (B <= 3.8e-248) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 2.4e-88) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((0.0 / B)) / math.pi) t_1 = 180.0 * (math.atan((A / -B)) / math.pi) tmp = 0 if B <= -1.1e-141: tmp = 180.0 * (math.atan(((C / B) + 1.0)) / math.pi) elif B <= -2.05e-184: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) elif B <= -4.5e-194: tmp = t_1 elif B <= -8.2e-292: tmp = t_0 elif B <= -7.5e-296: tmp = t_1 elif B <= 3.8e-248: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 2.4e-88: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(A / Float64(-B))) / pi)) tmp = 0.0 if (B <= -1.1e-141) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 1.0)) / pi)); elseif (B <= -2.05e-184) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); elseif (B <= -4.5e-194) tmp = t_1; elseif (B <= -8.2e-292) tmp = t_0; elseif (B <= -7.5e-296) tmp = t_1; elseif (B <= 3.8e-248) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 2.4e-88) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((0.0 / B)) / pi); t_1 = 180.0 * (atan((A / -B)) / pi); tmp = 0.0; if (B <= -1.1e-141) tmp = 180.0 * (atan(((C / B) + 1.0)) / pi); elseif (B <= -2.05e-184) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); elseif (B <= -4.5e-194) tmp = t_1; elseif (B <= -8.2e-292) tmp = t_0; elseif (B <= -7.5e-296) tmp = t_1; elseif (B <= 3.8e-248) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 2.4e-88) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(A / (-B)), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.1e-141], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.05e-184], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.5e-194], t$95$1, If[LessEqual[B, -8.2e-292], t$95$0, If[LessEqual[B, -7.5e-296], t$95$1, If[LessEqual[B, 3.8e-248], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.4e-88], t$95$0, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{A}{-B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.1 \cdot 10^{-141}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq -2.05 \cdot 10^{-184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;B \leq -4.5 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq -8.2 \cdot 10^{-292}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -7.5 \cdot 10^{-296}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 3.8 \cdot 10^{-248}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.4 \cdot 10^{-88}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.10000000000000005e-141Initial program 52.3%
Taylor expanded in A around 0 44.5%
unpow244.5%
unpow244.5%
hypot-define68.9%
Simplified68.9%
Taylor expanded in B around -inf 66.7%
if -1.10000000000000005e-141 < B < -2.05e-184Initial program 42.2%
Taylor expanded in C around inf 60.0%
Taylor expanded in A around inf 60.0%
if -2.05e-184 < B < -4.4999999999999999e-194 or -8.20000000000000087e-292 < B < -7.49999999999999991e-296Initial program 85.8%
Taylor expanded in B around inf 83.8%
Taylor expanded in A around inf 83.8%
associate-*r/83.8%
mul-1-neg83.8%
Simplified83.8%
if -4.4999999999999999e-194 < B < -8.20000000000000087e-292 or 3.7999999999999999e-248 < B < 2.4e-88Initial program 46.6%
Taylor expanded in C around inf 58.9%
associate-*r/58.9%
distribute-rgt1-in58.9%
metadata-eval58.9%
mul0-lft58.9%
metadata-eval58.9%
Simplified58.9%
if -7.49999999999999991e-296 < B < 3.7999999999999999e-248Initial program 85.8%
Taylor expanded in B around inf 74.5%
Taylor expanded in C around inf 69.3%
if 2.4e-88 < B Initial program 51.2%
Taylor expanded in B around inf 60.4%
Final simplification64.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI)))
(t_1 (* 180.0 (/ (atan (/ 0.0 B)) PI))))
(if (<= B -9.2e-71)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.6e-190)
t_0
(if (<= B -1.6e-262)
t_1
(if (<= B 5.5e-247)
t_0
(if (<= B 1.45e-103) t_1 (* 180.0 (/ (atan -1.0) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((C / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
double tmp;
if (B <= -9.2e-71) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.6e-190) {
tmp = t_0;
} else if (B <= -1.6e-262) {
tmp = t_1;
} else if (B <= 5.5e-247) {
tmp = t_0;
} else if (B <= 1.45e-103) {
tmp = t_1;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((C / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
double tmp;
if (B <= -9.2e-71) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.6e-190) {
tmp = t_0;
} else if (B <= -1.6e-262) {
tmp = t_1;
} else if (B <= 5.5e-247) {
tmp = t_0;
} else if (B <= 1.45e-103) {
tmp = t_1;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((C / B)) / math.pi) t_1 = 180.0 * (math.atan((0.0 / B)) / math.pi) tmp = 0 if B <= -9.2e-71: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.6e-190: tmp = t_0 elif B <= -1.6e-262: tmp = t_1 elif B <= 5.5e-247: tmp = t_0 elif B <= 1.45e-103: tmp = t_1 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)) tmp = 0.0 if (B <= -9.2e-71) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.6e-190) tmp = t_0; elseif (B <= -1.6e-262) tmp = t_1; elseif (B <= 5.5e-247) tmp = t_0; elseif (B <= 1.45e-103) tmp = t_1; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((C / B)) / pi); t_1 = 180.0 * (atan((0.0 / B)) / pi); tmp = 0.0; if (B <= -9.2e-71) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.6e-190) tmp = t_0; elseif (B <= -1.6e-262) tmp = t_1; elseif (B <= 5.5e-247) tmp = t_0; elseif (B <= 1.45e-103) tmp = t_1; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -9.2e-71], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.6e-190], t$95$0, If[LessEqual[B, -1.6e-262], t$95$1, If[LessEqual[B, 5.5e-247], t$95$0, If[LessEqual[B, 1.45e-103], t$95$1, N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -9.2 \cdot 10^{-71}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.6 \cdot 10^{-190}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;B \leq 5.5 \cdot 10^{-247}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 1.45 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.1999999999999994e-71Initial program 45.1%
Taylor expanded in B around -inf 60.1%
if -9.1999999999999994e-71 < B < -2.5999999999999998e-190 or -1.6e-262 < B < 5.49999999999999995e-247Initial program 76.5%
Taylor expanded in B around inf 69.2%
Taylor expanded in C around inf 54.7%
if -2.5999999999999998e-190 < B < -1.6e-262 or 5.49999999999999995e-247 < B < 1.4499999999999999e-103Initial program 43.6%
Taylor expanded in C around inf 59.3%
associate-*r/59.3%
distribute-rgt1-in59.3%
metadata-eval59.3%
mul0-lft59.3%
metadata-eval59.3%
Simplified59.3%
if 1.4499999999999999e-103 < B Initial program 51.2%
Taylor expanded in B around inf 60.4%
Final simplification58.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -5e-54)
(* 180.0 (/ (atan (+ (/ C B) 1.0)) PI))
(if (<= C -1.75e-188)
t_0
(if (<= C -2.3e-203)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 4.8e-90) t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -5e-54) {
tmp = 180.0 * (atan(((C / B) + 1.0)) / ((double) M_PI));
} else if (C <= -1.75e-188) {
tmp = t_0;
} else if (C <= -2.3e-203) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 4.8e-90) {
tmp = t_0;
} 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 t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -5e-54) {
tmp = 180.0 * (Math.atan(((C / B) + 1.0)) / Math.PI);
} else if (C <= -1.75e-188) {
tmp = t_0;
} else if (C <= -2.3e-203) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 4.8e-90) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -5e-54: tmp = 180.0 * (math.atan(((C / B) + 1.0)) / math.pi) elif C <= -1.75e-188: tmp = t_0 elif C <= -2.3e-203: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 4.8e-90: tmp = t_0 else: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -5e-54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 1.0)) / pi)); elseif (C <= -1.75e-188) tmp = t_0; elseif (C <= -2.3e-203) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 4.8e-90) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -5e-54) tmp = 180.0 * (atan(((C / B) + 1.0)) / pi); elseif (C <= -1.75e-188) tmp = t_0; elseif (C <= -2.3e-203) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 4.8e-90) tmp = t_0; else tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -5e-54], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.75e-188], t$95$0, If[LessEqual[C, -2.3e-203], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 4.8e-90], t$95$0, N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -5 \cdot 10^{-54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.75 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -2.3 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 4.8 \cdot 10^{-90}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < -5.00000000000000015e-54Initial program 73.6%
Taylor expanded in A around 0 70.1%
unpow270.1%
unpow270.1%
hypot-define86.4%
Simplified86.4%
Taylor expanded in B around -inf 71.6%
if -5.00000000000000015e-54 < C < -1.75e-188 or -2.29999999999999991e-203 < C < 4.8000000000000003e-90Initial program 61.1%
Taylor expanded in C around 0 61.1%
mul-1-neg61.1%
distribute-neg-frac261.1%
+-commutative61.1%
unpow261.1%
unpow261.1%
hypot-define91.0%
Simplified91.0%
Taylor expanded in B around -inf 62.2%
mul-1-neg62.2%
unsub-neg62.2%
Simplified62.2%
if -1.75e-188 < C < -2.29999999999999991e-203Initial program 43.2%
Taylor expanded in B around inf 70.1%
if 4.8000000000000003e-90 < C Initial program 27.3%
Taylor expanded in C around inf 61.5%
Taylor expanded in A around inf 61.5%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -1.55e-54)
(* 180.0 (/ (atan (+ (/ C B) 1.0)) PI))
(if (<= C -1.75e-188)
t_0
(if (<= C -2.3e-203)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 6e-89) t_0 (* (/ 180.0 PI) (atan (* B (/ -0.5 C))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -1.55e-54) {
tmp = 180.0 * (atan(((C / B) + 1.0)) / ((double) M_PI));
} else if (C <= -1.75e-188) {
tmp = t_0;
} else if (C <= -2.3e-203) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 6e-89) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -1.55e-54) {
tmp = 180.0 * (Math.atan(((C / B) + 1.0)) / Math.PI);
} else if (C <= -1.75e-188) {
tmp = t_0;
} else if (C <= -2.3e-203) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 6e-89) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / C)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -1.55e-54: tmp = 180.0 * (math.atan(((C / B) + 1.0)) / math.pi) elif C <= -1.75e-188: tmp = t_0 elif C <= -2.3e-203: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 6e-89: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / C))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -1.55e-54) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 1.0)) / pi)); elseif (C <= -1.75e-188) tmp = t_0; elseif (C <= -2.3e-203) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 6e-89) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -1.55e-54) tmp = 180.0 * (atan(((C / B) + 1.0)) / pi); elseif (C <= -1.75e-188) tmp = t_0; elseif (C <= -2.3e-203) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 6e-89) tmp = t_0; else tmp = (180.0 / pi) * atan((B * (-0.5 / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.55e-54], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -1.75e-188], t$95$0, If[LessEqual[C, -2.3e-203], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6e-89], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.55 \cdot 10^{-54}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;C \leq -1.75 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq -2.3 \cdot 10^{-203}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 6 \cdot 10^{-89}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\
\end{array}
\end{array}
if C < -1.55000000000000002e-54Initial program 73.6%
Taylor expanded in A around 0 70.1%
unpow270.1%
unpow270.1%
hypot-define86.4%
Simplified86.4%
Taylor expanded in B around -inf 71.6%
if -1.55000000000000002e-54 < C < -1.75e-188 or -2.29999999999999991e-203 < C < 5.9999999999999999e-89Initial program 61.1%
Taylor expanded in C around 0 61.1%
mul-1-neg61.1%
distribute-neg-frac261.1%
+-commutative61.1%
unpow261.1%
unpow261.1%
hypot-define91.0%
Simplified91.0%
Taylor expanded in B around -inf 62.2%
mul-1-neg62.2%
unsub-neg62.2%
Simplified62.2%
if -1.75e-188 < C < -2.29999999999999991e-203Initial program 43.2%
Taylor expanded in B around inf 70.1%
if 5.9999999999999999e-89 < C Initial program 27.3%
Taylor expanded in C around inf 61.5%
Taylor expanded in A around inf 61.5%
Simplified61.6%
Final simplification65.0%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (- 1.0 (/ A B))) PI))))
(if (<= C -1.8e-53)
(* 180.0 (/ (atan (+ (/ C B) 1.0)) PI))
(if (<= C 1.7e-284)
t_0
(if (<= C 1.55e-244)
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI)
(if (<= C 5.8e-89) t_0 (* (/ 180.0 PI) (atan (* B (/ -0.5 C))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((1.0 - (A / B))) / ((double) M_PI));
double tmp;
if (C <= -1.8e-53) {
tmp = 180.0 * (atan(((C / B) + 1.0)) / ((double) M_PI));
} else if (C <= 1.7e-284) {
tmp = t_0;
} else if (C <= 1.55e-244) {
tmp = (180.0 * atan((-1.0 - (A / B)))) / ((double) M_PI);
} else if (C <= 5.8e-89) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan((B * (-0.5 / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((1.0 - (A / B))) / Math.PI);
double tmp;
if (C <= -1.8e-53) {
tmp = 180.0 * (Math.atan(((C / B) + 1.0)) / Math.PI);
} else if (C <= 1.7e-284) {
tmp = t_0;
} else if (C <= 1.55e-244) {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
} else if (C <= 5.8e-89) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan((B * (-0.5 / C)));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((1.0 - (A / B))) / math.pi) tmp = 0 if C <= -1.8e-53: tmp = 180.0 * (math.atan(((C / B) + 1.0)) / math.pi) elif C <= 1.7e-284: tmp = t_0 elif C <= 1.55e-244: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi elif C <= 5.8e-89: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan((B * (-0.5 / C))) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(1.0 - Float64(A / B))) / pi)) tmp = 0.0 if (C <= -1.8e-53) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + 1.0)) / pi)); elseif (C <= 1.7e-284) tmp = t_0; elseif (C <= 1.55e-244) tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); elseif (C <= 5.8e-89) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(B * Float64(-0.5 / C)))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((1.0 - (A / B))) / pi); tmp = 0.0; if (C <= -1.8e-53) tmp = 180.0 * (atan(((C / B) + 1.0)) / pi); elseif (C <= 1.7e-284) tmp = t_0; elseif (C <= 1.55e-244) tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; elseif (C <= 5.8e-89) tmp = t_0; else tmp = (180.0 / pi) * atan((B * (-0.5 / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.8e-53], N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.7e-284], t$95$0, If[LessEqual[C, 1.55e-244], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[C, 5.8e-89], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(B * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;C \leq -1.8 \cdot 10^{-53}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.7 \cdot 10^{-284}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;C \leq 1.55 \cdot 10^{-244}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 5.8 \cdot 10^{-89}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(B \cdot \frac{-0.5}{C}\right)\\
\end{array}
\end{array}
if C < -1.7999999999999999e-53Initial program 73.6%
Taylor expanded in A around 0 70.1%
unpow270.1%
unpow270.1%
hypot-define86.4%
Simplified86.4%
Taylor expanded in B around -inf 71.6%
if -1.7999999999999999e-53 < C < 1.69999999999999996e-284 or 1.55e-244 < C < 5.79999999999999984e-89Initial program 58.4%
Taylor expanded in C around 0 57.4%
mul-1-neg57.4%
distribute-neg-frac257.4%
+-commutative57.4%
unpow257.4%
unpow257.4%
hypot-define89.6%
Simplified89.6%
Taylor expanded in B around -inf 61.6%
mul-1-neg61.6%
unsub-neg61.6%
Simplified61.6%
if 1.69999999999999996e-284 < C < 1.55e-244Initial program 74.1%
Taylor expanded in B around inf 90.3%
Taylor expanded in C around 0 90.3%
mul-1-neg90.3%
distribute-neg-frac290.3%
Simplified90.3%
Taylor expanded in A around 0 90.3%
Simplified90.3%
if 5.79999999999999984e-89 < C Initial program 27.3%
Taylor expanded in C around inf 61.5%
Taylor expanded in A around inf 61.5%
Simplified61.6%
Final simplification65.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (+ (/ (- C A) B) 1.0)) PI))))
(if (<= B -8e-195)
t_0
(if (<= B -6.2e-262)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.5e-24) t_0 (/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((((C - A) / B) + 1.0)) / ((double) M_PI));
double tmp;
if (B <= -8e-195) {
tmp = t_0;
} else if (B <= -6.2e-262) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.5e-24) {
tmp = t_0;
} 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 t_0 = 180.0 * (Math.atan((((C - A) / B) + 1.0)) / Math.PI);
double tmp;
if (B <= -8e-195) {
tmp = t_0;
} else if (B <= -6.2e-262) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.5e-24) {
tmp = t_0;
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((((C - A) / B) + 1.0)) / math.pi) tmp = 0 if B <= -8e-195: tmp = t_0 elif B <= -6.2e-262: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.5e-24: tmp = t_0 else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) / B) + 1.0)) / pi)) tmp = 0.0 if (B <= -8e-195) tmp = t_0; elseif (B <= -6.2e-262) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.5e-24) tmp = t_0; else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((((C - A) / B) + 1.0)) / pi); tmp = 0.0; if (B <= -8e-195) tmp = t_0; elseif (B <= -6.2e-262) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.5e-24) tmp = t_0; else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e-195], t$95$0, If[LessEqual[B, -6.2e-262], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.5e-24], t$95$0, N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{if}\;B \leq -8 \cdot 10^{-195}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq -6.2 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.0000000000000007e-195 or -6.1999999999999997e-262 < B < 2.4999999999999999e-24Initial program 57.0%
Taylor expanded in B around -inf 65.1%
associate--l+65.1%
div-sub66.8%
Simplified66.8%
if -8.0000000000000007e-195 < B < -6.1999999999999997e-262Initial program 38.5%
Taylor expanded in C around inf 73.7%
associate-*r/73.7%
distribute-rgt1-in73.7%
metadata-eval73.7%
mul0-lft73.7%
metadata-eval73.7%
Simplified73.7%
if 2.4999999999999999e-24 < B Initial program 48.0%
Taylor expanded in B around inf 78.4%
Taylor expanded in C around 0 75.1%
mul-1-neg75.1%
distribute-neg-frac275.1%
Simplified75.1%
Taylor expanded in A around 0 75.1%
Simplified75.1%
Final simplification69.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (+ (/ (- C A) B) 1.0))))
(if (<= B -8e-195)
(/ (* 180.0 t_0) PI)
(if (<= B -4.5e-262)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 1.95e-26)
(* 180.0 (/ t_0 PI))
(/ (* 180.0 (atan (- -1.0 (/ A B)))) PI))))))
double code(double A, double B, double C) {
double t_0 = atan((((C - A) / B) + 1.0));
double tmp;
if (B <= -8e-195) {
tmp = (180.0 * t_0) / ((double) M_PI);
} else if (B <= -4.5e-262) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 1.95e-26) {
tmp = 180.0 * (t_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 t_0 = Math.atan((((C - A) / B) + 1.0));
double tmp;
if (B <= -8e-195) {
tmp = (180.0 * t_0) / Math.PI;
} else if (B <= -4.5e-262) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 1.95e-26) {
tmp = 180.0 * (t_0 / Math.PI);
} else {
tmp = (180.0 * Math.atan((-1.0 - (A / B)))) / Math.PI;
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((((C - A) / B) + 1.0)) tmp = 0 if B <= -8e-195: tmp = (180.0 * t_0) / math.pi elif B <= -4.5e-262: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 1.95e-26: tmp = 180.0 * (t_0 / math.pi) else: tmp = (180.0 * math.atan((-1.0 - (A / B)))) / math.pi return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(Float64(C - A) / B) + 1.0)) tmp = 0.0 if (B <= -8e-195) tmp = Float64(Float64(180.0 * t_0) / pi); elseif (B <= -4.5e-262) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 1.95e-26) tmp = Float64(180.0 * Float64(t_0 / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(-1.0 - Float64(A / B)))) / pi); end return tmp end
function tmp_2 = code(A, B, C) t_0 = atan((((C - A) / B) + 1.0)); tmp = 0.0; if (B <= -8e-195) tmp = (180.0 * t_0) / pi; elseif (B <= -4.5e-262) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 1.95e-26) tmp = 180.0 * (t_0 / pi); else tmp = (180.0 * atan((-1.0 - (A / B)))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B, -8e-195], N[(N[(180.0 * t$95$0), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -4.5e-262], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.95e-26], N[(180.0 * N[(t$95$0 / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1} \left(\frac{C - A}{B} + 1\right)\\
\mathbf{if}\;B \leq -8 \cdot 10^{-195}:\\
\;\;\;\;\frac{180 \cdot t\_0}{\pi}\\
\mathbf{elif}\;B \leq -4.5 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.95 \cdot 10^{-26}:\\
\;\;\;\;180 \cdot \frac{t\_0}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(-1 - \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.0000000000000007e-195Initial program 52.7%
associate-*r/52.6%
associate-*l/52.7%
*-un-lft-identity52.7%
unpow252.7%
unpow252.7%
hypot-define78.7%
Applied egg-rr78.7%
Taylor expanded in B around -inf 72.5%
associate--l+72.5%
div-sub72.5%
Simplified72.5%
if -8.0000000000000007e-195 < B < -4.49999999999999998e-262Initial program 38.5%
Taylor expanded in C around inf 73.7%
associate-*r/73.7%
distribute-rgt1-in73.7%
metadata-eval73.7%
mul0-lft73.7%
metadata-eval73.7%
Simplified73.7%
if -4.49999999999999998e-262 < B < 1.94999999999999993e-26Initial program 65.7%
Taylor expanded in B around -inf 50.3%
associate--l+50.3%
div-sub55.4%
Simplified55.4%
if 1.94999999999999993e-26 < B Initial program 48.0%
Taylor expanded in B around inf 78.4%
Taylor expanded in C around 0 75.1%
mul-1-neg75.1%
distribute-neg-frac275.1%
Simplified75.1%
Taylor expanded in A around 0 75.1%
Simplified75.1%
Final simplification69.1%
(FPCore (A B C)
:precision binary64
(if (<= B -8e-195)
(/ (* 180.0 (atan (+ (/ (- C A) B) 1.0))) PI)
(if (<= B -6e-262)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ (* 180.0 (atan (/ (- C (+ A B)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8e-195) {
tmp = (180.0 * atan((((C - A) / B) + 1.0))) / ((double) M_PI);
} else if (B <= -6e-262) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((C - (A + B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8e-195) {
tmp = (180.0 * Math.atan((((C - A) / B) + 1.0))) / Math.PI;
} else if (B <= -6e-262) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C - (A + B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8e-195: tmp = (180.0 * math.atan((((C - A) / B) + 1.0))) / math.pi elif B <= -6e-262: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = (180.0 * math.atan(((C - (A + B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8e-195) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) / B) + 1.0))) / pi); elseif (B <= -6e-262) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - Float64(A + B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8e-195) tmp = (180.0 * atan((((C - A) / B) + 1.0))) / pi; elseif (B <= -6e-262) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = (180.0 * atan(((C - (A + B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8e-195], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, -6e-262], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8 \cdot 10^{-195}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - A}{B} + 1\right)}{\pi}\\
\mathbf{elif}\;B \leq -6 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.0000000000000007e-195Initial program 52.7%
associate-*r/52.6%
associate-*l/52.7%
*-un-lft-identity52.7%
unpow252.7%
unpow252.7%
hypot-define78.7%
Applied egg-rr78.7%
Taylor expanded in B around -inf 72.5%
associate--l+72.5%
div-sub72.5%
Simplified72.5%
if -8.0000000000000007e-195 < B < -6.00000000000000036e-262Initial program 38.5%
Taylor expanded in C around inf 73.7%
associate-*r/73.7%
distribute-rgt1-in73.7%
metadata-eval73.7%
mul0-lft73.7%
metadata-eval73.7%
Simplified73.7%
if -6.00000000000000036e-262 < B Initial program 56.7%
Taylor expanded in B around inf 68.7%
associate-*r/68.7%
associate-*l/68.7%
*-un-lft-identity68.7%
associate--l-68.7%
Applied egg-rr68.7%
Final simplification70.7%
(FPCore (A B C)
:precision binary64
(if (<= B -8e-195)
(* 180.0 (/ (atan (* (/ 1.0 B) (+ (- C A) B))) PI))
(if (<= B -1.45e-262)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(/ (* 180.0 (atan (/ (- C (+ A B)) B))) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8e-195) {
tmp = 180.0 * (atan(((1.0 / B) * ((C - A) + B))) / ((double) M_PI));
} else if (B <= -1.45e-262) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = (180.0 * atan(((C - (A + B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -8e-195) {
tmp = 180.0 * (Math.atan(((1.0 / B) * ((C - A) + B))) / Math.PI);
} else if (B <= -1.45e-262) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = (180.0 * Math.atan(((C - (A + B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8e-195: tmp = 180.0 * (math.atan(((1.0 / B) * ((C - A) + B))) / math.pi) elif B <= -1.45e-262: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = (180.0 * math.atan(((C - (A + B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (B <= -8e-195) tmp = Float64(180.0 * Float64(atan(Float64(Float64(1.0 / B) * Float64(Float64(C - A) + B))) / pi)); elseif (B <= -1.45e-262) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(C - Float64(A + B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -8e-195) tmp = 180.0 * (atan(((1.0 / B) * ((C - A) + B))) / pi); elseif (B <= -1.45e-262) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = (180.0 * atan(((C - (A + B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8e-195], N[(180.0 * N[(N[ArcTan[N[(N[(1.0 / B), $MachinePrecision] * N[(N[(C - A), $MachinePrecision] + B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.45e-262], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8 \cdot 10^{-195}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{1}{B} \cdot \left(\left(C - A\right) + B\right)\right)}{\pi}\\
\mathbf{elif}\;B \leq -1.45 \cdot 10^{-262}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -8.0000000000000007e-195Initial program 52.7%
Taylor expanded in B around -inf 72.5%
neg-mul-172.5%
Simplified72.5%
if -8.0000000000000007e-195 < B < -1.44999999999999998e-262Initial program 38.5%
Taylor expanded in C around inf 73.7%
associate-*r/73.7%
distribute-rgt1-in73.7%
metadata-eval73.7%
mul0-lft73.7%
metadata-eval73.7%
Simplified73.7%
if -1.44999999999999998e-262 < B Initial program 56.7%
Taylor expanded in B around inf 68.7%
associate-*r/68.7%
associate-*l/68.7%
*-un-lft-identity68.7%
associate--l-68.7%
Applied egg-rr68.7%
Final simplification70.7%
(FPCore (A B C)
:precision binary64
(if (<= B -1.8e-128)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 9.5e-114)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-128) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 9.5e-114) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.8e-128) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 9.5e-114) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.8e-128: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 9.5e-114: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.8e-128) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 9.5e-114) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.8e-128) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 9.5e-114) tmp = 180.0 * (atan((0.0 / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.8e-128], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.5e-114], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.8 \cdot 10^{-128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-114}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.80000000000000012e-128Initial program 50.4%
Taylor expanded in B around -inf 53.5%
if -1.80000000000000012e-128 < B < 9.49999999999999958e-114Initial program 61.3%
Taylor expanded in C around inf 38.9%
associate-*r/38.9%
distribute-rgt1-in38.9%
metadata-eval38.9%
mul0-lft38.9%
metadata-eval38.9%
Simplified38.9%
if 9.49999999999999958e-114 < B Initial program 51.2%
Taylor expanded in B around inf 60.4%
Final simplification51.0%
(FPCore (A B C) :precision binary64 (if (<= B -5e-310) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -5e-310) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -5e-310: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -5e-310) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -5e-310) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -5e-310], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -5 \cdot 10^{-310}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.999999999999985e-310Initial program 54.0%
Taylor expanded in B around -inf 41.9%
if -4.999999999999985e-310 < B Initial program 54.1%
Taylor expanded in B around inf 43.2%
Final simplification42.5%
(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.0%
Taylor expanded in B around inf 20.4%
Final simplification20.4%
herbie shell --seed 2024073
(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)))