Re: Motion 46: finalise interval literals, amendments
On 2013-07-02, at 11:12 PM, Jürgen Wolff von Gudenberg <wolff@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> John,
> just another option would be to use different constructors
> nums2interval(x) --> [x,x]
> nums2intervalwide(x) --> [x-ulp,x+ulp]
Really, why do we need to add an ulp around an interval? If my device tells me I measured 1.234 and the
device has accuracy 5%, I will construct my interval.
Regards,
Ned
> text2interval("x") --> [x,x] where is parseFloat("x")
> text2interval(x) --> [x-ulp,x+ulp]
> and then follow Ned's idea, see below.
> Analogously fr 2 bounds as input
> And then make th whole stringprocessing optional or recommended.
> Advantage: simpler to conform , no compiler necessary, only parseFloat,
> Diaadvantage different versions will show up, your arguments below
> just an idea
> Jürgen
>
> Am 02.07.2013 12:22, schrieb John Pryce:
>> P1788
>>
>> 6. I am skeptical of various "simpler" constructors that were proposed, e.g. Ned Nedialkov's idea to replace
>> xx = text2interval("[1.2, 3.4]")
>> by
>> xxlo = text2interval("1.2")
>> xxhi = text2interval("3.4")
>> xx = convexHull(xxlo,xxhi)
>> It's simpler for the implementer who writes text2interval, but a lot more complicated for the user. (And surely takes about twice as long, as one has to compute the upper bound of xxlo and lower bound of xxhi which are discarded? So would slow down the reading of a large interval array from a text file.) So I leave unchanged the basic idea of strings like "[1.2, 3.4]".
>>
>> Regards
>>
>> John Pryce
>>
>
> --
> o Prof. Dr. Juergen Wolff von Gudenberg, Lehrstuhl fuer Informatik II
> / \ Universitaet Wuerzburg, Am Hubland, D-97074 Wuerzburg
> InfoII o Tel.: +49 931 / 31 86602
> / \ Uni E-Mail: wolff@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> o o Wuerzburg