On 18/05/15 17:04, John Cosgrave wrote:
> In Maple, for a given integer "n", the command "length(n)"
> returns the number of decimal digits that n has. Would
> someone please tell me what is the equivalent command
> in Sage. I have looked in the documentation, did
> searches, ... , but couldn't find anything.

This is just:

sage: n = 24
sage: n.ndigits(10)
2

In Sage, when you have an object (integer, rational, polynomial) you can
just do

sage: n.<TAB>

(<TAB> is for the key TAB) and will obtain a list of methods that you
can apply to it.

Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-nt" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
Visit this group at http://groups.google.com/group/sage-nt.
For more options, visit https://groups.google.com/d/optout.

Reply via email to