Valid arguments for boost::math::gcd()
Hello everybody, I just learned that boost offers a function to determine the greatest common divisor of two integers, as described here: http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/boost_math/g reatest_common_divisor_and_least_common_multiple.html However, this documentation is not very clear about which arguments are valid for boost::math::gcd(). In particular, it does not specify that the first argument has to be greater than the second one, although this seems to be a requirement with the current implementation. Also, I would like to know how the greatest common divisor is defined when one or both of the arguments are zero. In that case, boost::math::gcd() seems to return the nonzero argument, if there is any - but is this mathematically correct? -- Matthias Hofmann Anvil-Soft, CEO http://www.anvil-soft.com - The Creators of Toilet Tycoon http://www.anvil-soft.de - Die Macher des Klomanagers
participants (1)
-
Matthias Hofmann