This is the mail archive of the
mailing list for the glibc project.
libm TLOSS errors for Bessel functions
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 22 Feb 2012 16:59:05 +0000 (UTC)
- Subject: libm TLOSS errors for Bessel functions
There's a whole series of bugs (2551 is the first example I looked at;
2552, 2553, 2554, 2562, 2563, 2565, 2566, 2576 all look like this from the
subjects though Bugzilla is giving internal errors right now so I can't
confirm) complaining about Bessel functions giving wrong, zero, values for
The cause is the wrappers in math/w_j*.c which handle these functions
specially for arguments greater than X_TLOSS (1.41484755040568800000e+16,
independent of whether the argument is float, double or long double -
that value was probably chosen for double). Reporting "total loss" errors
like this is only done for Bessel functions, not for any other functions.
The implementations themselves support handling larger arguments (provided
sincos does proper range reduction) - but that only gets used for
_LIB_VERSION == _IEEE_.
What do we want to do about these bugs? POSIX permits but does not
require these errors (it leaves open the question of what "too large" is);
I think it's most consistent with other functions not to give them by
default. The lack of specification of what "too large" is goes back to
the SVID, but maybe the TLOSS handling should be enabled for only for
_SVID_, or disabled for _POSIX_ as well as _IEEE_ (the difference is what
happens in _XOPEN_ mode)?
Joseph S. Myers