Chapter 2. Arbitrary-Precision Mathematics (BC) Functions

The BC functions allow basic mathematical operations to be performed on very large numbers that would normally not be possible on standard computer architectures. With standard mathematical operations, computers can only process numbers of a certain size; when that maximum size is reached, the number wraps around to its lowest value. Of course, this can lead to mathematical errors in your code. Using BC functions fixes this problem. One issue with these functions, however, is that they’re not available by default in PHP due to licensing restrictions, and must be downloaded separately from www.php.net/extra/number4.tar.gz. As of PHP 4.0.4, license conditions for the library changed and ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.