
(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 23 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
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- B) (+ C (hypot C B))))))
(t_1 (atan (* 0.5 (/ B A)))))
(if (<= A -8.9e+111)
(/ (* 180.0 t_1) PI)
(if (<= A -2.9e+81)
t_0
(if (<= A -1.45e-28)
(* 180.0 (/ t_1 PI))
(if (<= A 1.8e+72)
t_0
(* (/ 180.0 PI) (atan (/ (- C (+ A (hypot B (- A C)))) B)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-B / (C + hypot(C, B))));
double t_1 = atan((0.5 * (B / A)));
double tmp;
if (A <= -8.9e+111) {
tmp = (180.0 * t_1) / ((double) M_PI);
} else if (A <= -2.9e+81) {
tmp = t_0;
} else if (A <= -1.45e-28) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= 1.8e+72) {
tmp = t_0;
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((C - (A + hypot(B, (A - C)))) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((-B / (C + Math.hypot(C, B))));
double t_1 = Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -8.9e+111) {
tmp = (180.0 * t_1) / Math.PI;
} else if (A <= -2.9e+81) {
tmp = t_0;
} else if (A <= -1.45e-28) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= 1.8e+72) {
tmp = t_0;
} else {
tmp = (180.0 / Math.PI) * Math.atan(((C - (A + Math.hypot(B, (A - C)))) / B));
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-B / (C + math.hypot(C, B)))) t_1 = math.atan((0.5 * (B / A))) tmp = 0 if A <= -8.9e+111: tmp = (180.0 * t_1) / math.pi elif A <= -2.9e+81: tmp = t_0 elif A <= -1.45e-28: tmp = 180.0 * (t_1 / math.pi) elif A <= 1.8e+72: tmp = t_0 else: tmp = (180.0 / math.pi) * math.atan(((C - (A + math.hypot(B, (A - C)))) / B)) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-B) / Float64(C + hypot(C, B))))) t_1 = atan(Float64(0.5 * Float64(B / A))) tmp = 0.0 if (A <= -8.9e+111) tmp = Float64(Float64(180.0 * t_1) / pi); elseif (A <= -2.9e+81) tmp = t_0; elseif (A <= -1.45e-28) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= 1.8e+72) tmp = t_0; else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C - Float64(A + hypot(B, Float64(A - C)))) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-B / (C + hypot(C, B)))); t_1 = atan((0.5 * (B / A))); tmp = 0.0; if (A <= -8.9e+111) tmp = (180.0 * t_1) / pi; elseif (A <= -2.9e+81) tmp = t_0; elseif (A <= -1.45e-28) tmp = 180.0 * (t_1 / pi); elseif (A <= 1.8e+72) tmp = t_0; else tmp = (180.0 / pi) * atan(((C - (A + hypot(B, (A - C)))) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-B) / N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -8.9e+111], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -2.9e+81], t$95$0, If[LessEqual[A, -1.45e-28], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.8e+72], t$95$0, N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C - N[(A + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-B}{C + \mathsf{hypot}\left(C, B\right)}\right)\\
t_1 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -8.9 \cdot 10^{+111}:\\
\;\;\;\;\frac{180 \cdot t_1}{\pi}\\
\mathbf{elif}\;A \leq -2.9 \cdot 10^{+81}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.45 \cdot 10^{-28}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{+72}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C - \left(A + \mathsf{hypot}\left(B, A - C\right)\right)}{B}\right)\\
\end{array}
\end{array}
if A < -8.89999999999999998e111Initial program 11.8%
associate-*r/11.9%
unpow211.9%
Simplified11.9%
associate--l-11.5%
+-commutative11.5%
unpow211.5%
hypot-udef25.9%
flip--10.5%
frac-times5.5%
*-un-lft-identity5.5%
pow25.5%
Applied egg-rr5.5%
associate-+r+4.1%
Simplified4.1%
Taylor expanded in A around -inf 80.3%
if -8.89999999999999998e111 < A < -2.9e81 or -1.45000000000000006e-28 < A < 1.80000000000000017e72Initial program 55.3%
associate-*r/55.3%
unpow255.3%
Simplified55.3%
associate--l-55.4%
+-commutative55.4%
unpow255.4%
hypot-udef84.3%
flip--36.0%
frac-times32.2%
*-un-lft-identity32.2%
pow232.2%
Applied egg-rr32.2%
associate-+r+32.2%
Simplified32.2%
Taylor expanded in A around 0 53.3%
associate-*r/53.3%
mul-1-neg53.3%
+-commutative53.3%
unpow253.3%
unpow253.3%
hypot-def93.2%
Simplified93.2%
*-un-lft-identity93.2%
associate-/l*92.8%
Applied egg-rr92.8%
*-lft-identity92.8%
associate-/r/93.2%
Simplified93.2%
if -2.9e81 < A < -1.45000000000000006e-28Initial program 37.2%
associate-*l/37.2%
*-lft-identity37.2%
+-commutative37.2%
unpow237.2%
unpow237.2%
hypot-def48.5%
Simplified48.5%
Taylor expanded in A around -inf 64.6%
if 1.80000000000000017e72 < A Initial program 81.9%
associate-*r/81.9%
associate-*l/81.9%
associate-*l/81.9%
*-lft-identity81.9%
sub-neg81.9%
associate-+l-81.9%
sub-neg81.9%
remove-double-neg81.9%
+-commutative81.9%
unpow281.9%
unpow281.9%
hypot-def95.3%
Simplified95.3%
Final simplification89.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- B) (+ C (hypot C B))))))
(t_1 (atan (* 0.5 (/ B A)))))
(if (<= A -1.8e+113)
(/ (* 180.0 t_1) PI)
(if (<= A -1.65e+81)
t_0
(if (<= A -1.45e-28)
(* 180.0 (/ t_1 PI))
(if (<= A 2.25e+74)
t_0
(* 180.0 (/ (atan (/ (- (- C A) (hypot B (- A C))) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-B / (C + hypot(C, B))));
double t_1 = atan((0.5 * (B / A)));
double tmp;
if (A <= -1.8e+113) {
tmp = (180.0 * t_1) / ((double) M_PI);
} else if (A <= -1.65e+81) {
tmp = t_0;
} else if (A <= -1.45e-28) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= 2.25e+74) {
tmp = t_0;
} 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 t_0 = (180.0 / Math.PI) * Math.atan((-B / (C + Math.hypot(C, B))));
double t_1 = Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -1.8e+113) {
tmp = (180.0 * t_1) / Math.PI;
} else if (A <= -1.65e+81) {
tmp = t_0;
} else if (A <= -1.45e-28) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= 2.25e+74) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan((((C - A) - Math.hypot(B, (A - C))) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-B / (C + math.hypot(C, B)))) t_1 = math.atan((0.5 * (B / A))) tmp = 0 if A <= -1.8e+113: tmp = (180.0 * t_1) / math.pi elif A <= -1.65e+81: tmp = t_0 elif A <= -1.45e-28: tmp = 180.0 * (t_1 / math.pi) elif A <= 2.25e+74: tmp = t_0 else: tmp = 180.0 * (math.atan((((C - A) - math.hypot(B, (A - C))) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-B) / Float64(C + hypot(C, B))))) t_1 = atan(Float64(0.5 * Float64(B / A))) tmp = 0.0 if (A <= -1.8e+113) tmp = Float64(Float64(180.0 * t_1) / pi); elseif (A <= -1.65e+81) tmp = t_0; elseif (A <= -1.45e-28) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= 2.25e+74) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - A) - hypot(B, Float64(A - C))) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-B / (C + hypot(C, B)))); t_1 = atan((0.5 * (B / A))); tmp = 0.0; if (A <= -1.8e+113) tmp = (180.0 * t_1) / pi; elseif (A <= -1.65e+81) tmp = t_0; elseif (A <= -1.45e-28) tmp = 180.0 * (t_1 / pi); elseif (A <= 2.25e+74) tmp = t_0; else tmp = 180.0 * (atan((((C - A) - hypot(B, (A - C))) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-B) / N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -1.8e+113], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1.65e+81], t$95$0, If[LessEqual[A, -1.45e-28], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.25e+74], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - A), $MachinePrecision] - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-B}{C + \mathsf{hypot}\left(C, B\right)}\right)\\
t_1 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -1.8 \cdot 10^{+113}:\\
\;\;\;\;\frac{180 \cdot t_1}{\pi}\\
\mathbf{elif}\;A \leq -1.65 \cdot 10^{+81}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.45 \cdot 10^{-28}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq 2.25 \cdot 10^{+74}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - A\right) - \mathsf{hypot}\left(B, A - C\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.79999999999999996e113Initial program 11.8%
associate-*r/11.9%
unpow211.9%
Simplified11.9%
associate--l-11.5%
+-commutative11.5%
unpow211.5%
hypot-udef25.9%
flip--10.5%
frac-times5.5%
*-un-lft-identity5.5%
pow25.5%
Applied egg-rr5.5%
associate-+r+4.1%
Simplified4.1%
Taylor expanded in A around -inf 80.3%
if -1.79999999999999996e113 < A < -1.65e81 or -1.45000000000000006e-28 < A < 2.25e74Initial program 55.3%
associate-*r/55.3%
unpow255.3%
Simplified55.3%
associate--l-55.4%
+-commutative55.4%
unpow255.4%
hypot-udef84.3%
flip--36.0%
frac-times32.2%
*-un-lft-identity32.2%
pow232.2%
Applied egg-rr32.2%
associate-+r+32.2%
Simplified32.2%
Taylor expanded in A around 0 53.3%
associate-*r/53.3%
mul-1-neg53.3%
+-commutative53.3%
unpow253.3%
unpow253.3%
hypot-def93.2%
Simplified93.2%
*-un-lft-identity93.2%
associate-/l*92.8%
Applied egg-rr92.8%
*-lft-identity92.8%
associate-/r/93.2%
Simplified93.2%
if -1.65e81 < A < -1.45000000000000006e-28Initial program 37.2%
associate-*l/37.2%
*-lft-identity37.2%
+-commutative37.2%
unpow237.2%
unpow237.2%
hypot-def48.5%
Simplified48.5%
Taylor expanded in A around -inf 64.6%
if 2.25e74 < A Initial program 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
unpow281.9%
hypot-def95.3%
Simplified95.3%
Final simplification89.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* (/ 180.0 PI) (atan (/ (- B) (+ C (hypot C B))))))
(t_1 (atan (* 0.5 (/ B A)))))
(if (<= A -7e+115)
(/ (* 180.0 t_1) PI)
(if (<= A -3.8e+80)
t_0
(if (<= A -1.45e-28)
(* 180.0 (/ t_1 PI))
(if (<= A 1.25e+147)
t_0
(* 180.0 (/ (atan (/ (- (- A) (hypot A B)) B)) PI))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 / ((double) M_PI)) * atan((-B / (C + hypot(C, B))));
double t_1 = atan((0.5 * (B / A)));
double tmp;
if (A <= -7e+115) {
tmp = (180.0 * t_1) / ((double) M_PI);
} else if (A <= -3.8e+80) {
tmp = t_0;
} else if (A <= -1.45e-28) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= 1.25e+147) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 / Math.PI) * Math.atan((-B / (C + Math.hypot(C, B))));
double t_1 = Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -7e+115) {
tmp = (180.0 * t_1) / Math.PI;
} else if (A <= -3.8e+80) {
tmp = t_0;
} else if (A <= -1.45e-28) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= 1.25e+147) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(A, B)) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 / math.pi) * math.atan((-B / (C + math.hypot(C, B)))) t_1 = math.atan((0.5 * (B / A))) tmp = 0 if A <= -7e+115: tmp = (180.0 * t_1) / math.pi elif A <= -3.8e+80: tmp = t_0 elif A <= -1.45e-28: tmp = 180.0 * (t_1 / math.pi) elif A <= 1.25e+147: tmp = t_0 else: tmp = 180.0 * (math.atan(((-A - math.hypot(A, B)) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 / pi) * atan(Float64(Float64(-B) / Float64(C + hypot(C, B))))) t_1 = atan(Float64(0.5 * Float64(B / A))) tmp = 0.0 if (A <= -7e+115) tmp = Float64(Float64(180.0 * t_1) / pi); elseif (A <= -3.8e+80) tmp = t_0; elseif (A <= -1.45e-28) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= 1.25e+147) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 / pi) * atan((-B / (C + hypot(C, B)))); t_1 = atan((0.5 * (B / A))); tmp = 0.0; if (A <= -7e+115) tmp = (180.0 * t_1) / pi; elseif (A <= -3.8e+80) tmp = t_0; elseif (A <= -1.45e-28) tmp = 180.0 * (t_1 / pi); elseif (A <= 1.25e+147) tmp = t_0; else tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[((-B) / N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -7e+115], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -3.8e+80], t$95$0, If[LessEqual[A, -1.45e-28], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1.25e+147], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180}{\pi} \cdot \tan^{-1} \left(\frac{-B}{C + \mathsf{hypot}\left(C, B\right)}\right)\\
t_1 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -7 \cdot 10^{+115}:\\
\;\;\;\;\frac{180 \cdot t_1}{\pi}\\
\mathbf{elif}\;A \leq -3.8 \cdot 10^{+80}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.45 \cdot 10^{-28}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq 1.25 \cdot 10^{+147}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -7.00000000000000011e115Initial program 11.8%
associate-*r/11.9%
unpow211.9%
Simplified11.9%
associate--l-11.5%
+-commutative11.5%
unpow211.5%
hypot-udef25.9%
flip--10.5%
frac-times5.5%
*-un-lft-identity5.5%
pow25.5%
Applied egg-rr5.5%
associate-+r+4.1%
Simplified4.1%
Taylor expanded in A around -inf 80.3%
if -7.00000000000000011e115 < A < -3.79999999999999997e80 or -1.45000000000000006e-28 < A < 1.2500000000000001e147Initial program 55.3%
associate-*r/55.3%
unpow255.3%
Simplified55.3%
associate--l-55.4%
+-commutative55.4%
unpow255.4%
hypot-udef84.4%
flip--37.4%
frac-times33.7%
*-un-lft-identity33.7%
pow233.7%
Applied egg-rr33.7%
associate-+r+33.6%
Simplified33.6%
Taylor expanded in A around 0 51.4%
associate-*r/51.4%
mul-1-neg51.4%
+-commutative51.4%
unpow251.4%
unpow251.4%
hypot-def90.4%
Simplified90.4%
*-un-lft-identity90.4%
associate-/l*90.1%
Applied egg-rr90.1%
*-lft-identity90.1%
associate-/r/90.4%
Simplified90.4%
if -3.79999999999999997e80 < A < -1.45000000000000006e-28Initial program 37.2%
associate-*l/37.2%
*-lft-identity37.2%
+-commutative37.2%
unpow237.2%
unpow237.2%
hypot-def48.5%
Simplified48.5%
Taylor expanded in A around -inf 64.6%
if 1.2500000000000001e147 < A Initial program 93.9%
associate-*l/93.9%
*-lft-identity93.9%
+-commutative93.9%
unpow293.9%
unpow293.9%
hypot-def100.0%
Simplified100.0%
Taylor expanded in C around 0 93.9%
mul-1-neg93.9%
+-commutative93.9%
unpow293.9%
unpow293.9%
hypot-def100.0%
Simplified100.0%
Final simplification88.2%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI)))
(t_1 (atan (* 0.5 (/ B A)))))
(if (<= A -5.5e+108)
(/ (* 180.0 t_1) PI)
(if (<= A -5.5e+80)
t_0
(if (<= A -1.42e-28)
(* 180.0 (/ t_1 PI))
(if (<= A 2.3e+67)
t_0
(if (<= A 3.45e+109)
(* 180.0 (/ (atan (/ (- (- C B) A) B)) PI))
(if (<= A 3.8e+147)
(/
(* 180.0 (atan (/ (* B (- B)) (* B (+ A (- (* C 2.0) A))))))
PI)
(* 180.0 (/ (atan (/ (- B A) B)) PI))))))))))
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 = atan((0.5 * (B / A)));
double tmp;
if (A <= -5.5e+108) {
tmp = (180.0 * t_1) / ((double) M_PI);
} else if (A <= -5.5e+80) {
tmp = t_0;
} else if (A <= -1.42e-28) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= 2.3e+67) {
tmp = t_0;
} else if (A <= 3.45e+109) {
tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
} else if (A <= 3.8e+147) {
tmp = (180.0 * atan(((B * -B) / (B * (A + ((C * 2.0) - A)))))) / ((double) M_PI);
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
double t_1 = Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -5.5e+108) {
tmp = (180.0 * t_1) / Math.PI;
} else if (A <= -5.5e+80) {
tmp = t_0;
} else if (A <= -1.42e-28) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= 2.3e+67) {
tmp = t_0;
} else if (A <= 3.45e+109) {
tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
} else if (A <= 3.8e+147) {
tmp = (180.0 * Math.atan(((B * -B) / (B * (A + ((C * 2.0) - A)))))) / Math.PI;
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) t_1 = math.atan((0.5 * (B / A))) tmp = 0 if A <= -5.5e+108: tmp = (180.0 * t_1) / math.pi elif A <= -5.5e+80: tmp = t_0 elif A <= -1.42e-28: tmp = 180.0 * (t_1 / math.pi) elif A <= 2.3e+67: tmp = t_0 elif A <= 3.45e+109: tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi) elif A <= 3.8e+147: tmp = (180.0 * math.atan(((B * -B) / (B * (A + ((C * 2.0) - A)))))) / math.pi else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)) t_1 = atan(Float64(0.5 * Float64(B / A))) tmp = 0.0 if (A <= -5.5e+108) tmp = Float64(Float64(180.0 * t_1) / pi); elseif (A <= -5.5e+80) tmp = t_0; elseif (A <= -1.42e-28) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= 2.3e+67) tmp = t_0; elseif (A <= 3.45e+109) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi)); elseif (A <= 3.8e+147) tmp = Float64(Float64(180.0 * atan(Float64(Float64(B * Float64(-B)) / Float64(B * Float64(A + Float64(Float64(C * 2.0) - A)))))) / pi); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); t_1 = atan((0.5 * (B / A))); tmp = 0.0; if (A <= -5.5e+108) tmp = (180.0 * t_1) / pi; elseif (A <= -5.5e+80) tmp = t_0; elseif (A <= -1.42e-28) tmp = 180.0 * (t_1 / pi); elseif (A <= 2.3e+67) tmp = t_0; elseif (A <= 3.45e+109) tmp = 180.0 * (atan((((C - B) - A) / B)) / pi); elseif (A <= 3.8e+147) tmp = (180.0 * atan(((B * -B) / (B * (A + ((C * 2.0) - A)))))) / pi; else tmp = 180.0 * (atan(((B - A) / B)) / pi); 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[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -5.5e+108], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -5.5e+80], t$95$0, If[LessEqual[A, -1.42e-28], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.3e+67], t$95$0, If[LessEqual[A, 3.45e+109], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.8e+147], N[(N[(180.0 * N[ArcTan[N[(N[(B * (-B)), $MachinePrecision] / N[(B * N[(A + N[(N[(C * 2.0), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\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 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -5.5 \cdot 10^{+108}:\\
\;\;\;\;\frac{180 \cdot t_1}{\pi}\\
\mathbf{elif}\;A \leq -5.5 \cdot 10^{+80}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -1.42 \cdot 10^{-28}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq 2.3 \cdot 10^{+67}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.45 \cdot 10^{+109}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3.8 \cdot 10^{+147}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(\frac{B \cdot \left(-B\right)}{B \cdot \left(A + \left(C \cdot 2 - A\right)\right)}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.4999999999999998e108Initial program 11.4%
associate-*r/11.4%
unpow211.4%
Simplified11.4%
associate--l-11.1%
+-commutative11.1%
unpow211.1%
hypot-udef24.7%
flip--10.0%
frac-times5.2%
*-un-lft-identity5.2%
pow25.2%
Applied egg-rr5.2%
associate-+r+4.0%
Simplified4.0%
Taylor expanded in A around -inf 78.7%
if -5.4999999999999998e108 < A < -5.49999999999999967e80 or -1.42000000000000001e-28 < A < 2.2999999999999999e67Initial program 56.1%
associate-*l/56.1%
*-lft-identity56.1%
+-commutative56.1%
unpow256.1%
unpow256.1%
hypot-def85.9%
Simplified85.9%
Taylor expanded in A around 0 53.6%
unpow253.6%
unpow253.6%
hypot-def82.9%
Simplified82.9%
if -5.49999999999999967e80 < A < -1.42000000000000001e-28Initial program 37.2%
associate-*l/37.2%
*-lft-identity37.2%
+-commutative37.2%
unpow237.2%
unpow237.2%
hypot-def48.5%
Simplified48.5%
Taylor expanded in A around -inf 64.6%
if 2.2999999999999999e67 < A < 3.44999999999999995e109Initial program 71.8%
associate-*l/71.8%
*-lft-identity71.8%
+-commutative71.8%
unpow271.8%
unpow271.8%
hypot-def89.3%
Simplified89.3%
Taylor expanded in B around inf 89.1%
neg-mul-189.1%
unsub-neg89.1%
Simplified89.1%
if 3.44999999999999995e109 < A < 3.7999999999999997e147Initial program 41.5%
associate-*r/41.5%
unpow241.5%
Simplified41.5%
associate--l-41.5%
+-commutative41.5%
unpow241.5%
hypot-udef75.3%
flip--40.4%
frac-times37.1%
*-un-lft-identity37.1%
pow237.1%
Applied egg-rr37.1%
associate-+r+37.1%
Simplified37.1%
Taylor expanded in A around 0 50.3%
mul-1-neg50.3%
unpow250.3%
Simplified50.3%
Taylor expanded in C around inf 69.9%
mul-1-neg69.9%
unsub-neg69.9%
*-commutative69.9%
Simplified69.9%
if 3.7999999999999997e147 < A Initial program 93.9%
associate-*l/93.9%
*-lft-identity93.9%
+-commutative93.9%
unpow293.9%
unpow293.9%
hypot-def100.0%
Simplified100.0%
Taylor expanded in B around -inf 97.5%
Taylor expanded in C around 0 97.5%
Final simplification82.6%
(FPCore (A B C)
:precision binary64
(if (<= C -1.15e+41)
(* 180.0 (/ (atan (/ (- C (hypot B C)) B)) PI))
(if (<= C 3.6e+101)
(* 180.0 (/ (atan (/ (- (- A) (hypot A B)) B)) PI))
(* (/ 180.0 PI) (atan (* -0.5 (/ B C)))))))
double code(double A, double B, double C) {
double tmp;
if (C <= -1.15e+41) {
tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / ((double) M_PI));
} else if (C <= 3.6e+101) {
tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / ((double) M_PI));
} else {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (C <= -1.15e+41) {
tmp = 180.0 * (Math.atan(((C - Math.hypot(B, C)) / B)) / Math.PI);
} else if (C <= 3.6e+101) {
tmp = 180.0 * (Math.atan(((-A - Math.hypot(A, B)) / B)) / Math.PI);
} else {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
}
return tmp;
}
def code(A, B, C): tmp = 0 if C <= -1.15e+41: tmp = 180.0 * (math.atan(((C - math.hypot(B, C)) / B)) / math.pi) elif C <= 3.6e+101: tmp = 180.0 * (math.atan(((-A - math.hypot(A, B)) / B)) / math.pi) else: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) return tmp
function code(A, B, C) tmp = 0.0 if (C <= -1.15e+41) tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - hypot(B, C)) / B)) / pi)); elseif (C <= 3.6e+101) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(-A) - hypot(A, B)) / B)) / pi)); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (C <= -1.15e+41) tmp = 180.0 * (atan(((C - hypot(B, C)) / B)) / pi); elseif (C <= 3.6e+101) tmp = 180.0 * (atan(((-A - hypot(A, B)) / B)) / pi); else tmp = (180.0 / pi) * atan((-0.5 * (B / C))); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[C, -1.15e+41], N[(180.0 * N[(N[ArcTan[N[(N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 3.6e+101], N[(180.0 * N[(N[ArcTan[N[(N[((-A) - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.15 \cdot 10^{+41}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - \mathsf{hypot}\left(B, C\right)}{B}\right)}{\pi}\\
\mathbf{elif}\;C \leq 3.6 \cdot 10^{+101}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(-A\right) - \mathsf{hypot}\left(A, B\right)}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\end{array}
\end{array}
if C < -1.1499999999999999e41Initial program 76.7%
associate-*l/76.7%
*-lft-identity76.7%
+-commutative76.7%
unpow276.7%
unpow276.7%
hypot-def94.3%
Simplified94.3%
Taylor expanded in A around 0 76.8%
unpow276.8%
unpow276.8%
hypot-def92.3%
Simplified92.3%
if -1.1499999999999999e41 < C < 3.60000000000000029e101Initial program 56.9%
associate-*l/56.9%
*-lft-identity56.9%
+-commutative56.9%
unpow256.9%
unpow256.9%
hypot-def78.8%
Simplified78.8%
Taylor expanded in C around 0 54.6%
mul-1-neg54.6%
+-commutative54.6%
unpow254.6%
unpow254.6%
hypot-def76.6%
Simplified76.6%
if 3.60000000000000029e101 < C Initial program 16.1%
associate-*r/16.1%
unpow216.1%
Simplified16.1%
associate--l-16.1%
+-commutative16.1%
unpow216.1%
hypot-udef56.8%
flip--6.2%
frac-times5.3%
*-un-lft-identity5.3%
pow25.3%
Applied egg-rr5.3%
associate-+r+5.3%
Simplified5.3%
Taylor expanded in A around 0 55.3%
associate-*r/55.3%
mul-1-neg55.3%
+-commutative55.3%
unpow255.3%
unpow255.3%
hypot-def89.6%
Simplified89.6%
*-un-lft-identity89.6%
associate-/l*88.2%
Applied egg-rr88.2%
*-lft-identity88.2%
associate-/r/89.6%
Simplified89.6%
Taylor expanded in B around 0 82.3%
Final simplification80.5%
(FPCore (A B C)
:precision binary64
(let* ((t_0
(/ (* 180.0 (atan (/ (* B (- B)) (* B (+ A (- (* C 2.0) A)))))) PI)))
(if (<= B -1.3e-85)
(* (/ 180.0 PI) (atan (/ (+ C (- B A)) B)))
(if (<= B -3.3e-165)
t_0
(if (<= B -2.4e-189)
(/ (* 180.0 (atan (* 0.5 (/ B A)))) PI)
(if (<= B 5.2e-135)
(* 180.0 (/ (atan (/ (- (- C B) A) B)) PI))
(if (<= B 9.5e-36)
t_0
(* 180.0 (/ (atan (+ (/ C B) (- -1.0 (/ A B)))) PI)))))))))
double code(double A, double B, double C) {
double t_0 = (180.0 * atan(((B * -B) / (B * (A + ((C * 2.0) - A)))))) / ((double) M_PI);
double tmp;
if (B <= -1.3e-85) {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
} else if (B <= -3.3e-165) {
tmp = t_0;
} else if (B <= -2.4e-189) {
tmp = (180.0 * atan((0.5 * (B / A)))) / ((double) M_PI);
} else if (B <= 5.2e-135) {
tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
} else if (B <= 9.5e-36) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = (180.0 * Math.atan(((B * -B) / (B * (A + ((C * 2.0) - A)))))) / Math.PI;
double tmp;
if (B <= -1.3e-85) {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
} else if (B <= -3.3e-165) {
tmp = t_0;
} else if (B <= -2.4e-189) {
tmp = (180.0 * Math.atan((0.5 * (B / A)))) / Math.PI;
} else if (B <= 5.2e-135) {
tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
} else if (B <= 9.5e-36) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(((C / B) + (-1.0 - (A / B)))) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = (180.0 * math.atan(((B * -B) / (B * (A + ((C * 2.0) - A)))))) / math.pi tmp = 0 if B <= -1.3e-85: tmp = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) elif B <= -3.3e-165: tmp = t_0 elif B <= -2.4e-189: tmp = (180.0 * math.atan((0.5 * (B / A)))) / math.pi elif B <= 5.2e-135: tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi) elif B <= 9.5e-36: tmp = t_0 else: tmp = 180.0 * (math.atan(((C / B) + (-1.0 - (A / B)))) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(Float64(180.0 * atan(Float64(Float64(B * Float64(-B)) / Float64(B * Float64(A + Float64(Float64(C * 2.0) - A)))))) / pi) tmp = 0.0 if (B <= -1.3e-85) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))); elseif (B <= -3.3e-165) tmp = t_0; elseif (B <= -2.4e-189) tmp = Float64(Float64(180.0 * atan(Float64(0.5 * Float64(B / A)))) / pi); elseif (B <= 5.2e-135) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi)); elseif (B <= 9.5e-36) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C / B) + Float64(-1.0 - Float64(A / B)))) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = (180.0 * atan(((B * -B) / (B * (A + ((C * 2.0) - A)))))) / pi; tmp = 0.0; if (B <= -1.3e-85) tmp = (180.0 / pi) * atan(((C + (B - A)) / B)); elseif (B <= -3.3e-165) tmp = t_0; elseif (B <= -2.4e-189) tmp = (180.0 * atan((0.5 * (B / A)))) / pi; elseif (B <= 5.2e-135) tmp = 180.0 * (atan((((C - B) - A) / B)) / pi); elseif (B <= 9.5e-36) tmp = t_0; else tmp = 180.0 * (atan(((C / B) + (-1.0 - (A / B)))) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(N[(180.0 * N[ArcTan[N[(N[(B * (-B)), $MachinePrecision] / N[(B * N[(A + N[(N[(C * 2.0), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision]}, If[LessEqual[B, -1.3e-85], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -3.3e-165], t$95$0, If[LessEqual[B, -2.4e-189], N[(N[(180.0 * N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[B, 5.2e-135], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 9.5e-36], t$95$0, N[(180.0 * N[(N[ArcTan[N[(N[(C / B), $MachinePrecision] + N[(-1.0 - N[(A / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{180 \cdot \tan^{-1} \left(\frac{B \cdot \left(-B\right)}{B \cdot \left(A + \left(C \cdot 2 - A\right)\right)}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.3 \cdot 10^{-85}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\mathbf{elif}\;B \leq -3.3 \cdot 10^{-165}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -2.4 \cdot 10^{-189}:\\
\;\;\;\;\frac{180 \cdot \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;B \leq 5.2 \cdot 10^{-135}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 9.5 \cdot 10^{-36}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B} + \left(-1 - \frac{A}{B}\right)\right)}{\pi}\\
\end{array}
\end{array}
if B < -1.30000000000000006e-85Initial program 54.7%
associate-*r/54.7%
associate-*l/54.7%
associate-*l/54.7%
*-lft-identity54.7%
sub-neg54.7%
associate-+l-54.7%
sub-neg54.7%
remove-double-neg54.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-def77.9%
Simplified77.9%
Taylor expanded in B around -inf 75.0%
neg-mul-175.0%
unsub-neg75.0%
Simplified75.0%
if -1.30000000000000006e-85 < B < -3.2999999999999998e-165 or 5.20000000000000008e-135 < B < 9.5000000000000003e-36Initial program 41.4%
associate-*r/41.4%
unpow241.4%
Simplified41.4%
associate--l-41.8%
+-commutative41.8%
unpow241.8%
hypot-udef57.4%
flip--35.8%
frac-times37.7%
*-un-lft-identity37.7%
pow237.7%
Applied egg-rr37.7%
associate-+r+37.3%
Simplified37.3%
Taylor expanded in A around 0 50.4%
mul-1-neg50.4%
unpow250.4%
Simplified50.4%
Taylor expanded in C around inf 68.3%
mul-1-neg68.3%
unsub-neg68.3%
*-commutative68.3%
Simplified68.3%
if -3.2999999999999998e-165 < B < -2.3999999999999998e-189Initial program 5.6%
associate-*r/5.6%
unpow25.6%
Simplified5.6%
associate--l-4.0%
+-commutative4.0%
unpow24.0%
hypot-udef19.6%
flip--4.5%
frac-times2.4%
*-un-lft-identity2.4%
pow22.4%
Applied egg-rr2.4%
associate-+r+1.9%
Simplified1.9%
Taylor expanded in A around -inf 83.3%
if -2.3999999999999998e-189 < B < 5.20000000000000008e-135Initial program 63.0%
associate-*l/63.0%
*-lft-identity63.0%
+-commutative63.0%
unpow263.0%
unpow263.0%
hypot-def88.0%
Simplified88.0%
Taylor expanded in B around inf 61.8%
neg-mul-161.8%
unsub-neg61.8%
Simplified61.8%
if 9.5000000000000003e-36 < B Initial program 56.2%
associate-*l/56.3%
*-lft-identity56.3%
+-commutative56.3%
unpow256.3%
unpow256.3%
hypot-def81.8%
Simplified81.8%
Taylor expanded in B around inf 78.2%
Final simplification72.4%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
(if (<= A -5.3e+104)
t_1
(if (<= A -1.2e+83)
t_0
(if (<= A -5e-30)
t_1
(if (<= A -2.9e-176)
t_0
(if (<= A 1.1e-153)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 4000.0)
t_0
(if (<= A 1.75e+72)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (- B A) B)) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
double tmp;
if (A <= -5.3e+104) {
tmp = t_1;
} else if (A <= -1.2e+83) {
tmp = t_0;
} else if (A <= -5e-30) {
tmp = t_1;
} else if (A <= -2.9e-176) {
tmp = t_0;
} else if (A <= 1.1e-153) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 4000.0) {
tmp = t_0;
} else if (A <= 1.75e+72) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
double tmp;
if (A <= -5.3e+104) {
tmp = t_1;
} else if (A <= -1.2e+83) {
tmp = t_0;
} else if (A <= -5e-30) {
tmp = t_1;
} else if (A <= -2.9e-176) {
tmp = t_0;
} else if (A <= 1.1e-153) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 4000.0) {
tmp = t_0;
} else if (A <= 1.75e+72) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - B) / B)) / math.pi) t_1 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) tmp = 0 if A <= -5.3e+104: tmp = t_1 elif A <= -1.2e+83: tmp = t_0 elif A <= -5e-30: tmp = t_1 elif A <= -2.9e-176: tmp = t_0 elif A <= 1.1e-153: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 4000.0: tmp = t_0 elif A <= 1.75e+72: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) tmp = 0.0 if (A <= -5.3e+104) tmp = t_1; elseif (A <= -1.2e+83) tmp = t_0; elseif (A <= -5e-30) tmp = t_1; elseif (A <= -2.9e-176) tmp = t_0; elseif (A <= 1.1e-153) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 4000.0) tmp = t_0; elseif (A <= 1.75e+72) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - B) / B)) / pi); t_1 = 180.0 * (atan((0.5 * (B / A))) / pi); tmp = 0.0; if (A <= -5.3e+104) tmp = t_1; elseif (A <= -1.2e+83) tmp = t_0; elseif (A <= -5e-30) tmp = t_1; elseif (A <= -2.9e-176) tmp = t_0; elseif (A <= 1.1e-153) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 4000.0) tmp = t_0; elseif (A <= 1.75e+72) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -5.3e+104], t$95$1, If[LessEqual[A, -1.2e+83], t$95$0, If[LessEqual[A, -5e-30], t$95$1, If[LessEqual[A, -2.9e-176], t$95$0, If[LessEqual[A, 1.1e-153], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4000.0], t$95$0, If[LessEqual[A, 1.75e+72], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -5.3 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1.2 \cdot 10^{+83}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -5 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -2.9 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.1 \cdot 10^{-153}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.75 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -5.2999999999999999e104 or -1.19999999999999996e83 < A < -4.99999999999999972e-30Initial program 22.6%
associate-*l/22.6%
*-lft-identity22.6%
+-commutative22.6%
unpow222.6%
unpow222.6%
hypot-def46.8%
Simplified46.8%
Taylor expanded in A around -inf 72.3%
if -5.2999999999999999e104 < A < -1.19999999999999996e83 or -4.99999999999999972e-30 < A < -2.90000000000000006e-176 or 1.1e-153 < A < 4e3Initial program 60.9%
associate-*l/60.9%
*-lft-identity60.9%
+-commutative60.9%
unpow260.9%
unpow260.9%
hypot-def85.3%
Simplified85.3%
Taylor expanded in A around 0 57.3%
unpow257.3%
unpow257.3%
hypot-def81.4%
Simplified81.4%
Taylor expanded in C around 0 69.7%
mul-1-neg69.7%
unsub-neg69.7%
Simplified69.7%
if -2.90000000000000006e-176 < A < 1.1e-153Initial program 56.9%
associate-*l/56.9%
*-lft-identity56.9%
+-commutative56.9%
unpow256.9%
unpow256.9%
hypot-def88.2%
Simplified88.2%
Taylor expanded in B around -inf 56.4%
Taylor expanded in A around 0 54.7%
if 4e3 < A < 1.75000000000000005e72Initial program 29.2%
associate-*l/29.2%
*-lft-identity29.2%
+-commutative29.2%
unpow229.2%
unpow229.2%
hypot-def74.2%
Simplified74.2%
Taylor expanded in A around 0 23.8%
unpow223.8%
unpow223.8%
hypot-def68.8%
Simplified68.8%
Taylor expanded in C around inf 67.4%
if 1.75000000000000005e72 < A Initial program 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
unpow281.9%
hypot-def95.3%
Simplified95.3%
Taylor expanded in B around -inf 84.3%
Taylor expanded in C around 0 82.9%
Final simplification69.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
(if (<= A -4.8e+104)
t_1
(if (<= A -5e+84)
t_0
(if (<= A -8.2e-30)
t_1
(if (<= A -1.52e-176)
t_0
(if (<= A 6.8e-154)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 4000.0)
t_0
(if (<= A 4.2e+76)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(* 180.0 (/ (atan (/ (- B A) B)) PI)))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
double tmp;
if (A <= -4.8e+104) {
tmp = t_1;
} else if (A <= -5e+84) {
tmp = t_0;
} else if (A <= -8.2e-30) {
tmp = t_1;
} else if (A <= -1.52e-176) {
tmp = t_0;
} else if (A <= 6.8e-154) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 4000.0) {
tmp = t_0;
} else if (A <= 4.2e+76) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
double tmp;
if (A <= -4.8e+104) {
tmp = t_1;
} else if (A <= -5e+84) {
tmp = t_0;
} else if (A <= -8.2e-30) {
tmp = t_1;
} else if (A <= -1.52e-176) {
tmp = t_0;
} else if (A <= 6.8e-154) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 4000.0) {
tmp = t_0;
} else if (A <= 4.2e+76) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - B) / B)) / math.pi) t_1 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) tmp = 0 if A <= -4.8e+104: tmp = t_1 elif A <= -5e+84: tmp = t_0 elif A <= -8.2e-30: tmp = t_1 elif A <= -1.52e-176: tmp = t_0 elif A <= 6.8e-154: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 4000.0: tmp = t_0 elif A <= 4.2e+76: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) tmp = 0.0 if (A <= -4.8e+104) tmp = t_1; elseif (A <= -5e+84) tmp = t_0; elseif (A <= -8.2e-30) tmp = t_1; elseif (A <= -1.52e-176) tmp = t_0; elseif (A <= 6.8e-154) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 4000.0) tmp = t_0; elseif (A <= 4.2e+76) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - B) / B)) / pi); t_1 = 180.0 * (atan((0.5 * (B / A))) / pi); tmp = 0.0; if (A <= -4.8e+104) tmp = t_1; elseif (A <= -5e+84) tmp = t_0; elseif (A <= -8.2e-30) tmp = t_1; elseif (A <= -1.52e-176) tmp = t_0; elseif (A <= 6.8e-154) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 4000.0) tmp = t_0; elseif (A <= 4.2e+76) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.8e+104], t$95$1, If[LessEqual[A, -5e+84], t$95$0, If[LessEqual[A, -8.2e-30], t$95$1, If[LessEqual[A, -1.52e-176], t$95$0, If[LessEqual[A, 6.8e-154], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4000.0], t$95$0, If[LessEqual[A, 4.2e+76], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -4.8 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -5 \cdot 10^{+84}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -8.2 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1.52 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 6.8 \cdot 10^{-154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 4.2 \cdot 10^{+76}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.8e104 or -5.0000000000000001e84 < A < -8.2000000000000007e-30Initial program 22.6%
associate-*l/22.6%
*-lft-identity22.6%
+-commutative22.6%
unpow222.6%
unpow222.6%
hypot-def46.8%
Simplified46.8%
Taylor expanded in A around -inf 72.3%
if -4.8e104 < A < -5.0000000000000001e84 or -8.2000000000000007e-30 < A < -1.52000000000000001e-176 or 6.7999999999999997e-154 < A < 4e3Initial program 60.9%
associate-*l/60.9%
*-lft-identity60.9%
+-commutative60.9%
unpow260.9%
unpow260.9%
hypot-def85.3%
Simplified85.3%
Taylor expanded in A around 0 57.3%
unpow257.3%
unpow257.3%
hypot-def81.4%
Simplified81.4%
Taylor expanded in C around 0 69.7%
mul-1-neg69.7%
unsub-neg69.7%
Simplified69.7%
if -1.52000000000000001e-176 < A < 6.7999999999999997e-154Initial program 56.9%
associate-*l/56.9%
*-lft-identity56.9%
+-commutative56.9%
unpow256.9%
unpow256.9%
hypot-def88.2%
Simplified88.2%
Taylor expanded in B around -inf 56.4%
Taylor expanded in A around 0 54.7%
if 4e3 < A < 4.20000000000000013e76Initial program 29.2%
associate-*r/29.2%
unpow229.2%
Simplified29.2%
associate--l-29.2%
+-commutative29.2%
unpow229.2%
hypot-udef74.2%
flip--19.6%
frac-times18.3%
*-un-lft-identity18.3%
pow218.3%
Applied egg-rr18.3%
associate-+r+18.3%
Simplified18.3%
Taylor expanded in A around 0 59.9%
associate-*r/59.9%
mul-1-neg59.9%
+-commutative59.9%
unpow259.9%
unpow259.9%
hypot-def90.0%
Simplified90.0%
*-un-lft-identity90.0%
associate-/l*85.8%
Applied egg-rr85.8%
*-lft-identity85.8%
associate-/r/90.0%
Simplified90.0%
Taylor expanded in B around 0 68.1%
if 4.20000000000000013e76 < A Initial program 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
unpow281.9%
hypot-def95.3%
Simplified95.3%
Taylor expanded in B around -inf 84.3%
Taylor expanded in C around 0 82.9%
Final simplification69.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (* 180.0 (/ (atan (* 0.5 (/ B A))) PI))))
(if (<= A -7.2e+104)
t_1
(if (<= A -1.1e+85)
t_0
(if (<= A -2.1e-32)
t_1
(if (<= A -1.52e-176)
t_0
(if (<= A 9.8e-154)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 4000.0)
t_0
(if (<= A 1.75e+73)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(* (/ 180.0 PI) (atan (/ (- B A) B))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
double t_1 = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
double tmp;
if (A <= -7.2e+104) {
tmp = t_1;
} else if (A <= -1.1e+85) {
tmp = t_0;
} else if (A <= -2.1e-32) {
tmp = t_1;
} else if (A <= -1.52e-176) {
tmp = t_0;
} else if (A <= 9.8e-154) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 4000.0) {
tmp = t_0;
} else if (A <= 1.75e+73) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
double t_1 = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
double tmp;
if (A <= -7.2e+104) {
tmp = t_1;
} else if (A <= -1.1e+85) {
tmp = t_0;
} else if (A <= -2.1e-32) {
tmp = t_1;
} else if (A <= -1.52e-176) {
tmp = t_0;
} else if (A <= 9.8e-154) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 4000.0) {
tmp = t_0;
} else if (A <= 1.75e+73) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - B) / B)) / math.pi) t_1 = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) tmp = 0 if A <= -7.2e+104: tmp = t_1 elif A <= -1.1e+85: tmp = t_0 elif A <= -2.1e-32: tmp = t_1 elif A <= -1.52e-176: tmp = t_0 elif A <= 9.8e-154: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 4000.0: tmp = t_0 elif A <= 1.75e+73: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)) t_1 = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)) tmp = 0.0 if (A <= -7.2e+104) tmp = t_1; elseif (A <= -1.1e+85) tmp = t_0; elseif (A <= -2.1e-32) tmp = t_1; elseif (A <= -1.52e-176) tmp = t_0; elseif (A <= 9.8e-154) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 4000.0) tmp = t_0; elseif (A <= 1.75e+73) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - B) / B)) / pi); t_1 = 180.0 * (atan((0.5 * (B / A))) / pi); tmp = 0.0; if (A <= -7.2e+104) tmp = t_1; elseif (A <= -1.1e+85) tmp = t_0; elseif (A <= -2.1e-32) tmp = t_1; elseif (A <= -1.52e-176) tmp = t_0; elseif (A <= 9.8e-154) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 4000.0) tmp = t_0; elseif (A <= 1.75e+73) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -7.2e+104], t$95$1, If[LessEqual[A, -1.1e+85], t$95$0, If[LessEqual[A, -2.1e-32], t$95$1, If[LessEqual[A, -1.52e-176], t$95$0, If[LessEqual[A, 9.8e-154], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4000.0], t$95$0, If[LessEqual[A, 1.75e+73], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := 180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{if}\;A \leq -7.2 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1.1 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -2.1 \cdot 10^{-32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;A \leq -1.52 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 9.8 \cdot 10^{-154}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 1.75 \cdot 10^{+73}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -7.20000000000000001e104 or -1.1000000000000001e85 < A < -2.0999999999999999e-32Initial program 22.6%
associate-*l/22.6%
*-lft-identity22.6%
+-commutative22.6%
unpow222.6%
unpow222.6%
hypot-def46.8%
Simplified46.8%
Taylor expanded in A around -inf 72.3%
if -7.20000000000000001e104 < A < -1.1000000000000001e85 or -2.0999999999999999e-32 < A < -1.52000000000000001e-176 or 9.79999999999999993e-154 < A < 4e3Initial program 60.9%
associate-*l/60.9%
*-lft-identity60.9%
+-commutative60.9%
unpow260.9%
unpow260.9%
hypot-def85.3%
Simplified85.3%
Taylor expanded in A around 0 57.3%
unpow257.3%
unpow257.3%
hypot-def81.4%
Simplified81.4%
Taylor expanded in C around 0 69.7%
mul-1-neg69.7%
unsub-neg69.7%
Simplified69.7%
if -1.52000000000000001e-176 < A < 9.79999999999999993e-154Initial program 56.9%
associate-*l/56.9%
*-lft-identity56.9%
+-commutative56.9%
unpow256.9%
unpow256.9%
hypot-def88.2%
Simplified88.2%
Taylor expanded in B around -inf 56.4%
Taylor expanded in A around 0 54.7%
if 4e3 < A < 1.75000000000000001e73Initial program 29.2%
associate-*r/29.2%
unpow229.2%
Simplified29.2%
associate--l-29.2%
+-commutative29.2%
unpow229.2%
hypot-udef74.2%
flip--19.6%
frac-times18.3%
*-un-lft-identity18.3%
pow218.3%
Applied egg-rr18.3%
associate-+r+18.3%
Simplified18.3%
Taylor expanded in A around 0 59.9%
associate-*r/59.9%
mul-1-neg59.9%
+-commutative59.9%
unpow259.9%
unpow259.9%
hypot-def90.0%
Simplified90.0%
*-un-lft-identity90.0%
associate-/l*85.8%
Applied egg-rr85.8%
*-lft-identity85.8%
associate-/r/90.0%
Simplified90.0%
Taylor expanded in B around 0 68.1%
if 1.75000000000000001e73 < A Initial program 81.9%
associate-*r/81.9%
associate-*l/81.9%
associate-*l/81.9%
*-lft-identity81.9%
sub-neg81.9%
associate-+l-81.9%
sub-neg81.9%
remove-double-neg81.9%
+-commutative81.9%
unpow281.9%
unpow281.9%
hypot-def95.3%
Simplified95.3%
Taylor expanded in B around -inf 84.3%
neg-mul-184.3%
unsub-neg84.3%
Simplified84.3%
Taylor expanded in C around 0 82.9%
Final simplification69.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- C B) B)) PI)))
(t_1 (atan (* 0.5 (/ B A)))))
(if (<= A -4.7e+104)
(/ (* 180.0 t_1) PI)
(if (<= A -1.1e+85)
t_0
(if (<= A -7.5e-29)
(* 180.0 (/ t_1 PI))
(if (<= A -1.6e-176)
t_0
(if (<= A 1e-153)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 1350.0)
t_0
(if (<= A 3.1e+75)
(* (/ 180.0 PI) (atan (* -0.5 (/ B C))))
(* (/ 180.0 PI) (atan (/ (- B A) B))))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
double t_1 = atan((0.5 * (B / A)));
double tmp;
if (A <= -4.7e+104) {
tmp = (180.0 * t_1) / ((double) M_PI);
} else if (A <= -1.1e+85) {
tmp = t_0;
} else if (A <= -7.5e-29) {
tmp = 180.0 * (t_1 / ((double) M_PI));
} else if (A <= -1.6e-176) {
tmp = t_0;
} else if (A <= 1e-153) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 1350.0) {
tmp = t_0;
} else if (A <= 3.1e+75) {
tmp = (180.0 / ((double) M_PI)) * atan((-0.5 * (B / C)));
} else {
tmp = (180.0 / ((double) M_PI)) * atan(((B - A) / B));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
double t_1 = Math.atan((0.5 * (B / A)));
double tmp;
if (A <= -4.7e+104) {
tmp = (180.0 * t_1) / Math.PI;
} else if (A <= -1.1e+85) {
tmp = t_0;
} else if (A <= -7.5e-29) {
tmp = 180.0 * (t_1 / Math.PI);
} else if (A <= -1.6e-176) {
tmp = t_0;
} else if (A <= 1e-153) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 1350.0) {
tmp = t_0;
} else if (A <= 3.1e+75) {
tmp = (180.0 / Math.PI) * Math.atan((-0.5 * (B / C)));
} else {
tmp = (180.0 / Math.PI) * Math.atan(((B - A) / B));
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(((C - B) / B)) / math.pi) t_1 = math.atan((0.5 * (B / A))) tmp = 0 if A <= -4.7e+104: tmp = (180.0 * t_1) / math.pi elif A <= -1.1e+85: tmp = t_0 elif A <= -7.5e-29: tmp = 180.0 * (t_1 / math.pi) elif A <= -1.6e-176: tmp = t_0 elif A <= 1e-153: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 1350.0: tmp = t_0 elif A <= 3.1e+75: tmp = (180.0 / math.pi) * math.atan((-0.5 * (B / C))) else: tmp = (180.0 / math.pi) * math.atan(((B - A) / B)) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)) t_1 = atan(Float64(0.5 * Float64(B / A))) tmp = 0.0 if (A <= -4.7e+104) tmp = Float64(Float64(180.0 * t_1) / pi); elseif (A <= -1.1e+85) tmp = t_0; elseif (A <= -7.5e-29) tmp = Float64(180.0 * Float64(t_1 / pi)); elseif (A <= -1.6e-176) tmp = t_0; elseif (A <= 1e-153) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 1350.0) tmp = t_0; elseif (A <= 3.1e+75) tmp = Float64(Float64(180.0 / pi) * atan(Float64(-0.5 * Float64(B / C)))); else tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(B - A) / B))); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(((C - B) / B)) / pi); t_1 = atan((0.5 * (B / A))); tmp = 0.0; if (A <= -4.7e+104) tmp = (180.0 * t_1) / pi; elseif (A <= -1.1e+85) tmp = t_0; elseif (A <= -7.5e-29) tmp = 180.0 * (t_1 / pi); elseif (A <= -1.6e-176) tmp = t_0; elseif (A <= 1e-153) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 1350.0) tmp = t_0; elseif (A <= 3.1e+75) tmp = (180.0 / pi) * atan((-0.5 * (B / C))); else tmp = (180.0 / pi) * atan(((B - A) / B)); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[A, -4.7e+104], N[(N[(180.0 * t$95$1), $MachinePrecision] / Pi), $MachinePrecision], If[LessEqual[A, -1.1e+85], t$95$0, If[LessEqual[A, -7.5e-29], N[(180.0 * N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.6e-176], t$95$0, If[LessEqual[A, 1e-153], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 1350.0], t$95$0, If[LessEqual[A, 3.1e+75], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
t_1 := \tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)\\
\mathbf{if}\;A \leq -4.7 \cdot 10^{+104}:\\
\;\;\;\;\frac{180 \cdot t_1}{\pi}\\
\mathbf{elif}\;A \leq -1.1 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -7.5 \cdot 10^{-29}:\\
\;\;\;\;180 \cdot \frac{t_1}{\pi}\\
\mathbf{elif}\;A \leq -1.6 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 10^{-153}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 1350:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.1 \cdot 10^{+75}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{B - A}{B}\right)\\
\end{array}
\end{array}
if A < -4.70000000000000017e104Initial program 11.4%
associate-*r/11.4%
unpow211.4%
Simplified11.4%
associate--l-11.1%
+-commutative11.1%
unpow211.1%
hypot-udef24.7%
flip--10.0%
frac-times5.2%
*-un-lft-identity5.2%
pow25.2%
Applied egg-rr5.2%
associate-+r+4.0%
Simplified4.0%
Taylor expanded in A around -inf 78.7%
if -4.70000000000000017e104 < A < -1.1000000000000001e85 or -7.50000000000000006e-29 < A < -1.59999999999999992e-176 or 1.00000000000000004e-153 < A < 1350Initial program 60.9%
associate-*l/60.9%
*-lft-identity60.9%
+-commutative60.9%
unpow260.9%
unpow260.9%
hypot-def85.3%
Simplified85.3%
Taylor expanded in A around 0 57.3%
unpow257.3%
unpow257.3%
hypot-def81.4%
Simplified81.4%
Taylor expanded in C around 0 69.7%
mul-1-neg69.7%
unsub-neg69.7%
Simplified69.7%
if -1.1000000000000001e85 < A < -7.50000000000000006e-29Initial program 39.8%
associate-*l/39.8%
*-lft-identity39.8%
+-commutative39.8%
unpow239.8%
unpow239.8%
hypot-def50.6%
Simplified50.6%
Taylor expanded in A around -inf 62.7%
if -1.59999999999999992e-176 < A < 1.00000000000000004e-153Initial program 56.9%
associate-*l/56.9%
*-lft-identity56.9%
+-commutative56.9%
unpow256.9%
unpow256.9%
hypot-def88.2%
Simplified88.2%
Taylor expanded in B around -inf 56.4%
Taylor expanded in A around 0 54.7%
if 1350 < A < 3.1000000000000001e75Initial program 29.2%
associate-*r/29.2%
unpow229.2%
Simplified29.2%
associate--l-29.2%
+-commutative29.2%
unpow229.2%
hypot-udef74.2%
flip--19.6%
frac-times18.3%
*-un-lft-identity18.3%
pow218.3%
Applied egg-rr18.3%
associate-+r+18.3%
Simplified18.3%
Taylor expanded in A around 0 59.9%
associate-*r/59.9%
mul-1-neg59.9%
+-commutative59.9%
unpow259.9%
unpow259.9%
hypot-def90.0%
Simplified90.0%
*-un-lft-identity90.0%
associate-/l*85.8%
Applied egg-rr85.8%
*-lft-identity85.8%
associate-/r/90.0%
Simplified90.0%
Taylor expanded in B around 0 68.1%
if 3.1000000000000001e75 < A Initial program 81.9%
associate-*r/81.9%
associate-*l/81.9%
associate-*l/81.9%
*-lft-identity81.9%
sub-neg81.9%
associate-+l-81.9%
sub-neg81.9%
remove-double-neg81.9%
+-commutative81.9%
unpow281.9%
unpow281.9%
hypot-def95.3%
Simplified95.3%
Taylor expanded in B around -inf 84.3%
neg-mul-184.3%
unsub-neg84.3%
Simplified84.3%
Taylor expanded in C around 0 82.9%
Final simplification69.9%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (* -0.5 (/ B C))) PI))))
(if (<= B -1.9e-79)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -9.8e-169)
t_0
(if (<= B 1e-302)
(* 180.0 (/ (atan (/ C B)) PI))
(if (<= B 1.15e-187)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 2.1e-139)
(* 180.0 (/ (atan (/ (- A) B)) PI))
(if (<= B 2.05e-20) t_0 (* 180.0 (/ (atan -1.0) PI))))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
double tmp;
if (B <= -1.9e-79) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -9.8e-169) {
tmp = t_0;
} else if (B <= 1e-302) {
tmp = 180.0 * (atan((C / B)) / ((double) M_PI));
} else if (B <= 1.15e-187) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 2.1e-139) {
tmp = 180.0 * (atan((-A / B)) / ((double) M_PI));
} else if (B <= 2.05e-20) {
tmp = t_0;
} else {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
double tmp;
if (B <= -1.9e-79) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -9.8e-169) {
tmp = t_0;
} else if (B <= 1e-302) {
tmp = 180.0 * (Math.atan((C / B)) / Math.PI);
} else if (B <= 1.15e-187) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 2.1e-139) {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
} else if (B <= 2.05e-20) {
tmp = t_0;
} else {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) tmp = 0 if B <= -1.9e-79: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -9.8e-169: tmp = t_0 elif B <= 1e-302: tmp = 180.0 * (math.atan((C / B)) / math.pi) elif B <= 1.15e-187: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 2.1e-139: tmp = 180.0 * (math.atan((-A / B)) / math.pi) elif B <= 2.05e-20: tmp = t_0 else: tmp = 180.0 * (math.atan(-1.0) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)) tmp = 0.0 if (B <= -1.9e-79) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -9.8e-169) tmp = t_0; elseif (B <= 1e-302) tmp = Float64(180.0 * Float64(atan(Float64(C / B)) / pi)); elseif (B <= 1.15e-187) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 2.1e-139) tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); elseif (B <= 2.05e-20) tmp = t_0; else tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan((-0.5 * (B / C))) / pi); tmp = 0.0; if (B <= -1.9e-79) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -9.8e-169) tmp = t_0; elseif (B <= 1e-302) tmp = 180.0 * (atan((C / B)) / pi); elseif (B <= 1.15e-187) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 2.1e-139) tmp = 180.0 * (atan((-A / B)) / pi); elseif (B <= 2.05e-20) tmp = t_0; else tmp = 180.0 * (atan(-1.0) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := Block[{t$95$0 = N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.9e-79], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -9.8e-169], t$95$0, If[LessEqual[B, 1e-302], N[(180.0 * N[(N[ArcTan[N[(C / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.15e-187], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.1e-139], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 2.05e-20], 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(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{if}\;B \leq -1.9 \cdot 10^{-79}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -9.8 \cdot 10^{-169}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 10^{-302}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 1.15 \cdot 10^{-187}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-139}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 2.05 \cdot 10^{-20}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -1.9000000000000001e-79Initial program 54.7%
associate-*l/54.7%
*-lft-identity54.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-def78.3%
Simplified78.3%
Taylor expanded in B around -inf 51.7%
if -1.9000000000000001e-79 < B < -9.7999999999999999e-169 or 2.10000000000000008e-139 < B < 2.05e-20Initial program 47.0%
associate-*l/47.0%
*-lft-identity47.0%
+-commutative47.0%
unpow247.0%
unpow247.0%
hypot-def65.1%
Simplified65.1%
Taylor expanded in A around 0 29.3%
unpow229.3%
unpow229.3%
hypot-def40.8%
Simplified40.8%
Taylor expanded in C around inf 48.6%
if -9.7999999999999999e-169 < B < 9.9999999999999996e-303Initial program 59.7%
associate-*l/59.7%
*-lft-identity59.7%
+-commutative59.7%
unpow259.7%
unpow259.7%
hypot-def85.7%
Simplified85.7%
Taylor expanded in B around -inf 62.7%
Taylor expanded in C around inf 44.1%
if 9.9999999999999996e-303 < B < 1.14999999999999999e-187Initial program 40.5%
associate-*l/40.5%
*-lft-identity40.5%
+-commutative40.5%
unpow240.5%
unpow240.5%
hypot-def80.5%
Simplified80.5%
Taylor expanded in C around inf 44.2%
distribute-rgt1-in44.2%
metadata-eval44.2%
mul0-lft44.2%
metadata-eval44.2%
Simplified44.2%
if 1.14999999999999999e-187 < B < 2.10000000000000008e-139Initial program 90.0%
associate-*l/90.0%
*-lft-identity90.0%
+-commutative90.0%
unpow290.0%
unpow290.0%
hypot-def90.0%
Simplified90.0%
Taylor expanded in B around -inf 78.3%
Taylor expanded in A around inf 67.8%
associate-*r/67.8%
mul-1-neg67.8%
Simplified67.8%
if 2.05e-20 < B Initial program 54.7%
associate-*l/54.7%
*-lft-identity54.7%
+-commutative54.7%
unpow254.7%
unpow254.7%
hypot-def81.8%
Simplified81.8%
Taylor expanded in B around inf 66.1%
Final simplification54.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -1.35e-33)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -1.36e-176)
t_0
(if (<= A 3.2e-153)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 3800.0)
t_0
(if (<= A 7e+116)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (- A) B)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -1.35e-33) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -1.36e-176) {
tmp = t_0;
} else if (A <= 3.2e-153) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 3800.0) {
tmp = t_0;
} else if (A <= 7e+116) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((-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 tmp;
if (A <= -1.35e-33) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -1.36e-176) {
tmp = t_0;
} else if (A <= 3.2e-153) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 3800.0) {
tmp = t_0;
} else if (A <= 7e+116) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((-A / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -1.35e-33: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -1.36e-176: tmp = t_0 elif A <= 3.2e-153: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 3800.0: tmp = t_0 elif A <= 7e+116: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan((-A / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -1.35e-33) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -1.36e-176) tmp = t_0; elseif (A <= 3.2e-153) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 3800.0) tmp = t_0; elseif (A <= 7e+116) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(-A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -1.35e-33) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -1.36e-176) tmp = t_0; elseif (A <= 3.2e-153) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 3800.0) tmp = t_0; elseif (A <= 7e+116) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan((-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]}, If[LessEqual[A, -1.35e-33], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -1.36e-176], t$95$0, If[LessEqual[A, 3.2e-153], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3800.0], t$95$0, If[LessEqual[A, 7e+116], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -1.35 \cdot 10^{-33}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -1.36 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 3.2 \cdot 10^{-153}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 3800:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 7 \cdot 10^{+116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{-A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.35e-33Initial program 26.8%
associate-*l/26.8%
*-lft-identity26.8%
+-commutative26.8%
unpow226.8%
unpow226.8%
hypot-def50.9%
Simplified50.9%
Taylor expanded in A around -inf 66.0%
if -1.35e-33 < A < -1.36e-176 or 3.1999999999999999e-153 < A < 3800Initial program 60.6%
associate-*l/60.6%
*-lft-identity60.6%
+-commutative60.6%
unpow260.6%
unpow260.6%
hypot-def85.2%
Simplified85.2%
Taylor expanded in B around inf 46.9%
if -1.36e-176 < A < 3.1999999999999999e-153Initial program 56.9%
associate-*l/56.9%
*-lft-identity56.9%
+-commutative56.9%
unpow256.9%
unpow256.9%
hypot-def88.2%
Simplified88.2%
Taylor expanded in B around -inf 41.5%
if 3800 < A < 6.99999999999999993e116Initial program 40.0%
associate-*l/40.0%
*-lft-identity40.0%
+-commutative40.0%
unpow240.0%
unpow240.0%
hypot-def81.0%
Simplified81.0%
Taylor expanded in A around 0 22.5%
unpow222.5%
unpow222.5%
hypot-def64.1%
Simplified64.1%
Taylor expanded in C around inf 57.6%
if 6.99999999999999993e116 < A Initial program 87.2%
associate-*l/87.2%
*-lft-identity87.2%
+-commutative87.2%
unpow287.2%
unpow287.2%
hypot-def96.2%
Simplified96.2%
Taylor expanded in B around -inf 89.1%
Taylor expanded in A around inf 83.8%
associate-*r/83.8%
mul-1-neg83.8%
Simplified83.8%
Final simplification58.7%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan -1.0) PI))))
(if (<= A -1.12e-29)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A -2.3e-176)
t_0
(if (<= A 4.4e-153)
(* 180.0 (/ (atan 1.0) PI))
(if (<= A 450.0)
t_0
(if (<= A 7e+116)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan(-1.0) / ((double) M_PI));
double tmp;
if (A <= -1.12e-29) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= -2.3e-176) {
tmp = t_0;
} else if (A <= 4.4e-153) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (A <= 450.0) {
tmp = t_0;
} else if (A <= 7e+116) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double t_0 = 180.0 * (Math.atan(-1.0) / Math.PI);
double tmp;
if (A <= -1.12e-29) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= -2.3e-176) {
tmp = t_0;
} else if (A <= 4.4e-153) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (A <= 450.0) {
tmp = t_0;
} else if (A <= 7e+116) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): t_0 = 180.0 * (math.atan(-1.0) / math.pi) tmp = 0 if A <= -1.12e-29: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= -2.3e-176: tmp = t_0 elif A <= 4.4e-153: tmp = 180.0 * (math.atan(1.0) / math.pi) elif A <= 450.0: tmp = t_0 elif A <= 7e+116: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) t_0 = Float64(180.0 * Float64(atan(-1.0) / pi)) tmp = 0.0 if (A <= -1.12e-29) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= -2.3e-176) tmp = t_0; elseif (A <= 4.4e-153) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (A <= 450.0) tmp = t_0; elseif (A <= 7e+116) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) t_0 = 180.0 * (atan(-1.0) / pi); tmp = 0.0; if (A <= -1.12e-29) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= -2.3e-176) tmp = t_0; elseif (A <= 4.4e-153) tmp = 180.0 * (atan(1.0) / pi); elseif (A <= 450.0) tmp = t_0; elseif (A <= 7e+116) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / 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]}, If[LessEqual[A, -1.12e-29], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, -2.3e-176], t$95$0, If[LessEqual[A, 4.4e-153], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 450.0], t$95$0, If[LessEqual[A, 7e+116], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{if}\;A \leq -1.12 \cdot 10^{-29}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq -2.3 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 4.4 \cdot 10^{-153}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;A \leq 450:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 7 \cdot 10^{+116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -1.11999999999999995e-29Initial program 26.8%
associate-*l/26.8%
*-lft-identity26.8%
+-commutative26.8%
unpow226.8%
unpow226.8%
hypot-def50.9%
Simplified50.9%
Taylor expanded in A around -inf 66.0%
if -1.11999999999999995e-29 < A < -2.3000000000000001e-176 or 4.40000000000000001e-153 < A < 450Initial program 60.6%
associate-*l/60.6%
*-lft-identity60.6%
+-commutative60.6%
unpow260.6%
unpow260.6%
hypot-def85.2%
Simplified85.2%
Taylor expanded in B around inf 46.9%
if -2.3000000000000001e-176 < A < 4.40000000000000001e-153Initial program 56.9%
associate-*l/56.9%
*-lft-identity56.9%
+-commutative56.9%
unpow256.9%
unpow256.9%
hypot-def88.2%
Simplified88.2%
Taylor expanded in B around -inf 41.5%
if 450 < A < 6.99999999999999993e116Initial program 40.0%
associate-*l/40.0%
*-lft-identity40.0%
+-commutative40.0%
unpow240.0%
unpow240.0%
hypot-def81.0%
Simplified81.0%
Taylor expanded in A around 0 22.5%
unpow222.5%
unpow222.5%
hypot-def64.1%
Simplified64.1%
Taylor expanded in C around inf 57.6%
if 6.99999999999999993e116 < A Initial program 87.2%
associate-*l/87.2%
*-lft-identity87.2%
+-commutative87.2%
unpow287.2%
unpow287.2%
hypot-def96.2%
Simplified96.2%
Taylor expanded in A around inf 84.5%
*-commutative84.5%
Simplified84.5%
Final simplification58.9%
(FPCore (A B C)
:precision binary64
(if (<= A -4.3e-42)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 4e-130)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 2700.0)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 7e+116)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (* A -2.0) B)) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -4.3e-42) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 4e-130) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 2700.0) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 7e+116) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((A * -2.0) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -4.3e-42) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 4e-130) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 2700.0) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 7e+116) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((A * -2.0) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -4.3e-42: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 4e-130: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 2700.0: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 7e+116: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((A * -2.0) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -4.3e-42) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 4e-130) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 2700.0) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 7e+116) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(A * -2.0) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -4.3e-42) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 4e-130) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 2700.0) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 7e+116) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((A * -2.0) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -4.3e-42], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 4e-130], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2700.0], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 7e+116], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(A * -2.0), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4.3 \cdot 10^{-42}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 4 \cdot 10^{-130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 2700:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 7 \cdot 10^{+116}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{A \cdot -2}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -4.3000000000000001e-42Initial program 26.2%
associate-*l/26.3%
*-lft-identity26.3%
+-commutative26.3%
unpow226.3%
unpow226.3%
hypot-def51.7%
Simplified51.7%
Taylor expanded in A around -inf 63.8%
if -4.3000000000000001e-42 < A < 4.0000000000000003e-130Initial program 54.1%
associate-*l/54.1%
*-lft-identity54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-def85.8%
Simplified85.8%
Taylor expanded in B around -inf 50.6%
Taylor expanded in A around 0 49.5%
if 4.0000000000000003e-130 < A < 2700Initial program 81.3%
associate-*l/81.3%
*-lft-identity81.3%
+-commutative81.3%
unpow281.3%
unpow281.3%
hypot-def92.1%
Simplified92.1%
Taylor expanded in B around inf 54.4%
if 2700 < A < 6.99999999999999993e116Initial program 40.0%
associate-*l/40.0%
*-lft-identity40.0%
+-commutative40.0%
unpow240.0%
unpow240.0%
hypot-def81.0%
Simplified81.0%
Taylor expanded in A around 0 22.5%
unpow222.5%
unpow222.5%
hypot-def64.1%
Simplified64.1%
Taylor expanded in C around inf 57.6%
if 6.99999999999999993e116 < A Initial program 87.2%
associate-*l/87.2%
*-lft-identity87.2%
+-commutative87.2%
unpow287.2%
unpow287.2%
hypot-def96.2%
Simplified96.2%
Taylor expanded in A around inf 84.5%
*-commutative84.5%
Simplified84.5%
Final simplification61.3%
(FPCore (A B C)
:precision binary64
(if (<= A -6.8e-43)
(* 180.0 (/ (atan (* 0.5 (/ B A))) PI))
(if (<= A 3e-130)
(* 180.0 (/ (atan (/ (+ B C) B)) PI))
(if (<= A 3800.0)
(* 180.0 (/ (atan -1.0) PI))
(if (<= A 2.5e+72)
(* 180.0 (/ (atan (* -0.5 (/ B C))) PI))
(* 180.0 (/ (atan (/ (- B A) B)) PI)))))))
double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e-43) {
tmp = 180.0 * (atan((0.5 * (B / A))) / ((double) M_PI));
} else if (A <= 3e-130) {
tmp = 180.0 * (atan(((B + C) / B)) / ((double) M_PI));
} else if (A <= 3800.0) {
tmp = 180.0 * (atan(-1.0) / ((double) M_PI));
} else if (A <= 2.5e+72) {
tmp = 180.0 * (atan((-0.5 * (B / C))) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((B - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (A <= -6.8e-43) {
tmp = 180.0 * (Math.atan((0.5 * (B / A))) / Math.PI);
} else if (A <= 3e-130) {
tmp = 180.0 * (Math.atan(((B + C) / B)) / Math.PI);
} else if (A <= 3800.0) {
tmp = 180.0 * (Math.atan(-1.0) / Math.PI);
} else if (A <= 2.5e+72) {
tmp = 180.0 * (Math.atan((-0.5 * (B / C))) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((B - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if A <= -6.8e-43: tmp = 180.0 * (math.atan((0.5 * (B / A))) / math.pi) elif A <= 3e-130: tmp = 180.0 * (math.atan(((B + C) / B)) / math.pi) elif A <= 3800.0: tmp = 180.0 * (math.atan(-1.0) / math.pi) elif A <= 2.5e+72: tmp = 180.0 * (math.atan((-0.5 * (B / C))) / math.pi) else: tmp = 180.0 * (math.atan(((B - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (A <= -6.8e-43) tmp = Float64(180.0 * Float64(atan(Float64(0.5 * Float64(B / A))) / pi)); elseif (A <= 3e-130) tmp = Float64(180.0 * Float64(atan(Float64(Float64(B + C) / B)) / pi)); elseif (A <= 3800.0) tmp = Float64(180.0 * Float64(atan(-1.0) / pi)); elseif (A <= 2.5e+72) tmp = Float64(180.0 * Float64(atan(Float64(-0.5 * Float64(B / C))) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(B - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (A <= -6.8e-43) tmp = 180.0 * (atan((0.5 * (B / A))) / pi); elseif (A <= 3e-130) tmp = 180.0 * (atan(((B + C) / B)) / pi); elseif (A <= 3800.0) tmp = 180.0 * (atan(-1.0) / pi); elseif (A <= 2.5e+72) tmp = 180.0 * (atan((-0.5 * (B / C))) / pi); else tmp = 180.0 * (atan(((B - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[A, -6.8e-43], N[(180.0 * N[(N[ArcTan[N[(0.5 * N[(B / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3e-130], N[(180.0 * N[(N[ArcTan[N[(N[(B + C), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3800.0], N[(180.0 * N[(N[ArcTan[-1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.5e+72], N[(180.0 * N[(N[ArcTan[N[(-0.5 * N[(B / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(B - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;A \leq -6.8 \cdot 10^{-43}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(0.5 \cdot \frac{B}{A}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3 \cdot 10^{-130}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B + C}{B}\right)}{\pi}\\
\mathbf{elif}\;A \leq 3800:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\mathbf{elif}\;A \leq 2.5 \cdot 10^{+72}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(-0.5 \cdot \frac{B}{C}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{B - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if A < -6.8000000000000001e-43Initial program 26.2%
associate-*l/26.3%
*-lft-identity26.3%
+-commutative26.3%
unpow226.3%
unpow226.3%
hypot-def51.7%
Simplified51.7%
Taylor expanded in A around -inf 63.8%
if -6.8000000000000001e-43 < A < 2.99999999999999986e-130Initial program 54.1%
associate-*l/54.1%
*-lft-identity54.1%
+-commutative54.1%
unpow254.1%
unpow254.1%
hypot-def85.8%
Simplified85.8%
Taylor expanded in B around -inf 50.6%
Taylor expanded in A around 0 49.5%
if 2.99999999999999986e-130 < A < 3800Initial program 81.3%
associate-*l/81.3%
*-lft-identity81.3%
+-commutative81.3%
unpow281.3%
unpow281.3%
hypot-def92.1%
Simplified92.1%
Taylor expanded in B around inf 54.4%
if 3800 < A < 2.49999999999999996e72Initial program 29.2%
associate-*l/29.2%
*-lft-identity29.2%
+-commutative29.2%
unpow229.2%
unpow229.2%
hypot-def74.2%
Simplified74.2%
Taylor expanded in A around 0 23.8%
unpow223.8%
unpow223.8%
hypot-def68.8%
Simplified68.8%
Taylor expanded in C around inf 67.4%
if 2.49999999999999996e72 < A Initial program 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
unpow281.9%
hypot-def95.3%
Simplified95.3%
Taylor expanded in B around -inf 84.3%
Taylor expanded in C around 0 82.9%
Final simplification62.6%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ (- A) B)) PI))))
(if (<= B -4.8e-114)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B -1.6e-277)
t_0
(if (<= B 2.1e-184)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 3.4e+15) t_0 (* 180.0 (/ (atan -1.0) PI))))))))
double code(double A, double B, double C) {
double t_0 = 180.0 * (atan((-A / B)) / ((double) M_PI));
double tmp;
if (B <= -4.8e-114) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= -1.6e-277) {
tmp = t_0;
} else if (B <= 2.1e-184) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 3.4e+15) {
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((-A / B)) / Math.PI);
double tmp;
if (B <= -4.8e-114) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= -1.6e-277) {
tmp = t_0;
} else if (B <= 2.1e-184) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 3.4e+15) {
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((-A / B)) / math.pi) tmp = 0 if B <= -4.8e-114: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= -1.6e-277: tmp = t_0 elif B <= 2.1e-184: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 3.4e+15: 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(Float64(-A) / B)) / pi)) tmp = 0.0 if (B <= -4.8e-114) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= -1.6e-277) tmp = t_0; elseif (B <= 2.1e-184) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 3.4e+15) 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((-A / B)) / pi); tmp = 0.0; if (B <= -4.8e-114) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= -1.6e-277) tmp = t_0; elseif (B <= 2.1e-184) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 3.4e+15) 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[((-A) / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -4.8e-114], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.6e-277], t$95$0, If[LessEqual[B, 2.1e-184], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 3.4e+15], 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{-A}{B}\right)}{\pi}\\
\mathbf{if}\;B \leq -4.8 \cdot 10^{-114}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq -1.6 \cdot 10^{-277}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.1 \cdot 10^{-184}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 3.4 \cdot 10^{+15}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -4.8000000000000002e-114Initial program 52.7%
associate-*l/52.7%
*-lft-identity52.7%
+-commutative52.7%
unpow252.7%
unpow252.7%
hypot-def75.6%
Simplified75.6%
Taylor expanded in B around -inf 49.0%
if -4.8000000000000002e-114 < B < -1.5999999999999999e-277 or 2.0999999999999999e-184 < B < 3.4e15Initial program 60.4%
associate-*l/60.4%
*-lft-identity60.4%
+-commutative60.4%
unpow260.4%
unpow260.4%
hypot-def76.9%
Simplified76.9%
Taylor expanded in B around -inf 55.5%
Taylor expanded in A around inf 42.0%
associate-*r/42.0%
mul-1-neg42.0%
Simplified42.0%
if -1.5999999999999999e-277 < B < 2.0999999999999999e-184Initial program 43.5%
associate-*l/43.5%
*-lft-identity43.5%
+-commutative43.5%
unpow243.5%
unpow243.5%
hypot-def82.7%
Simplified82.7%
Taylor expanded in C around inf 43.2%
distribute-rgt1-in43.2%
metadata-eval43.2%
mul0-lft43.2%
metadata-eval43.2%
Simplified43.2%
if 3.4e15 < B Initial program 51.6%
associate-*l/51.6%
*-lft-identity51.6%
+-commutative51.6%
unpow251.6%
unpow251.6%
hypot-def81.7%
Simplified81.7%
Taylor expanded in B around inf 69.4%
Final simplification51.8%
(FPCore (A B C)
:precision binary64
(let* ((t_0 (* 180.0 (/ (atan (/ C B)) PI))))
(if (<= B -8.5e-189)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 1.5e-301)
t_0
(if (<= B 2.8e-196)
(* 180.0 (/ (atan (/ 0.0 B)) PI))
(if (<= B 4e-24) 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 <= -8.5e-189) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 1.5e-301) {
tmp = t_0;
} else if (B <= 2.8e-196) {
tmp = 180.0 * (atan((0.0 / B)) / ((double) M_PI));
} else if (B <= 4e-24) {
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 <= -8.5e-189) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 1.5e-301) {
tmp = t_0;
} else if (B <= 2.8e-196) {
tmp = 180.0 * (Math.atan((0.0 / B)) / Math.PI);
} else if (B <= 4e-24) {
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 <= -8.5e-189: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 1.5e-301: tmp = t_0 elif B <= 2.8e-196: tmp = 180.0 * (math.atan((0.0 / B)) / math.pi) elif B <= 4e-24: 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 <= -8.5e-189) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 1.5e-301) tmp = t_0; elseif (B <= 2.8e-196) tmp = Float64(180.0 * Float64(atan(Float64(0.0 / B)) / pi)); elseif (B <= 4e-24) 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 <= -8.5e-189) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 1.5e-301) tmp = t_0; elseif (B <= 2.8e-196) tmp = 180.0 * (atan((0.0 / B)) / pi); elseif (B <= 4e-24) 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, -8.5e-189], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 1.5e-301], t$95$0, If[LessEqual[B, 2.8e-196], N[(180.0 * N[(N[ArcTan[N[(0.0 / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4e-24], 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 -8.5 \cdot 10^{-189}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 1.5 \cdot 10^{-301}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 2.8 \cdot 10^{-196}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{0}{B}\right)}{\pi}\\
\mathbf{elif}\;B \leq 4 \cdot 10^{-24}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -8.50000000000000068e-189Initial program 50.0%
associate-*l/50.0%
*-lft-identity50.0%
+-commutative50.0%
unpow250.0%
unpow250.0%
hypot-def74.8%
Simplified74.8%
Taylor expanded in B around -inf 43.1%
if -8.50000000000000068e-189 < B < 1.5e-301 or 2.7999999999999998e-196 < B < 3.99999999999999969e-24Initial program 64.4%
associate-*l/64.4%
*-lft-identity64.4%
+-commutative64.4%
unpow264.4%
unpow264.4%
hypot-def81.4%
Simplified81.4%
Taylor expanded in B around -inf 60.3%
Taylor expanded in C around inf 40.8%
if 1.5e-301 < B < 2.7999999999999998e-196Initial program 38.2%
associate-*l/38.2%
*-lft-identity38.2%
+-commutative38.2%
unpow238.2%
unpow238.2%
hypot-def76.6%
Simplified76.6%
Taylor expanded in C around inf 42.7%
distribute-rgt1-in42.7%
metadata-eval42.7%
mul0-lft42.7%
metadata-eval42.7%
Simplified42.7%
if 3.99999999999999969e-24 < B Initial program 55.2%
associate-*l/55.2%
*-lft-identity55.2%
+-commutative55.2%
unpow255.2%
unpow255.2%
hypot-def81.3%
Simplified81.3%
Taylor expanded in B around inf 64.1%
Final simplification49.3%
(FPCore (A B C) :precision binary64 (if (<= B 2.52e-23) (* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI)) (* 180.0 (/ (atan (/ (- C B) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= 2.52e-23) {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan(((C - B) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= 2.52e-23) {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan(((C - B) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= 2.52e-23: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) else: tmp = 180.0 * (math.atan(((C - B) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= 2.52e-23) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(C - B) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= 2.52e-23) tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); else tmp = 180.0 * (atan(((C - B) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, 2.52e-23], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(C - B), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.52 \cdot 10^{-23}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{C - B}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < 2.51999999999999992e-23Initial program 53.6%
associate-*l/53.6%
*-lft-identity53.6%
+-commutative53.6%
unpow253.6%
unpow253.6%
hypot-def77.3%
Simplified77.3%
Taylor expanded in B around -inf 60.6%
if 2.51999999999999992e-23 < B Initial program 54.0%
associate-*l/54.0%
*-lft-identity54.0%
+-commutative54.0%
unpow254.0%
unpow254.0%
hypot-def80.8%
Simplified80.8%
Taylor expanded in A around 0 45.9%
unpow245.9%
unpow245.9%
hypot-def69.8%
Simplified69.8%
Taylor expanded in C around 0 68.4%
mul-1-neg68.4%
unsub-neg68.4%
Simplified68.4%
Final simplification63.0%
(FPCore (A B C) :precision binary64 (if (<= B -1e-264) (* 180.0 (/ (atan (/ (- (+ B C) A) B)) PI)) (* 180.0 (/ (atan (/ (- (- C B) A) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-264) {
tmp = 180.0 * (atan((((B + C) - A) / B)) / ((double) M_PI));
} else {
tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-264) {
tmp = 180.0 * (Math.atan((((B + C) - A) / B)) / Math.PI);
} else {
tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-264: tmp = 180.0 * (math.atan((((B + C) - A) / B)) / math.pi) else: tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-264) tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(B + C) - A) / B)) / pi)); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-264) tmp = 180.0 * (atan((((B + C) - A) / B)) / pi); else tmp = 180.0 * (atan((((C - B) - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-264], N[(180.0 * N[(N[ArcTan[N[(N[(N[(B + C), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-264}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(B + C\right) - A}{B}\right)}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1e-264Initial program 53.2%
associate-*l/53.2%
*-lft-identity53.2%
+-commutative53.2%
unpow253.2%
unpow253.2%
hypot-def77.3%
Simplified77.3%
Taylor expanded in B around -inf 66.8%
if -1e-264 < B Initial program 54.3%
associate-*l/54.3%
*-lft-identity54.3%
+-commutative54.3%
unpow254.3%
unpow254.3%
hypot-def79.3%
Simplified79.3%
Taylor expanded in B around inf 66.8%
neg-mul-166.8%
unsub-neg66.8%
Simplified66.8%
Final simplification66.8%
(FPCore (A B C) :precision binary64 (if (<= B -1e-264) (* (/ 180.0 PI) (atan (/ (+ C (- B A)) B))) (* 180.0 (/ (atan (/ (- (- C B) A) B)) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -1e-264) {
tmp = (180.0 / ((double) M_PI)) * atan(((C + (B - A)) / B));
} else {
tmp = 180.0 * (atan((((C - B) - A) / B)) / ((double) M_PI));
}
return tmp;
}
public static double code(double A, double B, double C) {
double tmp;
if (B <= -1e-264) {
tmp = (180.0 / Math.PI) * Math.atan(((C + (B - A)) / B));
} else {
tmp = 180.0 * (Math.atan((((C - B) - A) / B)) / Math.PI);
}
return tmp;
}
def code(A, B, C): tmp = 0 if B <= -1e-264: tmp = (180.0 / math.pi) * math.atan(((C + (B - A)) / B)) else: tmp = 180.0 * (math.atan((((C - B) - A) / B)) / math.pi) return tmp
function code(A, B, C) tmp = 0.0 if (B <= -1e-264) tmp = Float64(Float64(180.0 / pi) * atan(Float64(Float64(C + Float64(B - A)) / B))); else tmp = Float64(180.0 * Float64(atan(Float64(Float64(Float64(C - B) - A) / B)) / pi)); end return tmp end
function tmp_2 = code(A, B, C) tmp = 0.0; if (B <= -1e-264) tmp = (180.0 / pi) * atan(((C + (B - A)) / B)); else tmp = 180.0 * (atan((((C - B) - A) / B)) / pi); end tmp_2 = tmp; end
code[A_, B_, C_] := If[LessEqual[B, -1e-264], N[(N[(180.0 / Pi), $MachinePrecision] * N[ArcTan[N[(N[(C + N[(B - A), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(180.0 * N[(N[ArcTan[N[(N[(N[(C - B), $MachinePrecision] - A), $MachinePrecision] / B), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq -1 \cdot 10^{-264}:\\
\;\;\;\;\frac{180}{\pi} \cdot \tan^{-1} \left(\frac{C + \left(B - A\right)}{B}\right)\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} \left(\frac{\left(C - B\right) - A}{B}\right)}{\pi}\\
\end{array}
\end{array}
if B < -1e-264Initial program 53.2%
associate-*r/53.2%
associate-*l/53.2%
associate-*l/53.2%
*-lft-identity53.2%
sub-neg53.2%
associate-+l-53.1%
sub-neg53.1%
remove-double-neg53.1%
+-commutative53.1%
unpow253.1%
unpow253.1%
hypot-def74.4%
Simplified74.4%
Taylor expanded in B around -inf 66.8%
neg-mul-166.8%
unsub-neg66.8%
Simplified66.8%
if -1e-264 < B Initial program 54.3%
associate-*l/54.3%
*-lft-identity54.3%
+-commutative54.3%
unpow254.3%
unpow254.3%
hypot-def79.3%
Simplified79.3%
Taylor expanded in B around inf 66.8%
neg-mul-166.8%
unsub-neg66.8%
Simplified66.8%
Final simplification66.8%
(FPCore (A B C)
:precision binary64
(if (<= B -7.2e-133)
(* 180.0 (/ (atan 1.0) PI))
(if (<= B 4.8e-184)
(* 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 <= -7.2e-133) {
tmp = 180.0 * (atan(1.0) / ((double) M_PI));
} else if (B <= 4.8e-184) {
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 <= -7.2e-133) {
tmp = 180.0 * (Math.atan(1.0) / Math.PI);
} else if (B <= 4.8e-184) {
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 <= -7.2e-133: tmp = 180.0 * (math.atan(1.0) / math.pi) elif B <= 4.8e-184: 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 <= -7.2e-133) tmp = Float64(180.0 * Float64(atan(1.0) / pi)); elseif (B <= 4.8e-184) 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 <= -7.2e-133) tmp = 180.0 * (atan(1.0) / pi); elseif (B <= 4.8e-184) 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, -7.2e-133], N[(180.0 * N[(N[ArcTan[1.0], $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 4.8e-184], 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 -7.2 \cdot 10^{-133}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{elif}\;B \leq 4.8 \cdot 10^{-184}:\\
\;\;\;\;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 < -7.2000000000000008e-133Initial program 53.8%
associate-*l/53.8%
*-lft-identity53.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def75.1%
Simplified75.1%
Taylor expanded in B around -inf 46.7%
if -7.2000000000000008e-133 < B < 4.80000000000000049e-184Initial program 49.3%
associate-*l/49.3%
*-lft-identity49.3%
+-commutative49.3%
unpow249.3%
unpow249.3%
hypot-def83.9%
Simplified83.9%
Taylor expanded in C around inf 35.4%
distribute-rgt1-in35.4%
metadata-eval35.4%
mul0-lft35.4%
metadata-eval35.4%
Simplified35.4%
if 4.80000000000000049e-184 < B Initial program 56.1%
associate-*l/56.1%
*-lft-identity56.1%
+-commutative56.1%
unpow256.1%
unpow256.1%
hypot-def78.1%
Simplified78.1%
Taylor expanded in B around inf 51.7%
Final simplification46.3%
(FPCore (A B C) :precision binary64 (if (<= B -2.35e-306) (* 180.0 (/ (atan 1.0) PI)) (* 180.0 (/ (atan -1.0) PI))))
double code(double A, double B, double C) {
double tmp;
if (B <= -2.35e-306) {
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 <= -2.35e-306) {
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 <= -2.35e-306: 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 <= -2.35e-306) 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 <= -2.35e-306) 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, -2.35e-306], 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 -2.35 \cdot 10^{-306}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} 1}{\pi}\\
\mathbf{else}:\\
\;\;\;\;180 \cdot \frac{\tan^{-1} -1}{\pi}\\
\end{array}
\end{array}
if B < -2.3500000000000001e-306Initial program 54.3%
associate-*l/54.3%
*-lft-identity54.3%
+-commutative54.3%
unpow254.3%
unpow254.3%
hypot-def77.8%
Simplified77.8%
Taylor expanded in B around -inf 38.9%
if -2.3500000000000001e-306 < B Initial program 53.3%
associate-*l/53.3%
*-lft-identity53.3%
+-commutative53.3%
unpow253.3%
unpow253.3%
hypot-def78.9%
Simplified78.9%
Taylor expanded in B around inf 43.8%
Final simplification41.6%
(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 53.8%
associate-*l/53.8%
*-lft-identity53.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def78.4%
Simplified78.4%
Taylor expanded in B around inf 24.3%
Final simplification24.3%
herbie shell --seed 2023185
(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)))