Re: Motion P1788/M0051:IntervalLiteralsText -- discussion period begins
Vincent,
> In Table 2.2, 4th example, "Inf" should be replaced by "inf" since
> lowercase is assumed.
It is assumed that lower and upper cases are equivalent.
So this example shows that a string with upper-case character is
also a valid interval.
> * I'm not fond of the ?? forms for unbounded intervals, though they
> can be concise. For such intervals, I'd rather use [r] (which is
> even more concise), and literals like [-inf,17] and [17,inf].
The unbounded uncertain form is possibly superfluous for manual input.
It is intended for formatted output.
Suppose that conversion specifier cs in "intervalToText(x,cs)" selects uncertain form.
It would be good if output strings for bounded and unbounded strings
are in similar style:
5.2?1u
5.2??u
instead of
5.2?1u
[5,2,inf].
> When "inf" is used on the left side, can the minus sign be implied
> since there is no ambiguity in this context ("inf" just meaning
> unbounded on this side)?
There is no ambiguity for parser, but in my opinion it might be conter-intuitive
because substring "inf" denotes +oo in other contexts.
> Or leave the field blank, e.g. [,17] and
> [17,] (then [,] would mean [entire])?
I like it more.
I could rework the grammar and the text like this
infSupIntvl "[" sp {numberLiteral}? sp "," sp {numberLiteral}? sp "]"
(b) Inf-sup form: A string [ l , u ] where l and u are optional number literals with l ≤ u, l < +oo and
u > -oo, see §10.2 and the note on difficulties of implementation §12.12.8. Its bare value is
the mathematical interval [l, u]. Any of l and u may be omitted, with implied values l=-oo and u=+oo respectively.
A string [ x ] with nonempty x is equivalent to [ x , x ].
What other group members think about this ?
The portable interval literal syntax is defined for the Set-Based flavour.
What do proponents of other flavours think about interval literals ?
Interval literals in different flavours are not obliged to have the same syntax,
but we can afford a small effort to make their styles similar (if this doesn't delay discussion).
-Dima
----- Исходное сообщение -----
От: vincent@xxxxxxxxxx
Кому: STDS-1788@xxxxxxxxxxxxxxxxx
Отправленные: Среда, 2 Октябрь 2013 г 5:32:04 GMT +04:00 Абу-Даби, Маскат
Тема: Re: Motion P1788/M0051:IntervalLiteralsText -- discussion period begins
A few comments concerning the portable literals (12.11.6):
In Table 2.2, 4th example, "Inf" should be replaced by "inf" since
lowercase is assumed.
Concerning the grammar (and Table 2.2):
* What about [r] in addition to [entire]? In practice, the uppercase
form [R] would normally be used, as R typically denote the set of
real numbers. But see another proposition below.
* I'm not fond of the ?? forms for unbounded intervals, though they
can be concise. For such intervals, I'd rather use [r] (which is
even more concise), and literals like [-inf,17] and [17,inf].
When "inf" is used on the left side, can the minus sign be implied
since there is no ambiguity in this context ("inf" just meaning
unbounded on this side)? Or leave the field blank, e.g. [,17] and
[17,] (then [,] would mean [entire])?
--
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)