Always false float comparisons

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Wed May 18 04:48:49 PDT 2016


On Wednesday, 18 May 2016 at 11:11:08 UTC, Walter Bright wrote:
> On 5/18/2016 3:15 AM, deadalnix wrote:
>> On Wednesday, 18 May 2016 at 08:21:18 UTC, Walter Bright wrote:
>>> Trying to make D behave exactly like various C++ compilers 
>>> do, with all their
>>> semi-documented behavior and semi-documented switches that 
>>> affect constant
>>> folding behavior, is a hopeless task.
>>>
>>> I doubt various C++ compilers are this compatible, even if 
>>> they follow the
>>> same ABI.
>>>
>>
>> They aren't. For instance, GCC use arbitrary precision FB, and 
>> LLVM uses 128
>> bits soft floats in their innards.
>
> Looks like LLVM had the same idea as myself.
>
> Anyhow, this pretty much destroys the idea that I have proposed 
> some sort of cowboy FP that's going to wreck FP programs.
>
> (What is arbitrary precision FB?)

Typo: arbitrary precision FP. Meaning some soft float that grows 
as big as necessary to not lose precision à la BitInt but for 
floats.



More information about the Digitalmars-d mailing list