On 07/30/2013 08:51 PM, Gregory Warnes wrote:
> How about enclosing the bit-for-bit tests in 
> #ifdef IEEE754_Compliant
> ...
> #endif

Merely knowing that a platform conforms to IEEE 754 is not sufficient to
guarantee bit-for-bit compatibility. The order of operations also
matters, and compliers can, and do, re-arrange, eliminate, and combine
operations as an optimization. Even if the rounding rules are the same,
the cost of various operations or the primitive operations that are
available are not the same between platforms, so the optimizations also
differ, and also depend on compiler version and build environment.

Search http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html for
"float" for some idea of the myriad complier options which influence this.

Getting bit-for-bit IEEE 754 behavior on some platforms comes at the
expense of both speed and precision. For example, on the x87, the FPU
registers are 80 bits, and all register instructions operate on the full
80 bits, while IEEE 754 defines no such format (64 bits being the
closest). To avoid this requires -ffloat-store, which forces all
variables to be stored in RAM, which is a significant performance hit
for most programs and makes rounding error worse. I can't see this as
being good for gnuradio in any way.

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to