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.
The idea is to use the asinh(x) function, which is like x for |x| small, like log(x) for x somewhat> 1, and like -log(-x) for x somewhat< -1. You transform from the x variable to a y variable by
Divide by L to fit the length scale,
Take asinh.
You take the arithmetic mean in the y variable and transform back to the x variable by
Take sinh,
Multiply by L.