Anne Archibald wrote:
> On 1 April 2010 03:15, David Cournapeau <
david@silveregg.co.jp> wrote:
>> Anne Archibald wrote:
>>
>>> Particularly given the comments in the boost source code, I'm leery of
>>> this fix; who knows what an optimizing compiler will do with it?
>> But the current code *is* wrong: it is not true that u == 1 implies u -
>> 1 == 0 (and that (u-1) != 0 -> u != 1), because the spacing between two
>> consecutive floats is much bigger at 1 than at 0. And the current code
>> relies on this wrong assumption: at least with the correction, we test
>> for what we care about.
>
> I don't think this is true for IEEE floats, at least in the case we're
> interested in where u is approximately 1.
Yes, sorry, you're right.