On Fri, Oct 30, 2009 at 12:23 AM, ma...@mendelu.cz <ma...@mendelu.cz> wrote: > > Hello all > > The latex representation of numbers in scientific notation works as > excepted, unless we have these numbers as results from numerical > integral. Compare the last two outputs i nthe session below. Why is > > sage: latex(A[1]) > 1.66533453694e-14 > > and not > > sage: latex(A[1]) > 1.66533453694 \times 10^{-14} > > ?
It's because one is a Python float and one is a Sage real number: sage: latex(1.5e-20) 1.50000000000000 \times 10^{-20} sage: latex(float(1.5e-20)) 1.5e-20 sage: type(1.5e-20) <type 'sage.rings.real_mpfr.RealLiteral'> You can get around this as follows: sage: A=integral_numerical(x,2,1) sage: latex(RR(A[1])) 1.66533453693773 \times 10^{-14} Obviously, it would be nice if the latex command were improved so it is aware of Python floats. That would be a nice enhancement you can contribute to sage. -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---