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

Re: A proposal for the next motion



Dan et al,

I guess great minds think the same way :-)

The "invalid" flag you propose below seems very similar,
if not the same as, the "discontinuous" flag John Pryce
had been discussing for some time.  I'll let John comment.

Baker

Dan Zuras Intervals wrote:
Date: Mon, 18 May 2009 11:33:00 +0200
From: Vincent Lefevre <vincent@xxxxxxxxxx>
To: STDS-1788@xxxxxxxxxxxxxxxxx
Subject: Re: A proposal for the next motion

On 2009-05-17 22:34:39 -0400, Nate Hayes wrote:
Vincent Lefevre wrote:
There are (global) flags in IEEE 754-2008. Their scope is
language-defined.
. . .
In this case, like I mention earlier, I believe "local flag" or
"attribute" (which could be implemented as dual op-codes, for
example) is best option, i.e., the user must explicitly define the
behavior when invoking the function. This way, the user can choose

    sqrt([-4,-1]) = NaI        or        sqrt([-4,-1]) = {empty}

without needing to remember to check a global status flag after the
fact (or without needing to change a global control flag before,
either).
That's a possibility, but I'd rather prefer the following one:

  sqrt([-4,-1]) = (empty,invalid)
  sqrt([-1,4]) = ([0,2],invalid)

i.e. an "invalid" flag is attached to the returned interval.
With this choice, the "invalid" flag is set if and only if
you would get NaI with your choice. This just provides more
information.

Also, I said that instead of attaching the "invalid" flag to
the result, one could have a "status flag" with the meaning of
IEEE 754-2008. The advantage is that if the program produces
lots of output, the user does not need to check each result:
he can simply test the flag.



--

---------------------------------------------------------------
R. Baker Kearfott,    rbk@xxxxxxxxxxxxx   (337) 482-5346 (fax)
(337) 482-5270 (work)                     (337) 993-1827 (home)
URL: http://interval.louisiana.edu/kearfott.html
Department of Mathematics, University of Louisiana at Lafayette
(Room 217 Maxim D. Doucet Hall, 1403 Johnston Street)
Box 4-1010, Lafayette, LA 70504-1010, USA
---------------------------------------------------------------