Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: midpoint



On 8 Mar 2012 at 11:31, Vincent Lefevre wrote:

Date sent:      	Thu, 8 Mar 2012 11:31:12 +0100
From:           	Vincent Lefevre <vincent@xxxxxxxxxx>
To:             	stds-1788@xxxxxxxxxxxxxxxxx
Subject:        	Re: midpoint

> On 2012-03-07 08:27:34 -0800, Dan Zuras Intervals wrote:
> > 	Thus, although things like midpoint may be easily
> > 	well defined among the Reals, we have to ask
> 
> Among the reals, the midpoint of an unbounded interval or Empty
> is not well defined.
> 
> > 	ourselves: What is the best representation of
> > 	these results within our finite floating-point
> > 	systems & the intervals we construct out of them?
> > 
> > 	And, in this context, the word "best" should not
> > 	be interpreted as "closest" but as "most useful".
> > 	So: What is the most useful answer?
> > 
> > 	In general, this will be a matter of some opinion
> > 	& debate (obvious from the length of this discussion
> > 	already).  But I think your principle of avoiding
> > 	NaNs & infinities in so far as is possible is a good
> > 	place to start.
> > 
> > 	I believe that infinities can largely be avoided &
> > 	that NaNs can be avoided altogether.  But I must
> > 	admit I am not quite sure about the NaNs.
> 
> But what if the most useful answer is to warn the user that he did
> something wrong? And what is the most useful way to do that?
> 

very good question!

I just want to add that during a computation once
it happens that rad >= 1/2 mid  then clearly the user 
has done something wrong (and any further result is useless).
Instead of 1/2 any other convenient fp constant between, say,
1/10 and 1/2 can be used.

One should not forget that mid-rad numbers model approximate
numbers.

S Markov