This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: question about GCC Quad-Precision Math Library
- From: FX <fxcoudert at gmail dot com>
- To: Samuel C Stewart <samcstewart at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 30 Aug 2011 22:56:57 +0200
- Subject: Re: question about GCC Quad-Precision Math Library
- References: <1314737574.91996.YahooMailClassic@web65605.mail.ac4.yahoo.com>
Dear Samuel,
(I copy this email to the gcc@gcc.gnu.org list, as this is the home for discussions of this library.)
You can't use the libquadmath library with an ANSI-C compiler. You need a compiler that supports the __float128 type and operations on it (such as multiplications, as you mention).
Regards,
FX
> Francois,
>
> I have a question about the GCC Quad-Precision Math Library.
>
> Can I use this library with a regular ANSI-C compiler?
>
> I ask this question because I see in the code (power function)
> that you multiply two 128-bit quad floats using the '*', and I
> could not see how this would work.
>
> -----------------------------------------------------------------------------
> __float128 powq (__float128 x, __float128 y)
> {
> __float128 z, ax, z_h, z_l, p_h, p_l;
> __float128 y1, t1, t2, r, s, t, u, v, w;
> __float128 s2, s_h, s_l, t_h, t_l;
> int32_t i, j, k, yisint, n;
> uint32_t ix, iy;
> int32_t hx, hy;
> ieee854_float128 o, p, q;
> ...
> return s * z; // line 439
> -----------------------------------------------------------------------------
>
> Regards,
> Samuel Stewart
> Scotch Plains, NJ