[Cfp-interest] Not trigger sNaN

Eric Schwarz eschwarz at us.ibm.com
Mon Sep 17 05:25:34 PDT 2018


Mike,

I don't remember defining the sameQuantum operation.
I think it was to compare exponents or as a compare units instruction
and used it to determine whether the result had the expected quantum.
This was before IBM architecture came up with a flag for quantum exceptions
and
before we figured out we could test the most significant digit for
non-zero.
So if we are just testing a result for correct units, we don't want to
trigger exceptions,
though we may want to force it into the correct units.
An example is we have a table of data to output that should have the units
of 10^-2, we
test each data item before converting the significand to BCD and outputting
the
data.  Probably figured SNaNs would have already been seen by this point
and
not a point in the program where we want to take any exceptions.

Regards,
Eric


eschwarz at us.ibm.com

"Mike Cowlishaw" <mfc at speleotrove.com> wrote on 09/17/2018 06:47:19 AM:

> From: "Mike Cowlishaw" <mfc at speleotrove.com>
> To: "'Jim Thomas'" <jaswthomas at sbcglobal.net>
> Cc: <cfp-interest at oakapple.net>, "'Eric Schwarz'" <eschwarz at us.ibm.com>
> Date: 09/17/2018 06:47 AM
> Subject: RE: [Cfp-interest] Not trigger sNaN
>
> I believe it was, but I do not recall the reasoning.  Eric Schwartz might
> remember; cc:ing him ...
>
> Mike
>
> > -----Original Message-----
> > From: Jim Thomas [mailto:jaswthomas at sbcglobal.net]
> > Sent: 16 September 2018 16:40
> > To: Mike Cowlishaw
> > Cc: cfp-interest at oakapple.net
> > Subject: Re: [Cfp-interest] Not trigger sNaN
> >
> > Mike,
> >
> > 754 seems to say sameQuantum(sNaN, qNaN) is true with no
> > exception. Just double checking that it is as intended.
> >
> > Jim
> >
> > > On Aug 28, 2018, at 7:16 PM, Fred J. Tydeman
> > <tydeman at tybor.com> wrote:
> > >
> > > On Tue, 28 Aug 2018 13:13:45 -0500 Rajan Bhakta wrote:
> > >>
> > >>         *AI*: Fred: See which other functions have the need to not
> > >> trigger signaling nans but are functions (need to be macros).
> > >
> > > 754 Operations that shall not trigger an sNaN (signal invalid):
> > >
> > > "*" are functions in C
> > >
> > >
> > ...
> > > sameQuantum() = samequantum()*
> > >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20180917/b35a1d71/attachment.html 


More information about the Cfp-interest mailing list