Basic math in javascript can be a PITA once you move to arbritary precision (usually, but not always, currencty calculations). I thought I found a solution

This is an implmentation of PHP's bcmath library. HOWEVER - I stumbled on a test case where it flat out didn't work and so had to roll a specific implementation solution to get my project work done.

Does anyone know of a lib out there that actually works? If not I suppose I'll take this sourceforge project which *mostly* works and debug it. From the looks of the source code the original author just transliterated the original C code, so he's made a mistake somewhere along the line.

The bad test case is in my thumbs down comment.