This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Fix Bessel function error handling (bug 6807, bug 15901)


On 12/04/2013 03:25 AM, Joseph S. Myers wrote:
> Bugs 6807 and 15901 report problems with the handling of errors from
> y0 / y1 / yn: negative arguments should, like other domain errors,
> produce a NaN result, while 0 is a pole error, should produce an
> ERANGE errno value with divide-by-zero exception and should produce an
> infinity whose sign depends on the value of n in the case of yn.
> 
> This patch fixes those bugs in the way most consistent with the
> surrounding code.  The wrapper functions are changed to raise
> FE_DIVBYZERO explicitly, just as they raise FE_INVALID explicitly
> (except for the ynl wrapper, which does things differently from all
> the other wrappers for some reason) - maybe they should all change to
> call the __ieee754_* functions first, like the __ynl wrapper does, but
> that's a separate issue.  __kernel_standard is adjusted to produce the
> appropriate errno values and returns - errno values and exception
> structure are left unchanged in the deprecated matherr case as that
> seems safest for this deprecated interface.  The underlying ynl
> implementations are changed to produce the appropriate return and
> exceptions for zero arguments, as required by the nature of that
> wrapper.  (There may well be such bugs in other underlying
> implementations that would only show up with -lieee - clearly we do
> need tests of -ffinite-math-only and -lieee to test those function
> variants better, although I also think -lieee, which uses
> _LIB_VERSION, should be replaced by __*_noerrno function variants
> enabled with -fno-math-errno.)
> 
> Tested x86_64 and x86 and ulps updated accordingly (for the new tests
> of yn with negative n and finite arguments; such tests were previously
> lacking).
>

Ok, thanks,

Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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