mirror of https://github.com/CGAL/cgal
- Example of how to use cl_I.
This commit is contained in:
parent
93a7562fa3
commit
a38d5799d6
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
#ifndef CGAL_USE_CLN
|
||||
# error You need to have CLN installed in order to run this example
|
||||
#endif
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <iostream>
|
||||
|
||||
#include <CGAL/CLN/cl_integer.h>
|
||||
|
||||
#include <cl_io.h>
|
||||
#include <cl_integer_io.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
cl_I b = "31";
|
||||
cl_I p = b * 75;
|
||||
bool ok = (p==2325) && (CGAL::compare(p,cl_I(31*75))==CGAL::EQUAL);
|
||||
std::cout << (ok ? "ok" : "ERROR") << std::endl;
|
||||
std::cout << p << " == " << 31*75 << endl;
|
||||
return (ok) ? 0 : -1;
|
||||
}
|
||||
Loading…
Reference in New Issue