Hello Carl!

On Mon, Nov 24, 2014 at 9:55 AM, Carl Kleffner <cmkleff...@gmail.com> wrote:
> Hi K.Frank
>
> It's absolutely your (community) choice of course and fairly unproblematic
> if you stay inside the mingw-w64 system.
>
> It is however incompatible for MSVC compatibility even in case you never
> touch long doubles, as it affects double precision computation.

Yes,to clarify my earlier comments:  It is correct that even if you
use regular 64-bit doubles, the (x87-style) floating-point hardware
will (in extended-precision mode) compute intermediate results with
80-bit precision as long as the computations stay in the floating-point
registers, and only round them down to 64-bit doubles when they are
written to memory.

And yes, this can give different (almost always better) results than
computing intermediate results with 64-bit precision.  So, yes, this
will be incompatible with (but generally better than) the Microsoft
approach, even when only using doubles (i.e., not long doubles).

> See
> random-and-unexpected-exception-flt-divide-by-zero-and-exception-flt-invalid-operation.aspx
> or https://github.com/numpy/numpy/issues/5194 . At least it is a matter of
> documentation.
>
> I would like to ask you for an item in the mingw-w64 FAQ to explain the
> difference between the settings and how to choose double precision instead
> (linking CRT_fp8.o AFAIK)

Yes, very reasonable.  Whatever default behavior Kai & Co. choose for
mingw-w64, it should of course be documented, and, if different than the
Microsoft approach, that difference should be highlighted.  And, of course,
the end-user should be able to override the default behavior, whether it's
me who wants 80-precision for intermediate results, or someone like
yourself who has a use-case where 64-bit intermediate results are desired.
(Don't get me wrong -- I do believe that there are legitimate use-cases for
using 64-bit precision for intermediate results.  I just think they're rare.)

(I, of course, would vote for the default to be 80-bit long doubles with
80-bit precision for intermediate results based on my own experience,
but, much more importantly, based on the recommendation of the experts
such as Kahan.  But I would also vote for giving the end-user properly
documented mechanisms to override the default.)

> Cheers,
>
> Carl


Best.


Happy Extended-Precision Floating-Point Hacking!


K. Frank


> ...
> 2014-11-24 15:01 GMT+01:00 K. Frank <kfrank2...@gmail.com>:
>>
>> Hi Carl!
>>
>> I very much think that 80 bits should be the default for
>> long doubles, even if Microsoft does differently.
>> ...

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to