Re: mathmatical expressions evaluation

2004-12-23 Thread Tonino
yes - this is what I have been doing - created a set of functions to handle the formula and they all calculate a section of the formula. Thanks for all the help ;) Tonino -- http://mail.python.org/mailman/listinfo/python-list

Re: mathmatical expressions evaluation

2004-12-23 Thread Kent Johnson
Tonino wrote: thanks all for the info - and yes - speed is not really an issue and no - it is not an implementation of a complete financial system - but rather a small subset of a investment portfolio management system developed by "another company" ... What I am trying to achieve is to parse a for

Re: mathmatical expressions evaluation

2004-12-22 Thread Tonino
thanks all for the info - and yes - speed is not really an issue and no - it is not an implementation of a complete financial system - but rather a small subset of a investment portfolio management system developed by "another company" ... What I am trying to achieve is to parse a formula(s) and g

Re: mathmatical expressions evaluation

2004-12-22 Thread beliavsky
Paul McGuire wrote: >And I wouldn't necessarily agree with beliavsky's assertion that numarray >arrays are needed to represent payment dates and amounts, unless you were >going to implement a major banking financial system in Python. Maybe arrays are not "needed", but especially for vectors of flo

Re: mathmatical expressions evaluation

2004-12-22 Thread John Machin
Paul McGuire wrote: > Here's > a simple loan amortization schedule generator: > > def amortizationSchedule( principal, term, rate ): > pmt = ( principal * rate * ( 1 + rate)**term ) / (( 1 + rate)**term - 1) Simpliciter: pmt = principal * rate / (1 - (1 + rate)**(-term)) > pmt = round(pm

Re: mathmatical expressions evaluation

2004-12-22 Thread Paul McGuire
"Tonino" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a task of evaluating a complex series (sorta) of mathematical > expressions and getting an answer ... > > I have looked at the numarray (not really suited??) and pythonica (too > simple??) and even tried using eva

Re: mathmatical expressions evaluation

2004-12-22 Thread aaronwmail-usenet
> have a task of evaluating a complex series (sorta) of mathematical > expressions and getting an answer ... If we assume that you are looking for functionality and speed is secondary, please have a look at the technique in http://cvs.sourceforge.net/viewcvs.py/xsdb/xsdbXML/xsdbXMLpy/functions.p

Re: mathmatical expressions evaluation

2004-12-22 Thread beliavsky
There is QuantLib at http://quantlib.org/ . The site says "QuantLib is written in C++ with a clean object model, and is then exported to different languages such as Python, Ruby, and Scheme." I have not tried it -- if it is easily usable from Python please write back to c.l.p. There is a Python Fi

mathmatical expressions evaluation

2004-12-22 Thread Tonino
Hi, I have a task of evaluating a complex series (sorta) of mathematical expressions and getting an answer ... I have looked at the numarray (not really suited??) and pythonica (too simple??) and even tried using eval() ... but wondered if there were other packages/modules that would enable me to