On 10/16/2013 12:45 AM, kcrisman wrote:
sage: 5 % 3
2
sage: 5. % 3.
-1.00000000000000
I view this as a problem - was trying to construct the Weierstrass
function for my students
http://sagecell.sagemath.org/?q=mufyfu
and it wouldn't plot right until I changed %2 to %2., but now I get
this. Or is there some mathematical reason to be inconsistent here?
It's not a bug, it works as documented...
Why do you say it is working as documented? It looks like a bug to me.
FYI, you can work with RDF - the behavior is same as the integer case.
sage: aa = RDF(5.0)
sage: aa % 3
2
luckily, I knew where the
documentation would hide for this! Others might not.
def __mod__(left, right):
"""
Return the value of ``left - n*right``, rounded according to the
rounding mode of the parent, where ``n`` is the integer quotient of
``x`` divided by ``y``. The integer ``n`` is rounded toward the
nearest integer (ties rounded to even).
--
You received this message because you are subscribed to the Google
Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.