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

Re: Motion 31: V04.2: case, reverse case, reverse fma



Dmitry

On 10 Feb 2012, at 05:58, Dmitry Nadezhin wrote:
> So we have the natural interval extension "case(c,g,h)"
> and the "simple" interval extension "Case(c,g,h)".
> What will be the Level2 conformance requirements for this function ?
> Will implementation that returns "hull(case(c,g,h))" conform ?
> Or shall it return "hull(Case(c,g,h))" ?
> Or implementation may choose any of the above ?

My inclination is to say "it shall return hull(Case(c,g,h))", which is how I'll write the Level 2 text unless someone objects.

> The other question is about reverse-mode elementary functions.
> The text says about reverse-mode unary and binary functions.
> Now we have two required ternary functions: "fma(x,y,z)" and "case(c,g,h)".
> Will standard mention reverse interval extensions of them ?
> If yes, will the "case" have the natural reverse interval extension
> or some "simple" reverse interval extension ?

I propose to omit those. For fma, my (top of the head) belief is that constraint propagation algorithms rarely need to worry about saving one rounding, which is what it seems a reverse fma would give compared with splitting it into a reverse * and reverse +. For case (or Case) I haven't studied its reverse form at all, and would be glad if someone does.

I may be quite wrong.

John

> ----- Исходное сообщение -----
> От: j.d.pryce@xxxxxxxxxxxx
> Кому: stds-1788@xxxxxxxxxxxxxxxxx
> Отправленные: Среда, 8 Февраль 2012 г 15:39:07 GMT +03:00 Москва, Санкт-Петербург, Волгоград
> Тема: Re: Motion 31: V04.2 Revision of proposed Level 1 text
> 
> Dmitry, P1788
> 
> Thanks for these comments, sorry for the delay responding.
> 
> On 25 Jan 2012, at 19:07, Dmitry Nadezhin wrote:
>> 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.
> Yes, I see you are correct. Careless of me and others not to notice this.
> 
>> 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".
> My first impression is to like this idea. But not "recommended", which has its own meaning in clause 5. Try "simple" or "preferred" or ...?