Re: Don't get your GI tract in a twist...
> Date: Tue, 31 Jan 2012 04:20:24 -0800 (PST)
> From: Dmitry Nadezhin <dmitry.nadezhin@xxxxxxxxxx>
> To: <intervals08@xxxxxxxxxxxxxx>
> Cc: <stds-1788@xxxxxxxxxxxxxxxxx>, <nh@xxxxxxxxxxxxxxxxx>
> Subject: Re: Don't get your GI tract in a twist...
>
> What about one more example (again in two-digit floating-point decimal numb=
> ers) ?
>
> [u,v] = [0.92,1.2]
> midpoint([u,v]) = roundNear((u + v)/2) = roundNear((0.92 + 1.2)/2) = =
> roundNear(1.06) = 1.1
> radius([u,v]) = roundUp((v - u)/2) = roundUp((1.2 - 0.92)/2) = roundU=
> p(0.14) = 0.14
> [roundDown(midpoint(X) - radius(X)), roundUp(midpoint(X) + radius(X))] = =
> [roundDown(1.1 - 0.14), roundUp(1.1 + 0.14)] =
> [roundDown(0.96), roundUp(1.24)] = [0.96, 1.3]
>
> The property ([0.92,1.2] \subset [0.96, 1.3]) is false.
>
Now, THAT'S a good example.
OK, we're wrong. (I'm wrong. I had to convince Nate. :-)
And
radius([0.92,1.2]) =
max(midpoint([0.92,1.2])-0.92,1.2-midpoint([0.92,1.2]))
= max(1.1-0.92,1.2-1.1) = max(0.18,0.10) = 0.18
implies
[0.92,1.2] \subset [roundDown(1.1-.18),roundUp(1.1+.18)]
= [roundDown(0.92),roundUp(1.28)]
= [0.92,1.3]
clearly works.
So I guess your definitions has the -w option (works) & ours
does not.
I was hoping for 2 things: (1) that the definition of radius
reflected the definition of width & (2) that both were
independent of the definition of midpoint.
So before we run this play one more time let me ask you 2
questions:
(1) Can you think of a reason that the definition of width
should be changed to reflect the definition of radius?
And (2) Can you think of a definition of radius that has
both the -w option & is independent of the definition of
midpoint?
Any way you answer is OK. We will change it to work this
time. Thanks again for finding the flaws.
Dan