public static double getTokenFloatInternal(char[] buffer, int start, int end, int size) {
    { int length = end - start;
      int auxend = end;
      long mantissa = 0l;
      int exponent = 0;
      double mantissasign = 1.0;
      double exponentsign = 1.0;
      boolean exponentP = false;
      boolean decimalsP = false;
      int decimals = 0;
      char ch = Stella.NULL_CHARACTER;
      int digit = 0;
      double result = 0.0;

      if (length < 0) {
        length = length + size;
        auxend = size;
      }
      loop000 : for (;;) {
        while (start < auxend) {
          ch = ((char) (0x00ff & buffer[start]));
          switch (ch) {
            case '-': 
              if (exponentP) {
                exponentsign = -1.0;
              }
              else {
                mantissasign = -1.0;
              }
            break;
            case '+': 
            break;
            case '.': 
              decimalsP = true;
            break;
            case 'e': 
            case 'E': 
              exponentP = true;
            break;
            default:
              digit = (int) ch - (int) '0';
              if (exponentP) {
                exponent = (exponent * 10) + digit;
              }
              else {
                if (decimalsP) {
                  decimals = decimals + 1;
                }
                mantissa = (mantissa * 10) + digit;
              }
            break;
          }
          start = start + 1;
        }
        if (auxend == end) {
          break loop000;
        }
        start = 0;
        auxend = end;
      }
      result = ((double)(mantissa));
      exponent = ((int)((exponent * exponentsign) - decimals));
      if (!(exponent == 0)) {
        result = result * Math.pow((10.0),(((double)(exponent))));
      }
      return (result * mantissasign);
    }
  }