Exposing BCmath to Javascript

In the PHP forum I started a thread with code that allows javascript to call the bcmath functions in PHP. These functions are useful for precision math, such as with currency.

This thread is meant to just be a pointer to its sister for those who follow the javascript forum more than the php side. Please make any followups in the PHP thread linked above.