Multiprecision with Boost
We can use any precision using cpp_int datatype. It automatically assigns precision at runtime. For example, let's find out factorial (50) which is improssible to do with normal C++ or STL.
C++ (GCC 9.2.0)
-
Input
Using multi-precision float, we can get precision up to 50 and 100 decimal places. For this we can use cpp_float_50
or cpp_dec_float_100
respectively. Let us see the example to get the better idea.
C++ (GCC 9.2.0)
-
Input