From owner-sc22wg5@open-std.org  Thu Sep 23 10:32:29 2004
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-domo
Delivered-To: sc22wg5-domo@ghz.klid.dk
Received: by ghz.klid.dk (Postfix, from userid 521)
	id 87B3C37608; Thu, 23 Sep 2004 10:32:29 +0200 (CET DST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from dkuug.dk (ptah.dkuug.dk [195.215.30.66])
	by ghz.klid.dk (Postfix) with ESMTP id 2D51A37605
	for <sc22wg5@open-std.org>; Thu, 23 Sep 2004 10:32:27 +0200 (CET DST)
Received: from balin.rl.ac.uk (balin.rl.ac.uk [130.246.135.155])
	by dkuug.dk (8.12.10/8.9.2) with ESMTP id i8N8UDjH085335
	for <sc22wg5@dkuug.dk>; Thu, 23 Sep 2004 10:30:20 +0200 (CEST)
	(envelope-from j.k.reid@rl.ac.uk)
X-RAL-MFrom: <j.k.reid@rl.ac.uk>
X-RAL-Connect: <jkr.cse.rl.ac.uk [130.246.9.202]>
Received: from jkr.cse.rl.ac.uk (jkr.cse.rl.ac.uk [130.246.9.202])
	by balin.rl.ac.uk (8.12.8/8.12.8) with ESMTP id i8N8XHrF008667;
	Thu, 23 Sep 2004 09:33:19 +0100
Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1])
	by jkr.cse.rl.ac.uk (8.12.10/8.12.8) with ESMTP id i8N8Xa87003861;
	Thu, 23 Sep 2004 09:33:36 +0100
Message-ID: <41528A5F.9070109@rl.ac.uk>
Date: Thu, 23 Sep 2004 09:33:35 +0100
From: John Reid <j.k.reid@rl.ac.uk>
Reply-To: j.k.reid@rl.ac.uk
Organization: Rutherford Appleton Laboratory
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: WG5 <sc22wg5@dkuug.dk>
Subject: Forwarded message: RE: Why (standard conforming OR platform implementation)
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.39
X-Spam-Score: 0 () 
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Date: Wed, 22 Sep 2004 14:48:30 -0400
Message-ID: <6E93844AE9173945878F42EB2DBB51B34B0A1D@hdsmsx402.amr.corp.intel.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: Why (standard conforming OR platform implementation)
Thread-Index: AcSgzs48GIa8BHSkSDmP8Mz7RH0vIQAA6nKg
From: "Lionel, Steve" <steve.lionel@intel.com>
To: "Bernard PICHON" <Bernard.Pichon@obs-nice.fr>, <sc22wg5@dkuug.dk>
Cc: "NOULLEZ, Alain" <anz@obs-nice.fr>
X-OriginalArrivalTime: 22 Sep 2004 18:48:31.0454 (UTC) FILETIME=[C195AFE0:01C4A0D4]
X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang)
X-Spam-Score: 0 ()

The problem you're having is due to the use of the Intel X87 floating
point registers where calculations involving single precision are
actually computed in double precision. For performance, intermediate
computations are kept in the registers as long as possible, which can
lead to slightly different (though better!) results compared to
computations that are rounded to single precision.

CVF has a /fltconsistency switch which reduces the effects of this, but
it does not help with your program.  Intel Fortran offers /Op which does
help and gives the result you're looking for, though at a penalty in
performance (as /fltconsistency does with CVF).

The Alpha system is more "traditional" in that computations are always
carried out in the declared precision.

The Fortran standard is rather vague when it comes to defining the
numerical results of computation.  It does not even state that 2+2=3D4!
The CVF behavior is standard-conforming.

Steve Lionel
Software Products Development
Intel Corporation
Nashua, NH=20

-----Original Message-----
From: Bernard PICHON [mailto:Bernard.Pichon@obs-nice.fr]=20
Sent: Wednesday, September 22, 2004 2:11 PM
To: sc22wg5@dkuug.dk
Cc: NOULLEZ, Alain; Lionel, Steve
Subject: Why (standard conforming OR platform implementation)

Dear Fortran !
(expands in : Dear WG5 members, dear Lionel)

This program seems to me standard conforming.
But I don't understand its (different) behavior
   between Alpha platforms (with True64) for
       which the result is OK (for me)
   and Windows/Intel platforms (with CVF V6.6B)
       with a (very) strange result (in my opinion).
