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: Report bugs for variations in error handling in math functions?


On Fri, 25 Jul 2008, Michael Kerrisk wrote:

> Not even one approach is consistent.  Many functions don't set errno.
> But there are one or two that don't raise exceptions: the Bessel
> functions (j0(), y0 etc), for example.  It's all a bit of a mess,
> unfortunately.

Those functions aren't in C99.  They are however in POSIX, which defines 
C99-like error handling requirements, though a lot of errors are "may 
occur" just as a lot of C99 ones are.  (But if a "may occur" error is 
indicated by one of errno and exceptions, it must be indicated by both if 
math_errhandling says both forms of error handling are supported.)

(Bessel functions under different names and a lot of other functions are 
in DIS 24747, which passed its ballot for approval as an International 
Standard.  But I don't expect it to be integrated in the next revision of 
the C standard; my understanding is also that all of C++ TR1 *apart* from 
special mathematical functions (much the same set) is being integrated in 
C++0x.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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