[Cfp-interest 1802] Re: Exact subnormal results

David Chen dave.h.chen at gmail.com
Tue Oct 20 17:39:35 PDT 2020


Here is the exact text from IEEE 754-2019.

7.5 Underflow 7.5.0
The underflow exception shall be signaled when a tiny non-zero result is
detected. For binary formats, this

shall be either:

   1.

   a)  after rounding—when a non-zero result computed as though the
   exponent range were unbounded would lie strictly between ± b emin, or
   2.

   b)  before rounding—when a non-zero result computed as though both the
   exponent range and the precision were unbounded would lie strictly between
   ± b emin.

The implementer shall choose how tininess is detected, but shall detect
tininess in the same way for all operations in radix two, including
conversion operations under a binary rounding attribute.

For decimal formats, tininess is detected before rounding—when a non-zero
result computed as though both the exponent range and the precision were
unbounded would lie strictly between ± b emin.

The default exception handling for underflow shall always deliver a rounded
result. The method for detecting tininess does not affect the rounded
result delivered, which might be zero, subnormal, or ± b emin.

In addition, under default exception handling for underflow, if the rounded
result is inexact—that is, it differs from what would have been computed
were both exponent range and precision unbounded—the underflow flag shall
be raised and the inexact (see 7.6) exception shall be signaled. If the
rounded result is exact, no flag is raised and no inexact exception is
signaled. This is the only case in this standard of an exception signal
receiving default handling that does not raise the corresponding flag. Such
an underflow signal has no observable effect under default handling.


Best,

David.

On Tue, Oct 20, 2020 at 5:03 PM Damian McGuckin <damianm at esi.com.au> wrote:

>
> Hi Jim,
>
> On Tue, 20 Oct 2020, Jim Thomas wrote:
>
> > The definitions are in 7.12.1 in
> > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2573.pdf
> >
> > I assume you?re asking about the C standard.
>
> Because if you look there, the word underflow is used long before it
> appears in any definition.
>
> On page 450,
>
>         The "underflow" floating-point exception is raised whenever a
>         result is tiny (essentially subnormal or zero) and suffers loss of
>         accuracy.
>
> Given:
>
>         0.25 * 2**emin
>
> does this overflow. Because it is exact.  But is Page 450 the strict
> definition. Because, that answers Fred's question (and agrees with Fred).
>
> I actually meant in the latest IEEE 754 (or IEC).
>
> Sorry, if I seem rushed. I am off to two meetings and did not have time to
> look it up as thoroughly as I would have liked. But I wanted to get the
> email out before your part of the world went to bed.
>
> Regards - Damian
>
> Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
> Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted
> here
> Views & opinions here are mine and not those of any past or present
> employer
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest
>


-- 
Best Regards,
David.

****Email Disclaimer*: This email is intended only for addressee(s), may be
confidential or proprietary, and may constitute inside information that is
protected from disclosure under law. If you are not the intended recipient,
you are hereby notified not to read, disclose, distribute or otherwise use
this email.  If you are not the intended recipient, please inform the
sender by reply email and destroy all copies of the original message.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20201020/12992221/attachment-0001.htm>


More information about the Cfp-interest mailing list