code: 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));
          }
  
      }
docs: Convert to bc_num detecting scale