h = sage.misc.html.HTMLFragmentFactory()
a = h('<b>x</b>')
a = h(2/3)
def scinot(x,ndp): string="%."+str(ndp)+"e" base, expo = (string % x).split('e') return '{0}×10<sup>{1}</sup>'.format(base,int(expo))
html(scinot(332413.4959494995, 3))