MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / lcm

Function lcm

extern/boost/boost/integer/common_factor_rt.hpp:487–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485
486template <typename Integer>
487inline typename boost::enable_if_c<std::numeric_limits<Integer>::is_specialized, boost::rational<Integer> >::type lcm(boost::rational<Integer> const &a, boost::rational<Integer> const &b)
488{
489 return boost::rational<Integer>(static_cast<Integer>(lcm(a.numerator(), b.numerator())), static_cast<Integer>(gcd(a.denominator(), b.denominator())));
490}
491/**
492 * Knuth, The Art of Computer Programming: Volume 2, Third edition, 1998
493 * Chapter 4.5.2, Algorithm C: Greatest common divisor of n integers.

Callers 3

BOOST_GCD_NOEXCEPTFunction · 0.70
gcdFunction · 0.70
operator()Function · 0.70

Calls 1

gcdFunction · 0.70

Tested by

no test coverage detected