2012/9/11 Sisyphus <[email protected]>

> the output I get is:
>
> 1..1
> #     a = [ 0  1  2  2  4  5  5  6  8  9 10 ]
> #     b = [ 0  1  2  2  4  4  5  6  8  8  9 ]
> # a - b = [ 0  0  0  0  0  1  0  0  0  1  1 ]
> not ok 1 - lists are equal
>
> Is there a way to get the same output with the 64-bit mingw compiler ?
>

I feel compelled to say that if you are subtracting floats to check for
equality, you should be smacked in the face. This float-store kind of thing
can be different per compiler version, OS, and heck, even CPU if they
introduce some kind of low-level float optimization somewhere. You should
not be relying on float equality and the way a CPU actually uses its 80-bit
registers or not.

But .... if you know what you're doing, don't mind me :)

Ruben



> (I admit, this is a different question to the one that I originally asked.)
>
> With my 64-bit compilers, I've (now) tried different optimisations with
> both -fno-float-store and -ffloat-store, but I always seem to get output
> of:
>
> 1..1
> #     a = [ 0  1  2  2  4  5  5  6  8  9 10 ]
> #     b = [ 0  1  2  2  4  5  5  6  8  9 10 ]
> # a - b = [ 0  0  0  0  0  0  0  0  0  0  0 ]
> ok 1 - lists are equal
>
> >> And a second question:
> >> Is -fno-float-store a valid option ?
> > Yes, it is.
>
> Ok - thanks.
>
> > It is a valid option and documented by gcc's documentation.  See for
> > more details either invoke.texi or 'gcc info'.
>
> How does one invoke either of these in mingw ? (Or msys.)
>
> For reference, the documentation that I looked at was
>
> http://gcc.gnu.org/onlinedocs/gcc-3.4.4/gcc/Option-Summary.html#Option-Summary
>
> http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/Option-Summary.html#Option-Summary
>
> http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Option-Summary.html#Option-Summary
>
> Thanks Kai.
> I appreciate that you take the time to answer my dumb questions.
>
> Cheers,
> Rob
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to