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"



Vladik Kreinovich <vladik@xxxxxxxx> wrote:
> Maybe not make it Level 1 at all, keep it Level 2 function only?

I think Vladik's on to something, but perhaps I can go a step farther:
At Level 1, the particular value returned is not specified; but some
properties of the value are defined (e.g., inf <= split <= sup or some
such).

This avoids mathematical confusion about how to define the result of
splitting half-open intervals or Entire -- the operation is defined,
but the particular value isn't. 0 is acceptable for split(Entire) at
Level 1; so is 42, or -13.75.

At Level 2, we can make use of the underlying FP format's
characteristics and define split([0,oo)) &c. in terms of HUGE_VAL.

--Joel