+static ex csgn_series(const ex & x, const relational & rel, int order)
+{
+ const ex x_pt = x.subs(rel);
+ if (x_pt.info(info_flags::numeric)) {
+ if (ex_to_numeric(x_pt).real().is_zero())
+ throw (std::domain_error("csgn_series(): on imaginary axis"));
+ epvector seq;
+ seq.push_back(expair(csgn(x_pt), _ex0()));
+ return pseries(rel,seq);
+ }
+ epvector seq;
+ seq.push_back(expair(csgn(x_pt), _ex0()));
+ return pseries(rel,seq);
+}
+