
Hi All, I have to use isinf in an application. The application was originally written using gcc (under linux) which supports isinf. I want to port it to Windows and VC++ doesn't seem to support it. I googled around and I think the "omnipotent" Boost has something to help with this. Unfortunately, I couldn't get the details of how to make use of it. I would be grateful if someone can help me? Thank you in advance! metty ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Try either John Maddock's Math Toolkit library or Johan Rade's floating point utilities library. Both available from: http://www.boost-consulting.com/vault/index.php?direction=0&order=&directory =Math%20-%20Numerics I believe the Math Toolkit will be in Boost 1.35 but recall finding both libraries easy to lay over the top of 1.34. In John's library you need Math_toolkit_headers.zip / boost / math / special_functions / fpclassify.hpp / bool template<typename T> isinf(T t); I believe Johan's implementation is even more portable and robust than John's, but perhaps less far through the review process: Floating_point_utilities_v3.zip / boost / math / fpclassify.hpp / bool template<typename T> isinf(T t); Hth, Pete

Pete Bartlett wrote:
I believe the Math Toolkit will be in Boost 1.35
Correct.
I believe Johan's implementation is even more portable and robust than John's, but perhaps less far through the review process:
Well, I'm biased :-) But I'd characterise it like this: the version that will be in Boost-1.35 uses only portable C++ code, and will forward to the platforms native version if there is one. It's also been tested on all the platforms we regression test on, and the only failure I know of turned out to be a bug in numeric_limits (confirmed by IBM). On the other hand, Johan's implementation peeks at the bits of the value to determine it's type, which is *much* faster for native floating point types, but *maybe* less portable for some platforms, and doesn't scale to user defined floating point types. Hopefully we'll end up with a combination of the best bits of the two versions in the end - and Johan's code review is coming up at the end of Feb if you're interested BTW. HTH, John.

Dear Pete Bartlett, Sorry I am late to thank you. Your reply was helpful and I could solve the problem using John Madock's Math toolkit which seamlessly integrates with an older version of Boost. Thank you again. Best regards, metty --- Pete Bartlett <pete@pcbartlett.com> wrote:
http://www.boost-consulting.com/vault/index.php?direction=0&order=&directory
http://lists.boost.org/mailman/listinfo.cgi/boost-users
____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
participants (4)
-
Johan Råde
-
John Maddock
-
metty
-
Pete Bartlett