formal math ?

M

mehdi.rabah

Hi,

I have just discovered python and it seems so easy ans so powerful to
me that it remind me matlab or maple programming language (sorry free
software purists ears).

So I was wondering if there a sort of formal math library, that can do
a thing like:

lib.solve("x+1=0")
-> x=-1

I have checked numarray and I think it can not do this.

Thanks in advance,

Mehdi
 
R

Robert Kern

Hi,

I have just discovered python and it seems so easy ans so powerful to
me that it remind me matlab or maple programming language (sorry free
software purists ears).

So I was wondering if there a sort of formal math library, that can do
a thing like:

lib.solve("x+1=0")
-> x=-1

There are some old ones laying about in various states of usefulness.
Nothing really full-featured, though.

http://www.tildesoft.com/Pythonica.html
http://cens.ioc.ee/cgi-bin/viewcvs.cgi/python/ginac/

It's easier to integrate with a full-featured CAS than it is to write
one yourself.

http://home.arcor.de/mulk/projects/mascyma/index.xhtml.en
http://library.wolfram.com/infocenter/MathSource/585/
I have checked numarray and I think it can not do this.

No, it cannot.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
W

William Park

Hi,

I have just discovered python and it seems so easy ans so powerful to
me that it remind me matlab or maple programming language (sorry free
software purists ears).

So I was wondering if there a sort of formal math library, that can do
a thing like:

lib.solve("x+1=0")
-> x=-1

I have checked numarray and I think it can not do this.

Thanks in advance,

No, you need to type some more. :) You need to define function
def f(x):
return x + 1
and call root solver, either from a library or function imported from
module.

For simple cases, I use RPN calculator recently added to Bash shell,
like
rpn 'f(x)= 1 +' 0 1 secant =
rpn 'f(x)= 1 +' 'fd(x)= 1' 0 newton =

--
William Park <[email protected]>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
http://freshmeat.net/projects/bashdiff/
 
M

mehdi.rabah

Thanks you two.

I was just thinking if it was possible.

If I really want to do this, maybe the best way is to do an interface
to python of an open source project I have just discovered : maxima.

So long,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,315
Members
47,996
Latest member
LaurenFola

Latest Threads

Top