jblazi | 7 Aug 2002 14:26
Picon
Picon

Newbie questions

I am trying to find out whether I can use Maxima for teaching. So I installed 
Maxima (and GCL, by the way).

I have written a lisp function $f in a file that is called "mytest.lisp" and 
is in the current directory. It is extremely simple:

(defun $f (x) (* x x))

Can I load this function into maxima and call it? It should return (when 
called from Maxima):

(1) 4 when called like (f 2)
(2) 3+2sqrt(2) when called like (f (+ 1 (sqrt 2)))
(3) a^2+2a+1 when called like (f (+ a 1))

(In the third case, maybe some other function like expand in Maple could be 
nexessary, but this would be o.k. What I mean is, my function should be able 
to handle whatever unput is sensible in Maxima.)

TIA,

Janos Blazi
Richard Fateman | 7 Aug 2002 16:36
Picon
Favicon

Re: Newbie questions


jblazi wrote:
> 
> I am trying to find out whether I can use Maxima for teaching. So I installed
> Maxima (and GCL, by the way).
> 
> I have written a lisp function $f in a file that is called "mytest.lisp" and
> is in the current directory. It is extremely simple:
> 
> (defun $f (x) (* x x))
> 
> Can I load this function into maxima and call it? 

It must be in the same package as maxima, so you need an in-package
line in the file.

It should return (when
> called from Maxima):
> 
> (1) 4 when called like (f 2)

From a command line it would be called by  f(2);

> (2) 3+2sqrt(2) when called like (f (+ 1 (sqrt 2)))

No, you are call the LISP + function, not the maxima "simplify"
function.
The LIsp  function only knows about the usual numeric lisp data.

To do that you could do, for example  (defun $f(x)(simplifya (list
(Continue reading)

Camm Maguire | 7 Aug 2002 23:30

5.6.1

Greetings!  I just saw the 5.6.1 tarball on the website.  

1) Are there bug fixes therein relative to 5.6?
2) Is this considered the latest "stable" release?

Take care,

--

-- 
Camm Maguire			     			camm <at> enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah
James Amundson | 7 Aug 2002 23:51
Favicon

Re: 5.6.1

On Wed, 2002-08-07 at 16:30, Camm Maguire wrote:
> Greetings!  I just saw the 5.6.1 tarball on the website.  
> 
> 1) Are there bug fixes therein relative to 5.6?

There is one bug fix for a server problem with xmaxima. Here are the
contents of the file "NEWS" from 5.6.1:
------------------------------------------
This is the last version of Maxima as it was maintained by William
Schelter.  New versions will use a more modern build system and be
actively maintained by volunteers - this version is unsupported.  

This release is the same as the 5.6 release by Dr. Schelter except for
this  file and an updated version of xmaxima which avoids a serious bug.

The Maxima Team.
------------------------------------------
> 2) Is this considered the latest "stable" release?

Yes.

--Jim
jblazi | 8 Aug 2002 00:19
Picon
Picon

Re: Newbie questions

> Are you trying to teach math or Lisp?  If the latter, I'd use just gcl
> (or clisp or cmucl since they're closer to ANSI CL).  If the former
> it's quite a bit harder to do it in Lisp, and I'd just use maxima
> abilities to define my own functions.

It is math. But I am not going to use Maxima as a calculator,  but as a 
programming environment where you can perform symbolical calculations.
Maple and its programming language woudl be very good for this but most 
unfortunately we cannot afford to buy a site license and Maxima would be 
free... (I have not tried MuPad, which would be free to some extent as well.)

That is, we would like to write programs, load them and make the functions we 
have written, like det and crossprod available from within Maxima.  Using 
builtin Maxima functions are not intended, this is not what I am after.

J.B.

Gmane