[test] compile error on floating point comparison

16 Mar
2006
16 Mar
'06
7:32 a.m.
The last test results on msvc (RudbekAssociates, as well as huber-V2), have a failure in math library that seems to be caused by Boost.Test. See: http://tinyurl.com/hon2m Seems like "max" and "min" are defined as macros. Per max/min guidelines (http://boost.org/more/lib_guide.htm), I've fixed this with attached patch, and comitted it as obvious. Hope this will fix the issue. - Volodya

16 Mar
16 Mar
6:15 p.m.
Don't you need to change in all places? // Avoid overflow. - if( f2 < static_cast<FPT>(1) && f1 > f2 * std::numeric_limits<FPT>::max() ) + if( f2 < static_cast<FPT>(1) && f1 > f2 * (std::numeric_limits<FPT>::max)() ) return std::numeric_limits<FPT>::max(); Gennadiy
7031
Age (days ago)
7031
Last active (days ago)
1 comments
2 participants
participants (2)
-
Gennadiy Rozental
-
Vladimir Prus