On 26 November 2010 19:14, Dmitry Olshansky <[email protected]> wrote: > On 26.11.2010 20:37, Don Clugston wrote: >> >> Excellent! I predict this fails on AMD. (This test is a single >> instruction). > > And the answer is ... yes, it fails :-)
Awesome!!! In terms of Phobos, that's all we need to know -- the failure is not our fault, so I should just relax the tolerance on the test. I'm extremely pleased about this result. "The unit testing in the D standard library uncovered an CPU issue" is a pretty good story. The test exists because I was trying to improve the code coverage of the math library to >95% -- and I was only doing that because DMD has built-in code coverage. The bug also wouldn't have been uncovered unless D supported the hex format for floats. > So what's the next direction, maybe ask the AMD folks? Good question. I will certainly ask Agner Fog if he's heard of it. Perhaps somebody may be motivated to find the exact values where AMD and Intel differ. One interesting question is what VIA processors do. Do they follow Intel, or AMD? I don't even know which is more accurate. Probably, the correctly rounded result is almost exactly between them, so it's only an error of a fraction of a bit -- it's significant only in that the processors give different results. I could only find two references to AMD/Intel differences in the fyl2x instruction. This one is from CERN. It's clearly the same issue, although they don't give any details (no test cases). http://boinc.berkeley.edu/MOM1MP01.pdf This one sounds like the same thing, although note that it wasn't confirmed. http://forums.amd.com/forum/messageview.cfm?catid=29&threadid=135771&enterthread=y > >> import std.math; >> >> void main() >> { >> assert( yl2x(0x1.0076fc5cc7933866p+40L, LN2) == >> 0x1.bba4a9f774f49d0ap+4L, "YL2X fails"); >> } _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
