Sure, if realonly worked perfectly, your program would work correctly
for cubic arguments to signum functions. Thinking that realonly is
perfect is a reasonable assumption (how hard can that be?)---the user
documentation hedges:
When `realonly' is `true', `algsys' returns only those solutions which
are free of `%i'.
That is 100% true (I think) and 100% misleading. Reading that for the
first time (or second or third...), I'd assume that realonly would
expunge all nonreal solutions. But it doesn't.
Maxima programming is more interesting than pure numerical
programming; I regularly learn new things and rely on help and advice
from this list. And I've been doing this for awhile.
Barton