Depending on the syntactic presence of %i to indicate that a solution is
non-real is unreliable.
One way to check is to see if the imagpart is zero:
sols: solve(8*x^3-6*x-1,x)$
subset(setify(sols),lambda([q],is(equal(imagpart(rhs(q)),0)))
Of course, there are also expressions which are syntactically %i-free which
are complex, e.g. sqrt(-x^2-1).
-s
On Wed, Apr 11, 2012 at 14:13, Holger Schulz <qdl at gmx.net> wrote:
> I often have to compute zeros of functions. I use solve() for that. Often
> I need real solutions only. How can I suppress the solutions with %i?
>
> Thanks.
>
> hs
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>