Nicolas Neuss | 1 Oct 2003 12:07
Picon

Re: Re: rebuild the installed image: how to?

Richard Fateman <fateman <at> cs.berkeley.edu> writes:

> Depending on how much polynomial manipulation you
> need, you may find other simpler things to do, perhaps
> taking a few pages of lisp. For example, you probably
> don't need to worry about GCD computations, or polynomials
> of high degree.  Representing polynomials in n variables
> as n-dimensional arrays may be entirely adequate, especially
> since the polynomial stuff would be done (I imagine) only
> in setting up the problem, not in the iterations.
> RJF

What I would need most is multiprecision floating point numbers.  Do you
know a separate package for this?  (I know CLISP has this, but CLISP does
not do native code compilation and is therefore not suited for hardcore
numerics.  And I need it sometimes also out of the initialization phase,
e.g. for postprocessing.  Imagine wanting to evaluate a finite element
function on some arbitrary point in the domain).

In the (very?) far future, I could imagine benefits for using other parts
of Maxima as well.  Especially, I'm thinking of extending the Maxima
language to handle also partial differential equations (e.g. enter
coefficient functions in a mathematical form, call solve, plot the
solution).

Nicolas.
Raymond Toy | 1 Oct 2003 14:21
Picon
Picon

Re: Re: rebuild the installed image: how to?

>>>>> "Nicolas" == Nicolas Neuss <Nicolas.Neuss <at> iwr.uni-heidelberg.de> writes:

    Nicolas> What I would need most is multiprecision floating point numbers.  Do you
    Nicolas> know a separate package for this?  (I know CLISP has this, but CLISP does
    Nicolas> not do native code compilation and is therefore not suited for hardcore
    Nicolas> numerics.  And I need it sometimes also out of the initialization phase,

If you need fairly large multiprecision floating point numbers, I
think Clisp is good since it has the fastest bignum arithmetic I know
of.  But, yes, you are also doing intensive HW floating-point, then
Clisp isn't so good.

Ray
Jaime E. Villate | 1 Oct 2003 15:23
Picon

Re: Strange plot2d behaviour

On Tue, Sep 30, 2003 at 07:35:57PM +0200, Janos Blazi wrote:
> 
> When I give the command
> plot2d([f(x),g(x)],[x,-2,2]);
> (where f and g are well defined functions) then the plot is draw nicely, 
> just as I want it. But when I go back to my original command and change it 
> to
> plot2d([f(x),g(x)],[x,-0.5,1]);
> it does not work at all (and in fact it seems that Maxima does not work any 
> more).

It is always better to include a domain for y, to avoid running into
points where the function blows up.

Jaime
Jaime E. Villate | 1 Oct 2003 15:45
Picon

Rediscovering Schelter's direction field script

Hi,
after talking to James Amundson in Metz, I came to the conclusion that
I'd have to write my own direction-field-plot function.  As I was
working on it, I accidentally ran into a beautiful tcl script (plotdf)
which comes included with Openmath's omplotdata

If you haven't seen it, put the following somewhere where Maxima can
find it (i.e. ~/.maxima/plotdf.lisp)

(defun $plotdf()
(show-open-plot (with-output-to-string (st ) (format st "~%{plotdf}~%} ~%"))))

then do a load("plotdf") and lunch it with plotdf()
You can click on a point to trace an integral curve and change the
direction field, and the options, in the config menu.

I'm now improving $plotdf() to accept different equations and options,
but if any experienced Maxima-Lisp programmer wants to jump in, that
would save me a lot of time :-)

It would be nice that some function was added to src/plot.lisp to let
users access that functionality in an easy way.

Cheers,
Jaime
Jaime E. Villate | 1 Oct 2003 15:51
Picon

asin and acos wrong

Hi,
I've just submitted a bug report, but I'd also like to mention it in
this list. asin is giving wrong results (Maxima 5.9.0 from Debian's
package 5.9.0-11)

(C5) asin(0.5);

(D5) 0.5
(C6) asin(0.99);

(D6) 0.99
(C7) asin(1);

(D7) %PI/2

The plot of the function shows a really weird function:

(C8) plot2d(asin(x), [x,-4,4])$

And the same goes for acos

Regards,
Jaime
Raymond Toy | 1 Oct 2003 15:57
Picon
Picon

Re: Strange plot2d behaviour

>>>>> "Jaime" == Jaime E Villate <villate <at> gnu.org> writes:

    Jaime> On Tue, Sep 30, 2003 at 07:35:57PM +0200, Janos Blazi wrote:
    >> 
    >> When I give the command
    >> plot2d([f(x),g(x)],[x,-2,2]);
    >> (where f and g are well defined functions) then the plot is draw nicely, 
    >> just as I want it. But when I go back to my original command and change it 
    >> to
    >> plot2d([f(x),g(x)],[x,-0.5,1]);
    >> it does not work at all (and in fact it seems that Maxima does not work any 
    >> more).

    Jaime> It is always better to include a domain for y, to avoid running into
    Jaime> points where the function blows up.

Specifying a domain for y only limits what the plot shows.  The x axis
is still sampled around the singularity.  The plots, however, probably
look better if you do this.

Ray
Raymond Toy | 1 Oct 2003 16:22
Picon
Picon

Re: asin and acos wrong

>>>>> "Jaime" == Jaime E Villate <villate <at> gnu.org> writes:

    Jaime> Hi,
    Jaime> I've just submitted a bug report, but I'd also like to mention it in
    Jaime> this list. asin is giving wrong results (Maxima 5.9.0 from Debian's
    Jaime> package 5.9.0-11)

    Jaime> (C5) asin(0.5);

    Jaime> (D5) 0.5
    Jaime> (C6) asin(0.99);

    Jaime> (D6) 0.99

This doesn't happen for me, with the current CVS head code, on cmucl.

    Jaime> (C7) asin(1);

    Jaime> (D7) %PI/2

    Jaime> The plot of the function shows a really weird function:

    Jaime> (C8) plot2d(asin(x), [x,-4,4])$

This is a bit of a problem since asin(x) is complex for |x| > 1.  And
cmucl crashes in this case.  Ick.

Ray
Richard Fateman | 1 Oct 2003 17:27
Picon
Favicon

fast floats for Nicolas Neuss

The bignumber package in maxima is in one file (float.lisp) probably.
It is not especially fast because it attempts to do rounding
correctly to the last bit as prescribed by the IEEE floating point
rules.  If you can manage with simpler rules, the code will probably
be twice as fast.  (A change to fptrunc will do this). 

If you want fast VERY BIG bigfloats, then a linkage to GMP or perhaps
ARPREC should be considered.  This is what I have done from
Allegro common lisp, and I assume that CMUCL has similar foreign
function capabilities, if not identical declaration syntax.

If you want double-double precision  (2Xdouble), or
4Xdouble then there are
routines available for this that are quite fast.  David Bailey
has pointers to these at
http://crd.lbl.gov/~dhbailey/mpdist/

Regarding PDEs -- there is (was?) a package called
PDEase sold with commercial Macsyma. The documentation
might be of help, even if the code is unavailable.  On the
other hand, I don't solve PDEs for a living and can't
evaluate the design myself.  I suspect it is OK for
teaching.   It also may not have much to do with
symbolic computation.

Best of luck

RJF

Nicolas Neuss wrote:
(Continue reading)

Jaime E. Villate | 1 Oct 2003 18:18
Picon

Re: Strange plot2d behaviour

On Wed, Oct 01, 2003 at 02:23:21PM +0100, Jaime E. Villate wrote:
> It is always better to include a domain for y, to avoid running into
> points where the function blows up.

And on Wed, 01 Oct 2003 09:57:08 -0400, Raymond Toy replied:

> Specifying a domain for y only limits what the plot shows.  The x axis
> is still sampled around the singularity.  The plots, however, probably
> look better if you do this.

That's not what happens in the Maxima version that I use (5.9.0 with
GCL, under Debian GNU/Linux):

(C1) plot2d(1/x, [x, -2, 2], [y, -10, 10])$
(C2) plot2d(1/x, [x, -2, 2])$

C1 gives the plot quickly. C2 gets Maxima stuck until I reset it.

Jaime
Raymond Toy | 1 Oct 2003 18:47
Picon
Picon

Re: Strange plot2d behaviour

>>>>> "Jaime" == Jaime E Villate <villate <at> gnu.org> writes:

    Jaime> On Wed, Oct 01, 2003 at 02:23:21PM +0100, Jaime E. Villate wrote:
    >> It is always better to include a domain for y, to avoid running into
    >> points where the function blows up.

    Jaime> And on Wed, 01 Oct 2003 09:57:08 -0400, Raymond Toy replied:

    >> Specifying a domain for y only limits what the plot shows.  The x axis
    >> is still sampled around the singularity.  The plots, however, probably
    >> look better if you do this.

    Jaime> That's not what happens in the Maxima version that I use (5.9.0 with
    Jaime> GCL, under Debian GNU/Linux):

    Jaime> (C1) plot2d(1/x, [x, -2, 2], [y, -10, 10])$
    Jaime> (C2) plot2d(1/x, [x, -2, 2])$

    Jaime> C1 gives the plot quickly. C2 gets Maxima stuck until I reset it.

Oh, I forgot.  5.9.0 has a different plotting algorithm than what's
currently in CVS.  The y limits don't influence the sampling as much
any more, but plotting should be better too, as some of the old bug
reports show.

Ray

Gmane