Grant Edwards <[EMAIL PROTECTED]> wrote: >In the C implementations, the algorithms will be done >implemented in single precision, so doing my Python prototyping >in as close to single precision as possible would be "a good >thing".
Something like numpy might give you reproducable IEEE 32-bit floating point arithmetic, but you may find it difficult to get that out of a IA-32 C compiler. IA-32 compilers either set the x87 FPU's precision to either 64-bits or 80-bits and only round results down to 32-bits when storing values in memory. If you can target CPUs that support SSE, then compiler can use SSE math to do most single precision operations in single precision, although the compiler may not set the required SSE flags for full IEEE complaince. In other words, since you're probably going to have to allow for some small differences in results anyways, it may not be worth the trouble of trying to get Python to use 32-bit floats. (You might also want to consider whether you want to using single precision in your C code to begin with, on IA-32 CPUs it seldom makes a difference in performance.) Ross Ridge -- l/ // Ross Ridge -- The Great HTMU [oo][oo] [EMAIL PROTECTED] -()-/()/ http://www.csclub.uwaterloo.ca/~rridge/ db // -- http://mail.python.org/mailman/listinfo/python-list