------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-05-03 
09:48 -------
> I'm not sure what is best done with the signbit definition (maybe nothing if
> it will never call a library function at present, even though it isn't
> properly type-generic);

We can discriminate using sizeof, like in glibc.

> but the others can be done, e.g.
> 
> #define isfinite(x) __extension__ ({ __typeof (x) __x = (x); __builtin_expect
(!isnan(__x - __x), 1); })

This works fine for "big" numbers, but are there similar tricks to distinguish
denormals from normals?  If no, we'll have to resort to FLT_MIN and the like or
to bitwise-testing the exponent against 0.

I'm going to attach a first version of math_c99.h.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19933

Reply via email to