From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64935 invoked by alias); 10 Nov 2015 15:16:38 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 64887 invoked by uid 89); 10 Nov 2015 15:16:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 10 Nov 2015 15:16:30 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id tAAFGRHs029345 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Nov 2015 07:16:27 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id tAAFGQS9029344; Tue, 10 Nov 2015 07:16:26 -0800 (PST) (envelope-from sgk) Date: Tue, 10 Nov 2015 15:16:00 -0000 From: Steve Kargl To: Anton Shterenlikht Cc: fortran@gcc.gnu.org Subject: Re: how *not* to use denormalised numbers? Message-ID: <20151110151626.GA29286@troutmask.apl.washington.edu> References: <201511101441.tAAEflIw050375@mech-as222.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201511101441.tAAEflIw050375@mech-as222.men.bris.ac.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00047.txt.bz2 On Tue, Nov 10, 2015 at 06:41:48AM -0800, Anton Shterenlikht wrote: > Are denormalised numbers supported by default by gfortran6 (or 5)? > My understanding was that the use has to request > the use of denormalised numbers explicitly, via USE statement, > e.g. MFE, p.225. > > I have a program that does *not* USE ieee_features, > compiled by gfortran6 with these flags: > > -fopenmp -fbacktrace -Wall > > It returns (FreeBSD amd64): > > Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL > > suggesting denormalised numbers were used. > > I don't want to use denormalised numbers. > A flash to zero is acceptable, provided > this will trigger underflow exception. > What gfortran option(s) will achieve this? > Although I haven't checked, you'll probably need to use the IEEE arithmetic modules to control subnormal numbers or use C interop and fenv features to manipulate the FPU. -- Steve