On Sep 19, 2009, at 9:56 PM, Jason Grout wrote:
> Craig Citro wrote:
>>> Okay, that seems like a valid point, though I still disagree. I
>>> think
>>> that we have two levels of consistency here: consistency with the
>>> function and consistency with the concept of interval arithmetic. I
>>> t
> I speak from a programmatic point of view, though. I'd like to not be
> surprised that the following doesn't work:
>
> a=sin(floor(RIF( (1.1,1.2) )))
> a.lower()
> a.upper()
>
>
> versus
>
> a=sin(floor(RIF((1.5,2.5
> a.lower()
> a.upper()
>
I'm a little confused -- *neither* of those woul
Craig Citro wrote:
>> Okay, that seems like a valid point, though I still disagree. I think
>> that we have two levels of consistency here: consistency with the
>> function and consistency with the concept of interval arithmetic. I
>> think that in this case, the interval arithmetic requirement i
> Okay, that seems like a valid point, though I still disagree. I think
> that we have two levels of consistency here: consistency with the
> function and consistency with the concept of interval arithmetic. I
> think that in this case, the interval arithmetic requirement is more
> specific, so y
Craig Citro wrote:
>
> So I think that this suggests returning an Integer is the right move
> -- it's just a question of what to do if there *is* no single correct
> integer.
Okay, that seems like a valid point, though I still disagree. I think
that we have two levels of consistency here: cons
>> Well, I'm a little confused -- I thought that the whole point of
>> floor() and ceil() was to return Integers. Indeed:
In my opinion, this is a huge +1.
Nick
--~--~-~--~~~---~--~~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscri
On Fri, Sep 18, 2009 at 7:13 PM, Craig Citro wrote:
>
>> 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 aut
> 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
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
> singl
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 otherw
On 17-Sep-09, at 3:16 PM, David Harvey wrote:
>
> 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 cou
On 18-Sep-09, at 4:22 PM, Craig Citro wrote:
>
>> Example:
>>
>> sage: floor(log(RIF(8)) / log(RIF(2)))
>> 3.?
>>
>> Should this be 2? What if it returned an Integer if there was a
>> unique floor (ceiling, etc.) and raised an exception otherwise?
>>
>
> I'm +1 on x.floor()/x.ceil() returning an
> Example:
>
> sage: floor(log(RIF(8)) / log(RIF(2)))
> 3.?
>
> Should this be 2? What if it returned an Integer if there was a
> unique floor (ceiling, etc.) and raised an exception otherwise?
>
I'm +1 on x.floor()/x.ceil() returning an Integer when possible, and
raising an Exception otherwise.
>> 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".
>
Maybe include them and call them something like "ilower" and "iupper"?
I'm mode
William Stein wrote:
> On Fri, Sep 18, 2009 at 9:53 AM, Francois Maltey 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 kno
On Fri, Sep 18, 2009 at 9:53 AM, Francois Maltey 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 eventual
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()
François
--~--~-~--~~~---~--~~
To post to this group, send an email to sage-d
On Fri, Sep 18, 2009 at 7:06 AM, Jason Grout
wrote:
>
> Robert Bradshaw wrote:
>> On Sep 17, 2009, at 3:16 PM, David Harvey wrote:
>>
>>> 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
Robert Bradshaw wrote:
> On Sep 17, 2009, at 3:16 PM, David Harvey wrote:
>
>> 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 out
On Sep 17, 2009, at 10:44 PM, Robert Bradshaw wrote:
> On Sep 17, 2009, at 3:16 PM, David Harvey wrote:
>
>> 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 determin
On Sep 17, 2009, at 3:16 PM, David Harvey wrote:
> 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 cou
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
On 17-Sep-09, at 12:53 AM, Jason Grout 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 i
William Stein wrote :
> 2009/9/17 Jason Grout :
>
>> 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
2009/9/17 Jason Grout :
>
> 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
25 matches
Mail list logo