Craig Citro wrote: > So there are two things people could want from an interval i: > > 1) { floor(x) for x in i } > 2) min { floor(x) for x in i } > > I think that David's unhappy with floor doing (2). The other proposal > is to have x.floor() return the unique element in (1) when it's a > singleton, and raise an exception otherwise. David -- would you be > happy with that? >
I really think that floor, ceil, and round should return intervals when they are fed intervals. I thought that was the whole point of interval arithmetic. Shouldn't sin(floor(interval)) be an interval? It won't be if floor automatically converts things to integers. Why should floor, ceil, and round get special treatment to yank things out of interval arithmetic? Why not other functions too? It seems that having some functions that yank you out of interval arithmetic sort of spoil everything. I really like the idea that we should have separate ifloor, iceil, and iround functions specifically on intervals that return integers, as described. That said, I don't use interval arithmetic very much at all (so my points above are purely from a consistency point of view). However, I do plan on using it in teaching numerical analysis next semester. 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 -~----------~----~----~----~------~----~------~--~---