This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: FloatingPointMath and transformations
- From: Vincent Lefevre <vincent+gcc at vinc17 dot org>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 3 Jun 2014 00:16:04 +0200
- Subject: Re: FloatingPointMath and transformations
- Authentication-results: sourceware.org; auth=none
- References: <20140602140635 dot GA5214 at ypig dot lip dot ens-lyon dot fr> <0B0543CB-A674-423D-AA5B-4252D75C3C11 at mac dot com> <20140602143932 dot GM10386 at tucnak dot redhat dot com> <mvmppirfhq0 dot fsf at hawking dot suse dot de>
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)