hfinkel added a comment.

In https://reviews.llvm.org/D39611#915560, @efriedma wrote:

> > The POSIX docs all have language like this for complex calls:
> >  "No errors are defined."
>
> I would not trust the POSIX documentation.
>
> carg() is an alias for atan2(), and cabs() is an alias for hypot(), so they 
> should be marked the same way.  (On glibc, cabs/hypot will set errno; not 
> sure about carg/atan2.)


That seems like a bug if they set errno. The complex versions shouldn't set 
errno. glibc's docs say that neither hypot or set errno (although the POSIX 
spec allows for it in theory).

> For the others transcendental functions... they can raise exceptions in some 
> cases, so they could in theory set errno, but it looks like they don't on 
> glibc?  Not sure if that's documented anywhere, or something we should depend 
> on.

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.


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