From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id F372A3019A for ; Tue, 19 Sep 2000 19:02:35 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.8.7/8.8.7) id TAA09624 for axp-list@listman.redhat.com; Tue, 19 Sep 2000 19:02:35 -0400 Received: from newton.math.purdue.edu (root@newton.math.purdue.edu [128.210.3.6]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id TAA09620 for ; Tue, 19 Sep 2000 19:02:35 -0400 Received: from polya.math.purdue.edu (lucier@polya.math.purdue.edu [128.210.3.194]) by newton.math.purdue.edu (8.10.1/8.10.1/PURDUE_MATH-4.0) with ESMTP id e8JN2Xi22555 for ; Tue, 19 Sep 2000 18:02:33 -0500 (EST) Received: (from lucier@localhost) by polya.math.purdue.edu (8.9.3/8.9.3/PURDUE_MATH-3.2) id SAA12426 for axp-list@redhat.com; Tue, 19 Sep 2000 18:02:32 -0500 (EST) From: Brad Lucier Message-Id: <200009192302.SAA12426@polya.math.purdue.edu> Subject: Re: Alpha/Linux FP denormal processing To: axp-list@redhat.com Date: Tue, 19 Sep 2000 18:02:32 -0500 (EST) In-Reply-To: <200009192242.QAA29230@ellpspace.math.ualberta.ca> from "Michal Jaegermann" at Sep 19, 2000 04:42:43 PM X-Mailer: ELM [version 2.5 PL0] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors > > > > > -O2 converts the divide by 2 to a multiplication by 0.5, and so > > avoids the error. > > Yes, indeed. Even '-O' is good enough and '-O0' will expose the problem. > > OTOH compiling anything with gcc and without optimization is a pure > masochism and only a check that a code generator indeed does exist; > so I did not even considered that somebody may want to use that > to compile something for running. > > Michal Huh? This fails with -O2, too: popov-325% cat denormtest.c #include #include int main(int argc, char **argv) { double x = 1.0; double y; y = atof(argv[1]); for (x = 1.0; x != 0.0; x /= y) printf("%e\n", x); return 0; } popov-326% gcc -O2 -Wall -o denormtest denormtest.c popov-327% ./denormtest 2.0 | tail 1.139238e-305 5.696189e-306 2.848095e-306 1.424047e-306 7.120236e-307 3.560118e-307 1.780059e-307 8.900295e-308 4.450148e-308 2.225074e-308 Brad Lucier