Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (32 sloc) 1.54 KB

 

 

 

 

 

(C++) cln::cl_I

 

cln::cl_I is the CLN data type for an near-infinite-sized int.

 


#include <iostream> #include <cln/cln.h> //From http://www.richelbilderbeek.nl/CppClnExample1.htm int main() {   //Regular int   int x = 1;   //CLN int   cln::cl_I y = 1;   for (int i=1; i!=50; ++i)   {     x*=i;     y*=i;     std::cout << i << "! : " << x << '\t' << y << '\n';   } }

 

 

 

 

 

cln::cl_I code snippets

 

  1. CliToInt, convert cln::cl_I to int
  2. CliToStr, convert cln::cl_I to std::string
  3. IntToStrWithSep, add thousands seperators
  4. SafeIntToCli, convert int to cln::cl_I