FloatingPointMath and transformations
Vincent Lefevre
vincent+gcc@vinc17.org
Mon Jun 2 22:16:00 GMT 2014
On 2014-06-02 17:34:31 +0200, Andreas Schwab wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
>
> > If C is a power of two, then 1.0 / C should IMHO never overflow,
>
> It does if C is subnormal.
More precisely, in case of double precision, if C = DBL_MIN / 2,
1.0 / C doesn't overflow, but if C = DBL_MIN / 4 (or is smaller),
1.0 / C overflows.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the Gcc
mailing list