2016-07-29 05:19:01 -04:00
|
|
|
//
|
|
|
|
// Factors.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 29/07/2016.
|
|
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Factors_hpp
|
|
|
|
#define Factors_hpp
|
|
|
|
|
|
|
|
namespace NumberTheory {
|
2016-08-01 06:04:55 -04:00
|
|
|
/*!
|
|
|
|
@returns The greatest common divisor of @c a and @c b as computed by Euclid's algorithm.
|
|
|
|
*/
|
2016-07-29 05:19:01 -04:00
|
|
|
unsigned int greatest_common_divisor(unsigned int a, unsigned int b);
|
2016-08-01 06:04:55 -04:00
|
|
|
|
|
|
|
/*!
|
|
|
|
@returns The least common multiple of @c a and @c b computed indirectly via Euclid's greatest
|
|
|
|
common divisor algorithm.
|
|
|
|
*/
|
2016-07-29 05:19:01 -04:00
|
|
|
unsigned int least_common_multiple(unsigned int a, unsigned int b);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* Factors_hpp */
|