'Return string representation of the number in scientific notation.
Captures all of the information in the underlying representation.'

def __str__(self, eng=0, context=None):

    if self._isnan():
        minus = ('-' * self._sign)
        if (self._int == (0,)):
            info = ''
        else:
            info = ''.join(map(str, self._int))
        if (self._isnan() == 2):
            return ((minus + 'sNaN') + info)
        return ((minus + 'NaN') + info)
    if self._isinfinity():
        minus = ('-' * self._sign)
        return (minus + 'Infinity')
    if (context is None):
        context = getcontext()
    tmp = map(str, self._int)
    numdigits = len(self._int)
    leftdigits = (self._exp + numdigits)
    if (eng and (not self)):
        if ((self._exp < 0) and (self._exp >= (-6))):
            s = ((('-' * self._sign) + '0.') + ('0' * abs(self._exp)))
            return s
        exp = ((((self._exp - 1) // 3) + 1) * 3)
        if (exp != self._exp):
            s = ('0.' + ('0' * (exp - self._exp)))
        else:
            s = '0'
        if (exp != 0):
            if context.capitals:
                s += 'E'
            else:
                s += 'e'
            if (exp > 0):
                s += '+'
            s += str(exp)
        s = (('-' * self._sign) + s)
        return s
    if eng:
        dotplace = (((leftdigits - 1) % 3) + 1)
        adjexp = ((leftdigits - 1) - ((leftdigits - 1) % 3))
    else:
        adjexp = (leftdigits - 1)
        dotplace = 1
    if (self._exp == 0):
        pass
    elif ((self._exp < 0) and (adjexp >= 0)):
        tmp.insert(leftdigits, '.')
    elif ((self._exp < 0) and (adjexp >= (-6))):
        tmp[0:0] = (['0'] * int((- leftdigits)))
        tmp.insert(0, '0.')
    else:
        if (numdigits > dotplace):
            tmp.insert(dotplace, '.')
        elif (numdigits < dotplace):
            tmp.extend((['0'] * (dotplace - numdigits)))
        if adjexp:
            if (not context.capitals):
                tmp.append('e')
            else:
                tmp.append('E')
                if (adjexp > 0):
                    tmp.append('+')
            tmp.append(str(adjexp))
    if eng:
        while (tmp[0:1] == ['0']):
            tmp[0:1] = []
        if ((len(tmp) == 0) or (tmp[0] == '.') or (tmp[0].lower() == 'e')):
            tmp[0:0] = ['0']
    if self._sign:
        tmp.insert(0, '-')
    return ''.join(tmp)
