Always false float comparisons
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sun May 15 23:46:59 PDT 2016
On 5/15/2016 10:37 PM, Manu via Digitalmars-d wrote:
> No, you'll give me 80bit _when I type "real"_. Otherwise, if I type
> 'double', you'll give me that. I don't understand how that can be
> controversial.
Because, as I explained, that results in a 2x or more speed degradation (along
with the loss of accuracy).
> I know you love the x87, but I'm pretty sure you're among a small
> minority. Personally, I don't want a single line of code that goes
> anywhere near the x87 to be emit in any binary I produce. It's a
> deprecated old crappy piece of hardware, and transfers between x87 and
> sse regs are slow.
I used to do numerics work professionally. Most of the troubles I had were
catastrophic loss of precision. Accumulated roundoff errors when doing numerical
integration or matrix inversion are major problems. 80 bits helps dramatically
with that.
>> It's also why I'd like to build a 128 soft fp emulator in dmd for all
>> compile time float operations.
>
> And I did also realise the reason for your desire to implement 128bit
> soft-float the same moment I realised this. The situation that
> different DMD builds operate at different precisions internally (based
> on the host arch) is a whole new level of astonishment.
Then you're probably also astonished at the links I posted to you on how g++ and
VC++ behave with FP.
More information about the Digitalmars-d
mailing list