efriedma added a comment.

> In general, because all of these functions are well defined over the entire 
> complex domain, they don't have errors. The "no errors defined" is likely 
> correct.

One, it is not true that all these functions are well-defined over the entire 
complex domain.  For example, according to the C standard `catanh(1)` raises a 
divide-by-zero error.

Two, even for the functions which are defined over the entire complex domain, 
the result can still overflow and/or underflow, and therefore they could set 
errno to ERANGE.  cabs() can overflow, cexp() can overflow, etc.

Three, even if we only care about the behavior of the current version of glibc, 
cabs() actually does modify errno. (Try `cabs(1.7e308+I*1.7e308)`).


https://reviews.llvm.org/D39611



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to