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

Re: Fw: Useless sNaNs... or useful?



On Fri, Oct 15, 2010 at 4:15 PM, Dan Zuras Intervals
<intervals08@xxxxxxxxxxxxxx> wrote:
>> Date: Fri, 15 Oct 2010 16:00:46 -0400
>> Subject: Re: Fw: Useless sNaNs... or useful?
>> From: Lee Winter <lee.j.i.winter@xxxxxxxxx>
>> To: Dan Zuras Intervals <intervals08@xxxxxxxxxxxxxx>
>> Cc: Ian McIntosh <ianm@xxxxxxxxxx>, stds-1788@xxxxxxxxxxxxxxxxx
>>
>> On Fri, Oct 15, 2010 at 3:14 PM, Dan Zuras Intervals
>> <intervals08@xxxxxxxxxxxxxx> wrote:
>> >> Subject: Fw: Useless sNaNs...  or useful?
>> >> . . .
>> >>
>> >> One important use is to initialize all floating point variables to
>> >> signaling NaNs.  If they are inadvertently not properly initialized la=
>> >>
>> >> . . .
>> >>
>> >> - Ian McIntosh   IBM Canada Lab  Compiler Back End Supp=
>> >>
>> >
>> > I know of no companies doing this today.
>>
>> It is not up to companies.  It is up to software implementors.
>>
>> . . .
>>
>> >
>> > Please name them.
>>
>> Lee Winter
>
>        It doesn't matter.

Yes it does.

>
>        Just name them.

Their names are both legion and irrelevant.

>
>        If my tone sounds challenging, that is only
>        partially true.
>
>        What you & Ian probably don't know is that
>        I, along with Prof Kahan & Bob, advocated
>        for consistent behaviors for signalling NaNs
>        that would permit exactly this application.

Actually I was aware of that, but, not having been there, I probably
don't know all of the details.

>        As it happened there were sound technical
>        reasons for features that made it infeasible.
>        All of which were thought to be more important
>        than this application.  All of which I can
>        describe for you in detail but hesitate to do
>        so in this forum.

I am quite interested, but I don't think those details matter for the
purpose of this discussion.

>        So if there are people out there doing this,
>        I want to know who they are.  Others will
>        want to know as well.

I seem to have lost some context.  By "doing this" do you mean:
   -- initializing otherwise uninitialized FP with a sentinel value?
   -- initializing otherwise uninitialized FP with NaNs of some kind?
   -- initializing otherwise uninitialized FP with NaNs of the signaling kind?

If sentinel values then I see no direct relevance to P1788.

If NaNs of some kind then the usage is legion.

If SNaNs then the usage is limited in my experience because of the
limited infrastructure and thus awkwardness of handling immediate
exceptions.  In my software packages I support construction with both
quiet and signaling NaNs as a user option.  But my recommendation and
default is quiet NaNs.

Lee Winter
Nashua, New Hampshire
United States of America