On Monday, March 5, 2012 9:22:14 PM UTC+8, William wrote:
>
>
>
> On Sunday, March 4, 2012, Irucka Embry <[email protected]> wrote:
>
> > It would be very helpful to have an option to have a decimal answer when 
> performing calculations, especially when solving complex linear and/or 
> nonlinear equations, such as is possible with Matlab, GNU Octave, Scilab, 
> etc. It is very difficult to find any answers online, in the Sage search 
> engine, etc. to that question.
> >
>
> Sage output is always displayed  in decimal by default, so I do not 
> understand your question at all.
>

I think what (s)he meant is that by default stuff is not printed in 
decimals, example:

sage: log(3,2)
log(3)/log(2)

To the OP:
To get the numerical result at the end, simply use .n() like:

sage: log(3,2).n()
1.58496250072116

This is very useful since Sage can do exact computations, and does so by 
default (always?). There are some inherent precision problems if you use 
Matlab or Octave and you want accurate results.

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to