Set errno for atan2 underflow (bug 16349).

System Internals / glibc - Joseph Myers [codesourcery.com] - 31 March 2014 09:56 UTC

This patch fixes bug 16349, missing errno setting for atan2 underflow, by adding appropriate checks to the existing wrappers. (As in other cases, the __kernel_standard support for calling matherr is considered to be for existing code expecting existing rules for what's considered an error, even if those don't correspond to a general logical scheme for what counts as what kind of error, so __set_errno calls are added directly without any changes to __kernel_standard.)

Tested x86_64 and x86.

[BZ #16349]
- math/w_atan2.c: Include . (__atan2): Set errno for result underflowing to zero.
- math/w_atan2f.c: Include . (__atan2f): Set errno for result underflowing to zero.
- math/w_atan2l.c: Include . (__atan2l): Set errno for result underflowing to zero.
- math/auto-libm-test-in: Don't allow missing errno for some atan2 tests.
- math/auto-libm-test-out: Regenerated.

54fa247 Set errno for atan2 underflow (bug 16349).
ChangeLog | 13 +
NEWS | 10 +-
math/auto-libm-test-in | 9 +-
math/auto-libm-test-out | 1076 +++++++++++++++++++++++------------------------
math/w_atan2.c | 8 +-
math/w_atan2f.c | 8 +-
math/w_atan2l.c | 8 +-
7 files changed, 581 insertions(+), 551 deletions(-)

Upstream: sourceware.org


  • Share