python 2.5.2
ubuntu 8.04 LTS
(1) I find that python/gmpy is about 3 times slower than c++/gmp.
Is this the general experience, or am I doing something wrong?
(2) I am unable to understand the following error in conversion from float() to gmpy.mpf() or how to avoid it:
prints:
7.9900000000000 002131628207280 30055761337
2.6633333333333 334043876069093 43351920446
I am new to both linux and python and would appreciate any expert help.
zakad
ubuntu 8.04 LTS
(1) I find that python/gmpy is about 3 times slower than c++/gmp.
Is this the general experience, or am I doing something wrong?
(2) I am unable to understand the following error in conversion from float() to gmpy.mpf() or how to avoid it:
Code:
import gmpy gmpy.set_minprec(100) t= gmpy.mpf(7.99) print t print t/3
7.9900000000000 002131628207280 30055761337
2.6633333333333 334043876069093 43351920446
I am new to both linux and python and would appreciate any expert help.
zakad
Comment