This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: The arithmetic support of SCmode and DCmode.


Wow.  I just looked at egcs/libf2c/libF77/c_div.c (which comes from
netlib libf2c, with my own changes to handle aliasing, which is
not the issue here).

Turns out, c_div.c *already* uses double-precision for the intermediate
computations, yet still uses the "slow, safe" method.

Let's pretend it used single-precision...

>#if DBL_MAX_EXP > FLT_MAX_EXP + FLT_MAX_EXP

Does anyone know if there are any systems targeted by egcs/gcc that
would execute the "direct" double-precision version of c_div *slower*
than the current, "slow", safe way, assuming it used single precision?

That is, are there any machines where double-precision computations
(and conversions) are *lots* slower than sticking with single precision?

(I know the Numerix 464 was that way, but it's long-since dead now.  :)

If there are no such targets, Tim's test is probably sufficient
(assuming his analysis of the algorithm is correct).

If there are such targets, it'd be nice to accommodate them by adding
to the test one that makes it fail if the target is slow for double
precision.

        tq vm, (burley)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]