Skip to content

Commit e7b5e40

Browse files
committed
Simplify Euclidean algorithm very slightly using (x) vs (x != 0).
1 parent 2982b3b commit e7b5e40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/boost/math/common_factor_rt.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ namespace detail
381381
inline EuclideanDomain Euclid_gcd(EuclideanDomain a, EuclideanDomain b)
382382
{
383383
using std::swap;
384-
while (b != EuclideanDomain(0))
384+
while (b)
385385
{
386386
gcd_traits<EuclideanDomain>::modulo(a, b);
387387
swap(a, b);

0 commit comments

Comments
 (0)