I took a look through some of the source code you linked, and the type cast seems to be applied in particular when there's a subtraction that's obviously close to zero. I don't have enough C++ experience to know how the compilers are expected to behave on such things (even more so older versions), but I walked through a bunch of the arithmetic and there's a lot of adding and subtracting things that should either add up to zero or add up neatly to just one of the terms that was in a previous step, so I'm actually a little surprised that there aren't more oddball things in there (or at least a note about setting a compiler directive not to simplify) to keep the epsilons from getting optimized away.
There are enough things that just cancel away in odd ways that I was partly looking to verify you hadn't made any typos!
EDIT: in your first link it actually points out that the Intel C++ compiler does allow associativity transformations by default, so it may be a bit of legacy code to prevent that.
In reply to Re^6: [OT] C++ mystery.
by bitingduck
in thread [OT] C++ mystery.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |