2009/9/17 Jason Grout <jason-s...@creativetrax.com>: > > Currently, round(), floor(), and ceil() on interval objects return > intervals. > > There is a patch up at #2899 that changes these functions to return > integers (round-> "round the midpoint", floor -> largest integer below > the bottom of the interval, etc.). I think the reasoning is that > round(), floor, ceil, etc. should always return integers. > > What do people think? Should we close the ticket, or should we merge > the patch (after possible rebasing). > > To illustrate: > > Currently: > > sage: R = RealIntervalField(100) > sage: a = R(9.5, 11.3); a.str(style='brackets') > '[9.5000000000000000000000000000000 .. 11.300000000000000710542735760101]' > sage: floor(a).str(style='brackets') > '[9.0000000000000000000000000000000 .. 11.000000000000000000000000000000]' > > > Proposed: > > sage: floor(a) > 9 >
I would find this soooooooo useful! Whenever I compute with intervals, I often really want the integer floor, ceiling, or round. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---