carl  24.04
Computer ARithmetic Library
LCM.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "GCD.h"
4 
5 namespace carl {
6 
7 template<typename C, typename O, typename P>
9 {
10  assert(!is_zero(a));
11  assert(!is_zero(b));
12  if (a == b) return a;
13  return quotient(a*b, gcd(a,b));
14 }
15 
16 }
carl is the main namespace for the library.
Interval< Number > quotient(const Interval< Number > &_lhs, const Interval< Number > &_rhs)
Implements the division with remainder.
Definition: Interval.h:1488
cln::cl_I gcd(const cln::cl_I &a, const cln::cl_I &b)
Calculate the greatest common divisor of two integers.
Definition: operations.h:310
bool is_zero(const Interval< Number > &i)
Check if this interval is a point-interval containing 0.
Definition: Interval.h:1453
cln::cl_I lcm(const cln::cl_I &a, const cln::cl_I &b)
Calculate the least common multiple of two integers.
Definition: operations.h:362
The general-purpose multivariate polynomial class.