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

Re: How do I bisect unbounded intervals?



Dan Zuras wrote:
>  Someone suggested an information theory midpoint.  In
>  floating-point this is quite close to a geometric mean
>  in that it finds that floating-point number for which
>  the number of representable numbers between lo & mid
>  is nearly equal to the number between mid & hi.
>
>  There is merit in this but I would not give it the name
>  "midpoint".  Perhaps "split".

Neat!  Convert both endpoints to sortable, take the average,
and convert back to floating-point!  ("Sortable" is a crude but
invertible transformation that permits basic string comparison
to be applied to the bits.  On big-endian machines for binary
formats this involves inverting the sign bit and, if the input
was negative, inverting all other bits as well.  For DFP it's a
bit more complicated but still doable.)  (NaNs need to be dealt
with first, or they would be bigger than infinity.)

(This is unfortunately a Level 4 concept.  Well, we are supposed
to avoid Level 3 issues, but nobody said anything about Level 4!)

Michel.
---Sent: 2012-01-13 05:46:59 UTC