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

Re: min / max and empty intervals (was: Friendly amendment to Motion 25)



> Subject: Re: min / max and empty intervals (was: Friendly amendment to Motion 25)
> From: John Pryce <j.d.pryce@xxxxxxxxxxxx>
> Date: Tue, 7 Jun 2011 07:38:08 +0100
> To: "stds-1788@xxxxxxxx" <stds-1788@xxxxxxxx>
> 
> Dan & all
> 
> If one were supporting a max(ListOfObjects) function then considering
> max of zero or one object(s) would be necessary, but no, I'm only
> interested in arity >= 2. In fact max(x1,x2,x3) is just syntactic
> sugar for max(x1,max(x2,x3)), etc.

	It doesn't matter John.  You will still have to have answers
	for max(xx,empty) & max(empty,empty) which amounts to the
	same thing.

	If you define max as 'empty preserving' just like add, it is
	a consistent approach.  It just may have more dire consequences
	down the road.

> 
> On 7 Jun 2011, at 02:11, Dan Zuras Intervals wrote:
> > 	Always assuming, of course, that we DEFINE max(empty,xx) to
> > 	be xx.
> I can see why 754 chose the rule it did. Though I wish it had defined
> two functions, say maxNum which has maxNum(x,NaN)=NaN (NaN="something's
> wrong") and maxData which has maxData(x,NaN)=x (NaN="missing data").
> I think the balance for 1788 is the other way, and max should be like
> any other point function, whose natural interval extension returns
> Empty if any input is Empty. 

	You reason wonderfully about this problem, John.

	In fact WE DID have two versions in the draft for the longest
	time.  We called them maxNum (which returns the number) &
	maxNaN (which returns the NaN).  This was because the two
	camps could not agree on which was the more desirable version
	for literally years.

	Then, when it came down to recommending which version languages
	chose as the basis function for that language's max function,
	we decided that it was better to have just one out there than
	have each language go its own way.  Something of a 'standard
	is better than better' argument.

	The one we decided on was maxNum for the reasons I outlined
	before.  The remaining artifact of that decision is the fact
	that it is called maxNum in the text rather than just max.

	So, do you think we should make two versions available to
	interval users or settle on just one?

	And which version lies to the user the least?  In 754 we
	called this the principle of least astonishment.  That is,
	which answer will generate the least surprise for the user
	who questions the truth of the result.

	Reasonable people can differ on this.

> 
> Those who have actually used max/min in interval code should give their
> view. Vladik, you might have experience of doing statistics on samples
> of interval data? Nate?
> 
> John

	I wholeheartedly agree with this.  Those who have been there
	should advise those of us who haven't.  Did you have a notion
	of the empty interval in your arithmetic?  Did you have a
	notion of the [-oo,-oo] interval?  Whether or not you had
	either of these, what does the user expect to see when asking
	max(xx,empty) or max(empty,empty)?  What is least astonishing?

	We need your experience.


				   Dan