On Wed, Sep 19, 2012 at 12:42 PM, Christophe BAL <[email protected]> wrote:
> What I think very confusing is that 1/4 is the Sage division and not the
> Python standard one, so why it would be different for randint ?
It's not Sage division vs. Python division, it's Sage Integers vs. Python ints.
At the Sage console, input lines are preparsed to wrap numbers like 1
to 4 in "Integer" calls:
sage: 1/4
1/4
sage: preparse("1/4")
'Integer(1)/Integer(4)'
In fact, you could even turn the preparser off, and recover Python's behaviour:
sage: preparser(False)
sage: 1/4
0
Doug
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.