* BCMath [ http://www.php.net/manual/en/ref.bc.php ] * PHP as binary/CLI (command line interface) (Have a look whether there is a /usr/bin/php or /usr/local/bin/php) * A scheduler (such as cron) +--------------------+
The next thing is to check whether you have BCMath installed or not.
If BCMath is missing, open [currency.php] in your editor and uncomment the line where it says something like this (at the top): /* Uncomment this if you are missing the BCMath package...
bcmath config.m4 doesn't have correct paths, so some includes are not properly found and compile fails.
Furthermore, it still insists on number.c being present, which is apparently not needed (it used to be needed in past, I guess).
Note some care needs to be taken for the include paths, since some files include "config.h", which need to pick up the proper one - bcmath configure or libbcmath one - appropriately.
I plan to implement either a spigot algorithm or something similar to generate pi in the near future.
A little comment for the simplified example above: you can do base converting without BCMath functions using only math operators, but you will not able to manage very large values or work with strings to compress or scramble data.
If you have BCMath installed in your system it worth use it for this.
Here are some hints arising from my experience with programming number theory algorithms in BCMATH.
The discussion is aimed at BC programmers who wish to convert their BC programs into BCMATH and who wish to make their BC programs more accessible.
Only a modicum of PHP programming knowledge is required and I found the book PHP for the world wide web by Larry Uhlman, gave a good introduction to PHP.
From Zend this week there was more discussion, with conversations about enabling bcmath by default, HTTP digest authentication in PHP 5, PHP on Netware and PHP 5.0.0 RC1.
The bcmath extension allows for correct number precision, which becomes important in financial applications, he states.
Rui Hirokawa submitted a patch that adds HTTP digest authentication to PHP 5.