7
#include<dune/common/gcd.hh>
8
#include<dune/common/lcm.hh>
9
#include<dune/common/static_assert.hh>
13
dune_static_assert((Dune::Gcd<2*2*2*5*5*5*11, 2*2*5*13>::value == 2*2*5), "gcd not working properly");
14
dune_static_assert((Dune::Lcm<11,3>::value == 33), "lcm not working properly");
15
dune_static_assert((Dune::Lcm<18,15>::value == 18*15/3), "lcm not working properly");
16
dune_static_assert((Dune::Lcm<10800,Dune::Lcm<36000,7680>::value>::value==1728000), "lcm not working properly");
21
std::cout<<" gcd(2,5)="<<Dune::Gcd<2,5>::value<<" gcd(3, 18)="
22
<<Dune::Gcd<3,18>::value<<" gcd("<<2*2*2*5*5*5*11<<", "
23
<< 2*2*5*13<<")="<<Dune::Gcd<2*2*2*5*5*5*11, 2*2*5*13>::value
25
std::cout<<" lcm(18,15)="<<Dune::Lcm<18,15>::value
26
<<" lcm(10800,36000,7680)="<<Dune::Lcm<10800,Dune::Lcm<36000,7680>::value>::value<<std::endl;