Re: Motion 31: V04.2 Revision of proposed Level 1 text
Here are some small comments:
1) case(c,g,h)
The point function is defined as
(1) case(c,g,h) = if (c < 0) g else h
It's natural interval extension is
(2) case(C,G,H) = Empty, if (C isEmpty) or (G isEmpty) or (H isEmpty)
G, if (C.sup < 0) and not (H isEmpty)
H, if (C.inf >= 0) and not (G isEmpty)
hull(G U H), if (C.inf < 0) and (C.sup >= 0) and not (G isEmpty) and (not H isEmpty)
The document says that natural interval extension is
(3) case(C,G,H) = Empty, if (C is Empty)
G, if (C.sup < 0)
H, if (C.inf >= 0)
hull(G U H), if (C.inf < 0) and (C.sup >= 0)
This is not true. (3) is not natural interval extension, (3) is wider interval extension.
Nevertheless, I like more the definition (3).
If the implementation is forced to compute case according to the tightest definition (2),
it has to always compute both G and H subexpressions.
The definition (3) allows to skip computation of G and H in some cases.
My opinion is to keep definition (3) of case(C,G,H),
but call (3) "recommended interval extension" instead of "natural interval extension".
Perhaps, we should change classification of case(C,G,H) from "interval arithmetic operation"
to "interval non-arithmetic operation", but I'm not sure.
2) fma(x,y,z)
The operation fma is mentioned in definitions, but the document don't clarify the status of
interval version fma. Is it required, recommended or none ?
3) negate(x) = -x
The unary minus is an operator in most programming languages.
Shouldn't we require interval version of negate ?
4) isBoundedNonempty(x) = not (x isEmpty) and (x.inf > -oo) and (x.sup < +oo).
Section "Abbreviations" defines IR as a "the set of bounded, nonempty closed real intervals".
Perhaps, there should be a boolean function to test this.
Unfortunately, I failed to find a shorter name for it.
5) The section 5.6.5 says that "evaluation all these sums independently costs O(n^2)".
However, it is possible to compute all these sums in O(n*log(n)) using binary tree of partial sums.
Perhaps, we can say "evaluation all these sums without inner subtraction costs O(n*log(n)) .
Best Regards,
-Dima
----- Исходное сообщение -----
От: j.d.pryce@xxxxxxxxxxxx
Кому: stds-1788@xxxxxxxxxxxxxxxxx
Отправленные: Среда, 25 Январь 2012 г 15:02:03 GMT +03:00 Москва, Санкт-Петербург, Волгоград
Тема: Motion 31: V04.2 Revision of proposed Level 1 text
Baker and P1788
I send herewith a revised draft of the proposed Level 1 text, less decorations, that I originally circulated on 5 Dec 2011.
The main changes from the previous draft are listed in the front-matter on page 3.
Changes to existing text are minor.
Additions to the Required and Recommended operations are quite substantial:
- *Functions* I'd forgotten we'd decided on, such as comparisons and inner add/subtract.
- *Constants*: a new bit on the need for denotations of point and interval constants.
There are some new Definitions to support this.
Please read with care, and comment.
Baker, I feel this needs a new discussion period, but maybe shorter than the standard 3 weeks?
Regards
John Pryce