From: Steven W. <ste...@us...> - 2007-04-21 18:49:15
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1949/boost-sandbox/boost/units Modified Files: static_rational.hpp Log Message: handle negative denominator correctly Index: static_rational.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/static_rational.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- static_rational.hpp 13 Apr 2007 06:08:52 -0000 1.7 +++ static_rational.hpp 21 Apr 2007 18:49:14 -0000 1.8 @@ -71,7 +71,7 @@ /// greatest common divisor of N and D // need cast to signed because static_gcd returns unsigned long static const integer_type den = - static_cast<integer_type>(boost::math::static_gcd<nabs,dabs>::value); + static_cast<integer_type>(boost::math::static_gcd<nabs,dabs>::value) * ((D < 0) ? -1 : 1); public: // for mpl arithmetic support |