| 1 | initial version |
At first sight, this seems indeed inconsistent, but I've learned to be wary of "obvious" answers when it comes to Sage's arithmetic.
May I suggest to ask this interesting question on sage-support (or possibly sage-devel) ?
| 2 | No.2 Revision |
At first sight, this seems indeed inconsistent, but I've learned to be wary of "obvious" answers when it comes to Sage's arithmetic.
The type of the objects may be a hint :
sage: type(.45)
<type 'sage.rings.real_mpfr.RealLiteral'>
sage: type(.45/.28)
<type 'sage.rings.real_mpfr.RealNumber'>
So mpfr defines some operator called / (possibly division) of RealNumbers (and, BTW, of RealLiterals), ...
sage: type(.45%.28)
<type 'sage.rings.real_mpfr.RealNumber'>
... as well as something called % (which indeed looks like modulo.
The question is now why mpfrs authors did not define anything called //. And why Sage's developers didn't extend mpfr to define //...
May I suggest to ask this interesting question on sage-support (or possibly sage-devel) ? There might be subtleties I am not aware of.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.