I disagree with this change. One of the main purposes of interval arithmetic is to be able to take a function f(x) that operates on floats, and pass in intervals instead, to determine the possible range of outputs a given input interval could produce. This change violates that paradigm. The author of f(x) shouldn't need to care whether they are operating on floats or intervals.
david On Sep 17, 3:53 am, Jason Grout <jason-s...@creativetrax.com> wrote: > 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 > > Thanks, > > Jason > > -- > Jason Grout --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---