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

Re: Motion 46: finalise interval literals



On 2013-07-12 14:37:47 +0100, John Pryce wrote:
> On 11 Jul 2013, at 14:54, Vincent Lefevre wrote:
> > On 2013-07-11 09:21:02 +0100, John Pryce wrote:
> >> ...
> >> Neumaier's uncertain form 5.6?1 stays because I think it is useful,
> >> and easy to read once you get used to it.
> > 
> > You should give an example with a power of 10, because not everyone
> > has the same definition of ulp for such a number. Say, "100?" is
> > [99.5,100.5].

> A valid point -- someone might reasonably think an ulp of 1200 is
> 100, not 1, i.e. take last *nonzero* place of number as written.
> This is not the proposed definition. (And it means an ulp of 0 is
> undefined or must be a special case.)

Actually, for powers of 10 (the radix), I was thinking of Harrison's
definition of ulp. From our Handbook of Floating-Point Arithmetic:

  [Harrison] $\ulp(x)$ is the distance between the closest straddling
  floating-point numbers $a$ and $b$ (i.e., those with $a \leq x \leq b$
  and $a \neq b$), assuming that the exponent range is not upper-bounded.

> > Also, it is ambiguous for 0: is it defined or not?
> > For instance, "0?", "0.0?", etc. The ulp of 0 is not defined, but
> > it can make sense to define "0?", "0.0?", etc.
> Yes, in my intended definition, an ulp of 0 is 1, and ulp of 0.0 is 0.1.
> 
> If you want to give 1200 an ulp of 100 you write 12?1e2, for
> instance, to mean [1100,1300].

Yes, I think this should be explained in an informative part.

> I support what Dmitry says:
> On 11 Jul 2013, at 15:26, Dmitry Nadezhin wrote:
> > I think that interval literals should be locale-independent (or in
> > CC locale).
> 
>  What is "CC locale"?

I suppose that Dmitry was meaning "C" ("POSIX" is equivalent).

> My web search didn't find such a thing. 
> 
> BTW. What does denote infinity in a Turkish C program?

Interpretation of a C program is locale-independent. But locales
affect strtod(). I haven't done any test yet. There are 4 possibilities
to write "inf", but I don't know which ones are recognized in practice
and whether there may be errors in the documentation or the the C
library.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)