lib/libbcmath.js
function(str) {
        var p;
        p = str.indexOf('.');
        if (p==-1) {
            return libbcmath.bc_str2num(str, 0);
        } else {
            return libbcmath.bc_str2num(str, (str.length-p));
        }

    }
function(str) {
        var p;
        p = str.indexOf('.');
        if (p==-1) {
            return libbcmath.bc_str2num(str, 0);
        } else {
            return libbcmath.bc_str2num(str, (str.length-p));
        }

    }
function ( str ) { var p ; p = str . indexOf ( '.' ) ; if ( p == - 1 ) { return libbcmath . bc_str2num ( str , 0 ) ; } else { return libbcmath . bc_str2num ( str , ( str . length - p ) ) ; } }
Convert to bc_num detecting scale
Convert to bc_num detecting scale