
(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 17 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 -6.5e+77) (/ (atan (* -0.5 (/ B (- C A)))) (* PI 0.005555555555555556)) (* 180.0 (/ (atan (/ (- C (+ A (hypot B (- A C)))) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.5e+77) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) * 0.005555555555555556);
} 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 <= -6.5e+77) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI * 0.005555555555555556);
} 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 <= -6.5e+77: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi * 0.005555555555555556) 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 <= -6.5e+77) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi * 0.005555555555555556)); 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 <= -6.5e+77) tmp = atan((-0.5 * (B / (C - A)))) / (pi * 0.005555555555555556); 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, -6.5e+77], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $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 -6.5 \cdot 10^{+77}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.5e77Initial program 11.1%
Simplified15.0%
Taylor expanded in B around 0 90.3%
*-commutative90.3%
clear-num90.3%
un-div-inv90.5%
div-inv90.5%
metadata-eval90.5%
Applied egg-rr90.5%
if -6.5e77 < A Initial program 67.9%
Simplified86.4%
Final simplification87.1%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
(t_1 (* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))
(if (<= A -1e+84)
(/ (atan (* -0.5 (/ B (- C A)))) (* PI 0.005555555555555556))
(if (<= A 1.1e+66)
t_0
(if (<= A 3.9e+148)
t_1
(if (<= A 1.95e+187)
t_0
(if (<= A 2.8e+213)
(* 180.0 (/ (atan (+ (/ (* B 0.5) C) (* 2.0 (/ (- C A) B)))) PI))
t_1)))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
double tmp;
if (A <= -1e+84) {
tmp = atan((-0.5 * (B / (C - A)))) / (((double) M_PI) * 0.005555555555555556);
} else if (A <= 1.1e+66) {
tmp = t_0;
} else if (A <= 3.9e+148) {
tmp = t_1;
} else if (A <= 1.95e+187) {
tmp = t_0;
} else if (A <= 2.8e+213) {
tmp = 180.0 * (atan((((B * 0.5) / C) + (2.0 * ((C - A) / B)))) / ((double) M_PI));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
double tmp;
if (A <= -1e+84) {
tmp = Math.atan((-0.5 * (B / (C - A)))) / (Math.PI * 0.005555555555555556);
} else if (A <= 1.1e+66) {
tmp = t_0;
} else if (A <= 3.9e+148) {
tmp = t_1;
} else if (A <= 1.95e+187) {
tmp = t_0;
} else if (A <= 2.8e+213) {
tmp = 180.0 * (Math.atan((((B * 0.5) / C) + (2.0 * ((C - A) / B)))) / Math.PI);
} else {
tmp = t_1;
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) t_1 = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) tmp = 0 if A <= -1e+84: tmp = math.atan((-0.5 * (B / (C - A)))) / (math.pi * 0.005555555555555556) elif A <= 1.1e+66: tmp = t_0 elif A <= 3.9e+148: tmp = t_1 elif A <= 1.95e+187: tmp = t_0 elif A <= 2.8e+213: tmp = 180.0 * (math.atan((((B * 0.5) / C) + (2.0 * ((C - A) / B)))) / math.pi) else: tmp = t_1 return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)) tmp = 0.0 if (A <= -1e+84) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) / Float64(pi * 0.005555555555555556)); elseif (A <= 1.1e+66) tmp = t_0; elseif (A <= 3.9e+148) tmp = t_1; elseif (A <= 1.95e+187) tmp = t_0; elseif (A <= 2.8e+213) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B * 0.5) / C) + Float64(2.0 * Float64(Float64(C - A) / B)))) / pi)); else tmp = t_1; end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); t_1 = 180.0 * (atan((-2.0 * (A / B))) / pi); tmp = 0.0; if (A <= -1e+84) tmp = atan((-0.5 * (B / (C - A)))) / (pi * 0.005555555555555556); elseif (A <= 1.1e+66) tmp = t_0; elseif (A <= 3.9e+148) tmp = t_1; elseif (A <= 1.95e+187) tmp = t_0; elseif (A <= 2.8e+213) tmp = 180.0 * (atan((((B * 0.5) / C) + (2.0 * ((C - A) / B)))) / pi); else tmp = t_1; end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -1e+84], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.1e+66], t$95$0, If[LessEqual[A, 3.9e+148], t$95$1, If[LessEqual[A, 1.95e+187], t$95$0, If[LessEqual[A, 2.8e+213], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B * 0.5), $MachinePrecision] / C), $MachinePrecision] + N[(2.0 * N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{if}\;A \leq -1 \cdot 10^{+84}:\\
\;\;\;\;\frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq 1.1 \cdot 10^{+66}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.9 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq 1.95 \cdot 10^{+187}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{+213}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{C} + 2 \cdot \frac{C - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if A < -1.00000000000000006e84Initial program 11.1%
Simplified15.0%
Taylor expanded in B around 0 90.3%
*-commutative90.3%
clear-num90.3%
un-div-inv90.5%
div-inv90.5%
metadata-eval90.5%
Applied egg-rr90.5%
if -1.00000000000000006e84 < A < 1.0999999999999999e66 or 3.90000000000000002e148 < A < 1.94999999999999991e187Initial program 60.4%
Simplified60.4%
Taylor expanded in A around 0 55.2%
unpow255.2%
unpow255.2%
hypot-def77.3%
Simplified77.3%
if 1.0999999999999999e66 < A < 3.90000000000000002e148 or 2.7999999999999999e213 < A Initial program 90.8%
Simplified90.8%
Taylor expanded in A around inf 87.7%
if 1.94999999999999991e187 < A < 2.7999999999999999e213Initial program 88.4%
Simplified88.4%
Taylor expanded in C around -inf 74.1%
+-commutative74.1%
+-commutative74.1%
associate-+l+74.1%
associate-*r/74.1%
metadata-eval74.1%
cancel-sign-sub-inv74.1%
distribute-lft-out--74.1%
div-sub88.4%
Simplified88.4%
Final simplification81.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI)))
(t_1 (atan (* 2.0 (/ C B)))))
(if (<= A -1.3e-96)
t_0
(if (<= A -1.8e-122)
(/ 180.0 (/ PI t_1))
(if (<= A -9.6e-179)
t_0
(if (<= A -2.3e-266)
(* 180.0 (/ t_1 PI))
(if (<= A -6.2e-303)
(* 180.0 (/ (atan (/ B (/ C -0.5))) PI))
(if (<= A 1.55e-255)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 6.5e-225)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 3e-60)
t_0
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / (C - A)))) * (180.0 / ((double) M_PI));
double t_1 = atan((2.0 * (C / B)));
double tmp;
if (A <= -1.3e-96) {
tmp = t_0;
} else if (A <= -1.8e-122) {
tmp = 180.0 / (((double) M_PI) / t_1);
} else if (A <= -9.6e-179) {
tmp = t_0;
} else if (A <= -2.3e-266) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= -6.2e-303) {
tmp = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
} else if (A <= 1.55e-255) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 6.5e-225) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 3e-60) {
tmp = t_0;
} 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 = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
double t_1 = Math.atan((2.0 * (C / B)));
double tmp;
if (A <= -1.3e-96) {
tmp = t_0;
} else if (A <= -1.8e-122) {
tmp = 180.0 / (Math.PI / t_1);
} else if (A <= -9.6e-179) {
tmp = t_0;
} else if (A <= -2.3e-266) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= -6.2e-303) {
tmp = 180.0 * (Math.atan((B / (C / -0.5))) / Math.PI);
} else if (A <= 1.55e-255) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 6.5e-225) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 3e-60) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi) t_1 = math.atan((2.0 * (C / B))) tmp = 0 if A <= -1.3e-96: tmp = t_0 elif A <= -1.8e-122: tmp = 180.0 / (math.pi / t_1) elif A <= -9.6e-179: tmp = t_0 elif A <= -2.3e-266: tmp = 180.0 * (t_1 / math.pi) elif A <= -6.2e-303: tmp = 180.0 * (math.atan((B / (C / -0.5))) / math.pi) elif A <= 1.55e-255: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 6.5e-225: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 3e-60: tmp = t_0 else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / pi)) t_1 = atan(Float64(2.0 * Float64(C / B))) tmp = 0.0 if (A <= -1.3e-96) tmp = t_0; elseif (A <= -1.8e-122) tmp = Float64(180.0 / Float64(pi / t_1)); elseif (A <= -9.6e-179) tmp = t_0; elseif (A <= -2.3e-266) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= -6.2e-303) tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(C / -0.5))) / pi)); elseif (A <= 1.55e-255) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 6.5e-225) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 3e-60) tmp = t_0; 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 = atan((-0.5 * (B / (C - A)))) * (180.0 / pi); t_1 = atan((2.0 * (C / B))); tmp = 0.0; if (A <= -1.3e-96) tmp = t_0; elseif (A <= -1.8e-122) tmp = 180.0 / (pi / t_1); elseif (A <= -9.6e-179) tmp = t_0; elseif (A <= -2.3e-266) tmp = 180.0 * (t_1 / pi); elseif (A <= -6.2e-303) tmp = 180.0 * (atan((B / (C / -0.5))) / pi); elseif (A <= 1.55e-255) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 6.5e-225) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 3e-60) tmp = t_0; else tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -1.3e-96], t$95$0, If[LessEqual[A, -1.8e-122], N[(180.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.6e-179], t$95$0, If[LessEqual[A, -2.3e-266], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6.2e-303], N[(180.0 * N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.55e-255], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6.5e-225], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3e-60], t$95$0, 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 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
t_1 := \tan^{-1} \left(2 \cdot \frac{C}{B}\right)\\
\mathbf{if}\;A \leq -1.3 \cdot 10^{-96}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.8 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t_1}}\\
\mathbf{elif}\;A \leq -9.6 \cdot 10^{-179}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.3 \cdot 10^{-266}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq -6.2 \cdot 10^{-303}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{-255}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 6.5 \cdot 10^{-225}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.3000000000000001e-96 or -1.79999999999999997e-122 < A < -9.6000000000000002e-179 or 6.5000000000000005e-225 < A < 3.00000000000000019e-60Initial program 30.3%
Simplified47.2%
Taylor expanded in B around 0 65.7%
if -1.3000000000000001e-96 < A < -1.79999999999999997e-122Initial program 81.9%
Simplified81.9%
Taylor expanded in C around -inf 57.0%
clear-num57.0%
un-div-inv57.0%
Applied egg-rr57.0%
if -9.6000000000000002e-179 < A < -2.29999999999999996e-266Initial program 81.2%
Simplified81.2%
Taylor expanded in C around -inf 46.2%
if -2.29999999999999996e-266 < A < -6.2000000000000002e-303Initial program 55.7%
Simplified55.7%
Taylor expanded in A around 0 55.7%
unpow255.7%
unpow255.7%
hypot-def76.3%
Simplified76.3%
Taylor expanded in C around inf 47.1%
associate-*r/47.1%
*-commutative47.1%
associate-/l*47.1%
Simplified47.1%
if -6.2000000000000002e-303 < A < 1.54999999999999999e-255Initial program 83.6%
Simplified83.6%
Taylor expanded in B around inf 64.1%
if 1.54999999999999999e-255 < A < 6.5000000000000005e-225Initial program 72.7%
Simplified72.7%
Taylor expanded in B around -inf 62.6%
if 3.00000000000000019e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 70.0%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (atan (/ (* -0.5 B) (- C A))) (/ 180.0 PI)))
(t_1 (atan (* 2.0 (/ C B)))))
(if (<= A -3.2e-95)
t_0
(if (<= A -2.1e-122)
(/ 180.0 (/ PI t_1))
(if (<= A -9.2e-179)
t_0
(if (<= A -4.8e-266)
(* 180.0 (/ t_1 PI))
(if (<= A -2.2e-293)
(* 180.0 (/ (atan (/ B (/ C -0.5))) PI))
(if (<= A 2.35e-253)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 1.7e-224)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 3.4e-60)
(* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = atan(((-0.5 * B) / (C - A))) * (180.0 / ((double) M_PI));
double t_1 = atan((2.0 * (C / B)));
double tmp;
if (A <= -3.2e-95) {
tmp = t_0;
} else if (A <= -2.1e-122) {
tmp = 180.0 / (((double) M_PI) / t_1);
} else if (A <= -9.2e-179) {
tmp = t_0;
} else if (A <= -4.8e-266) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= -2.2e-293) {
tmp = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
} else if (A <= 2.35e-253) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 1.7e-224) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 3.4e-60) {
tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / ((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 = Math.atan(((-0.5 * B) / (C - A))) * (180.0 / Math.PI);
double t_1 = Math.atan((2.0 * (C / B)));
double tmp;
if (A <= -3.2e-95) {
tmp = t_0;
} else if (A <= -2.1e-122) {
tmp = 180.0 / (Math.PI / t_1);
} else if (A <= -9.2e-179) {
tmp = t_0;
} else if (A <= -4.8e-266) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= -2.2e-293) {
tmp = 180.0 * (Math.atan((B / (C / -0.5))) / Math.PI);
} else if (A <= 2.35e-253) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 1.7e-224) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 3.4e-60) {
tmp = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((-0.5 * B) / (C - A))) * (180.0 / math.pi) t_1 = math.atan((2.0 * (C / B))) tmp = 0 if A <= -3.2e-95: tmp = t_0 elif A <= -2.1e-122: tmp = 180.0 / (math.pi / t_1) elif A <= -9.2e-179: tmp = t_0 elif A <= -4.8e-266: tmp = 180.0 * (t_1 / math.pi) elif A <= -2.2e-293: tmp = 180.0 * (math.atan((B / (C / -0.5))) / math.pi) elif A <= 2.35e-253: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 1.7e-224: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 3.4e-60: tmp = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(atan(Float64(Float64(-0.5 * B) / Float64(C - A))) * Float64(180.0 / pi)) t_1 = atan(Float64(2.0 * Float64(C / B))) tmp = 0.0 if (A <= -3.2e-95) tmp = t_0; elseif (A <= -2.1e-122) tmp = Float64(180.0 / Float64(pi / t_1)); elseif (A <= -9.2e-179) tmp = t_0; elseif (A <= -4.8e-266) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= -2.2e-293) tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(C / -0.5))) / pi)); elseif (A <= 2.35e-253) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 1.7e-224) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 3.4e-60) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / 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 = atan(((-0.5 * B) / (C - A))) * (180.0 / pi); t_1 = atan((2.0 * (C / B))); tmp = 0.0; if (A <= -3.2e-95) tmp = t_0; elseif (A <= -2.1e-122) tmp = 180.0 / (pi / t_1); elseif (A <= -9.2e-179) tmp = t_0; elseif (A <= -4.8e-266) tmp = 180.0 * (t_1 / pi); elseif (A <= -2.2e-293) tmp = 180.0 * (atan((B / (C / -0.5))) / pi); elseif (A <= 2.35e-253) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 1.7e-224) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 3.4e-60) tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / 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[(N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -3.2e-95], t$95$0, If[LessEqual[A, -2.1e-122], N[(180.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.2e-179], t$95$0, If[LessEqual[A, -4.8e-266], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.2e-293], N[(180.0 * N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.35e-253], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.7e-224], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.4e-60], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / 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 := \tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right) \cdot \frac{180}{\pi}\\
t_1 := \tan^{-1} \left(2 \cdot \frac{C}{B}\right)\\
\mathbf{if}\;A \leq -3.2 \cdot 10^{-95}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.1 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t_1}}\\
\mathbf{elif}\;A \leq -9.2 \cdot 10^{-179}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -4.8 \cdot 10^{-266}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq -2.2 \cdot 10^{-293}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2.35 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 1.7 \cdot 10^{-224}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 3.4 \cdot 10^{-60}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.1999999999999997e-95 or -2.09999999999999992e-122 < A < -9.1999999999999995e-179Initial program 22.7%
Simplified40.5%
Taylor expanded in B around 0 73.8%
associate-*r/73.8%
Applied egg-rr73.8%
if -3.1999999999999997e-95 < A < -2.09999999999999992e-122Initial program 81.9%
Simplified81.9%
Taylor expanded in C around -inf 57.0%
clear-num57.0%
un-div-inv57.0%
Applied egg-rr57.0%
if -9.1999999999999995e-179 < A < -4.7999999999999999e-266Initial program 81.2%
Simplified81.2%
Taylor expanded in C around -inf 46.2%
if -4.7999999999999999e-266 < A < -2.2e-293Initial program 55.7%
Simplified55.7%
Taylor expanded in A around 0 55.7%
unpow255.7%
unpow255.7%
hypot-def76.3%
Simplified76.3%
Taylor expanded in C around inf 47.1%
associate-*r/47.1%
*-commutative47.1%
associate-/l*47.1%
Simplified47.1%
if -2.2e-293 < A < 2.34999999999999991e-253Initial program 83.6%
Simplified83.6%
Taylor expanded in B around inf 64.1%
if 2.34999999999999991e-253 < A < 1.69999999999999996e-224Initial program 72.7%
Simplified72.7%
Taylor expanded in B around -inf 62.6%
if 1.69999999999999996e-224 < A < 3.40000000000000007e-60Initial program 55.9%
Simplified69.6%
Taylor expanded in B around 0 38.5%
if 3.40000000000000007e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 70.0%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (* -0.5 (/ B (- C A))))) (t_1 (atan (* 2.0 (/ C B)))))
(if (<= A -4e-95)
(/ t_0 (* PI 0.005555555555555556))
(if (<= A -1.7e-122)
(/ 180.0 (/ PI t_1))
(if (<= A -7e-179)
(* (atan (/ (* -0.5 B) (- C A))) (/ 180.0 PI))
(if (<= A -2.3e-266)
(* 180.0 (/ t_1 PI))
(if (<= A -1.1e-301)
(* 180.0 (/ (atan (/ B (/ C -0.5))) PI))
(if (<= A 1.15e-254)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 3.4e-225)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 3e-60)
(* t_0 (/ 180.0 PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / (C - A))));
double t_1 = atan((2.0 * (C / B)));
double tmp;
if (A <= -4e-95) {
tmp = t_0 / (((double) M_PI) * 0.005555555555555556);
} else if (A <= -1.7e-122) {
tmp = 180.0 / (((double) M_PI) / t_1);
} else if (A <= -7e-179) {
tmp = atan(((-0.5 * B) / (C - A))) * (180.0 / ((double) M_PI));
} else if (A <= -2.3e-266) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= -1.1e-301) {
tmp = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
} else if (A <= 1.15e-254) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 3.4e-225) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 3e-60) {
tmp = t_0 * (180.0 / ((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 = Math.atan((-0.5 * (B / (C - A))));
double t_1 = Math.atan((2.0 * (C / B)));
double tmp;
if (A <= -4e-95) {
tmp = t_0 / (Math.PI * 0.005555555555555556);
} else if (A <= -1.7e-122) {
tmp = 180.0 / (Math.PI / t_1);
} else if (A <= -7e-179) {
tmp = Math.atan(((-0.5 * B) / (C - A))) * (180.0 / Math.PI);
} else if (A <= -2.3e-266) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= -1.1e-301) {
tmp = 180.0 * (Math.atan((B / (C / -0.5))) / Math.PI);
} else if (A <= 1.15e-254) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 3.4e-225) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 3e-60) {
tmp = t_0 * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / (C - A)))) t_1 = math.atan((2.0 * (C / B))) tmp = 0 if A <= -4e-95: tmp = t_0 / (math.pi * 0.005555555555555556) elif A <= -1.7e-122: tmp = 180.0 / (math.pi / t_1) elif A <= -7e-179: tmp = math.atan(((-0.5 * B) / (C - A))) * (180.0 / math.pi) elif A <= -2.3e-266: tmp = 180.0 * (t_1 / math.pi) elif A <= -1.1e-301: tmp = 180.0 * (math.atan((B / (C / -0.5))) / math.pi) elif A <= 1.15e-254: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 3.4e-225: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 3e-60: tmp = t_0 * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(-0.5 * Float64(B / Float64(C - A)))) t_1 = atan(Float64(2.0 * Float64(C / B))) tmp = 0.0 if (A <= -4e-95) tmp = Float64(t_0 / Float64(pi * 0.005555555555555556)); elseif (A <= -1.7e-122) tmp = Float64(180.0 / Float64(pi / t_1)); elseif (A <= -7e-179) tmp = Float64(atan(Float64(Float64(-0.5 * B) / Float64(C - A))) * Float64(180.0 / pi)); elseif (A <= -2.3e-266) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= -1.1e-301) tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(C / -0.5))) / pi)); elseif (A <= 1.15e-254) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 3.4e-225) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 3e-60) tmp = Float64(t_0 * Float64(180.0 / 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 = atan((-0.5 * (B / (C - A)))); t_1 = atan((2.0 * (C / B))); tmp = 0.0; if (A <= -4e-95) tmp = t_0 / (pi * 0.005555555555555556); elseif (A <= -1.7e-122) tmp = 180.0 / (pi / t_1); elseif (A <= -7e-179) tmp = atan(((-0.5 * B) / (C - A))) * (180.0 / pi); elseif (A <= -2.3e-266) tmp = 180.0 * (t_1 / pi); elseif (A <= -1.1e-301) tmp = 180.0 * (atan((B / (C / -0.5))) / pi); elseif (A <= 1.15e-254) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 3.4e-225) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 3e-60) tmp = t_0 * (180.0 / 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[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -4e-95], N[(t$95$0 / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.7e-122], N[(180.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7e-179], N[(N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.3e-266], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.1e-301], N[(180.0 * N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.15e-254], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.4e-225], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3e-60], N[(t$95$0 * N[(180.0 / 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 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
t_1 := \tan^{-1} \left(2 \cdot \frac{C}{B}\right)\\
\mathbf{if}\;A \leq -4 \cdot 10^{-95}:\\
\;\;\;\;\frac{t_0}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq -1.7 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t_1}}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-179}:\\
\;\;\;\;\tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq -2.3 \cdot 10^{-266}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq -1.1 \cdot 10^{-301}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1.15 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 3.4 \cdot 10^{-225}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-60}:\\
\;\;\;\;t_0 \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -3.99999999999999996e-95Initial program 23.1%
Simplified37.3%
Taylor expanded in B around 0 75.5%
*-commutative75.5%
clear-num75.5%
un-div-inv75.6%
div-inv75.6%
metadata-eval75.6%
Applied egg-rr75.6%
if -3.99999999999999996e-95 < A < -1.6999999999999999e-122Initial program 81.9%
Simplified81.9%
Taylor expanded in C around -inf 57.0%
clear-num57.0%
un-div-inv57.0%
Applied egg-rr57.0%
if -1.6999999999999999e-122 < A < -7.00000000000000049e-179Initial program 20.6%
Simplified56.4%
Taylor expanded in B around 0 65.4%
associate-*r/65.5%
Applied egg-rr65.5%
if -7.00000000000000049e-179 < A < -2.29999999999999996e-266Initial program 81.2%
Simplified81.2%
Taylor expanded in C around -inf 46.2%
if -2.29999999999999996e-266 < A < -1.1e-301Initial program 55.7%
Simplified55.7%
Taylor expanded in A around 0 55.7%
unpow255.7%
unpow255.7%
hypot-def76.3%
Simplified76.3%
Taylor expanded in C around inf 47.1%
associate-*r/47.1%
*-commutative47.1%
associate-/l*47.1%
Simplified47.1%
if -1.1e-301 < A < 1.1499999999999999e-254Initial program 83.6%
Simplified83.6%
Taylor expanded in B around inf 64.1%
if 1.1499999999999999e-254 < A < 3.3999999999999999e-225Initial program 72.7%
Simplified72.7%
Taylor expanded in B around -inf 62.6%
if 3.3999999999999999e-225 < A < 3.00000000000000019e-60Initial program 55.9%
Simplified69.6%
Taylor expanded in B around 0 38.5%
if 3.00000000000000019e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 70.0%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (* -0.5 (/ B (- C A))))) (t_1 (atan (* 2.0 (/ C B)))))
(if (<= A -1.3e-96)
(/ t_0 (* PI 0.005555555555555556))
(if (<= A -2e-122)
(/ 180.0 (/ PI t_1))
(if (<= A -7e-179)
(* (atan (/ (* -0.5 B) (- C A))) (/ 180.0 PI))
(if (<= A -2.9e-266)
(* 180.0 (/ t_1 PI))
(if (<= A -6e-301)
(/ (atan (/ -0.5 (/ (- C A) B))) (* PI 0.005555555555555556))
(if (<= A 3.05e-254)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 2e-224)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 3.8e-60)
(* t_0 (/ 180.0 PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = atan((-0.5 * (B / (C - A))));
double t_1 = atan((2.0 * (C / B)));
double tmp;
if (A <= -1.3e-96) {
tmp = t_0 / (((double) M_PI) * 0.005555555555555556);
} else if (A <= -2e-122) {
tmp = 180.0 / (((double) M_PI) / t_1);
} else if (A <= -7e-179) {
tmp = atan(((-0.5 * B) / (C - A))) * (180.0 / ((double) M_PI));
} else if (A <= -2.9e-266) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= -6e-301) {
tmp = atan((-0.5 / ((C - A) / B))) / (((double) M_PI) * 0.005555555555555556);
} else if (A <= 3.05e-254) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 2e-224) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 3.8e-60) {
tmp = t_0 * (180.0 / ((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 = Math.atan((-0.5 * (B / (C - A))));
double t_1 = Math.atan((2.0 * (C / B)));
double tmp;
if (A <= -1.3e-96) {
tmp = t_0 / (Math.PI * 0.005555555555555556);
} else if (A <= -2e-122) {
tmp = 180.0 / (Math.PI / t_1);
} else if (A <= -7e-179) {
tmp = Math.atan(((-0.5 * B) / (C - A))) * (180.0 / Math.PI);
} else if (A <= -2.9e-266) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= -6e-301) {
tmp = Math.atan((-0.5 / ((C - A) / B))) / (Math.PI * 0.005555555555555556);
} else if (A <= 3.05e-254) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 2e-224) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 3.8e-60) {
tmp = t_0 * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan((-0.5 * (B / (C - A)))) t_1 = math.atan((2.0 * (C / B))) tmp = 0 if A <= -1.3e-96: tmp = t_0 / (math.pi * 0.005555555555555556) elif A <= -2e-122: tmp = 180.0 / (math.pi / t_1) elif A <= -7e-179: tmp = math.atan(((-0.5 * B) / (C - A))) * (180.0 / math.pi) elif A <= -2.9e-266: tmp = 180.0 * (t_1 / math.pi) elif A <= -6e-301: tmp = math.atan((-0.5 / ((C - A) / B))) / (math.pi * 0.005555555555555556) elif A <= 3.05e-254: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 2e-224: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 3.8e-60: tmp = t_0 * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(-0.5 * Float64(B / Float64(C - A)))) t_1 = atan(Float64(2.0 * Float64(C / B))) tmp = 0.0 if (A <= -1.3e-96) tmp = Float64(t_0 / Float64(pi * 0.005555555555555556)); elseif (A <= -2e-122) tmp = Float64(180.0 / Float64(pi / t_1)); elseif (A <= -7e-179) tmp = Float64(atan(Float64(Float64(-0.5 * B) / Float64(C - A))) * Float64(180.0 / pi)); elseif (A <= -2.9e-266) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= -6e-301) tmp = Float64(atan(Float64(-0.5 / Float64(Float64(C - A) / B))) / Float64(pi * 0.005555555555555556)); elseif (A <= 3.05e-254) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 2e-224) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 3.8e-60) tmp = Float64(t_0 * Float64(180.0 / 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 = atan((-0.5 * (B / (C - A)))); t_1 = atan((2.0 * (C / B))); tmp = 0.0; if (A <= -1.3e-96) tmp = t_0 / (pi * 0.005555555555555556); elseif (A <= -2e-122) tmp = 180.0 / (pi / t_1); elseif (A <= -7e-179) tmp = atan(((-0.5 * B) / (C - A))) * (180.0 / pi); elseif (A <= -2.9e-266) tmp = 180.0 * (t_1 / pi); elseif (A <= -6e-301) tmp = atan((-0.5 / ((C - A) / B))) / (pi * 0.005555555555555556); elseif (A <= 3.05e-254) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 2e-224) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 3.8e-60) tmp = t_0 * (180.0 / 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[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -1.3e-96], N[(t$95$0 / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2e-122], N[(180.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7e-179], N[(N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.9e-266], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -6e-301], N[(N[ArcTan[N[(-0.5 / N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.05e-254], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2e-224], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e-60], N[(t$95$0 * N[(180.0 / 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 := \tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right)\\
t_1 := \tan^{-1} \left(2 \cdot \frac{C}{B}\right)\\
\mathbf{if}\;A \leq -1.3 \cdot 10^{-96}:\\
\;\;\;\;\frac{t_0}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq -2 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t_1}}\\
\mathbf{elif}\;A \leq -7 \cdot 10^{-179}:\\
\;\;\;\;\tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq -2.9 \cdot 10^{-266}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq -6 \cdot 10^{-301}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5}{\frac{C - A}{B}}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq 3.05 \cdot 10^{-254}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 2 \cdot 10^{-224}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{-60}:\\
\;\;\;\;t_0 \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.3000000000000001e-96Initial program 23.1%
Simplified37.3%
Taylor expanded in B around 0 75.5%
*-commutative75.5%
clear-num75.5%
un-div-inv75.6%
div-inv75.6%
metadata-eval75.6%
Applied egg-rr75.6%
if -1.3000000000000001e-96 < A < -2.00000000000000012e-122Initial program 81.9%
Simplified81.9%
Taylor expanded in C around -inf 57.0%
clear-num57.0%
un-div-inv57.0%
Applied egg-rr57.0%
if -2.00000000000000012e-122 < A < -7.00000000000000049e-179Initial program 20.6%
Simplified56.4%
Taylor expanded in B around 0 65.4%
associate-*r/65.5%
Applied egg-rr65.5%
if -7.00000000000000049e-179 < A < -2.89999999999999996e-266Initial program 81.2%
Simplified81.2%
Taylor expanded in C around -inf 46.2%
if -2.89999999999999996e-266 < A < -5.99999999999999998e-301Initial program 55.7%
Simplified76.3%
Taylor expanded in B around 0 46.9%
*-commutative46.9%
clear-num46.9%
un-div-inv46.9%
div-inv46.9%
metadata-eval46.9%
Applied egg-rr46.9%
clear-num47.1%
un-div-inv47.1%
Applied egg-rr47.1%
if -5.99999999999999998e-301 < A < 3.05e-254Initial program 83.6%
Simplified83.6%
Taylor expanded in B around inf 64.1%
if 3.05e-254 < A < 2e-224Initial program 72.7%
Simplified72.7%
Taylor expanded in B around -inf 62.6%
if 2e-224 < A < 3.79999999999999994e-60Initial program 55.9%
Simplified69.6%
Taylor expanded in B around 0 38.5%
if 3.79999999999999994e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 70.0%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (atan (/ (* -0.5 B) (- C A)))) (t_1 (atan (* 2.0 (/ C B)))))
(if (<= A -1.06e-95)
(/ t_0 (* PI 0.005555555555555556))
(if (<= A -1.9e-122)
(/ 180.0 (/ PI t_1))
(if (<= A -7.2e-179)
(* t_0 (/ 180.0 PI))
(if (<= A -2.8e-266)
(* 180.0 (/ t_1 PI))
(if (<= A -8.5e-307)
(/ (atan (/ -0.5 (/ (- C A) B))) (* PI 0.005555555555555556))
(if (<= A 2.2e-255)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 1.25e-223)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 3.9e-60)
(* (atan (* -0.5 (/ B (- C A)))) (/ 180.0 PI))
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))))))))))))
double code(double A, double B, double C) {
double t_0 = atan(((-0.5 * B) / (C - A)));
double t_1 = atan((2.0 * (C / B)));
double tmp;
if (A <= -1.06e-95) {
tmp = t_0 / (((double) M_PI) * 0.005555555555555556);
} else if (A <= -1.9e-122) {
tmp = 180.0 / (((double) M_PI) / t_1);
} else if (A <= -7.2e-179) {
tmp = t_0 * (180.0 / ((double) M_PI));
} else if (A <= -2.8e-266) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= -8.5e-307) {
tmp = atan((-0.5 / ((C - A) / B))) / (((double) M_PI) * 0.005555555555555556);
} else if (A <= 2.2e-255) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 1.25e-223) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 3.9e-60) {
tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / ((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 = Math.atan(((-0.5 * B) / (C - A)));
double t_1 = Math.atan((2.0 * (C / B)));
double tmp;
if (A <= -1.06e-95) {
tmp = t_0 / (Math.PI * 0.005555555555555556);
} else if (A <= -1.9e-122) {
tmp = 180.0 / (Math.PI / t_1);
} else if (A <= -7.2e-179) {
tmp = t_0 * (180.0 / Math.PI);
} else if (A <= -2.8e-266) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= -8.5e-307) {
tmp = Math.atan((-0.5 / ((C - A) / B))) / (Math.PI * 0.005555555555555556);
} else if (A <= 2.2e-255) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 1.25e-223) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 3.9e-60) {
tmp = Math.atan((-0.5 * (B / (C - A)))) * (180.0 / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = math.atan(((-0.5 * B) / (C - A))) t_1 = math.atan((2.0 * (C / B))) tmp = 0 if A <= -1.06e-95: tmp = t_0 / (math.pi * 0.005555555555555556) elif A <= -1.9e-122: tmp = 180.0 / (math.pi / t_1) elif A <= -7.2e-179: tmp = t_0 * (180.0 / math.pi) elif A <= -2.8e-266: tmp = 180.0 * (t_1 / math.pi) elif A <= -8.5e-307: tmp = math.atan((-0.5 / ((C - A) / B))) / (math.pi * 0.005555555555555556) elif A <= 2.2e-255: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 1.25e-223: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 3.9e-60: tmp = math.atan((-0.5 * (B / (C - A)))) * (180.0 / math.pi) else: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) return tmp
function code(A, B, C) t_0 = atan(Float64(Float64(-0.5 * B) / Float64(C - A))) t_1 = atan(Float64(2.0 * Float64(C / B))) tmp = 0.0 if (A <= -1.06e-95) tmp = Float64(t_0 / Float64(pi * 0.005555555555555556)); elseif (A <= -1.9e-122) tmp = Float64(180.0 / Float64(pi / t_1)); elseif (A <= -7.2e-179) tmp = Float64(t_0 * Float64(180.0 / pi)); elseif (A <= -2.8e-266) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= -8.5e-307) tmp = Float64(atan(Float64(-0.5 / Float64(Float64(C - A) / B))) / Float64(pi * 0.005555555555555556)); elseif (A <= 2.2e-255) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 1.25e-223) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 3.9e-60) tmp = Float64(atan(Float64(-0.5 * Float64(B / Float64(C - A)))) * Float64(180.0 / 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 = atan(((-0.5 * B) / (C - A))); t_1 = atan((2.0 * (C / B))); tmp = 0.0; if (A <= -1.06e-95) tmp = t_0 / (pi * 0.005555555555555556); elseif (A <= -1.9e-122) tmp = 180.0 / (pi / t_1); elseif (A <= -7.2e-179) tmp = t_0 * (180.0 / pi); elseif (A <= -2.8e-266) tmp = 180.0 * (t_1 / pi); elseif (A <= -8.5e-307) tmp = atan((-0.5 / ((C - A) / B))) / (pi * 0.005555555555555556); elseif (A <= 2.2e-255) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 1.25e-223) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 3.9e-60) tmp = atan((-0.5 * (B / (C - A)))) * (180.0 / 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[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -1.06e-95], N[(t$95$0 / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.9e-122], N[(180.0 / N[(Pi / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -7.2e-179], N[(t$95$0 * N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.8e-266], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -8.5e-307], N[(N[ArcTan[N[(-0.5 / N[(N[(C - A), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.2e-255], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.25e-223], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.9e-60], N[(N[ArcTan[N[(-0.5 * N[(B / N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(180.0 / 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 := \tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right)\\
t_1 := \tan^{-1} \left(2 \cdot \frac{C}{B}\right)\\
\mathbf{if}\;A \leq -1.06 \cdot 10^{-95}:\\
\;\;\;\;\frac{t_0}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq -1.9 \cdot 10^{-122}:\\
\;\;\;\;\frac{180}{\frac{\pi}{t_1}}\\
\mathbf{elif}\;A \leq -7.2 \cdot 10^{-179}:\\
\;\;\;\;t_0 \cdot \frac{180}{\pi}\\
\mathbf{elif}\;A \leq -2.8 \cdot 10^{-266}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq -8.5 \cdot 10^{-307}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5}{\frac{C - A}{B}}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq 2.2 \cdot 10^{-255}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{-223}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 3.9 \cdot 10^{-60}:\\
\;\;\;\;\tan^{-1} \left(-0.5 \cdot \frac{B}{C - A}\right) \cdot \frac{180}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.06e-95Initial program 23.1%
Simplified37.3%
Taylor expanded in B around 0 75.5%
*-commutative75.5%
clear-num75.5%
un-div-inv75.6%
div-inv75.6%
metadata-eval75.6%
Applied egg-rr75.6%
associate-*r/75.5%
Applied egg-rr75.6%
if -1.06e-95 < A < -1.9e-122Initial program 81.9%
Simplified81.9%
Taylor expanded in C around -inf 57.0%
clear-num57.0%
un-div-inv57.0%
Applied egg-rr57.0%
if -1.9e-122 < A < -7.20000000000000015e-179Initial program 20.6%
Simplified56.4%
Taylor expanded in B around 0 65.4%
associate-*r/65.5%
Applied egg-rr65.5%
if -7.20000000000000015e-179 < A < -2.8e-266Initial program 81.2%
Simplified81.2%
Taylor expanded in C around -inf 46.2%
if -2.8e-266 < A < -8.4999999999999995e-307Initial program 55.7%
Simplified76.3%
Taylor expanded in B around 0 46.9%
*-commutative46.9%
clear-num46.9%
un-div-inv46.9%
div-inv46.9%
metadata-eval46.9%
Applied egg-rr46.9%
clear-num47.1%
un-div-inv47.1%
Applied egg-rr47.1%
if -8.4999999999999995e-307 < A < 2.1999999999999999e-255Initial program 83.6%
Simplified83.6%
Taylor expanded in B around inf 64.1%
if 2.1999999999999999e-255 < A < 1.25000000000000006e-223Initial program 72.7%
Simplified72.7%
Taylor expanded in B around -inf 62.6%
if 1.25000000000000006e-223 < A < 3.9000000000000002e-60Initial program 55.9%
Simplified69.6%
Taylor expanded in B around 0 38.5%
if 3.9000000000000002e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 70.0%
Final simplification64.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ B (/ C -0.5))) PI))))
(if (<= A -4.8e+76)
(* 180.0 (/ (atan (/ (* B 0.5) A)) PI))
(if (<= A -4.1e-65)
t_0
(if (<= A -2.1e-122)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= A -9.5e-178)
t_0
(if (<= A 3.5e-252)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 4.2e-225)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 3.2e-60)
t_0
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
double tmp;
if (A <= -4.8e+76) {
tmp = 180.0 * (atan(((B * 0.5) / A)) / ((double) M_PI));
} else if (A <= -4.1e-65) {
tmp = t_0;
} else if (A <= -2.1e-122) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (A <= -9.5e-178) {
tmp = t_0;
} else if (A <= 3.5e-252) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 4.2e-225) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 3.2e-60) {
tmp = t_0;
} 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((B / (C / -0.5))) / Math.PI);
double tmp;
if (A <= -4.8e+76) {
tmp = 180.0 * (Math.atan(((B * 0.5) / A)) / Math.PI);
} else if (A <= -4.1e-65) {
tmp = t_0;
} else if (A <= -2.1e-122) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (A <= -9.5e-178) {
tmp = t_0;
} else if (A <= 3.5e-252) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 4.2e-225) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 3.2e-60) {
tmp = t_0;
} 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((B / (C / -0.5))) / math.pi) tmp = 0 if A <= -4.8e+76: tmp = 180.0 * (math.atan(((B * 0.5) / A)) / math.pi) elif A <= -4.1e-65: tmp = t_0 elif A <= -2.1e-122: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif A <= -9.5e-178: tmp = t_0 elif A <= 3.5e-252: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 4.2e-225: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 3.2e-60: tmp = t_0 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(Float64(B / Float64(C / -0.5))) / pi)) tmp = 0.0 if (A <= -4.8e+76) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B * 0.5) / A)) / pi)); elseif (A <= -4.1e-65) tmp = t_0; elseif (A <= -2.1e-122) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (A <= -9.5e-178) tmp = t_0; elseif (A <= 3.5e-252) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 4.2e-225) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 3.2e-60) tmp = t_0; 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((B / (C / -0.5))) / pi); tmp = 0.0; if (A <= -4.8e+76) tmp = 180.0 * (atan(((B * 0.5) / A)) / pi); elseif (A <= -4.1e-65) tmp = t_0; elseif (A <= -2.1e-122) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (A <= -9.5e-178) tmp = t_0; elseif (A <= 3.5e-252) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 4.2e-225) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 3.2e-60) tmp = t_0; 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[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.8e+76], N[(180.0 * N[(N[ArcTan[N[(N[(B * 0.5), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -4.1e-65], t$95$0, If[LessEqual[A, -2.1e-122], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -9.5e-178], t$95$0, If[LessEqual[A, 3.5e-252], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4.2e-225], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.2e-60], t$95$0, 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} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\mathbf{if}\;A \leq -4.8 \cdot 10^{+76}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B \cdot 0.5}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -4.1 \cdot 10^{-65}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.1 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -9.5 \cdot 10^{-178}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-252}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{-225}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.8e76Initial program 11.1%
Simplified8.3%
Taylor expanded in A around -inf 86.0%
associate-*r/86.0%
Simplified86.0%
if -4.8e76 < A < -4.09999999999999987e-65 or -2.09999999999999992e-122 < A < -9.50000000000000009e-178 or 4.20000000000000001e-225 < A < 3.2000000000000001e-60Initial program 42.4%
Simplified42.4%
Taylor expanded in A around 0 42.4%
unpow242.4%
unpow242.4%
hypot-def67.8%
Simplified67.8%
Taylor expanded in C around inf 43.9%
associate-*r/43.9%
*-commutative43.9%
associate-/l*43.9%
Simplified43.9%
if -4.09999999999999987e-65 < A < -2.09999999999999992e-122Initial program 70.1%
Simplified70.0%
Taylor expanded in C around -inf 48.2%
if -9.50000000000000009e-178 < A < 3.49999999999999986e-252Initial program 72.7%
Simplified72.7%
Taylor expanded in B around inf 38.4%
if 3.49999999999999986e-252 < A < 4.20000000000000001e-225Initial program 72.7%
Simplified72.7%
Taylor expanded in B around -inf 62.6%
if 3.2000000000000001e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 70.0%
Final simplification60.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ B (/ C -0.5))) PI))))
(if (<= A -4.8e+76)
(* (/ 180.0 PI) (atan (/ 0.5 (/ A B))))
(if (<= A -1.2e-65)
t_0
(if (<= A -1.85e-122)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= A -3.2e-175)
t_0
(if (<= A 1.3e-253)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 3.5e-225)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 3e-60)
t_0
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
double tmp;
if (A <= -4.8e+76) {
tmp = (180.0 / ((double) M_PI)) * atan((0.5 / (A / B)));
} else if (A <= -1.2e-65) {
tmp = t_0;
} else if (A <= -1.85e-122) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (A <= -3.2e-175) {
tmp = t_0;
} else if (A <= 1.3e-253) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 3.5e-225) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 3e-60) {
tmp = t_0;
} 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((B / (C / -0.5))) / Math.PI);
double tmp;
if (A <= -4.8e+76) {
tmp = (180.0 / Math.PI) * Math.atan((0.5 / (A / B)));
} else if (A <= -1.2e-65) {
tmp = t_0;
} else if (A <= -1.85e-122) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (A <= -3.2e-175) {
tmp = t_0;
} else if (A <= 1.3e-253) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 3.5e-225) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 3e-60) {
tmp = t_0;
} 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((B / (C / -0.5))) / math.pi) tmp = 0 if A <= -4.8e+76: tmp = (180.0 / math.pi) * math.atan((0.5 / (A / B))) elif A <= -1.2e-65: tmp = t_0 elif A <= -1.85e-122: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif A <= -3.2e-175: tmp = t_0 elif A <= 1.3e-253: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 3.5e-225: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 3e-60: tmp = t_0 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(Float64(B / Float64(C / -0.5))) / pi)) tmp = 0.0 if (A <= -4.8e+76) tmp = Float64(Float64(180.0 / pi) * atan(Float64(0.5 / Float64(A / B)))); elseif (A <= -1.2e-65) tmp = t_0; elseif (A <= -1.85e-122) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (A <= -3.2e-175) tmp = t_0; elseif (A <= 1.3e-253) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 3.5e-225) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 3e-60) tmp = t_0; 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((B / (C / -0.5))) / pi); tmp = 0.0; if (A <= -4.8e+76) tmp = (180.0 / pi) * atan((0.5 / (A / B))); elseif (A <= -1.2e-65) tmp = t_0; elseif (A <= -1.85e-122) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (A <= -3.2e-175) tmp = t_0; elseif (A <= 1.3e-253) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 3.5e-225) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 3e-60) tmp = t_0; 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[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.8e+76], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(0.5 / N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.2e-65], t$95$0, If[LessEqual[A, -1.85e-122], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.2e-175], t$95$0, If[LessEqual[A, 1.3e-253], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.5e-225], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3e-60], t$95$0, 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} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\mathbf{if}\;A \leq -4.8 \cdot 10^{+76}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{0.5}{\frac{A}{B}}\right)\\
\mathbf{elif}\;A \leq -1.2 \cdot 10^{-65}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.85 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.2 \cdot 10^{-175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.3 \cdot 10^{-253}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 3.5 \cdot 10^{-225}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.8e76Initial program 11.1%
Simplified15.0%
Taylor expanded in B around 0 90.3%
Taylor expanded in C around 0 86.0%
associate-*r/86.0%
associate-/l*86.0%
Simplified86.0%
if -4.8e76 < A < -1.2000000000000001e-65 or -1.8499999999999999e-122 < A < -3.2e-175 or 3.4999999999999997e-225 < A < 3.00000000000000019e-60Initial program 42.4%
Simplified42.4%
Taylor expanded in A around 0 42.4%
unpow242.4%
unpow242.4%
hypot-def67.8%
Simplified67.8%
Taylor expanded in C around inf 43.9%
associate-*r/43.9%
*-commutative43.9%
associate-/l*43.9%
Simplified43.9%
if -1.2000000000000001e-65 < A < -1.8499999999999999e-122Initial program 70.1%
Simplified70.0%
Taylor expanded in C around -inf 48.2%
if -3.2e-175 < A < 1.3e-253Initial program 72.7%
Simplified72.7%
Taylor expanded in B around inf 38.4%
if 1.3e-253 < A < 3.4999999999999997e-225Initial program 72.7%
Simplified72.7%
Taylor expanded in B around -inf 62.6%
if 3.00000000000000019e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 70.0%
Final simplification60.3%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ B (/ C -0.5))) PI))))
(if (<= A -6.2e+76)
(/ (atan (* 0.5 (/ B A))) (* PI 0.005555555555555556))
(if (<= A -3.4e-65)
t_0
(if (<= A -2.1e-122)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= A -3.7e-178)
t_0
(if (<= A 4.55e-256)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 1.55e-225)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 6e-60)
t_0
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
double tmp;
if (A <= -6.2e+76) {
tmp = atan((0.5 * (B / A))) / (((double) M_PI) * 0.005555555555555556);
} else if (A <= -3.4e-65) {
tmp = t_0;
} else if (A <= -2.1e-122) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (A <= -3.7e-178) {
tmp = t_0;
} else if (A <= 4.55e-256) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 1.55e-225) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 6e-60) {
tmp = t_0;
} 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((B / (C / -0.5))) / Math.PI);
double tmp;
if (A <= -6.2e+76) {
tmp = Math.atan((0.5 * (B / A))) / (Math.PI * 0.005555555555555556);
} else if (A <= -3.4e-65) {
tmp = t_0;
} else if (A <= -2.1e-122) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (A <= -3.7e-178) {
tmp = t_0;
} else if (A <= 4.55e-256) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 1.55e-225) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 6e-60) {
tmp = t_0;
} 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((B / (C / -0.5))) / math.pi) tmp = 0 if A <= -6.2e+76: tmp = math.atan((0.5 * (B / A))) / (math.pi * 0.005555555555555556) elif A <= -3.4e-65: tmp = t_0 elif A <= -2.1e-122: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif A <= -3.7e-178: tmp = t_0 elif A <= 4.55e-256: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 1.55e-225: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 6e-60: tmp = t_0 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(Float64(B / Float64(C / -0.5))) / pi)) tmp = 0.0 if (A <= -6.2e+76) tmp = Float64(atan(Float64(0.5 * Float64(B / A))) / Float64(pi * 0.005555555555555556)); elseif (A <= -3.4e-65) tmp = t_0; elseif (A <= -2.1e-122) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (A <= -3.7e-178) tmp = t_0; elseif (A <= 4.55e-256) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 1.55e-225) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 6e-60) tmp = t_0; 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((B / (C / -0.5))) / pi); tmp = 0.0; if (A <= -6.2e+76) tmp = atan((0.5 * (B / A))) / (pi * 0.005555555555555556); elseif (A <= -3.4e-65) tmp = t_0; elseif (A <= -2.1e-122) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (A <= -3.7e-178) tmp = t_0; elseif (A <= 4.55e-256) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 1.55e-225) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 6e-60) tmp = t_0; 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[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -6.2e+76], N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.4e-65], t$95$0, If[LessEqual[A, -2.1e-122], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -3.7e-178], t$95$0, If[LessEqual[A, 4.55e-256], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.55e-225], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 6e-60], t$95$0, 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} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\mathbf{if}\;A \leq -6.2 \cdot 10^{+76}:\\
\;\;\;\;\frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi \cdot 0.005555555555555556}\\
\mathbf{elif}\;A \leq -3.4 \cdot 10^{-65}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.1 \cdot 10^{-122}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq -3.7 \cdot 10^{-178}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 4.55 \cdot 10^{-256}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 1.55 \cdot 10^{-225}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 6 \cdot 10^{-60}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.20000000000000023e76Initial program 11.1%
Simplified15.0%
Taylor expanded in B around 0 90.3%
*-commutative90.3%
clear-num90.3%
un-div-inv90.5%
div-inv90.5%
metadata-eval90.5%
Applied egg-rr90.5%
Taylor expanded in C around 0 86.2%
if -6.20000000000000023e76 < A < -3.39999999999999987e-65 or -2.09999999999999992e-122 < A < -3.70000000000000004e-178 or 1.54999999999999998e-225 < A < 6.00000000000000038e-60Initial program 42.4%
Simplified42.4%
Taylor expanded in A around 0 42.4%
unpow242.4%
unpow242.4%
hypot-def67.8%
Simplified67.8%
Taylor expanded in C around inf 43.9%
associate-*r/43.9%
*-commutative43.9%
associate-/l*43.9%
Simplified43.9%
if -3.39999999999999987e-65 < A < -2.09999999999999992e-122Initial program 70.1%
Simplified70.0%
Taylor expanded in C around -inf 48.2%
if -3.70000000000000004e-178 < A < 4.55e-256Initial program 72.7%
Simplified72.7%
Taylor expanded in B around inf 38.4%
if 4.55e-256 < A < 1.54999999999999998e-225Initial program 72.7%
Simplified72.7%
Taylor expanded in B around -inf 62.6%
if 6.00000000000000038e-60 < A Initial program 81.3%
Simplified81.3%
Taylor expanded in A around inf 70.0%
Final simplification60.4%
(FPCore (A B C)
:precision binary64
(if (<= C -1.3e-50)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(if (<= C -2.3e-157)
(* 180.0 (/ (atan -1.0) PI))
(if (<= C 9.5e-281)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= C 1.65e-239)
(* 180.0 (/ (atan 1.0) PI))
(* 180.0 (/ (atan (/ B (/ C -0.5))) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-50) {
tmp = 180.0 * (atan((2.0 * (C / B))) / ((double) M_PI));
} else if (C <= -2.3e-157) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (C <= 9.5e-281) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (C <= 1.65e-239) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((B / (C / -0.5))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.3e-50) {
tmp = 180.0 * (Math.atan((2.0 * (C / B))) / Math.PI);
} else if (C <= -2.3e-157) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (C <= 9.5e-281) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (C <= 1.65e-239) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((B / (C / -0.5))) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.3e-50: tmp = 180.0 * (math.atan((2.0 * (C / B))) / math.pi) elif C <= -2.3e-157: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif C <= 9.5e-281: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif C <= 1.65e-239: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = 180.0 * (math.atan((B / (C / -0.5))) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.3e-50) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * Float64(C / B))) / pi)); elseif (C <= -2.3e-157) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (C <= 9.5e-281) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (C <= 1.65e-239) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(B / Float64(C / -0.5))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.3e-50) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); elseif (C <= -2.3e-157) tmp = 180.0 * (atan(-1.0) / pi); elseif (C <= 9.5e-281) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (C <= 1.65e-239) tmp = 180.0 * (atan(1.0) / pi); else tmp = 180.0 * (atan((B / (C / -0.5))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.3e-50], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -2.3e-157], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.5e-281], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.65e-239], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(B / N[(C / -0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.3 \cdot 10^{-50}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq -2.3 \cdot 10^{-157}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;C \leq 9.5 \cdot 10^{-281}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 1.65 \cdot 10^{-239}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B}{\frac{C}{-0.5}}\right)}{\pi}\\
\end{array}
\end{array}
if C < -1.3000000000000001e-50Initial program 76.3%
Simplified76.2%
Taylor expanded in C around -inf 70.0%
if -1.3000000000000001e-50 < C < -2.29999999999999989e-157Initial program 60.0%
Simplified60.0%
Taylor expanded in B around inf 52.0%
if -2.29999999999999989e-157 < C < 9.5000000000000003e-281Initial program 67.2%
Simplified67.2%
Taylor expanded in A around inf 43.7%
if 9.5000000000000003e-281 < C < 1.64999999999999998e-239Initial program 71.3%
Simplified71.1%
Taylor expanded in B around -inf 67.7%
if 1.64999999999999998e-239 < C Initial program 40.5%
Simplified39.4%
Taylor expanded in A around 0 29.0%
unpow229.0%
unpow229.0%
hypot-def44.4%
Simplified44.4%
Taylor expanded in C around inf 51.1%
associate-*r/51.2%
*-commutative51.2%
associate-/l*51.2%
Simplified51.2%
Final simplification56.4%
(FPCore (A B C)
:precision binary64
(if (<= C -6.8e-306)
(* 180.0 (/ (atan (+ (* 2.0 (/ C B)) (* 0.5 (/ B C)))) PI))
(if (<= C 3.7e-222)
(* 180.0 (/ (atan 1.0) PI))
(/ (atan (/ (* -0.5 B) (- C A))) (* PI 0.005555555555555556)))))
double code(double A, double B, double C) {
double tmp;
if (C <= -6.8e-306) {
tmp = 180.0 * (atan(((2.0 * (C / B)) + (0.5 * (B / C)))) / ((double) M_PI));
} else if (C <= 3.7e-222) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else {
tmp = atan(((-0.5 * B) / (C - A))) / (((double) M_PI) * 0.005555555555555556);
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -6.8e-306) {
tmp = 180.0 * (Math.atan(((2.0 * (C / B)) + (0.5 * (B / C)))) / Math.PI);
} else if (C <= 3.7e-222) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else {
tmp = Math.atan(((-0.5 * B) / (C - A))) / (Math.PI * 0.005555555555555556);
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -6.8e-306: tmp = 180.0 * (math.atan(((2.0 * (C / B)) + (0.5 * (B / C)))) / math.pi) elif C <= 3.7e-222: tmp = 180.0 * (math.atan(1.0) / math.pi) else: tmp = math.atan(((-0.5 * B) / (C - A))) / (math.pi * 0.005555555555555556) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -6.8e-306) tmp = Float64(180.0 * Float64(atan(Float64(Float64(2.0 * Float64(C / B)) + Float64(0.5 * Float64(B / C)))) / pi)); elseif (C <= 3.7e-222) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); else tmp = Float64(atan(Float64(Float64(-0.5 * B) / Float64(C - A))) / Float64(pi * 0.005555555555555556)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -6.8e-306) tmp = 180.0 * (atan(((2.0 * (C / B)) + (0.5 * (B / C)))) / pi); elseif (C <= 3.7e-222) tmp = 180.0 * (atan(1.0) / pi); else tmp = atan(((-0.5 * B) / (C - A))) / (pi * 0.005555555555555556); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -6.8e-306], N[(180.0 * N[(N[ArcTan[N[(N[(2.0 * N[(C / B), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.7e-222], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[N[(N[(-0.5 * B), $MachinePrecision] / N[(C - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6.8 \cdot 10^{-306}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B} + 0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.7 \cdot 10^{-222}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan^{-1} \left(\frac{-0.5 \cdot B}{C - A}\right)}{\pi \cdot 0.005555555555555556}\\
\end{array}
\end{array}
if C < -6.7999999999999996e-306Initial program 71.5%
Simplified71.5%
Taylor expanded in A around 0 62.7%
unpow262.7%
unpow262.7%
hypot-def76.4%
Simplified76.4%
Taylor expanded in C around -inf 63.1%
if -6.7999999999999996e-306 < C < 3.6999999999999999e-222Initial program 70.3%
Simplified70.2%
Taylor expanded in B around -inf 48.4%
if 3.6999999999999999e-222 < C Initial program 39.5%
Simplified58.7%
Taylor expanded in B around 0 57.6%
*-commutative57.6%
clear-num57.6%
un-div-inv57.6%
div-inv57.6%
metadata-eval57.6%
Applied egg-rr57.6%
associate-*r/57.6%
Applied egg-rr57.6%
Final simplification59.7%
(FPCore (A B C)
:precision binary64
(if (<= B -3.8e+47)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -3.5e-128)
(* 180.0 (/ (atan (* -2.0 (/ A B))) PI))
(if (<= B 4.2e+77)
(* 180.0 (/ (atan (* 2.0 (/ C B))) PI))
(* 180.0 (/ (atan -1.0) PI))))))
double code(double A, double B, double C) {
double tmp;
if (B <= -3.8e+47) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -3.5e-128) {
tmp = 180.0 * (atan((-2.0 * (A / B))) / ((double) M_PI));
} else if (B <= 4.2e+77) {
tmp = 180.0 * (atan((2.0 * (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 <= -3.8e+47) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -3.5e-128) {
tmp = 180.0 * (Math.atan((-2.0 * (A / B))) / Math.PI);
} else if (B <= 4.2e+77) {
tmp = 180.0 * (Math.atan((2.0 * (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 <= -3.8e+47: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -3.5e-128: tmp = 180.0 * (math.atan((-2.0 * (A / B))) / math.pi) elif B <= 4.2e+77: tmp = 180.0 * (math.atan((2.0 * (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 <= -3.8e+47) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -3.5e-128) tmp = Float64(180.0 * Float64(atan(Float64(-2.0 * Float64(A / B))) / pi)); elseif (B <= 4.2e+77) tmp = Float64(180.0 * Float64(atan(Float64(2.0 * 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 <= -3.8e+47) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -3.5e-128) tmp = 180.0 * (atan((-2.0 * (A / B))) / pi); elseif (B <= 4.2e+77) tmp = 180.0 * (atan((2.0 * (C / B))) / pi); else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -3.8e+47], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.5e-128], N[(180.0 * N[(N[ArcTan[N[(-2.0 * N[(A / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.2e+77], N[(180.0 * N[(N[ArcTan[N[(2.0 * N[(C / 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 -3.8 \cdot 10^{+47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -3.5 \cdot 10^{-128}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-2 \cdot \frac{A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4.2 \cdot 10^{+77}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(2 \cdot \frac{C}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -3.8000000000000003e47Initial program 54.5%
Simplified54.5%
Taylor expanded in B around -inf 64.6%
if -3.8000000000000003e47 < B < -3.5e-128Initial program 68.7%
Simplified68.7%
Taylor expanded in A around inf 42.6%
if -3.5e-128 < B < 4.1999999999999997e77Initial program 62.4%
Simplified61.2%
Taylor expanded in C around -inf 42.2%
if 4.1999999999999997e77 < B Initial program 47.2%
Simplified47.2%
Taylor expanded in B around inf 64.0%
Final simplification51.5%
(FPCore (A B C)
:precision binary64
(if (<= B -4.1e+47)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 6.6e+101)
(* 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 <= -4.1e+47) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6.6e+101) {
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 <= -4.1e+47) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6.6e+101) {
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 <= -4.1e+47: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6.6e+101: 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 <= -4.1e+47) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6.6e+101) 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 <= -4.1e+47) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6.6e+101) 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, -4.1e+47], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.6e+101], 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 -4.1 \cdot 10^{+47}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6.6 \cdot 10^{+101}:\\
\;\;\;\;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 < -4.1000000000000001e47Initial program 54.5%
Simplified54.5%
Taylor expanded in B around -inf 64.6%
if -4.1000000000000001e47 < B < 6.60000000000000022e101Initial program 65.3%
Simplified64.5%
Taylor expanded in A around inf 37.7%
if 6.60000000000000022e101 < B Initial program 41.8%
Simplified41.8%
Taylor expanded in B around inf 67.3%
Final simplification48.8%
(FPCore (A B C)
:precision binary64
(if (<= B -3.25e-111)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 6.5e-93)
(* 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 <= -3.25e-111) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 6.5e-93) {
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 <= -3.25e-111) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 6.5e-93) {
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 <= -3.25e-111: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 6.5e-93: 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 <= -3.25e-111) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 6.5e-93) 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 <= -3.25e-111) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 6.5e-93) 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, -3.25e-111], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.5e-93], 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 -3.25 \cdot 10^{-111}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-93}:\\
\;\;\;\;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 < -3.24999999999999987e-111Initial program 61.4%
Simplified61.4%
Taylor expanded in B around -inf 48.8%
if -3.24999999999999987e-111 < B < 6.5e-93Initial program 61.2%
Simplified59.7%
Taylor expanded in C around inf 22.0%
mul-1-neg22.0%
distribute-rgt1-in22.0%
metadata-eval22.0%
mul0-lft22.0%
distribute-frac-neg22.0%
metadata-eval22.0%
Simplified22.0%
if 6.5e-93 < B Initial program 53.2%
Simplified53.2%
Taylor expanded in B around inf 50.4%
Final simplification41.0%
(FPCore (A B C) :precision binary64 (if (<= B -1e-309) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-309) {
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 <= -1e-309) {
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 <= -1e-309: 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 <= -1e-309) 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 <= -1e-309) 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, -1e-309], 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 \cdot 10^{-309}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.000000000000002e-309Initial program 60.1%
Simplified60.0%
Taylor expanded in B around -inf 39.0%
if -1.000000000000002e-309 < B Initial program 57.2%
Simplified56.3%
Taylor expanded in B around inf 37.6%
Final simplification38.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 58.6%
Simplified58.1%
Taylor expanded in B around inf 20.4%
Final simplification20.4%
herbie shell --seed 2023274
(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)))