
(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 15 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 -5.2e+141) (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI) (/ (* 180.0 (atan (/ (- (- C A) (hypot (- A C) B)) B))) PI)))
double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+141) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else {
tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / ((double) M_PI);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -5.2e+141) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else {
tmp = (180.0 * Math.atan((((C - A) - Math.hypot((A - C), B)) / B))) / Math.PI;
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -5.2e+141: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi else: tmp = (180.0 * math.atan((((C - A) - math.hypot((A - C), B)) / B))) / math.pi return tmp
function code(A, B, C) tmp = 0.0 if (A <= -5.2e+141) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); else tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(C - A) - hypot(Float64(A - C), B)) / B))) / pi); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -5.2e+141) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; else tmp = (180.0 * atan((((C - A) - hypot((A - C), B)) / B))) / pi; end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -5.2e+141], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(N[(180.0 * N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5.2 \cdot 10^{+141}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(A - C, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.1999999999999999e141Initial program 7.9%
Applied egg-rr43.5%
Taylor expanded in A around -inf 93.9%
if -5.1999999999999999e141 < A Initial program 61.8%
Applied egg-rr86.0%
Final simplification86.9%
(FPCore (A B C) :precision binary64 (if (<= A -5e+126) (/ (* 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 <= -5e+126) {
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 <= -5e+126) {
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 <= -5e+126: 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 <= -5e+126) 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 <= -5e+126) 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, -5e+126], 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 -5 \cdot 10^{+126}:\\
\;\;\;\;\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 < -4.99999999999999977e126Initial program 11.1%
Applied egg-rr45.9%
Taylor expanded in A around -inf 88.9%
if -4.99999999999999977e126 < A Initial program 62.0%
Simplified85.8%
Final simplification86.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (* B -0.5) C)) PI)))
(t_1 (* 180.0 (/ (atan (* 2.0 (/ C B))) PI))))
(if (<= B -8e-35)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -5.5e-49)
t_0
(if (<= B 9.2e-274)
t_1
(if (<= B 8.2e-243)
(/ (* 180.0 (atan (/ 0.0 B))) PI)
(if (<= B 7e-198)
t_1
(if (<= B 1e-183)
t_0
(if (<= B 7.6e+37)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
double t_1 = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
double tmp;
if (B <= -8e-35) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -5.5e-49) {
tmp = t_0;
} else if (B <= 9.2e-274) {
tmp = t_1;
} else if (B <= 8.2e-243) {
tmp = (180.0 * atan((0.0 / B))) / ((double) M_PI);
} else if (B <= 7e-198) {
tmp = t_1;
} else if (B <= 1e-183) {
tmp = t_0;
} else if (B <= 7.6e+37) {
tmp = 180.0 * (atan((-2.0 * (A / 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 t_0 = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
double t_1 = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
double tmp;
if (B <= -8e-35) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -5.5e-49) {
tmp = t_0;
} else if (B <= 9.2e-274) {
tmp = t_1;
} else if (B <= 8.2e-243) {
tmp = (180.0 * Math.atan((0.0 / B))) / Math.PI;
} else if (B <= 7e-198) {
tmp = t_1;
} else if (B <= 1e-183) {
tmp = t_0;
} else if (B <= 7.6e+37) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) t_1 = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) tmp = 0 if B <= -8e-35: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -5.5e-49: tmp = t_0 elif B <= 9.2e-274: tmp = t_1 elif B <= 8.2e-243: tmp = (180.0 * math.atan((0.0 / B))) / math.pi elif B <= 7e-198: tmp = t_1 elif B <= 1e-183: tmp = t_0 elif B <= 7.6e+37: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) 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(Float64(B * -0.5) / C)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)) tmp = 0.0 if (B <= -8e-35) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -5.5e-49) tmp = t_0; elseif (B <= 9.2e-274) tmp = t_1; elseif (B <= 8.2e-243) tmp = Float64(Float64(180.0 * atan(Float64(0.0 / B))) / pi); elseif (B <= 7e-198) tmp = t_1; elseif (B <= 1e-183) tmp = t_0; elseif (B <= 7.6e+37) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); 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(((B * -0.5) / C)) / pi); t_1 = 180.0 * (atan((2.0 * (C / B))) / pi); tmp = 0.0; if (B <= -8e-35) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -5.5e-49) tmp = t_0; elseif (B <= 9.2e-274) tmp = t_1; elseif (B <= 8.2e-243) tmp = (180.0 * atan((0.0 / B))) / pi; elseif (B <= 7e-198) tmp = t_1; elseif (B <= 1e-183) tmp = t_0; elseif (B <= 7.6e+37) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); 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[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -8e-35], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.5e-49], t$95$0, If[LessEqual[B, 9.2e-274], t$95$1, If[LessEqual[B, 8.2e-243], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 7e-198], t$95$1, If[LessEqual[B, 1e-183], t$95$0, If[LessEqual[B, 7.6e+37], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -8 \cdot 10^{-35}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -5.5 \cdot 10^{-49}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 9.2 \cdot 10^{-274}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 8.2 \cdot 10^{-243}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 10^{-183}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 7.6 \cdot 10^{+37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.00000000000000006e-35Initial program 52.2%
Taylor expanded in B around -inf 66.2%
if -8.00000000000000006e-35 < B < -5.50000000000000031e-49 or 7.0000000000000005e-198 < B < 1.00000000000000001e-183Initial program 13.4%
Taylor expanded in C around inf 51.5%
+-commutative51.5%
+-commutative51.5%
associate--l+70.5%
mul-1-neg70.5%
distribute-rgt1-in70.5%
associate-*r*70.5%
metadata-eval70.5%
metadata-eval70.5%
metadata-eval70.5%
*-commutative70.5%
metadata-eval70.5%
Simplified70.5%
Taylor expanded in B around 0 90.6%
associate-*r/90.6%
Simplified90.6%
if -5.50000000000000031e-49 < B < 9.19999999999999984e-274 or 8.19999999999999962e-243 < B < 7.0000000000000005e-198Initial program 64.9%
Taylor expanded in C around -inf 49.4%
if 9.19999999999999984e-274 < B < 8.19999999999999962e-243Initial program 39.4%
Applied egg-rr100.0%
Taylor expanded in C around inf 75.8%
mul-1-neg75.8%
sub-neg75.8%
+-inverses75.8%
metadata-eval75.8%
Simplified75.8%
if 1.00000000000000001e-183 < B < 7.59999999999999979e37Initial program 65.8%
Taylor expanded in A around inf 43.0%
if 7.59999999999999979e37 < B Initial program 51.4%
Taylor expanded in B around inf 67.7%
Final simplification59.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI)))
(t_1 (* 180.0 (/ (atan (/ (* 0.5 B) A)) PI))))
(if (<= A -1.35e+54)
t_1
(if (<= A -4.5e+31)
t_0
(if (<= A -3e-309)
t_1
(if (<= A 3.5e-110)
t_0
(if (<= A 8e-17)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double t_1 = 180.0 * (atan(((0.5 * B) / A)) / ((double) M_PI));
double tmp;
if (A <= -1.35e+54) {
tmp = t_1;
} else if (A <= -4.5e+31) {
tmp = t_0;
} else if (A <= -3e-309) {
tmp = t_1;
} else if (A <= 3.5e-110) {
tmp = t_0;
} else if (A <= 8e-17) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.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(1.0) / Math.PI);
double t_1 = 180.0 * (Math.atan(((0.5 * B) / A)) / Math.PI);
double tmp;
if (A <= -1.35e+54) {
tmp = t_1;
} else if (A <= -4.5e+31) {
tmp = t_0;
} else if (A <= -3e-309) {
tmp = t_1;
} else if (A <= 3.5e-110) {
tmp = t_0;
} else if (A <= 8e-17) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) t_1 = 180.0 * (math.atan(((0.5 * B) / A)) / math.pi) tmp = 0 if A <= -1.35e+54: tmp = t_1 elif A <= -4.5e+31: tmp = t_0 elif A <= -3e-309: tmp = t_1 elif A <= 3.5e-110: tmp = t_0 elif A <= 8e-17: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(Float64(0.5 * B) / A)) / pi)) tmp = 0.0 if (A <= -1.35e+54) tmp = t_1; elseif (A <= -4.5e+31) tmp = t_0; elseif (A <= -3e-309) tmp = t_1; elseif (A <= 3.5e-110) tmp = t_0; elseif (A <= 8e-17) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(1.0) / pi); t_1 = 180.0 * (atan(((0.5 * B) / A)) / pi); tmp = 0.0; if (A <= -1.35e+54) tmp = t_1; elseif (A <= -4.5e+31) tmp = t_0; elseif (A <= -3e-309) tmp = t_1; elseif (A <= 3.5e-110) tmp = t_0; elseif (A <= 8e-17) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(N[(0.5 * B), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1.35e+54], t$95$1, If[LessEqual[A, -4.5e+31], t$95$0, If[LessEqual[A, -3e-309], t$95$1, If[LessEqual[A, 3.5e-110], t$95$0, If[LessEqual[A, 8e-17], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(\frac{0.5 \cdot B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.35 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -4.5 \cdot 10^{+31}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3 \cdot 10^{-309}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-110}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 8 \cdot 10^{-17}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.35000000000000005e54 or -4.4999999999999996e31 < A < -3.000000000000001e-309Initial program 41.7%
Taylor expanded in A around -inf 53.2%
associate-*r/53.2%
*-commutative53.2%
Simplified53.2%
if -1.35000000000000005e54 < A < -4.4999999999999996e31 or -3.000000000000001e-309 < A < 3.49999999999999974e-110Initial program 56.5%
Taylor expanded in B around -inf 57.7%
if 3.49999999999999974e-110 < A < 8.00000000000000057e-17Initial program 40.0%
Taylor expanded in C around inf 30.5%
+-commutative30.5%
+-commutative30.5%
associate--l+34.9%
mul-1-neg34.9%
distribute-rgt1-in34.9%
associate-*r*34.9%
metadata-eval34.9%
metadata-eval34.9%
metadata-eval34.9%
*-commutative34.9%
metadata-eval34.9%
Simplified34.9%
Taylor expanded in B around 0 50.3%
associate-*r/50.3%
Simplified50.3%
if 8.00000000000000057e-17 < A Initial program 80.3%
Taylor expanded in A around inf 73.0%
Final simplification59.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan 1.0) PI)))
(t_1 (/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)))
(if (<= A -1.02e+53)
t_1
(if (<= A -1.25e+32)
t_0
(if (<= A -6.5e-308)
t_1
(if (<= A 3.9e-110)
t_0
(if (<= A 5.2e-18)
(* 180.0 (/ (atan (/ (* B -0.5) C)) PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(1.0) / ((double) M_PI));
double t_1 = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
double tmp;
if (A <= -1.02e+53) {
tmp = t_1;
} else if (A <= -1.25e+32) {
tmp = t_0;
} else if (A <= -6.5e-308) {
tmp = t_1;
} else if (A <= 3.9e-110) {
tmp = t_0;
} else if (A <= 5.2e-18) {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-2.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(1.0) / Math.PI);
double t_1 = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
double tmp;
if (A <= -1.02e+53) {
tmp = t_1;
} else if (A <= -1.25e+32) {
tmp = t_0;
} else if (A <= -6.5e-308) {
tmp = t_1;
} else if (A <= 3.9e-110) {
tmp = t_0;
} else if (A <= 5.2e-18) {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(1.0) / math.pi) t_1 = (180.0 * math.atan((0.5 * (B / A)))) / math.pi tmp = 0 if A <= -1.02e+53: tmp = t_1 elif A <= -1.25e+32: tmp = t_0 elif A <= -6.5e-308: tmp = t_1 elif A <= 3.9e-110: tmp = t_0 elif A <= 5.2e-18: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(1.0) / pi)) t_1 = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi) tmp = 0.0 if (A <= -1.02e+53) tmp = t_1; elseif (A <= -1.25e+32) tmp = t_0; elseif (A <= -6.5e-308) tmp = t_1; elseif (A <= 3.9e-110) tmp = t_0; elseif (A <= 5.2e-18) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(1.0) / pi); t_1 = (180.0 * atan((0.5 * (B / A)))) / pi; tmp = 0.0; if (A <= -1.02e+53) tmp = t_1; elseif (A <= -1.25e+32) tmp = t_0; elseif (A <= -6.5e-308) tmp = t_1; elseif (A <= 3.9e-110) tmp = t_0; elseif (A <= 5.2e-18) tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[A, -1.02e+53], t$95$1, If[LessEqual[A, -1.25e+32], t$95$0, If[LessEqual[A, -6.5e-308], t$95$1, If[LessEqual[A, 3.9e-110], t$95$0, If[LessEqual[A, 5.2e-18], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} 1}{\pi}\\
t_1 := \frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -1.02 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1.25 \cdot 10^{+32}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -6.5 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 3.9 \cdot 10^{-110}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5.2 \cdot 10^{-18}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.01999999999999999e53 or -1.2499999999999999e32 < A < -6.4999999999999999e-308Initial program 41.7%
Applied egg-rr68.2%
Taylor expanded in A around -inf 53.3%
if -1.01999999999999999e53 < A < -1.2499999999999999e32 or -6.4999999999999999e-308 < A < 3.9e-110Initial program 56.5%
Taylor expanded in B around -inf 57.7%
if 3.9e-110 < A < 5.2000000000000001e-18Initial program 40.0%
Taylor expanded in C around inf 30.5%
+-commutative30.5%
+-commutative30.5%
associate--l+34.9%
mul-1-neg34.9%
distribute-rgt1-in34.9%
associate-*r*34.9%
metadata-eval34.9%
metadata-eval34.9%
metadata-eval34.9%
*-commutative34.9%
metadata-eval34.9%
Simplified34.9%
Taylor expanded in B around 0 50.3%
associate-*r/50.3%
Simplified50.3%
if 5.2000000000000001e-18 < A Initial program 80.3%
Taylor expanded in A around inf 73.0%
Final simplification59.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -1.9e-48)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.16e-273)
t_0
(if (<= B 1.08e-243)
(/ (* 180.0 (atan (/ 0.0 B))) PI)
(if (<= B 1.22e-131) t_0 (* 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 tmp;
if (B <= -1.9e-48) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.16e-273) {
tmp = t_0;
} else if (B <= 1.08e-243) {
tmp = (180.0 * atan((0.0 / B))) / ((double) M_PI);
} else if (B <= 1.22e-131) {
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((C / B)) / Math.PI);
double tmp;
if (B <= -1.9e-48) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.16e-273) {
tmp = t_0;
} else if (B <= 1.08e-243) {
tmp = (180.0 * Math.atan((0.0 / B))) / Math.PI;
} else if (B <= 1.22e-131) {
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((C / B)) / math.pi) tmp = 0 if B <= -1.9e-48: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.16e-273: tmp = t_0 elif B <= 1.08e-243: tmp = (180.0 * math.atan((0.0 / B))) / math.pi elif B <= 1.22e-131: 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(C / B)) / pi)) tmp = 0.0 if (B <= -1.9e-48) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.16e-273) tmp = t_0; elseif (B <= 1.08e-243) tmp = Float64(Float64(180.0 * atan(Float64(0.0 / B))) / pi); elseif (B <= 1.22e-131) 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((C / B)) / pi); tmp = 0.0; if (B <= -1.9e-48) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.16e-273) tmp = t_0; elseif (B <= 1.08e-243) tmp = (180.0 * atan((0.0 / B))) / pi; elseif (B <= 1.22e-131) 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[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.9e-48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.16e-273], t$95$0, If[LessEqual[B, 1.08e-243], N[(N[(180.0 * N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 1.22e-131], 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{C}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.9 \cdot 10^{-48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.16 \cdot 10^{-273}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 1.08 \cdot 10^{-243}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.22 \cdot 10^{-131}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.90000000000000001e-48Initial program 50.6%
Taylor expanded in B around -inf 62.9%
if -1.90000000000000001e-48 < B < 1.1599999999999999e-273 or 1.08e-243 < B < 1.21999999999999988e-131Initial program 63.5%
Simplified73.4%
+-commutative73.4%
add-sqr-sqrt68.4%
fma-def68.3%
Applied egg-rr68.3%
Taylor expanded in C around inf 48.6%
if 1.1599999999999999e-273 < B < 1.08e-243Initial program 39.4%
Applied egg-rr100.0%
Taylor expanded in C around inf 75.8%
mul-1-neg75.8%
sub-neg75.8%
+-inverses75.8%
metadata-eval75.8%
Simplified75.8%
if 1.21999999999999988e-131 < B Initial program 56.0%
Taylor expanded in B around inf 47.2%
Final simplification54.1%
(FPCore (A B C)
:precision binary64
(if (<= B -1.95e-48)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -2.3e-259)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 7.2e+37)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.95e-48) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -2.3e-259) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 7.2e+37) {
tmp = 180.0 * (atan((-2.0 * (A / 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.95e-48) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -2.3e-259) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 7.2e+37) {
tmp = 180.0 * (Math.atan((-2.0 * (A / 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.95e-48: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -2.3e-259: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 7.2e+37: tmp = 180.0 * (math.atan((-2.0 * (A / 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.95e-48) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -2.3e-259) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 7.2e+37) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / 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.95e-48) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -2.3e-259) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 7.2e+37) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.95e-48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2.3e-259], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.2e+37], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.95 \cdot 10^{-48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -2.3 \cdot 10^{-259}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.2 \cdot 10^{+37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.95e-48Initial program 50.6%
Taylor expanded in B around -inf 62.9%
if -1.95e-48 < B < -2.2999999999999999e-259Initial program 68.7%
Simplified79.1%
+-commutative79.1%
add-sqr-sqrt76.5%
fma-def76.6%
Applied egg-rr76.6%
Taylor expanded in C around inf 55.6%
if -2.2999999999999999e-259 < B < 7.19999999999999995e37Initial program 58.0%
Taylor expanded in A around inf 39.6%
if 7.19999999999999995e37 < B Initial program 51.4%
Taylor expanded in B around inf 67.7%
Final simplification54.6%
(FPCore (A B C)
:precision binary64
(if (<= B -8e-49)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.25e-260)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= B 2.6e+37)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -8e-49) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.25e-260) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (B <= 2.6e+37) {
tmp = 180.0 * (atan((-2.0 * (A / 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 <= -8e-49) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.25e-260) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (B <= 2.6e+37) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -8e-49: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.25e-260: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif B <= 2.6e+37: tmp = 180.0 * (math.atan((-2.0 * (A / 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 <= -8e-49) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.25e-260) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (B <= 2.6e+37) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / 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 <= -8e-49) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.25e-260) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (B <= 2.6e+37) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -8e-49], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.25e-260], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.6e+37], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -8 \cdot 10^{-49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.25 \cdot 10^{-260}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.6 \cdot 10^{+37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -7.99999999999999949e-49Initial program 50.6%
Taylor expanded in B around -inf 62.9%
if -7.99999999999999949e-49 < B < -1.2500000000000001e-260Initial program 68.7%
Taylor expanded in C around -inf 55.6%
if -1.2500000000000001e-260 < B < 2.5999999999999999e37Initial program 58.0%
Taylor expanded in A around inf 39.6%
if 2.5999999999999999e37 < B Initial program 51.4%
Taylor expanded in B around inf 67.7%
Final simplification54.6%
(FPCore (A B C)
:precision binary64
(if (<= B -9e-49)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -4.05e-261)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 7.5e+37)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -9e-49) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -4.05e-261) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 7.5e+37) {
tmp = 180.0 * (atan((-A / 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 <= -9e-49) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -4.05e-261) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 7.5e+37) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -9e-49: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -4.05e-261: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 7.5e+37: tmp = 180.0 * (math.atan((-A / 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 <= -9e-49) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -4.05e-261) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 7.5e+37) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / 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 <= -9e-49) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -4.05e-261) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 7.5e+37) tmp = 180.0 * (atan((-A / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -9e-49], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -4.05e-261], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 7.5e+37], N[(180.0 * N[(N[ArcTan[N[((-A) / 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 -9 \cdot 10^{-49}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -4.05 \cdot 10^{-261}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{+37}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -9.0000000000000004e-49Initial program 50.6%
Taylor expanded in B around -inf 62.9%
if -9.0000000000000004e-49 < B < -4.04999999999999982e-261Initial program 68.7%
Simplified79.1%
+-commutative79.1%
add-sqr-sqrt76.5%
fma-def76.6%
Applied egg-rr76.6%
Taylor expanded in C around inf 55.6%
if -4.04999999999999982e-261 < B < 7.5000000000000003e37Initial program 58.0%
Simplified69.0%
+-commutative69.0%
add-sqr-sqrt63.4%
fma-def63.2%
Applied egg-rr63.2%
Taylor expanded in A around inf 39.6%
mul-1-neg39.6%
Simplified39.6%
if 7.5000000000000003e37 < B Initial program 51.4%
Taylor expanded in B around inf 67.7%
Final simplification54.6%
(FPCore (A B C) :precision binary64 (if (<= C 2.7e+39) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (/ (* B -0.5) C)) PI))))
double code(double A, double B, double C) {
double tmp;
if (C <= 2.7e+39) {
tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B * -0.5) / C)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= 2.7e+39) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / B))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B * -0.5) / C)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= 2.7e+39: tmp = 180.0 * (math.atan((1.0 + ((C - A) / B))) / math.pi) else: tmp = 180.0 * (math.atan(((B * -0.5) / C)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= 2.7e+39) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * -0.5) / C)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= 2.7e+39) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 * (atan(((B * -0.5) / C)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, 2.7e+39], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B * -0.5), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq 2.7 \cdot 10^{+39}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot -0.5}{C}\right)}{\pi}\\
\end{array}
\end{array}
if C < 2.70000000000000003e39Initial program 64.1%
Taylor expanded in B around -inf 66.2%
associate--l+66.2%
div-sub66.2%
Simplified66.2%
if 2.70000000000000003e39 < C Initial program 21.3%
Taylor expanded in C around inf 50.1%
+-commutative50.1%
+-commutative50.1%
associate--l+57.8%
mul-1-neg57.8%
distribute-rgt1-in57.8%
associate-*r*57.8%
metadata-eval57.8%
metadata-eval57.8%
metadata-eval57.8%
*-commutative57.8%
metadata-eval57.8%
Simplified57.8%
Taylor expanded in B around 0 74.8%
associate-*r/74.8%
Simplified74.8%
Final simplification67.8%
(FPCore (A B C) :precision binary64 (if (<= B 1e-220) (* 180.0 (/ (atan (+ 1.0 (/ (- C A) B))) PI)) (* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1e-220) {
tmp = 180.0 * (atan((1.0 + ((C - A) / 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 <= 1e-220) {
tmp = 180.0 * (Math.atan((1.0 + ((C - A) / 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 <= 1e-220: tmp = 180.0 * (math.atan((1.0 + ((C - A) / 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 <= 1e-220) tmp = Float64(180.0 * Float64(atan(Float64(1.0 + Float64(Float64(C - A) / B))) / pi)); else tmp = Float64(180.0 * Float64(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 <= 1e-220) tmp = 180.0 * (atan((1.0 + ((C - A) / B))) / pi); else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1e-220], N[(180.0 * N[(N[ArcTan[N[(1.0 + N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 10^{-220}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(1 + \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 9.99999999999999992e-221Initial program 55.4%
Taylor expanded in B around -inf 69.6%
associate--l+69.6%
div-sub70.3%
Simplified70.3%
if 9.99999999999999992e-221 < B Initial program 56.7%
Simplified77.6%
Taylor expanded in B around inf 69.4%
+-commutative69.4%
Simplified69.4%
Final simplification70.0%
(FPCore (A B C) :precision binary64 (if (<= B 1e-220) (/ (* 180.0 (atan (/ (- (+ B C) A) B))) PI) (* 180.0 (/ (atan (/ (- C (+ A B)) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 1e-220) {
tmp = (180.0 * atan((((B + C) - A) / 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 <= 1e-220) {
tmp = (180.0 * Math.atan((((B + C) - A) / 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 <= 1e-220: tmp = (180.0 * math.atan((((B + C) - A) / 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 <= 1e-220) tmp = Float64(Float64(180.0 * atan(Float64(Float64(Float64(B + C) - A) / B))) / pi); else tmp = Float64(180.0 * Float64(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 <= 1e-220) tmp = (180.0 * atan((((B + C) - A) / B))) / pi; else tmp = 180.0 * (atan(((C - (A + B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 1e-220], N[(N[(180.0 * N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[(A + B), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 10^{-220}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 9.99999999999999992e-221Initial program 55.4%
Applied egg-rr82.4%
Taylor expanded in B around -inf 70.3%
if 9.99999999999999992e-221 < B Initial program 56.7%
Simplified77.6%
Taylor expanded in B around inf 69.4%
+-commutative69.4%
Simplified69.4%
Final simplification70.0%
(FPCore (A B C)
:precision binary64
(if (<= B -1.4e-48)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.02e-131)
(* 180.0 (/ (atan (/ C B)) PI))
(* 180.0 (/ (atan -1.0) PI)))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.4e-48) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.02e-131) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1.4e-48) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.02e-131) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1.4e-48: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.02e-131: tmp = 180.0 * (math.atan((C / B)) / math.pi) else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1.4e-48) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.02e-131) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1.4e-48) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.02e-131) tmp = 180.0 * (atan((C / B)) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1.4e-48], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.02e-131], N[(180.0 * N[(N[ArcTan[N[(C / 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.4 \cdot 10^{-48}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.02 \cdot 10^{-131}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.40000000000000002e-48Initial program 50.6%
Taylor expanded in B around -inf 62.9%
if -1.40000000000000002e-48 < B < 1.02000000000000001e-131Initial program 61.3%
Simplified73.6%
+-commutative73.6%
add-sqr-sqrt66.8%
fma-def66.8%
Applied egg-rr66.8%
Taylor expanded in C around inf 45.5%
if 1.02000000000000001e-131 < B Initial program 56.0%
Taylor expanded in B around inf 47.2%
Final simplification52.2%
(FPCore (A B C) :precision binary64 (if (<= B -1.6e-298) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1.6e-298) {
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 <= -1.6e-298) {
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 <= -1.6e-298: 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 <= -1.6e-298) 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 <= -1.6e-298) 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, -1.6e-298], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1.6 \cdot 10^{-298}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.59999999999999999e-298Initial program 55.6%
Taylor expanded in B around -inf 47.7%
if -1.59999999999999999e-298 < B Initial program 56.2%
Taylor expanded in B around inf 34.2%
Final simplification41.3%
(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 55.9%
Taylor expanded in B around inf 17.3%
Final simplification17.3%
herbie shell --seed 2023326
(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)))