[Tutor] decimal precision in python

Kapil Shukla shukla.kapil at gmail.com
Mon Feb 6 16:25:53 CET 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120206/fdcb8a4d/attachment.html>


More information about the Tutor mailing list