From: William S F. <ws...@fu...> - 2013-09-09 21:41:48
|
On 09/09/13 19:39, Vadim Zeitlin wrote: > On Mon, 09 Sep 2013 19:28:07 +0100 William S Fulton <ws...@fu...> wrote: > > WSF> > I do not know what range of compilers you support. Semi-recent > WSF> > versions of gcc and clang should have no problems with isinf. I think > WSF> > Intel is okay too but have not verified. > WSF> > > WSF> Some preprocessor macros will be needed to provide as wide a support as > WSF> possible. There must be some code out there that gives portable isinf() > WSF> for pre C99 standard. If anyone knows of a good source, let me know. > > See > > https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/math.h#L56 > > for the definition which should work with just about everything (just > pretend that it was already updated to use C++11 isinf() if available...). > Thanks, that is nearly what we want, isinf() isn't quite the opposite of isfinite() though. We want to accept isnan() so combining isfinite() and isnan() might work. William |