From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org  Thu Aug 25 02:51:26 2016
Return-Path: <owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id C74263586F7; Thu, 25 Aug 2016 02:51:26 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
Received: from nag-j.co.jp (bvdeuz19.secure.ne.jp [180.222.80.19])
	by www.open-std.org (Postfix) with SMTP id D9C743582A1
	for <sc22wg5@open-std.org>; Thu, 25 Aug 2016 02:51:15 +0200 (CEST)
Received: (qmail 82365 invoked from network); 25 Aug 2016 09:51:13 +0900
Received: from unknown (HELO Maru10) (218.42.159.105)
  by 0 with SMTP; 25 Aug 2016 09:51:13 +0900
Message-ID: <2DE77B7A56D547D097864941DFF54059@Maru10>
From: "Cohen Malcolm" <malcolm@nag-j.co.jp>
To: <sc22wg5@open-std.org>
References: <20160824135715.DE9D535852E@www.open-std.org>
In-Reply-To: <20160824135715.DE9D535852E@www.open-std.org>
Subject: Re: [ukfortran] (SC22WG5.5784) (j3.2006) edits to clarify SQRTtreatment of negative zero, for comments
Date: Thu, 25 Aug 2016 09:51:16 +0900
MIME-Version: 1.0
Content-Type: text/plain;
	format=flowed;
	charset="utf-8";
	reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 16.4.3528.331
X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

>The real part of log of zero is well defined - it is minus infinity.

No, the log of real zero is not defined in maths, though it is in a 
recommended (not mandatory) function in 60559.

60559 does not however define the log of complex zero.  According to its 
usual rules, one might expect (-INF,NaN).

>Hence exp( log(x) ) is also well defined - it is zero.

Actually that would be (NaN,NaN).

>3 out of 3 compilers agree with me

And a fourth produces

(-Infinity,NaN)
(NaN,NaN)

Anyway, compilers do not implement maths, nor are they are reliable guide to 
the finer points of 60559.

Also, non-60559 machines exist and are still used, and their compilers 
cannot agree with you.

>Perhaps [we should add more features]

Perhaps not at this time.

Cheers,
-- 
........................Malcolm Cohen, Nihon NAG, Tokyo. 

