Skip to content

Latest commit

 

History

History
57 lines (32 loc) · 1.54 KB

CppCl_I.md

File metadata and controls

57 lines (32 loc) · 1.54 KB

 

 

 

 

 

 

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';   } }

 

 

 

 

 

 

  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