On Mon, Feb 6, 2012 at 10:25 AM, Kapil Shukla <shukla.ka...@gmail.com>wrote:
> i tried writing a small code to calculate option price using the binomial > tree model. I compared my results with results of the same program in > excel. There seems to be a minor difference due to decimal precision as > excel is using 15 decimal precision and python (both 2.7 and 3.1) using 11. > (at least that's what shown on shell) > > can some one guide me whats the equivalent of using a double datatype on > python and i can't use long() in 3.1 any more. > > Please also suggest a free editor for python which can at least repeat > previous command with a key stroke > > regards > kapil > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > > Have you looked into the decimal module? (you need to import decimal) http://docs.python.org/library/decimal.html You can specify the amount of precision needed. Also, i would suggest using 3.2, if it's not too late in your project. As for editors, I hear VIM is good. I use Eclipse as an IDE personally. People seem to have some fairly definite ideas on what editor other people should use, bordering on religious fanaticism.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor