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

Re: Another proposal for a "split" function to complement "mid"



> Subject: Another proposal for a "split" function to complement "mid"
> From: John Pryce <prycejd1@xxxxxxxxxxxxx>
> Date: Sun, 18 Mar 2012 16:02:56 +0000
> Cc: stds-1788 <stds-1788@xxxxxxxxxxxxxxxxx>
> 
> Dan, P1788, also Arnold, Baker and Nate
> 
> On 14 Mar 2012, at 17:22, Dan Zuras Intervals wrote:
> > 	I have been contemplating that split function we discussed
> > 	earlier.  In so far as is possible, I would like to write
> > 	it independent of the underlying interval form.  In effect,
> > 	not caring whether one uses explicit (inf-sup or [a,b] form)
> > 	or implicit (mid-rad or <m,r> form).
> 
> I personally am against the idea of a Level 2 mid(xx) function that =
> gives non-NaN values for intervals xx = [xlo,xhi] such that the Level =
> 1 value is undefined.
> 
> But I see the need for a split(xx) function for those who do Branch & =
> Bound and similar work.
> 
> Arnold proposed a "median" idea based on finding a value xmed such that =
> there are about as many FP numbers between xlo and xmed as between xmed =
> and xhi, but has dropped it for the present. Dan is thinking along =
> similar lines, but his method seems to be parameterized by the FP radix, =
> which doesn't appeal to me much.
> 
> Can I propose a more mathematically based "median"? It's parameterized =
> by a single number L>0, a "length scale", which the user chooses to suit =
> the application. Like the other proposals, it is symmetric round 0, and:
> - If |xlo|, |xhi| are somewhat < L, it is almost
>   the same as arithmetic mean.
> - If xlo somewhat > L, or xhi somewhat < -L, it
>   is almost the same as geometric mean.
> 
> . . .

	If the radix parameter bothers you (& it bothers me a bit too),
	I can't see how replacing it with a length scale, L, improves
	matters.

	If you want to do without a parameter, the geometric mean IS
	the natural split that follows the roughly log distribution of
	floating-point numbers.  For us it would mean splitting off
	zero & infinity until one is wholly within the positives or
	negatives.  That is, until we have either 0 < inf(X) <= sup(X)
	< +oo or -oo < inf(X) <= sup(X) < 0.  From that point on,
	split(X) = +/-sqrt(inf(X)*sup(X)) as the case may be.

	Since this is equivalent to

		log|split(X)| = (log|inf(X)| + log|sup(X)|)/2

	it is logarithmically distributed just like floating-point
	numbers.  Which also has the property that it is nearly the
	arithmetic mean when inf(X) & sup(X) are near one another &
	away from zero.

	I hesitated to propose it because of all the special case
	splitting of zero & infinity that must be done before the
	split kicked in.  But if the parameter is the problem, it
	is the natural solution.

	IMHO, of course...


				Dan