[Python-3000] Extension: mpf for GNU MP floating point (original) (raw)

Rob Crowther weilawei at gmail.com
Fri Sep 28 18:32:52 CEST 2007


-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Another day, another update. Latest code: http://umass.glexia.net/mpf.tar.bz2

There's been a couple minor changes externally:

a) MPF() now takes a float or integer argument because mpf_set_str is just wacky and I haven't gotten it working properly yet. This does somewhat limit the values you can pass to it, but strings will be added back later on. At that point, you'll have a choice of initializing it with a tuple (base, sign, whole, decimal), a string, a float, or an integer.

b) As a side effect of this, roundtripping doesn't work. Not that it ever worked. But it's a bit further away right now.

Externally, the MPF_get function was rewritten from scratch (for the fourth time). MPF_init was changed to use mpf_set_d instead of mpf_set_str because... well, mpf_set_str is too wacky and unpredictable at the moment. I'm sorting that out as we speak.

If you really want to see lots of internal information, use the build_debug.sh script instead of setup.py. (Note that the directories already need to be in place to compile this way.)

There's a test program which you can compile with the command:

gcc -o test test.c -lgmp

It's my scratchpad for working out new ideas before integrating them into the extension. Currently, it contains a barebones version of MPF_get and a slew of test cases, soon to be ported to Python. YES, there WILL be a test suite.

Question -- Does anyone know of a decent place to host this project? I'm really lazy about updating project sites, so I'd like something simple offering storage space and a bug tracker. I don't need SVN. I use git on my development box, so that would be a bonus if someone knew of free project hosting with git.

Rob -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG/Sy0qR5p8HaX4oURAhznAJ9a8N6mgCHXcGph09KhjXu/kYPnFgCeOKLH ngznr86SynMbF0wQep3GDB0= =6Pun -----END PGP SIGNATURE-----



More information about the Python-3000 mailing list