docs: function format( n, i, rm, caller ) {
              var c0, e, ne, len, str;
  
              rm = rm != null && isValidInt( rm, 0, 8, caller, roundingMode )
                ? rm | 0 : ROUNDING_MODE;
  
              if ( !n.c ) return n.toString();
              c0 = n.c[0];
              ne = n.e;
  
              if ( i == null ) {
                  str = coeffToString( n.c );
                  str = caller == 19 || caller == 24 && ne <= TO_EXP_NEG
                    ? toExponential( str, ne )
                    : toFixedPoint( str, ne );
              } else {
                  n = round( new BigNumber(n), i, rm );
  
                  // n.e may have changed if the value was rounded up.
                  e = n.e;
  
                  str = coeffToString( n.c );
                  len = str.length;
  
                  // toPrecision returns exponential notation if the number of significant digits
                  // specified is less than the number of digits necessary to represent the integer
                  // part of the value in fixed-point notation.
  
                  // Exponential notation.
                  if ( caller == 19 || caller == 24 && ( i <= e || e <= TO_EXP_NEG ) ) {
  
                      // Append zeros?
                      for ( ; len < i; str += '0', len++ );
                      str = toExponential( str, e );
  
                  // Fixed-point notation.
                  } else {
                      i -= ne;
                      str = toFixedPoint( str, e );
  
                      // Append zeros?
                      if ( e + 1 > len ) {
                          if ( --i > 0 ) for ( str += '.'; i--; str += '0' );
                      } else {
                          i += e - len;
                          if ( i > 0 ) {
                              if ( e + 1 == len ) str += '.';
                              for ( ; i--; str += '0' );
                          }
                      }
                  }
              }
  
              return n.s < 0 && c0 ? '-' + str : str;
          }