This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: TR1 Math Special Functions
Paolo Carlini <pcarlini@suse.de> writes:
| Hi,
|
| > I have some fixed. One or two I'm going to have to XFAIL for now.
|
| Fine, thanks.
|
| >> Besides that, before we can do the first commit, I can see one
| >> blocker issue (really, because affects the bootstrap itself, on
| >> some targets): you are using in many places std::isnan, which, in
| >> fact, is only available if the target supports the C99 math
| >> facilities (grep tr1/cmath about isnan & co, about that). What do
| >> you suggest? As a stopgap solution we could also disable completely
| >> the affected code (but I appreciate your efforts with tgamma,
| >> elsewhere... )
| >
| > Am I allowed to use this:
| > else if (::__gnu_cxx::__capture_isnan(__alpha))
| > return std::numeric_limits<_Tpa>::quiet_NaN();
|
| I don't think you are: if the C99 related macros are undefined, you
| don't find anything useful in namespace __gnu_cxx: have a look to the
| logic in c_std/cmath.
Can we require C99? Or is there a __builtin_isnan to use?
Also, if __alpha is a NaN, then is has encoded information that it
makes sense to pass to the caller. So, I would write the above as
else if (__builtin_isnan(__alpha))
return __alpha;
-- Gaby