On Fri, Jan 08, 2010 at 09:10:45PM +0100, Dieter Kaiser wrote:
> > Sure. Then why
> >
> > plot3d(sqrt(realpart(subst(k0=%i,Ree)^2+imagpart(k0=%
> > i,Ree)^2),...)
> >
> > still works (see the example I sent in my first mail)?
>
> I had a look at the problem.
Thank you, Dieter!
> (%i5) rectform(test)$
> Evaluation took 0.1360 seconds (0.2420 elapsed) using 302.578 KB.
>
> (%i6) abs(test)$
> Evaluation took 0.3120 seconds (0.4120 elapsed) using 2.536 MB.
>
> Then I have measured the time to get the plots. Surprisingly, the plot
> with the absolute value now is much faster:
This is probably because the expression returned by the modified abs
is shorter (better simplified) than just a simple sqrt(re^2+im^2).
> (%i7) plot3d(sqrt(realpart(test)^2
> +imagpart(test)^2),[ky,-3,3],[kz,-3,3]);
> Evaluation took 119.8990 seconds (122.6900 elapsed) using 3259.698 MB.
> (%o7) false
>
> (%i8) plot3d(abs(test),[ky,-3,3],[kz,-3,3]);
> Evaluation took 54.8320 seconds (56.3300 elapsed) using 628.454 MB.
> (%o8) false
>
> I have tried the testsuite with the modified function absarg and I have
> got no problems. I will do some further tests.
Thank you once more! BTW, that my code is not copyrighted in any way,
so if you would like to add it or any part of it to the testsuite I am
fine with that ;-)
--
Stanislav