Adding isinfl() and isnanl()

Joel Sherrill joel.sherrill@gmail.com
Thu Feb 5 15:09:44 GMT 2026


Hi

math.h:123 has isinfl () and isnanl() as this:

123
<https://sourceware.org/git?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/math.h;h=5e92d2662da145cabad51e5946051aa34e9092b6;hb=HEAD#l123>
#ifdef __CYGWIN__ /* not implemented in newlib yet */
124
<https://sourceware.org/git?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/math.h;h=5e92d2662da145cabad51e5946051aa34e9092b6;hb=HEAD#l124>
extern int isinfl (long double);
125
<https://sourceware.org/git?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/math.h;h=5e92d2662da145cabad51e5946051aa34e9092b6;hb=HEAD#l125>
extern int isnanl (long double);
126
<https://sourceware.org/git?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/math.h;h=5e92d2662da145cabad51e5946051aa34e9092b6;hb=HEAD#l126>
#endif

The winsup implementation has them as simple wrappers for the
corresponding built-in functions such as __builtin_isinf_sign().

If I copied the winsup/ implementation and put each in a new file
in newlib/libm so they are always available, is that OK?

If so, any suggestions on location inside libm for simple wrappers
for the corresponding builtin?

What would the conditional guard need to be? Just Cygwin and RTEMS?
or more?

Anything I am missing?

Thanks.

--joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/newlib/attachments/20260205/035291e2/attachment.htm>


More information about the Newlib mailing list