[PATCH] D39641: [CodeGen] make cbrt and fma constant (never set errno)

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 10 11:43:41 PST 2017


efriedma added a comment.

cbrt() can't underflow; that's not how cube roots work.  If 0<x<1, cbrt(x) > x.  See also the definition of rootn() in IEEE 754 (which specifies no exceptions for n=3).

For fma(), sure, I guess we could whitelist glibc and msvcrt, if you're worried there's some unknown implementation which sets ERANGE.


https://reviews.llvm.org/D39641





More information about the cfe-commits mailing list