Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Changing the default i387 precision

If I follow the standards and your mail correctly:

  C99 says "long double" does not necessarily map to an IEEE754 type.

  While enforcing IEEE754-compliant rounding on "double" makes sense, I
  don't understand it on long double.

  You are talking about the 80-bit x86 extended double format as 'long

  To have 'proper long double support' in libm, means functions with
  long double type signature that take these 80-bit quantities and
  operate on them?

  Most compilers use SSE when the code says long double, but SSE/SSE2 is
  only regular double.

  C99 defines eg "cosl" that takes and returns long double.

  Fortunately we have no system calls with long doubles, so there are no
  issues there.

So are you proposing then

  1) Make gcc and clang use larger storage (maybe already true) and avoid
  SSE instructions for variables declared as long double?

  2) Add functions in libm so that instead of float/double versions we
  will have float/double/long double versions of each function?

I'm not sure that this leads to a lot of incremental usefulness, and
it's a fair bit of work.  But from the standards-weenie view I don't see
anything wrong with doing it.

Attachment: pgpcAh7eGTRgG.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index