Actually gcc provides libquadmath for 128-bit floating point math routines.

It might be worth a look.

Aloha
Kai
Am 20.07.2013 17:04 schrieb "JonY" <[email protected]>:

> On 7/21/2013 01:58, K. Frank wrote:
> >
> > That would certainly make sense, but it doesn't square with what
> > numeric_limits is telling me:
> >
> >    numeric_limits<long double>::digits10 = 18
> >    numeric_limits<long double>::max_digits10 = 21
> >
> > Just to check that numeric_limits isn't lying to me I ran a small program
> > that adds and subtracts 1.0 to and from a small long double.  This agrees
> > with numeric_limits and shows about 20 decimal digits of precision.
> >
> >    ---------------
> >    d = 1e-017
> >    (d += 1.0;  d -= 1.0;)
> >    d = 9.97466e-018
> >    ---------------
> >    d = 1e-018
> >    (d += 1.0;  d -= 1.0;)
> >    d = 9.75782e-019
> >    ---------------
> >    d = 1e-019
> >    (d += 1.0;  d -= 1.0;)
> >    d = 1.0842e-019
> >    ---------------
> >    d = 1e-020
> >    (d += 1.0;  d -= 1.0;)
> >    d = 0
> >    ---------------
> >
> > I compiled the test program without any special compiler flags.  Do I
> > need to somehow enable the SSE registers you mentioned in order
> > to take advantage of them?
> >
>
> I checked the assembly listing and have confirmed that GCC still tries
> to use the 387 for extended precision and will use SSE for double
> precision.
>
> IIRC AMD's 387 implementation is 64bit only, so your results might
> differ on them.
>
> >> Use something like MPFR if you want arbitrary high precision math
> >> independent of hardware capabilities.
> >
> > No, I don't need that.  I was just a little curious about what I saw, and
> > thought an 80-bit long double was a little skimpy for a modern, 64-bit
> > machine.
>
> There is quad precision floats with 128-bit lengths, they're not very
> commonly supported. GCC supports it, but aren't any math routines in
> mingw-w64 to actually work on it, eg quad sqrt etc.
>
> There is also decimal math support in GCC, there is some work on the
> math routines, but nothing yet for general use.
>
>
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to