function splitNull( num ) { return parseFloat( (num + '').replace( /0{10,}\d+/, '' ) ); } alert(splitNull(46.0100000000001)); // 46.01