Hi Erik,

On 2019-03-06, E. Madison Bray <erik.m.b...@gmail.com> wrote:
> and also Python 2 always rounds half-integers up, whereas
> Python 3 rounds even half-integers down and odd half-integers up.

What the heck?? Is there any widely accepted industry standard for that
"odd" rule? Why not round down half-integers whose cross total in
hexagesimal representation has an odd number of prime divisors, and
round up otherwise? </sarcasm>

> On Python 3, when giving a non-zero argument for the second
> argument--rounding to a decimal place--it always returns a float.
>
> Also on Python 3, an object a type that implements __round__ can
> return any type it wants for round(obj).

If I understand correctly, Sage currently uses .round() for customised
rounding. Would it be a good idea to add a .__round__() method to
sage.structure.element.Element that by default tries to return
self.round()? In future, rounding should of course be implemented by
overriding the default .__round__(), and old .round() should probably be
renamed.

Best regards,
Simon

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

Reply via email to