There are a number of interact examples on the wiki (such as the Gram- Schmidt one at http://wiki.sagemath.org/interact/linear_algebra) that work around this problem by casting to a field of low precision, for example doing something like
latex(RealField(8)(0.6)) produces "0.60". Hope that helps, Marshall Hampton On Nov 17, 9:02 am, Stan Schymanski <[EMAIL PROTECTED]> wrote: > A week older and still not smarter... > Sorry for the noise, but I am still trying to find a way of getting > useful latex output for equations that contain decimal numbers. It > seems that the previous posts passed below the radars of those that > might know the answer, so I am trying to push it to the surface again. > Isn't anybody else bothered by rows of 0s in the latex() or show() > output? > > Cheers > Stan > > On Nov 10, 1:25 pm, Stan Schymanski <[EMAIL PROTECTED]> wrote: > > > It seems thatlatex(eqn) just evaluates eqn and prints the result > > inlatexnotation, without cutting off annoying 0s or giving the user the > > opportunity to set a precision. I find this very annoying, as > > suchlatexoutput is not very useful for illustration purposes. Does anyone > > know a trick how to automatically round ugly numbers for thelatex > > output? I feel that this should be incorporated into thelatex() code, > > though. > > Here is another illustration of the problem: > > > latex(0.6*x) > > {0.600000000000000 x} > > > latex(0.6.n(digits=4)*x) > > {0.599998500000000 x} > > > The second attempt became even uglier! > > > This is on sage 3.1.4 on an Intel Macbook Pro. > > > Thanks for your help! (Anyone?) > > Stan --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---