tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Complex division, compiler-rt and logarithm
Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
>(1) Use the better algorithmic approach and provide a version of the
>functions in question in libc.
>(2) Use the simpler approach of libgcc.
I'd suggest to implement (2) for now. While it is always preferrable
to have a more accurate implementation, the matter is somewhat complex:
-scalbn() is used internally by libm, thus needs the rename/weak_alias
protection. Would have to span the 2 libraries then, like the
pthread stub stuff.
-The implementation needs special handling at least for non-IEEE FP,
long double and perhaps for some FPUs -- it needs research whether
eg the i387 version or one using bit operations performs better
on amd64. (Such research is easier done if it only affects libm.)
-The Sun-based implementation in libm has its own support macros
and error handling support. (I could live without the non-POSIX
error handling modes, but I wouldn't remove an existing feature
without good reasons.)
Christos Zoulas <christos%astron.com@localhost> wrote:
> We already have a stealth scalbn in libc for compat_ldexp...
Yes, and in my tests it has been as correct as the Sun-libm
implementation. Performance could make a difference.
The bottom line is that dealing with these problems would
distract you massively from getting compiler_rt in shape.
And since the easy solution wouldn't be a regression, I'd
choose that.
best regards
Matthias
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Besuchen Sie uns auf unserem neuen Webauftritt unter www.fz-juelich.de
Home |
Main Index |
Thread Index |
Old Index