Big Number Calculator

August 17th, 2009 by Dragos Leave a reply »

This class can be used to add arbitrary precision numbers in pure PHP.

It takes two decimal numbers represented as strings of unlimited length and performs an addition digit by digit.

The result is another decimal number represented as a string.

Download class

December 2006 Number 5

December 2006 Number 5

Arbitrary precision numbers can be used to perform mathematical operations without loosing the precision of the results.

PHP applications can use the bcmath extension to perform arbitrary precision operations. However, this extension is not always available in all PHP installations.

This class provides a pure PHP based solution to perform basic operations with arbitrary precision numbers. It can be used in environments where bcmath extension is not available.

Manuel Lemos


VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Advertisement

Comments are closed.