def split_mantissa_exponent(v):
 x = u'{0:.8g}'.format(v).split(u'e')
 if (x[0] != (u'1.' + (u'0' * (len(x[0]) - 2)))):
  m = x[0]
 else:
  m = u''
 if (len(x) == 2):
  ex = x[1].lstrip(u'0+')
  if ((len(ex) > 0) and (ex[0] == u'-')):
   ex = (u'-' + ex[1:].lstrip(u'0'))
 else:
  ex = u''
 return (m, ex)

def split_mantissa_exponent ( v ) : x = u'{0:.8g}' . format ( v ) . split ( u'e' ) if ( x [ 0 ] != ( u'1.' + ( u'0' * ( len ( x [ 0 ] ) - 2 ) ) ) ) : m = x [ 0 ] else : m = u'' if ( len ( x ) == 2 ) : ex = x [ 1 ] . lstrip ( u'0+' ) if ( ( len ( ex ) > 0 ) and ( ex [ 0 ] == u'-' ) ) : ex = ( u'-' + ex [ 1 : ] . lstrip ( u'0' ) ) else : ex = u'' return ( m , ex )
given a number .