From: Eric W. <ewm...@gm...> - 2013-09-20 22:01:00
|
Hi William, Thanks, I am behind on things. (I had to get out a release so I had to go with my disabled approach.) I'll try to test this soon. One thought about using the target language infinity: I don't know if its guaranteed that it will equal the C99 infinity and what happens in that case. Thanks, Eric On 9/11/13, William S Fulton <ws...@fu...> wrote: > On 09/09/13 22:41, William S Fulton wrote: >> 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. >> > I've committed a fix so that infinity is now accepted for type float. > The implementation does require a C99 isfinite() to be available, > otherwise we can't reliably check for infinity and then we fall back to > the previous incorrect behaviour. I did also attempt to use an > equivalent to isfinite() on a very limited set of platforms: Windows and > Solaris, based on the wxWidgets version. See commit > a91cd0bc5c1550bfa2c922c7434323c30ca1fb87 - > https://github.com/swig/swig/commit/a91cd0bc5c1550bfa2c922c7434323c30ca1fb87 > > Eric, can you check this all works for you. > > William > > -- Beginning iPhone Games Development http://playcontrol.net/iphonegamebook/ |