[Maxima] realpart strangeness, was: besselarray bug, was: Bessel plotting problem
robert.dodier at gmail.com
Wed Jun 11 23:21:55 CDT 2008
On 6/10/08, Richard Hennessy <rvh2007 at comcast.net> wrote:
> I downloaded the new bessel.lisp and still get an error.
> (%i75) draw2d(parametric(realpart(bessel_j(1/6,-(sqrt(1)*t^3)/3)*sqrt(t)), imagpart(bessel_j(1/6,-(sqrt(1)*t)/3)*sqrt(t)), t, -3, 3))$
> Maxima encountered a Lisp error:
> Error in > [or a callee]: ((MTIMES SIMP) 0.32163376045133785
> ((MPLUS SIMP) 0.22273258887231484
> ((MTIMES SIMP) 0.12859472014273318 $%I))) is not of type (OR
OK -- there are 2 errors here.
The less serious is that draw2d doesn't handle non-float values gracefully.
The more serious is that realpart (and imagpart) assumes that any
function it doesn;t recognize (which includes Bessel functions) is
purely real. Yikes. Should return a noun expression in that case.
This bug was reported before:
I'm pretty sure there are other bugs in the basic functions for complex
variables, realpart, imagpart, conjugate, carg, and cabs, maybe others.
I hope someone can take the time to review those functions & resolve
any existing or new bug reports.
As a work-around, try writing 'realpart(...), 'imagpart(...) in the expressions
to be plotted, and try plot2d instead of draw2d.
More information about the Maxima