std.math performance (SSE vs. real)

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 28 17:22:04 PDT 2014


On 6/28/2014 4:27 AM, francesco cattoglio wrote:
> We are talking about paying a price when you don't need it.

More than that - the suggestion has come up here (and comes up repeatedly) to 
completely remove support for 80 bits. Heck, Microsoft has done so with VC++ and 
even once attempted to completely remove it from 64 bit Windows (I talked them 
out of it, you can thank me!).


> With the correct
> approach, solving numerical problems with double precision floats yelds
> perfectly fine results. And it is, in fact, commonplace.

Presuming your average mechanical engineer is well versed in how to do matrix 
inversion while accounting for precision problems is an absurd pipe dream.

Most engineers only know their math book algorithms, not comp sci best practices.

Heck, few CS graduates know how to do it.


> Again, I've not read yet a research paper in which it was clearly stated that
> 64bit floats were not good enough for solving a whole class of PDE problem. I'm
> not saying that real is useless, quite the opposite: I love the idea of having
> an extra tool when the need arises. I think the focus should be about not paying
> a price for what you don't use

I used to work doing numerical analysis on airplane parts. I didn't need a 
research paper to discover how much precision matters and when my results fell 
apart.


More information about the Digitalmars-d mailing list