There are five admissible combinations of types for (Int, Real)
.
They are represented by the five codes given below. For example, to use Int = NTL::ZZ, Real = double in a program, it suffices o put: #define TYPES_CODE ZD at the very beginning of the file, before the present file is read.
Another (more flexible) way of specifying the flexible types (Int, Real)
is to pass the types we want to use in the class and function templates. See the guide and the examples to see how to do that. This template function returns a character string that gives the values of Int
and Real
, usually for printing purposes. For example, strTypes<NTL::ZZ,double>(str)
will return the string Int = NTL::ZZ, Real = double
in str
.