I wrote:
Emil Jerabek wrote:
Then still test #4 fails on my system, and I think it is allowed to fail. The requirement on MinReal and MaxReal is not (as one might expect) that they are the smallest and largest real values
0, but: "The values of minreal and maxreal shall be such that
arithmetic in the set including the closed interval - maxreal to maxreal, but excluding the two open intervals - minreal to zero and zero to minreal can be expected to work with reasonable approximations, but arithmetic outside this set cannot be expected to work with reasonable approximations." (ISO 10206, 6.4.2.2 b).
Therefore, on a system that supports denormalized floating point numbers (such as IA32), I gather the MinReal should contain the smallest normalized number which it seems to do.
That's true, I didn't realize this problem. I think a modified version of the test could pass:
Clever trick! ;-) Works on my system (IA32, Linux and DJGPP). Will check on other machines later.
I tested it on Sparc (Solaris) now, and 42 failed. I'm not convinced that it should succeed everywhere (what exactly is "reasonable approximation"?), so I'm commenting it out. Perhaps you have another idea how we can check it ...
Frank