by ULLI (93 Submissions)
Category: Math/Dates
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
This class contains the basic arithmetic operations (+ - * / mod) and a square root function for integer operands of virtually any size. A few helper functions are also included. There is no real limit on the number of digits but your memory size and time (up to a theoretical maximum of more than four thousand million digits). However, extracting for example the root of 10,000-digit number giving a result of 5,000 accurate(!!) digits will let you drink a cup of coffee while waiting (faster when compiled -- about 27 seconds on my 1800 Athlon). The Screenshot shows the square root of 2 with about 1000 digits. Download is 8 kB.