private String formE(double number) {
    // format absolute mantisse
    int exponent = 0;
    String zeros = "00000000000000000000000".substring(0, _precision + 1);
    if (number != 0) {
      exponent = (int) Math.floor(Math.log(Math.abs(number)) / Math.log(10));
      double mantisse = Math.floor(Math.abs(number * power(10.0,
                                            _precision - exponent)) + 0.5);
      if (mantisse >= 10 * _tenToPrecision) {
        exponent++;
        mantisse = Math.floor(Math.abs(number * power(10.0,
                                          _precision - exponent)) + 0.5);
      }
      zeros = Long.toString((long) mantisse);
    }

    // make fractional part
    StringBuffer fracPart = new StringBuffer();
    if (_decimalPoint) {
      fracPart.append('.').append(zeros.substring(1));
    }

    // make exponent
    fracPart.append(Character.isLowerCase(_descriptor) ? 'e': 'E')
            .append(exponent < 0 ? '-' : '+');
    exponent = Math.abs(exponent);
    for (int i = 0, n = fracPart.length(); i < 3; i++) {
      fracPart.insert(n, Character.forDigit(exponent % 10, 10));
      exponent /= 10;
    }

    return form(number < 0, zeros.substring(0, 1), new String(fracPart));
  }