William Stein wrote: > On Fri, Sep 18, 2009 at 9:53 AM, Francois Maltey <fmal...@nerim.fr> wrote: >> Hello, >>> sage: a = RIF(1.5,2.3) >>> >>> I see no way to easily get 1 2 or 3 from a. >>> >> I propose, but I'm perhaps missunderstanding. >> >> a.lower().floor() >> a.upper().ceil() >> a.center().round() > > I know about those and always eventually end up using them. But I > don't consider them "easy".
How a new function, integer_range a.integer_range() returns [0, 1, 2, 3] or maybe just returns the iterator xrange(0,4) Then you could do something like a.integer_range()[0] Jason --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---