User Tools

Site Tools


handling_20very_20large_20numbers_20without_20using_20scientific_20notation

Handling very large numbers without using scientific notation

BB4W, like most programming languages, can handle very large numbers - but only in floating-point notation. This is fine for normal usage, but what if you want to investigate the digits of such a number? For instance, you may be looking for patterns in the digits such as a sequence or groupings of similar digits (there are still folk out there looking for patterns in pi, out at the millionth decimal place!).

The program below can multiply very large numbers together and show the exact answer with every digit present. I hope no-one is offended by the copyright notice in there. You're free to use the code without obligation, but please acknowledge me if you use it in released work. I've had the experience of having code stolen, slightly altered, and then being claimed as the work of the person doing the alteration. Anyway, here it is:


string_multiplication_2.bbcString Multiplication _2.bbc




I hope this is useful to someone out there.

Edit by Richard Russell, December 2013

See also the MAPM (My Arbitrary Precision Math) and HIME (Huge Integer Math and Encryption) libraries, both of which support calculations using arbitrary precision integer arithmetic:

BB4WMAPMLIB is here
HIMELIB is here

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
handling_20very_20large_20numbers_20without_20using_20scientific_20notation.txt · Last modified: 2024/01/05 00:22 by 127.0.0.1