lib/number.js
function (format) {
            _validFormat(format);
    
            var m = _regexDecFormat.exec(format);
            if (m !== null)
                return (  (typeof m[3] === 'string') ? m[3].length : 0 )
                     + ( (m[4] === '%')              ? 2           : 0 );
            
            else {
                m = _regexFracFormat.exec(format);
                if (m !== null)
                    return _getPrecision(1 / parseInt(m[2], 10));
            }
            
            throw "IllegalArgumentException: format is not recognized (" + format + ")";
        }
function (format) {
            _validFormat(format);
    
            var m = _regexDecFormat.exec(format);
            if (m !== null)
                return (  (typeof m[3] === 'string') ? m[3].length : 0 )
                     + ( (m[4] === '%')              ? 2           : 0 );
            
            else {
                m = _regexFracFormat.exec(format);
                if (m !== null)
                    return _getPrecision(1 / parseInt(m[2], 10));
            }
            
            throw "IllegalArgumentException: format is not recognized (" + format + ")";
        }
function ( format ) { _validFormat ( format ) ; var m = _regexDecFormat . exec ( format ) ; if ( m !== null ) return ( ( typeof m [ 3 ] === 'string' ) ? m [ 3 ] . length : 0 ) + ( ( m [ 4 ] === '%' ) ? 2 : 0 ) ; else { m = _regexFracFormat . exec ( format ) ; if ( m !== null ) return _getPrecision ( 1 / parseInt ( m [ 2 ] , 10 ) ) ; } throw "IllegalArgumentException: format is not recognized (" + format + ")" ; }
Returns the number of decimals necessary to do
math operations accurately with specified 'format'.

@param format {String}
@return {Integer} Number of decimals, >= 0
Returns the number of decimals necessary to do math operations accurately with specified format .