It is very often necessary to use rationals with more precision than the operational system floating point representation allows. In probability, for example, the bigger is your sample space, the bigger may be your necessity for precision. In general, the more precision is offered to a numerical method the closer to the real value the value obtained will may be.

This package contains the structure and functionality to manipulate "big numbers". It basically includes the functions to add, subtract, add, multiply, divide, find GCD, powers and roots of these numbers. To learn more about each function, click on the links on the left.

For those who are familiar with LUA structures, the implemention of the "big numbers" will seam quite simple. Each bignumber is a table of NUMBERs and the functions to manipulate them are all meta-methods of the table.

After loading the packages the mathematical operations will have automatically been changed, so that you will be able to add, subtract, multiply, divide and raise a bigrats to a power using the conventional symbols ( + , - , * , / , ^ ). The only disvantage of doing this is that a bignumber will be created to hold the value before it is atributed to the result, therefore leading to many avoidable calls of the garbage collector.