Re: Motion 46: finalise interval literals, amendments
John
I had in mind a different meaning of the words literal and constructor
literal = explicitely , (hand)written constant
constructor like in oopl suh as c++ or java
Juergen
Am 28.06.2013 13:09, schrieb John Pryce:
Vincent
On 28 Jun 2013, at 10:32, Vincent Lefevre wrote:
(3) Should nums2interval() use (as it does currently) the Siegfried
Rump scheme where nums2interval(oo,oo) gives [HUGEPOS,oo]?
NO!
(Jürgen wrote:)
I dare to say yes although the consequences will be
-- constructor([oo,oo] =[realmax,oo]
or constructor ([oo,oo]) is invalid
-- nums2intval [oo] = union of {[a,oo] :a > realmax}
either there is a difference between constructor and num2intval
or [oo] is a valid interval hence motion 3 is violated.
==> I change my yes into NO
I don't get this: nums2interval is one of the 2 constructors.
yes, it is, and it gets 2 fp-numbers
whereas text2interval receives 1 string representing an interval using
correctly rounded string to fp numbers transformation
What's the difference between "nums2interval" and "constructor"?
nums2interval IS one of the 2 constructors
Note that nums2interval(+oo,+oo) should never occur in practice,
as RNDD(any real number) < +oo. Or does anyone have an example?
Siegfried had several stories from his own experience where users came to grief on this. I think this was one scenario:
- The interval package was such that nums2interval(oo,oo) (no brackets, Jürgen!) returned
certainly no brackets in that place
Empty.
- User was constructing interval xx = [a,b] as Union of nums2interval(a,a) and nums2interval(b,b). (I forget why, maybe that's how it had to be done in that package.)
- This done for a sequence of b's getting bigger.
- Eventually b overflowed and you had xx = Union([a,a],Empty) = [a,a] which is a containment failure.
Certainly this sort of thing can occur in practice. The interface between the floating-point and interval worlds has unavoidable hazards, and Siegfried wanted to minimise these hazards by adding this special case.
John Pryce
Jürgen
--
- Prof. Dr. Juergen Wolff von Gudenberg
o Lehrstuhl fuer Informatik II
/ \ Universitaet Wuerzburg, Am Hubland, D-97074 Wuerzburg
InfoII o Tel.: +49 931 / 31 86602 Fax ../31 86603
/ \ Uni E-Mail:wolff@xxxxxxxxxxxxxxxxxxxxxxxxxxx
o o Wuerzburg