Re: Motion 46: finalise interval literals
Vincent
I see there are still some things to change or clarify before we vote. I'm thinking of ideas on identifying a "basic" standard within the "full" one, though this is a job for the "chief simplifier" who I hope will be announced shortly.
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.)
> 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].
> Moreover the grammar doesn't match (1). According to (1), "011" is
> 9 in C, but according to the grammar, it is 11, in the context of
> ratNumLit.
For now, I pass on this annoying C syntax feature.
> Also, what about locales? Is this for the "default" locale only or
> for all locales? In the latter case, for Turkish locales, "Inf" would
> not be accepted as an infinity.
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"? My web search didn't find such a thing.
BTW. What does denote infinity in a Turkish C program?
John Pryce