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]
Other format: [Raw text]

Re: [OT] __builtin_cpow((0,0),(0,0))



On Mar 9, 2005, at 03:18, Duncan Sands wrote:
if the Ada front-end has an efficient, accurate implementation
of x^y, wouldn't it make sense to move it to the back-end
(__builtin_pow) so everyone can benefit?

Does not have it yet. Current implementation is reasonably accurate, but not very fast. However, I'm working on a rewrite of these functions that match Ada strict mode accuracy requirements and is reasonably fast.

However, there is too much difference between C and Ada requirements
for the power function for it to make sense to share the implementation.
Ada requires raising exception in certain circumstances, but doesn't care
about errno. Also, for Ada the rounding mode always is round-to-even.


Finally, even though the Ada math library conforms to Ada strict mode
requirements (typically 2 or 4 eps), it doesn't try to have these functions
be correctly rounded. This allows significant simplifications of the
function evaluation, making it efficient to implement even on systems
without support for fused multiply-add.


-Geert


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